Redistribution: Using Distribute Lists to Control Redistribution
distribute-list = filter networks in routing updates (From IOS Help)
Once you perform route redistribution, you’ll often find that you need to fine-tune the process by allowing some routes to be redistributed while preventing redistribution of other routes. We can do that with distribute lists.
A distribute-list uses an ACL to define the routes to be redistributed – and explicitly or implicitly prohibited from redistribution.
Example for redistribution into OSPF to filter out networks 220.127.116.11/24 and 18.104.22.168/24:
R1(config)#access-list 17 deny 22.214.171.124 0.0.0.255 R1(config)#access-list 17 deny 126.96.36.199 0.0.0.255 R1(config)#access-list 17 permit any
We would assume the command is completed in OSPF as follows:
R1(config-router)#distribute-list 17 out serial0 % Interface not allowed with OUT for OSPF
But OSPF will not work in this manner, as the routing updates are in the format of LSAs, where as EIGRP and RIP aren’t. Hence we can’t filter LSAs as such.
We need to specify a protocol as apposed to an interface.
R1(config-router)#distribute-list 17 out rip
This will filter routes going into OSPF, that match ACL 17 and originate from RIP.
NOTE: OSPF will converge extremely quickly and this will/should show in the best routes asap.
***show ip protocols will also show any applied distribute lists and their direction!***
R1(config)#router rip R1(config-router)#distribute-list 17 ? in Filter incoming routing updates out Filter outgoing routing updates R1(config-router)#distribute-list 17 in ? BRI ISDN Basic Rate Interface Ethernet IEEE 802.3 Loopback Loopback interface Null Null interface Serial Serial <cr> R1(config-router)#distribute-list 17 in ethernet0