CCNA 3.1.b: Forwarding decision based on route lookup


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 110) 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
 is variably subnetted, 3 subnets, 2 masks
          S [1/0] via
          S [1/0] is directly connected G0/1
          S [1/0] via
      #show ip route cache
          Prefix/Length        Age        Interface    Next-hop
        00:02:35    G0/1
      00:23:31    G0/1
    • 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.



  1. Vanessa Mabunda
    Vanessa Mabunda
    September 22, 2019 at 1:59 pm


    Isn’t OSPF AD = 110?

Leave a Reply
Built by TrailSix