website pop up marketing distribute-list
Cisco CCNA | CCNP Certification Training Site. Cisco tips and tools for exam success. logo video

distribute-list

Printer-Friendly Format

Command

Distribute-List

Use

Allows you to filter routes from the routing table. For CCNA purposes, this is usually 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, we will apply a distribute-list to R2. First, we will see what EIGRP routes we have on R2.

R2(config-router)#do show ip route eigrp
1.0.0.0/32 is subnetted, 3 subnets
D 1.1.1.1 [90/156160] via 10.1.1.1, 00:00:03, FastEthernet0/0
D 1.3.3.3 [90/156160] via 10.1.1.1, 00:00:03, FastEthernet0/0
D 1.2.2.2 [90/156160] via 10.1.1.1, 00:04:58, FastEthernet0/0
192.168.13.0/30 is subnetted, 1 subnets
D 192.168.13.0 [90/2172416] via 10.1.1.1, 00:00:03, FastEthernet0/0
3.0.0.0/32 is subnetted, 1 subnets
D 3.3.3.3 [90/156160] via 10.2.2.3, 00:00:03, FastEthernet1/0
111.0.0.0/32 is subnetted, 1 subnets
D 111.111.111.111 [90/156160] via 10.1.1.1, 00:00:03, FastEthernet0/0
10.0.0.0/24 is subnetted, 3 subnets
D 10.4.4.0 [90/2172416] via 10.2.2.3, 00:00:03, FastEthernet1/0
[90/2172416] via 10.1.1.1, 00:00:03, FastEthernet0/0
11.0.0.0/32 is subnetted, 1 subnets
D 11.11.11.11 [90/156160] via 10.1.1.1, 00:00:03, FastEthernet0/0


Next, we will set an access-list to only allow 1.2.2.2 and use it in a distribute-list.

R2(config-router)#access-list 25 permit 1.2.2.2
R2(config-router)#distribute-list 25 in


Afterwards, we see only 1.2.2.2 is in the routing table.

R2(config-router)#do show ip route eigrp
1.0.0.0/32 is subnetted, 1 subnets
D 1.2.2.2 [90/156160] via 10.1.1.1, 00:06:53, FastEthernet0/0



Back to commands department




Printer-Friendly Format

This site and/or material is not sponsored by, endorsed by, or affiliated with Cisco Systems, Inc. and/or its affiliates. Cisco®, Cisco Systems®, CCDA™, CCNA™, CCDP™, CCNP™, CCIE™, or CCSI™ are trademarks or registered trademarks of Cisco Systems, Inc. and/or its affiliates in the United States and certain other countries.

Home | Search | Contact Us | Tell a Friend | Text Size

2006-2013 HowtoNetwork.net All Rights Reserved. Reproduction without permission prohibited.
Reality Press, Midsummer Court, 314 Midsummer Blvd.,Milton Keynes, MK92UB, UK

This site is powered by MemberGate Membership Site Software