Random Cisco geekery, issue 1: RIP route preference.

Here’s the situation: two routers are connected with two interfaces, one is FastEthernet0/1 and the other one is Dialer1 (which is a bundle of two Serial interfaces).

We’re using RIP to connect these two routers:

ip subnet-zero
ip classless

router rip
 version 2
 network 10.0.0.0
 no auto-summary

Fa0/1 is experiencing some hardware problems, so we want to prefer Di1 instead while we investigate the issue, but still we want to be able to fail over Fa0/1 in the meantime.

Each routing protocol has ways to set “priorities” somehow. Being RIP a vector-distance routing protocol, it makes selections based on how many hops you need, somehow like BGP counting Autonomous Systems in the AS path.

Here’s the solution:

router rip
 offset-list 0 in 1 FastEthernet0/1
 offset-list 0 out 1 FastEthernet0/1

The first command says: “take all the routes received from Fa0/1 and add 1 hop to the count”. The second command does the same when sending other routes to other router over that interface. That 0 in the middle stands for “all routes”, but we can also have the number of an access-list, if you want to alter specific routes instead.

What happens next?
The RIP protocol ends up excluding Fa0/1 at all:

R1#show ip rip database
0.0.0.0/0    auto-summary
10.0.0.0/8    auto-summary
10.2.0.0/30    directly connected, FastEthernet0/0
10.2.0.4/30    directly connected, FastEthernet0/1
10.2.0.8/30    directly connected, Dialer1
10.2.0.10/32    directly connected, Dialer1
10.2.0.12/30
    [1] via 10.2.0.10, 00:00:21, Dialer1
10.2.255.1/32    directly connected, Loopback0
10.2.255.2/32
    [1] via 10.2.0.10, 00:00:21, Dialer1
10.2.255.3/32
    [2] via 10.2.0.10, 00:00:21, Dialer1

But still, when Di1 goes down, failover works:

R1#show ip rip database
0.0.0.0/0    auto-summary
10.0.0.0/8    auto-summary
10.2.0.0/30    directly connected, FastEthernet0/0
10.2.0.4/30    directly connected, FastEthernet0/1
10.2.0.8/30 is possibly down
10.2.0.10/32 is possibly down
10.2.0.12/30
    [2] via 10.2.0.6, 00:00:26, FastEthernet0/1
10.2.255.1/32    directly connected, Loopback0
10.2.255.2/32
    [2] via 10.2.0.6, 00:00:26, FastEthernet0/1
10.2.255.3/32
    [3] via 10.2.0.6, 00:00:26, FastEthernet0/1

Note the two routes showing as “possibly down”, as related to Di1.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *