Setup is simple, there are 4 loopback interfaces on R1.
I am going to start a basic EIGRP process in both R1 & R2 which runs on all the interfaces..
R1(config)#router eigrp 10
R1(config-router)#network 0.0.0.0
R2(config)#router eigrp 10
R2(config-router)#network 0.0.0.0
Above commands will result the following output in R2's routing table..
All the loopback interfaces of R1 are advertised to R2 by R1 in EIGRP process.
I am creating a prefix-list to capture the routes which starts from 192.168.0.0 and has the prefix length greater than or equal to /25
R1(config)#ip prefix-list TEST seq 20 permit 0.0.0.0/0 le 32
R1(config)#router eigrp 10
R1(config-router)#distribute-list prefix TEST out ethernet 0/0
Note:-
If we didn't specify the exact interface, it will by default be applied to all the interfaces..
If we wanted to configure the distribute list on R2, we would have used it inbound like the following..
R2(config)#ip prefix-list TEST seq 10 deny 192.168.0.0/16 ge 25
R2(config)#ip prefix-list TEST seq 20 permit 0.0.0.0/0 le 32
R2(config)#router eigrp 10
R2(config-router)#distribute-list prefix TEST in
Routes will not be in the R2's topology table even.
Prefix lists can also be used to filter routes from a specific gateway (neighbor).
In this topology there is only 1 neighbor to the R2, but the logic can apply for a setup of several neighbors. Here the prefix match the neighbor address and gateway command is used.
R2(config)#ip prefix-list NOT-FROM-R1 seq 10 deny 10.1.1.1/32
R2(config)#ip prefix-list NOT-FROM-R1 seq 20 permit 0.0.0.0/0 le 32
R2(config)#router eigrp 10
R2(config-router)#distribute-list prefix gateway NOT-FROM-R1 in
Also note that;
R2(config-router)#distribute-list prefix PREFIX-LIST-1 gateway PREFIX-LIST-2 in
will filter updates and gateway independently. Routing updates permitted from PREFIX-LIST-1 and the updates from gateways which are permitted from PREFIX-LIST-2 will be in the topology table.
Note that this is different from the filtering using extended ACLs where it can filter a specific route from a specific neighbor.
If we wanted to configure the distribute list on R2, we would have used it inbound like the following..
R2(config)#ip prefix-list TEST seq 10 deny 192.168.0.0/16 ge 25
R2(config)#ip prefix-list TEST seq 20 permit 0.0.0.0/0 le 32
R2(config)#router eigrp 10
R2(config-router)#distribute-list prefix TEST in
Routes will not be in the R2's topology table even.
Prefix lists can also be used to filter routes from a specific gateway (neighbor).
In this topology there is only 1 neighbor to the R2, but the logic can apply for a setup of several neighbors. Here the prefix match the neighbor address and gateway command is used.
R2(config)#ip prefix-list NOT-FROM-R1 seq 10 deny 10.1.1.1/32
R2(config)#ip prefix-list NOT-FROM-R1 seq 20 permit 0.0.0.0/0 le 32
R2(config)#router eigrp 10
R2(config-router)#distribute-list prefix gateway NOT-FROM-R1 in
Also note that;
R2(config-router)#distribute-list prefix PREFIX-LIST-1 gateway PREFIX-LIST-2 in
will filter updates and gateway independently. Routing updates permitted from PREFIX-LIST-1 and the updates from gateways which are permitted from PREFIX-LIST-2 will be in the topology table.
Note that this is different from the filtering using extended ACLs where it can filter a specific route from a specific neighbor.
No comments:
Post a Comment