What is Distribute List?
Distribute List is Like an access-list, use to deny or permit the routing update to pass through a router/interface. Distribute List allow you apply an access list to a routing updates.
How to apply a Distribute List:
It can be apply on in or out bond of an interface under a routing process.
e.g in fig. R1 want to send a routing update to it neighbor, this update will go through from interface S0/0, router will check, is there some Distribute List apply to this interface. If there is a Distribute List which would contain the allow route to pass through this interface. In this list u may block 126.96.36.199, 188.8.131.52 etc.
Distribute List Configuration in GNS3:
Here in figure you can see a two routing domain. R2, R3 and R4 running “ospf area 1”
R1 have some RIP routes which are 184.108.40.206\24 to 220.127.116.11\24.
Objective1: some of networks behind the R1, we don’t want to get out the entire network.
18.104.22.168, 22.214.171.124 remain in this networks not accessed from R4.
Objective2: But other two networks 126.96.36.199\24 & 188.8.131.52\24 can’t cross from rip-network. They remains in RIP network, can’t go across the R3 & R4.
Note: For full Lab configuration you can visit Route redistribution configuration.
Create an Access-list
R1(config)# ip access-list standard route_filter
R1(config-)#Deny 184.108.40.206. 0.0.0.255
R1(config-)#Deny 220.127.116.11. 0.0.0.255
Apply distribute list under routing process using that acces-list
R1(config-router)#Distrib-list route_filter out serial 0\2
R2#clrear ip route *
R2#Show ip routeFrom above configuration objective1 is achieved. You can view the figure that in R4 routing table there are not 18.104.22.168\24 & 22.214.171.124\24
For achieving the 2nd objective we need to do the same above steps and configurations. i.e.
R2(config)# Ip access-list standard route_filter2
R2(config)#Deny 126.96.36.199. 0.0.0.255
R2(config)#Deny 188.8.131.52. 0.0.0.255
R2(config)#Router osfp 1
R2(config-router)#Distrib-list route_filter 2out rip
After completing above configuration you shall see that networks 184.108.40.206\24 & 220.127.116.11\24 disappear from R4’s routing table, but remains in R2 routing table.