Concepts tested
- Filter inbound ASPATH segments based on length
- Configuring basic BGP peering
Topology
R1(config)#router bgp 65001
R1(config-router)#neighbor 65.1.0.2 remote 65002
R1(config-router)#address-family ipv4 unicast
R1(config-router-af)#neighbor 65.1.0.2 activate
R1(config-router-af)#bgp maxas-limit 2
R1 Verification
Once you configure your neighbor statement and the peering comes up you should see the following:
%BGP-5-ADJCHANGE: neighbor 65.1.0.2 Up
R1#sh ip bgp | b Network
Network Next Hop Metric LocPrf Weight Path
*> 160.150.1.0/24 65.1.0.2 0 0 65002 i
*> 160.151.1.0/24 65.1.0.2 0 0 65002 65123 i
*> 160.152.1.0/24 65.1.0.2 0 0 65002 65123 65223 i
*> 160.153.1.0/24 65.1.0.2 0 0 65002 65123 65223 i
With that command configured and we clear our peering session we should see the following:
R1#clear bgp ipv4 unicast * soft
R1#sh ip bgp | b Network
Network Next Hop Metric LocPrf Weight Path
*> 160.150.1.0/24 65.1.0.2 0 0 65002 i
*> 160.151.1.0/24 65.1.0.2 0 0 65002 65123 i
R1#
Now we only see the prefixes we want to see, and that is it for this lab.
No comments:
Post a Comment