Default Routes 331
Using Static Routes to 0.0.0.0, with redistribute static
Routers consider a route to 0.0.0.0/0 as a default route. RIP and EIGRP support redistribution of
static routes, including such a default static route. The rules and conditions for redistributing static
defaults into RIP and EIGRP are as follows:
■ The static ip route 0.0.0.0 0.0.0.0 and redistribute static commands need to be configured
on the same local router.
■ The metric must be defaulted or set, using the same methods covered earlier in this chapter.
■ The redistribute command can refer to a route map, which examines all static routes (not just
the default).
■ EIGRP treats the default route as an external route by default, with default AD 170.
■ This method is not supported by OSPF.
Example 10-8 shows how R1 can inject defaults via RIP to R3 and via EIGRP to R4. The EIGRP
configuration refers to a route map that examines all static routes, matching only static default
routes. If other static routes existed, EIGRP would not advertise those routes based on the
route map.
Example 10-8 Static Default Route with Route Redistribution
! R1 Config—note that ip classless is configured, but it does not impact the
! advertisement of the static route at all.
router eigrp 1
redistribute static route-map just-default
network 10.0.0.0
network 14.0.0.0
default-metric 1544 10 1 1 1
!
router rip
version 2
redistribute static
network 13.0.0.0
default-metric 1
!
ip classless
! The static route is configured next, followed by the prefix list that matches
! the default route, and the route map that refers to the prefix list.
ip route 0.0.0.0 0.0.0.0 10.1.1.102
!
ip prefix-list zero-prefix seq 5 permit 0.0.0.0/0
!
route-map just-default permit 10
match ip address prefix-list zero-prefix
!
continues
route-map just-default deny 20
! Next, R3, the RIP router, lists R1 (13.1.1.1) as its gateway of last resort,
! based on the RIP route to 0.0.0.0/0, next hop 13.1.1.1.
R3# sh ip route
! Lines omitted for brevity
Gateway of last resort is 13.1.1.1 to network 0.0.0.0
13.0.0.0/24 is subnetted, 2 subnets
C 13.1.1.0 is directly connected, Serial0/0/0.1
C 13.1.2.0 is directly connected, FastEthernet0/0
R* 0.0.0.0/0 [120/1] via 13.1.1.1, 00:00:12, Serial0/0/0.1
! Next, R4, the EIGRP router, lists R1 (14.1.1.1) as its gateway of last resort,
! based on the EIGRP route to 0.0.0.0/0, next hop 14.1.1.1. Note that the default
! points to 0.0.0.0/0, AD 170, as it is an external route, due to the EX listed
! in the output of the show ip route command.
R4# sh ip route
! lines omitted for brevity
Gateway of last resort is 14.1.1.1 to network 0.0.0.0
D 10.0.0.0/8 [90/2172416] via 14.1.1.1, 00:01:30, Serial0/0/0.1
14.0.0.0/24 is subnetted, 2 subnets
C 14.1.2.0 is directly connected, FastEthernet0/0
C 14.1.1.0 is directly connected, Serial0/0/0.1
D*EX 0.0.0.0/0 [170/2172416] via 14.1.1.1, 00:01:30, Serial0/0/0.1