RIP: Filtering based on Source
·
We
can filter the routes based on the source
·
Let
me take a small topology to configure filtering based on source in RIP
R1------S1/0-------------s1/0----R2----s1/1--------------s1/1------R3
10.1.12.1--------------10.1.12.2-----11.1.23.2--------------11.1.23.3
R1(config-router)#do
show run | sec router
router
rip
version 2
network 1.0.0.0
network 10.0.0.0
no auto-summary
R1(config-router)#
R2(config-router)#do
show run | sec router
router
rip
version 2
network 2.0.0.0
network 10.0.0.0
no auto-summary
R2(config-router)#
R1(config-router)#do
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 not set
1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback0
2.0.0.0/32 is subnetted, 1 subnets
R 2.2.2.2 [120/1] via 10.1.12.2, 00:00:26,
Serial1/0
10.0.0.0/24 is subnetted, 1 subnets
C 10.1.12.0 is directly connected,
Serial1/0
R1(config-router)#
R2(config-router)#do
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 not set
1.0.0.0/32 is subnetted, 1 subnets
R 1.1.1.1 [120/1] via 10.1.12.1, 00:00:26,
Serial1/0
2.0.0.0/32 is subnetted, 1 subnets
C 2.2.2.2 is directly connected, Loopback0
10.0.0.0/24 is subnetted, 1 subnets
C 10.1.12.0 is directly connected,
Serial1/0
11.0.0.0/24 is subnetted, 1 subnets
C 11.1.23.0 is directly connected,
Serial1/1
R2(config-router)#
Observation:
·
RIP
is configured between R1 and R2
·
R1
has advertised its loopback0 1.1.1.1/32 into RIP
·
R2
has advertised its loopback0 2.2.2.2/32 into RIP
R1#show ip protocols
Routing
Protocol is "rip"
Outgoing update filter list for all interfaces
is not set
Incoming update filter list for all
interfaces is not set
Sending updates every 30 seconds, next due in
17 seconds
Invalid after 180 seconds, hold down 180,
flushed after 240
Redistributing: rip
Default version control: send version 2,
receive version 2
Interface Send Recv
Triggered RIP Key-chain
Serial1/0 2 2
Loopback0 2 2
Automatic network summarization is not in
effect
Maximum path: 4
Routing for Networks:
1.0.0.0
10.0.0.0
Routing Information Sources:
Gateway Distance Last Update
10.1.12.2 120 00:00:06
Distance: (default is 120)
R1#
R2#show ip protocols
Routing
Protocol is "rip"
Outgoing update filter list for all
interfaces is not set
Incoming update filter list for all
interfaces is not set
Sending updates every 30 seconds, next due in
17 seconds
Invalid after 180 seconds, hold down 180,
flushed after 240
Redistributing: rip
Default version control: send version 2,
receive version 2
Interface Send Recv
Triggered RIP Key-chain
Serial1/0 2 2
Loopback0 2 2
Automatic network summarization is not in
effect
Interface Send Recv
Triggered RIP Key-chain
Maximum path: 4
Routing for Networks:
2.0.0.0
10.0.0.0
Routing Information Sources:
Gateway Distance Last Update
10.1.12.1 120 00:00:03
Distance: (default is 120)
R2#
Observation:
·
In
R1, source Gateway is displayed as 10.1.12.2
·
In
R2, source Gateway is displayed as 10.1.12.1
·
If
R1 doesn’t want to receive any updates from R2, we can filter the routes based
on the Source Gateway
·
Let
me configure to filter the routes from R2 in R1:
R1(config)#ip
prefix-list 1 seq 5 permit 10.1.12.2/24
R1(config)#router
rip
R1(config-router)#distribute-list
gateway 1 in
R1(config)#do 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 not set
1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback0
10.0.0.0/24 is subnetted, 1 subnets
C 10.1.12.0 is directly connected,
Serial1/0
R1(config)#
Observation:
·
R1
doesn’t have any routes from R2 now
No comments:
Post a Comment