Information Technology Reference
In-Depth Information
routing table. Usually, you use these for access to the Internet. Because external networks are
not usually advertised into the user's internetwork, you use the default route to route those
Internet bound packets to a default router, firewall, or gateway.
Routing protocols handle default route configuration differently. The default route is usually
configured by using a static route command, such as the following:
ip route 0.0.0.0 0.0.0.0 x.x.x.x
x.x.x.x is the IP address of the next hop.
Or the destination can be an output interface, as follows:
ip route 0.0.0.0 0.0.0.0 serial 0
Another way to configure the default route is to use the ip default-network command. You use
this command when IP routing is enabled. The configured network becomes the gateway of last
resort if it is the routing table.
The router in the following example does not have the default network configured.
Listing the routes in Example 2-4 shows that the gateway of last resort is not set.
Example 2-4
Gateway of Last Resort Is Not Set
router4#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, * - candidate default
U - per-user static route, o - ODR
Gateway of last resort is not set
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
D 10.1.3.0/24 [90/2195456] via 10.100.1.1, 00:02:45, Serial1
S 10.0.0.0/8 [1/0] via 10.1.3.0
C 10.1.4.0/24 is directly connected, Ethernet0
C 10.100.1.0/24 is directly connected, Serial1
D 192.168.1.0/24 [90/2297856] via 10.100.1.1, 00:02:45, Serial1
router4#
Now, configure the default gateway(see Example 2-5).
Configuration of the IP Default Network
Example 2-5
router4#config terminal
Enter configuration commands, one per line. End with CNTL/Z.
router4(config)#ip default-network 192.168.1.0
router4(config)#^Z
router4#
Search WWH ::




Custom Search