04-08-2019 07:38 AM
Hello,
I have an ASR1001-X with 2 BGP peers and I have 2 /24 networks and want to advertise 1 networks by each upstream.
ip as-path access-list 10 permit ^$ ip as-path access-list 100 permit ^$ ip as-path access-list 200 permit ^$ router bgp 254 bgp router-id 10.10.254.1 bgp log-neighbor-changes neighbor 10.10.100.1 remote-as 100 neighbor 10.10.200.1 remote-as 200 ! address-family ipv4 network 20.20.20.0 mask 255.255.255.248 network 20.20.30.0 mask 255.255.255.248 aggregate-address 20.20.20.0 255.255.255.0 summary-only aggregate-address 20.20.30.0 255.255.255.0 summary-only neighbor 10.10.100.1 activate neighbor 10.10.100.1 route-map as100-in in neighbor 10.10.100.1 route-map as100-out out neighbor 10.10.200.1 activate neighbor 10.10.200.1 route-map as200-in in neighbor 10.10.200.1 route-map as200-out out exit-address-family route-map as100-in permit 10 match as-path 10 route-map as100-out permit 10 match as-path 100 route-map as200-in permit 10 match as-path 10 route-map as200-out permit 10 match as-path 200
This is my config and what I want to do is to limit the next
advertise 20.20.20.0/24 via AS100 and 20.20.30.0/24 via as200. Idk if is possible with route maps or what, actually I'm trying to do it with prefix-lists.
Anyone in the same situation or can help with this?
Thanks
04-08-2019 08:05 AM
I have several comments and suggestions.
- you have configured your 2 BGP peers with different AS numbers so we are dealing with EBGP.
- you are applying an AS path list inbound to control what advertisement from your EBGP peers you will accept. That path list permits only ^$ and no advertisement from those peers will meet that condition. So you will accept no advertisement from those peers.
- you are applying an AS path list outbound to control what you will advertise to those peers. That path list permits only ^$ and that is the effective way to prevent your AS becoming a transit AS between those EBGP neighbors. So this is a good thing in your config.
- you want to advertise only a single network to one EBGP peer and a different network to the other EBGP peer. Your comment is that you are trying prefix lists for this but there are no prefix lists in what you posted. Prefix lists that permit only 20.20.20.0 and permit only 20.20.30.0 applied to outbound advertisements would be an effective way to accomplish your objective.
HTH
Rick
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide