Monday, April 20, 2009
RIP Default Routes: default-information originate vs. redistribute static
I told my students that the default-information originate command was similiar to the redistribute static command. A student asked me how exactly do they differ. To answer that question I have set up a scenario using three routers, as depicted above, to give studens a visual of how they both work and differ.
I set up Router3 as the ISP and configured two static routes pointing to 10.1.1.0/30 and 192.168.1.0/24. I set up Router2 as the edge router of my network. In Router2 I had two static routers pointing to virtual networks (network 1.0.0.0 and network 2.0.0.0) and a default static route (0.0.0.0).
First I configured Router2 to propagate the default route to Router1 using the default-information originate command. As a result, the default static route was propagated correctly to Router1 as shown below (see Router2’s configuration file, routing table and Rotuer1’s routing table). Notice that the default static was the only static route that RIP advertised to Router1. Note, I have removed some unrelated lines of commands from the configuration files, to simplify.
R2#show run
service password-encryption
hostname R2
enable secret 5 $1$uEh1$AsHH04FVVwwziW4XdTJHn0
interface Loopback1
ip address 1.1.1.1 255.255.255.255
interface Loopback2
ip address 2.2.2.2 255.255.255.255
interface Serial0/0
ip address 10.1.1.2 255.255.255.252
interface Serial0/1
ip address 172.16.2.2 255.255.255.252
router rip
network 10.0.0.0
default-information originate
ip classless
ip route 0.0.0.0 0.0.0.0 Serial0/1
ip route 129.5.0.0 255.255.0.0 Loopback1
ip route 129.6.0.0 255.255.0.0 Loopback2
line con 0
password 7 00071A150754
login
line vty 0 4
password 7 05080F1C2243
login
end
R2#
R2#show ip route
Gateway of last resort is 0.0.0.0 to network 0.0.0.0
1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback1
2.0.0.0/32 is subnetted, 1 subnets
C 2.2.2.2 is directly connected, Loopback2
172.16.0.0/30 is subnetted, 1 subnets
C 172.16.2.0 is directly connected, Serial0/1
S 129.5.0.0/16 is directly connected, Loopback1
S 129.6.0.0/16 is directly connected, Loopback2 10.0.0.0/30 is subnetted, 1 subnets
C 10.1.1.0 is directly connected, Serial0/0
R 192.168.1.0/24 [120/1] via 10.1.1.1, 00:00:09, Serial0/0
S* 0.0.0.0/0 is directly connected, Serial0/1
R2 is the edge router which contains two static routes and a default static route. The default static route has been propagated to the inside (R1) using the default-information originate command.
R1#show ip route
Gateway of last resort is 10.1.1.2 to network 0.0.0.0
10.0.0.0/30 is subnetted, 1 subnets
C 10.1.1.0 is directly connected, Serial0/2/0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
R* 0.0.0.0/0 [120/1] via 10.1.1.2, 00:00:13, Serial0/2/0R1#
Next, I configured Router2 to propagate the default route to Router1 using the redistribute static command. As a result, not only the default static route was propagated Router1, but ALL three of the static routes were advertized to Router1! See Router1’s routing table after modifying R2’s configuration file to use the redistribute static command in place of the default-information originate command:
R1#show ip route
Gateway of last resort is 10.1.1.2 to network 0.0.0.0
R 129.5.0.0/16 [120/1] via 10.1.1.2, 00:00:04, Serial0/2/0
R 129.6.0.0/16 [120/1] via 10.1.1.2, 00:00:04, Serial0/2/0 10.0.0.0/30 is subnetted, 1 subnets
C 10.1.1.0 is directly connected, Serial0/2/0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
R* 0.0.0.0/0 [120/1] via 10.1.1.2, 00:00:04, Serial0/2/0
R1#
As you can see, since R2 had more that one static route, they were all advertised through RIP using the redistribute static command. Therefore, in order to use the redistribute static command, we need to do some additional configuration to Router2. In Router2, we would have to use a distribute-list command or a route map (both to be studied in your CCNP1 class) to permit only the default static route to be propagated by RIP. Following is an example of the extra configuration needed in Router2 as well as the resulting Router1 routing table.
R2#show run
service password-encryption
hostname R2
enable secret 5 $1$uEh1$AsHH04FVVwwziW4XdTJHn0
interface Loopback1
ip address 1.1.1.1 255.255.255.255
interface Loopback2
ip address 2.2.2.2 255.255.255.255
interface Serial0/0
ip address 10.1.1.2 255.255.255.252
interface Serial0/1
ip address 172.16.2.2 255.255.255.252
router rip
redistribute static
network 10.0.0.0
distribute-list 10 out staticip classless
ip route 0.0.0.0 0.0.0.0 Serial0/1
ip route 129.5.0.0 255.255.0.0 Loopback1
ip route 129.6.0.0 255.255.0.0 Loopback2
access-list 10 permit 0.0.0.0
line con 0
password 7 00071A150754
login
line vty 0 4
password 7 05080F1C2243
login
end
R1#show ip route
Gateway of last resort is 10.1.1.2 to network 0.0.0.0
10.0.0.0/30 is subnetted, 1 subnets
C 10.1.1.0 is directly connected, Serial0/2/0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
R* 0.0.0.0/0 [120/1] via 10.1.1.2, 00:00:02, Serial0/2/0R1#
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment