Static Routing Flashcards
Connected Networks
A router natively provides connectivity for networks between its interfaces.
Assigning an IP address to an interface in the up state will inject the associated network into the router’s routing table (Routing Information Base [RIB]). The locally attached network is referred to as a connected network. Connected networks or routes have an administrative distance (AD) of zero. It is not possible for any other routing protocol to preempt a connected route in the RIB.
Routes with the L beside them to indicate that they are local routes. Local routes are explicit /32 (IPv4) and /128 (IPv6) routes referencing the IP addresses configured for that interface. Local routes are necessary for programming the Cisco Express Forwarding (CEF) as receive entries.
Secondary Connected Networks
Secondary IP addresses on an interface operate identically to the primary IP address in programming the RIB. Secondary connected networks are the networks associated with the secondary IP addresses.
Static Routing
Static routes provide precise control over routing but may be an administrative burden as the number of routers and network segments grow. Using static routing requires zero network bandwidth because implementing manual route entries does not require communicating with other routers.
Static routes are classified as either:
- Directly Attached Static Route
- Recursive Static Route
- Fully Specified Static Route
Point-to-Point Interfaces
Point-to-point (P2P) interfaces do not have to worry about maintaining an adjacency table and do not use Address Resolution Protocol (ARP), so static routes can directly reference the outbound interface of the router. A static route that uses only the outbound next-hop interface is known as a directly attached static route and requires that the outbound interface be in an up state for the route to install into the RIB.
router static
address-family ipv4 unicast
10.3.3.0/24 serial0/1/0/0
Broadcast Interfaces
IPv4 Ethernet interfaces use ARP to determine the forwarding address on the shared medium, so static routes using these interface types need to specify an IP address for the next hop. Static routes of this type are known as recursive static routes and require the route’s next-hop address to exist in the routing table to install the static route into the RIB. The static route will forward packets toward the next-hop IP address. Recursive static routes will work on P2P interfaces, too.
XR1
router static
address-family ipv4 unicast
10.3.3.0/24 10.13.1.3
Default Route
A default route is the route of last resort. A router uses a default route to forward packets when a more specific route entry does not exist in the route table. A default route’s destination network will be 0.0.0.0 with a subnet mask of 0.0.0.0 or a prefix length of /0.
Default routes are common method for providing basic connectivity when a router has only one exit path (normally a WAN circuit). Instead of programming multiple static routes that use the same outbound interface, a default route can replace the need to configure multiple static routes to the same destination if there is only one exit point. A default route reduces the configuration and memory consumed by the routing table.
A default route can provide backup connectivity because more specific routes would be selected first by the router.
Floating Static Routing
A floating static route is a common technique for providing a backup connectivity for prefixes learned via dynamic routing protocols. A floating static route is configured with an AD higher than the primary route. Because the AD is higher than the primary route, it will be installed only in the RIB when the primary route is withdrawn.
Recursive Lookup
The forwarding engine on Cisco devices needs to know which interface an outbound packet should use. A recursive lookup refers to the process in which additional checks on the router are required to identify the outbound interface for a route in the routing table. Directly attached static routes do not need to perform a recursive lookup because the outbound interface is already specified. A recursive static route will use a different method for identifying the outbound interface.
How to find the outbound interface for a static route?
The router will need to identify the physical interface connected to the next-hop IP address. The recursive lookup is the process of identifying the outbound interface using the next-hop IP address and the adjacency table.
The 10.11.11.0 and 10.33.33.0 network entries include the outbound interface, and a recursive lookup is not required.
XR1 uses a recursive static route to the 10.3.3.0/24 using the next-hop IP address 10.13.1.3 and use a second directly attached static route to the 10.33.33.0/24 using the Serial 0/1/0/0 interface. R3 uses a recursive static route to the 10.1.1.0/24 network using the next-hop IP address 10.13.1.2 and configure a second directly attached static route to the 10.11.11.0/24 network using the Serial 1/0 interface.
The FIB
The Forwarding Information Base (FIB) will contain the outbound interface used for a route.
Multihop Routing
Multihop routing involves network paths that must cross two or more routers to reach the destination. Static routing does not scale very well with multihop routing because all routers along the path need to be aware of the source and destination networks to ensure full IP reachability. Failure to do so will result in packet drops.
The network 10.34.1.0/24 is two hops away from XR1, and 10.12.1.0/24 is two hops away from R4. Providing bidirectional connectivity between XR1 and R4 will require installing multiple routes. XR1 will need a static route to reach the 10.34.1.0/24 network and R4 will need a static route to reach the 10.12.1.0/24 network. Both routers will create a static route to the 10.23.1.0/24 network to allow full connectivity between the four routers in the topology.
Single Recursive Lookup
The simplest method for multihop static routes is to use the same next-hop address for both network prefixes. When a packet is forwarded on XR1 or R4, the router identifies the next-hop IP address in the routing table; the router performs a single recursive lookup for the outbound interface.
XR1
router static
address-family ipv4 unicast
10.23.1.0/24 10.12.1.2
10.34.1.0/24 10.12.1.2
Using single recursive static routes removes the burden of having to know the topology or any upcoming changes in the topology. The downfall to this is that when a new link is added all the static routes need to be changed.
Multiple Recursive Lookups
Another method for multihop static routes allows for using a next-hop IP address that is contained within another entry in the routing table. The router will perform multiple recursive lookups to identify the outbound interface.
XR1
router static
address-family ipv4 unicast
10.23.1.0/24 10.12.1.2
10.34.1.0/24 10.23.1.3
When XR1 sends a packet to R4, it locates the next-hop IP address of 10.23.1.3. XR1 will not see 10.23.1.3 in the adjacency table but will then locate the route to the 10.23.1.0/24 network. The 10.23.1.0/24 network will use the next-hop IP address of 10.12.1.2 that is listed in the adjacency table. XR1 has performed two recursive lookups to locate the outbound interface for a route.
Note
Cisco does not recommend using directly attached default routes on interfaces that use ARP because it can impact the performance or stability on the system.