RIP — Filtering with Offset List

Anggara
Network Warrior
Published in
3 min readApr 14, 2017

The objective of this lab is to prevent IP 3.3.3.3/32 on R3 from being advertised to R1.

Configuration of R1 :

R1(config)#interface e0/0
R1(config-if)#ip address 10.10.10.1 255.255.255.252
R1(config-if)#no shut
R1(config)#interface e0/1
R1(config-if)#ip address 30.30.30.1 255.255.255.252
R1(config-if)#no shut
R1(config)#interface loopback 0
R1(config-if)#ip address 1.1.1.1 255.255.255.255
R1(config-if)#no shut
R1(config)#router rip
R1(config-router)#version 2
R1(config-router)#network 0.0.0.0
R1(config-router)#no auto-summary

Configuration of R2 :

R2(config)#interface e0/0
R2(config-if)#ip address 10.10.10.2 255.255.255.252
R2(config-if)#no shut
R2(config)#interface e0/1
R2(config-if)#ip address 20.20.20.1 255.255.255.252
R2(config-if)#no shut
R2(config)#interface loopback 0
R2(config-if)#ip address 2.2.2.2 255.255.255.255
R2(config-if)#no shut
R2(config)#router rip
R2(config-router)#version 2
R2(config-router)#network 0.0.0.0
R2(config-router)#no auto-summary

Configuration of R3 :

R3(config)#interface e0/0
R3(config-if)#ip address 20.20.20.2 255.255.255.252
R3(config-if)#no shut
R3(config)#interface e0/1
R3(config-if)#ip address 30.30.30.2 255.255.255.252
R3(config-if)#no shut
R3(config)#interface loopback 0
R3(config-if)#ip address 3.3.3.3 255.255.255.255
R3(config-if)#no shut
R3(config)#router rip
R3(config-router)#version 2
R3(config-router)#network 0.0.0.0
R3(config-router)#no auto-summary

Now verify from R1 :

R1#sh ip route rip
— output omitted —
2.0.0.0/32 is subnetted, 1 subnets
R 2.2.2.2 [120/1] via 10.10.10.2, 00:00:12, Ethernet0/0
3.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
R 3.0.0.0/8 [120/1] via 30.30.30.2, 00:02:30, Ethernet0/1
R 3.3.3.3/32 [120/1] via 30.30.30.2, 00:00:13, Ethernet0/1
20.0.0.0/30 is subnetted, 1 subnets
R 20.20.20.0 [120/1] via 30.30.30.2, 00:00:13, Ethernet0/1
[120/1] via 10.10.10.2, 00:00:12, Ethernet0/0

R1#ping 3.3.3.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/4/10 ms

From the result above, we can see 3.3.3.3/32 from R1 advertised by RIP, also R1 can ping 3.3.3.3/32 successfully.

Now, we will add the configuration in order 3.3.3.3/32 will not advertised to R1 :

R1(config)#access-list 1 permit 3.3.3.3 0.0.0.0
R1(config)#router rip
R1(config-router)#offset-list 1 in 16

Let’s check again from R1 :

R1#ping 3.3.3.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
…..
Success rate is 0 percent (0/5)
R1#sh ip route rip
— output omitted —
2.0.0.0/32 is subnetted, 1 subnets
R 2.2.2.2 [120/1] via 10.10.10.2, 00:00:05, Ethernet0/0
20.0.0.0/30 is subnetted, 1 subnets
R 20.20.20.0 [120/1] via 30.30.30.2, 00:00:16, Ethernet0/1
[120/1] via 10.10.10.2, 00:00:05, Ethernet0/0

R1 can’t ping 3.3.3.3/32 and we can’t see 3.3.3.3/32 on routing table.

It’s because the additional configuration added existing hop count and becomes more than 15 hops. The maximum hop count is 15, therefore route to 3.3.3.3/32 becomes inaccessible.

We can see it by run debug on R1 :

R1#debug ip rip
RIP protocol debugging is on
— output omitted —
R1#
*Jan 6 04:15:20.145: RIP: received v2 update from 30.30.30.2 on Ethernet0/1
*Jan 6 04:15:20.145: 2.2.2.2/32 via 0.0.0.0 in 2 hops
*Jan 6 04:15:20.145: 3.3.3.3/32 via 0.0.0.0 in 17 hops (inaccessible)
*Jan 6 04:15:20.145: 20.20.20.0/30 via 0.0.0.0 in 1 hops
— output omitted —
R1#
*Jan 6 04:15:32.479: RIP: received v2 update from 10.10.10.2 on Ethernet0/0
*Jan 6 04:15:32.479: 2.2.2.2/32 via 0.0.0.0 in 1 hops
*Jan 6 04:15:32.479: 3.3.3.3/32 via 0.0.0.0 in 18 hops (inaccessible)
*Jan 6 04:15:32.479: 20.20.20.0/30 via 0.0.0.0 in 1 hops

Please hit the ♥ button if you liked this post. You’ll help others find it. Thanks!

--

--

Network Warrior
Network Warrior

Published in Network Warrior

IP Networking, Routing, Switching, Operating Systems, and more…

Anggara
Anggara

Written by Anggara

An ordinary person who has extraordinary life | a traveler | a seeker