As you learned earlier, the default route is known as the gateway of last resort. This route is normally the address of an organization's core network router or the address out of the network to an Internet router. If a router receives a packet and does not know the route to the packet's destination network, the router has two choices: The router can forward the packet out the interface designated by the default route, or it can drop the packet and notify the source device that the packet could not be delivered. To see if a default route has been configured, use the show ip route command as shown below. RTR# show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static route Gateway of last resort is 207.212.78.105 to network 0.0.0.0 207.212.78.0/29 is subnetted, 1 subnets C 207.212.78.104 is directly connected, Ethernet0 10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks R 10.2.0.0/16 [120/2] via 10.1.1.1, 00:00:10, FastEthernet0 R 10.3.0.0/16 [120/2] via 10.1.1.1, 00:00:10, FastEthernet0 C 10.1.0.0/16 is directly connected, FastEthernet0 R 10.4.0.0/16 [120/3] via 10.1.1.1, 00:00:10, FastEthernet0 S 10.1.2.25/32 is directly connected, FastEthernet0 C 192.168.1.0/24 is directly connected, Loopback0 S* 0.0.0.0/0 [1/0] via 207.212.78.105 RTR# Notice the two lines in bold in the above output which show the gateway of last resort. The route shows up as both a static route and as the gateway of last resort. Now let's look at the same router with the gateway of last resort not configured as shown in the following output. RTR# show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static route Gateway of last resort is not set 207.212.78.0/29 is subnetted, 1 subnets C 207.212.78.104 is directly connected, Ethernet0 10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks R 10.2.0.0/16 [120/2] via 10.1.1.1, 00:00:10, FastEthernet0 R 10.3.0.0/16 [120/2] via 10.1.1.1, 00:00:10, FastEthernet0 C 10.1.0.0/16 is directly connected, FastEthernet0 R 10.4.0.0/16 [120/3] via 10.1.1.1, 00:00:10, FastEthernet0 S 10.1.2.25/32 is directly connected, FastEthernet0 C 192.168.1.0/24 is directly connected, Loopback0 RTR# If you need to configure the Gateway of Last Resort, use the ip route command as shown below. In this example, the IP address 207.212.78.254 is the router belonging to the ISP. The 0.0.0.0 0.0.0.0 IP address indicates to the router that if the routing table doesn't list any IP address with any subnet mask, the router is to forward the packet to that IP address. That action signals the end of the router's responsibility for routing the packet. RTR# ip route 0.0.0.0 0.0.0.0 207.212.78.254 RTR# |