Command
Distribute-List
Use
Allows you to filter routes from the routing table. For CCNA purposes, usually this is done through access lists.
Syntax
Router(config-router)#distribute-list <list> <in/out>
OR
Router(config-router)#distribute-list <list> <in/out> <interface>
Options
<list> | Access list |
<in/out> | Whether the router is receiving or sending the route |
Example
In this example, a distribute-list is applied to R2.
R2(config-router)#access-list 66 permit 1.1.1.1 |
Here is the route table from R3 before applying the distribute-list
R3(config-router)#do show ip route rip |
After applying the distribute-list, the only route that is passed from R2 is 1.1.1.1.
R3(config-router)#do show ip route rip |
Also, R1 no longer has any routes.
R1(config-router)#do show ip route ripR1(config-router)# |