Static Routes
1) Stub networks: a network with a single link into the rest of the network,
2) For upstream traffic, leaving the stub network, a special case of static route, The default
route is typically used to forward all traffic to all destinations outside of the stub network.
3) Every time we configure static routing, we should think about the bidirectional nature of
traffic, and so as we send traffic outbound, we will receive return traffic coming in.
4) In some instances, you could even see hybrids of static and dynamic routing.
For outbound traffic, you would configure a default/static route at router B
For inbound traffic, you could configure B with the dynamic routing protocol
Determine exit-interface type:
A-point-to-point Interface scenario(pppoe , 3glte0/1, HDLC, PPP, or PTP Frame Relay sub-interface)
- Using static route with Exit interface OR next-hop IP address dose not make difference(usually exit-interface)
- Router only expects only one host/router next to it ,(The interface has one next-hop device)
- Router will always forward all packets to next router.
- Router uses L2 address of “next-hop IP address” of interface for routing packet to every destination address
- When using exit-interface we can save the trouble of having to find out the next-hop IP address
B-Multipoint Interface scenario(Ethernet/Multipoint interface):
The interface have multiple devices connected to it
B1-Static route with IP address as next-hop:
router do ARP request (L3 to L2 resolution) to get next-hop router MAC and use it as Dst MAC and use Exit-interface MAC as Src
MAC
B2-Static route with Exit-interface as next-hop:
router needs L3 to L2 resolution for each destination prefixes
Router will assume the destination host is directly connected/attached to exit-interface,
and do ARP request for destination IP directly(instead of ARP for next-hop router IP as in #B1)
The ARP request will fail because no one will reply to the ARP request (the actual destination host is in a distant network)
#-When use Exit-interface OR IP address as next-hop:
1-Exit- interface as Next-hop:(…use only IP address of next router as next-hop…)
- Router will have many entry in its ARP table (IP-MAC) of each remote addresses
- Router assume destination address is directly connected to that interface , and try to find the L2 address of destination IP (ARP
Request)
- There is only one possible next-hop device
- The outbound interface option is typically used in floating static routes and backups
2-IP address as Next-hop :
- Router will have only one entry in its ARP table (IP-MAC) of next-hop
- Router needs L2 Address of Next-hop IP(IP (ARP Request)
- On Ethernet (or other multi access interfaces)
- It is much better to specify the next-hop IP Address.
- The IP address is typically used in a single point-to-point link scenario.
Static Route Configuration inbound traffic only
Router(config)# ip route [network/host] [mask] [address/interface] [distance] [permanent]
if you want traffic to leave the stub network, you would have to define static routing or dynamic
routing also at router B.
Static Routes Configuration Lab
0-open the file lab_static.pkt
Configure all necessary router to connect network of
1-Show routing table of Host1, Host3 ,Router1,2,3
Host1 to network of Host3 ? 2- ping Host1 <-->Host3
3- in the Path (Router1->Router2->Router3 ) run the commands:
Router1(config)# ip route [Link] [Link] [Link]
Router2(config)# ip route [Link] [Link] [Link]
4-Show route of Router1,2,3 , ping Host1 <-->Host3
5-in path (Router3->Router2->Router1) run the commands:
Router3(config)# ip route [Link] [Link] [Link]
Router2(config)# ip route [Link] [Link] [Link]
6-Show route of Router1,2,3
7- ping Host1 <-->Host3
Default Route (Gateway of last resort)
1) Default routing can be considered a special type of static routing.
2) Default routes are useful when:
dealing with a network with a single exit point.
a bulk of destination networks have to be routed to a single next-hop device.
to send packets destined to any unknown destination to a single next hop address.
3) Three indicators of default routes :all zeros destination, the asterisk (*), the S in the first column.
4) When adding a default route, you should ensure that the next-hop device can route the
packet further, or else the next hop device will drop the packet.
5) The static route at router B points to all unknown destinations. This is designated by all
zeros in the destination and mask. (example to internet router)
Default Routes Configuration Lab
0-open the file lab_static.pkt
1-Show route of Host1, Host3 ,Router1,2,3
2- ping Host1 from Host3 , 2- ping Host3 from Host1
3- in the Path (Router1->Router2->Router3 ) run the commands:
Router1(config)# ip route [Link] [Link] [Link]
Router2(config)# ip route [Link] [Link] [Link]
4-Show route of Router1,2,3
5-in path (Router3->Router2->Router1) run the commands:
Router3(config)# ip route [Link] [Link] [Link]
Router2(config)# ip route [Link] [Link] [Link]
6-Show route of Router1,2,3
7- ping Host1 from Host3 , 2- ping Host3 from Host1