CCNA, CCNA Exam, CCNA help, Cisco Certified Network Associate, CCNA study, CCNA prep

CCNA 3.1.b: Forwarding decision based on route lookup

Overview:

Routers have many different routes in their tables, but need to have a fast way (forwarding decision) to find the best path to a destination network.

 

Study Notes:

  • A prefix is a network address and a route mask
  • Typically, the forwarding decision in a router is based on three processes - Routing protocols, Routing table and Forwarding Decision
    • Routing protocols
      • The routing protocol uses its algorithm (its metric) to figure out the best path to a network
      • Routes with different prefix lengths get entered into the routing table because they are viewed as being different routes
      • Routes with same prefix lengths use the administrative distance as the tie-breaker for the route to enter into the routing table.  i.e. Internal EIGRP (AD 90) will win out over OSPF (AD 120) if both protocols are have a route to the same destination network.
    • Routing table
      • Route with longest prefix length is used for the routing decision
      #show ip route
          172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks
          S    172.16.0.0/24 [1/0] via 10.0.0.1
          S    172.16.2.0/24 [1/0] is directly connected G0/1
          S    172.16.0.128/25 [1/0] via 10.0.0.1
      #show ip route cache
          Prefix/Length        Age        Interface    Next-hop
          172.16.0.0/25        00:02:35    G0/1        10.0.0.2
          172.16.0.128/25      00:23:31    G0/1        10.0.0.2
    • Forwarding decision (switches packets)
      • Once the longest prefix has been matched the router sends the packet to the exit interface
      • The packet moves down the TCP/IP stack from layer 3 to layer 2 and gets encapsulated
      • Depending on which type of switching is used determines how fast the frame gets put on the wire
        • Process switching - waits for the CPU to process it.
        • Fast switching - first packet is process switched, others use cache
        • Cisco Express Forwarding - a router might have tons of routes, but usually only a few neighbors.  It makes sense then to preconstruct the L2 frame headers and egress interfaces and save them in the adjacency table.  This trades memory for speed.

 

Links:

https://www.cisco.com/c/en/us/support/docs/ip/enhanced-interior-gateway-routing-protocol-eigrp/8651-21.html#forwarding


Leave a Reply

s2Member®