Search This Blog

Saturday, December 10, 2011

RIPv2 Default route


RIP use the command default-information originate in order to advertise default route to his neighbors, while there is another feature which allows us to do conditional route advertise.

For example, following the network diagram on the previous post,  I have configured network 172.16.40.0/24 in access-list 40:
access-list 40 permit 172.16.40.0 0.0.0.255

Then configure route-map to match that network:
route-map NET-40 permit 10
 match ip address 40

And finally configure default-route under RIP router:
router rip
 version 2
 network 10.0.0.0
 network 192.168.10.0
 network 192.168.20.0
 network 192.168.30.0
 network 192.168.40.0
 network 192.168.50.0
 default-information originate route-map NET-40
 distribute-list 111 in
 distance 90 10.0.15.5 0.0.0.0 50
 no auto-summary

The result - R1 is advertising default route to his neighbors as long as network 172.16.40.0/24 is exist in his routing table:
R3#show ip route
Codes: C - connected, S - static, 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
       i - IS-IS, su - IS-IS summary, 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 10.0.123.1 to network 0.0.0.0

R    192.168.30.0/24 [120/1] via 10.0.123.1, 00:00:02, FastEthernet0/0
R    192.168.10.0/24 [120/1] via 10.0.123.1, 00:00:02, FastEthernet0/0
R    192.168.40.0/24 [120/1] via 10.0.123.1, 00:00:02, FastEthernet0/0
     172.16.0.0/24 is subnetted, 5 subnets
R       172.16.50.0 [120/1] via 10.0.34.4, 00:00:14, FastEthernet0/1
R       172.16.40.0 [120/1] via 10.0.34.4, 00:00:14, FastEthernet0/1
R       172.16.30.0 [120/1] via 10.0.34.4, 00:00:14, FastEthernet0/1
R       172.16.20.0 [120/1] via 10.0.34.4, 00:00:16, FastEthernet0/1
R       172.16.10.0 [120/1] via 10.0.34.4, 00:00:16, FastEthernet0/1
R    192.168.20.0/24 [120/1] via 10.0.123.1, 00:00:03, FastEthernet0/0
     10.0.0.0/24 is subnetted, 5 subnets
R       10.0.15.0 [120/1] via 10.0.123.1, 00:00:03, FastEthernet0/0
R       10.0.24.0 [120/1] via 10.0.123.2, 00:00:00, FastEthernet0/0
                  [120/1] via 10.0.34.4, 00:00:16, FastEthernet0/1
R       10.0.45.0 [120/1] via 10.0.34.4, 00:00:17, FastEthernet0/1
C       10.0.34.0 is directly connected, FastEthernet0/1
C       10.0.123.0 is directly connected, FastEthernet0/0
R    192.168.50.0/24 [120/1] via 10.0.123.1, 00:00:05, FastEthernet0/0
R*   0.0.0.0/0 [120/1] via 10.0.123.1, 00:00:05, FastEthernet0/0

Shutting down interface loopback 4 on R4 will make R1 to redraw the default route.

No comments:

Post a Comment