cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
243
Views
0
Helpful
3
Replies

Prefix advertisement to specyfic neighbor

kwojtyra
Level 1
Level 1

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.

3 Replies 3

Pavel Tarakanov
Cisco Employee
Cisco Employee

You can check examples from documentation:

https://www.cisco.com/c/en/us/td/docs/routers/ios/config/17-x/ip-routing/b-ip-routing/m_irg-route-map-continue.html

 

Also, can you please provide more details on what you trying to achieve?

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

M02@rt37
VIP
VIP

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

 

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.
Review Cisco Networking for a $25 gift card