09-02-2024 03:13 AM - last edited on 09-02-2024 03:51 AM by shaiksh
Hi,
we have bgp running on the switch and I would like to make it so that a specific network, for example 10.10.10.0/24, is broadcast to a different bgp neighbor than all the others. I tried to prefix it with the list assigned to the route map but it doesn't work.
I also tried to define the next hop for this network, but I think I'm configuring it incorrectly.
Does someone have a example of that?
Regards.
09-02-2024 04:04 AM
You can check examples from documentation:
Also, can you please provide more details on what you trying to achieve?
09-02-2024 04:10 AM
To peer you want to NOT advertise this prefix
- Route-map Adv deny 10
Match ip address prefix <prefix-list name>
- Route-map Adv permit 20
Then apply this route-map with
Neighbor <x.x.x.x> route-map Adv out
This will prevent advertise specific prefix and advertise all other prefix to neighbor you want
MHM
09-02-2024 05:29 AM - edited 09-02-2024 05:29 AM
Hello @kwojtyra
To advertise the [10.10.10.0/24] network to a specific BGP neighbor while preventing it from being advertised to others, you could create a prefix list to match the network, apply a route map to advertise it to the intended neighbor, and deny it for others. This involves defining a prefix list for 10.10.10.0/24, creating a route map to match and set the next-hop if needed, and then applying this route map to the specific neighbor.
---
ip prefix-list SPECIFIC_NETWORK permit 10.10.10.0/24
route-map ADVERTISE_SPECIFIC_NETWORK permit 10
match ip address prefix-list SPECIFIC_NETWORK
router bgp <BGP_AS_NUMBER>
neighbor <NEIGHBOR_IP> route-map ADVERTISE_SPECIFIC_NETWORK out
To deny this network to other neighbors:
---
route-map DENY_SPECIFIC_NETWORK deny 10
match ip address prefix-list SPECIFIC_NETWORK
route-map DENY_SPECIFIC_NETWORK permit 20
router bgp <BGP_AS_NUMBER>
neighbor <OTHER_NEIGHBOR_IP> route-map DENY_SPECIFIC_NETWORK out
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