cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
704
Views
0
Helpful
4
Replies

BGP Advertisement

4everlearning
Level 1
Level 1

Hi Guys,

Let's say i want to advertise the same network with different subnets to 2 different eBGP peers that belong to 2 different networks, how can i do that?

for example, my CE is connected to Netowkr A and Network B PEs through eBGP. I want to send 192.168.33.x /27 to Network A and 192.168.33.x /24 to Network B? how can i do that as if i use the Network statement, it will send the same thing to both networks since you can't specify. 

 

Thanks,

 

1 Accepted Solution

Accepted Solutions

Hi,

 

here is a config example:

!

ip prefix-list not_to_A seq 5 permit 192.168.33.0/24

ip prefix-list not_to_B seq 5 permit 192.168.33.0/27

!

route-map to_A deny 10

 match ip address prefix-list not_to_A

route-map to_A permit 20

!

route-map to_B deny 10

 match ip address prefix-list not_to_B

route-map to_B permit 20

!

router bgp ...

neighbor A route-map to_A out

neighbor B route-map to_B out

network 192.168.33.0 mask 255.255.255.0

network 192.168.33.0 mask 255.255.255.224

!

 

This way the 192.168.33.0/24 will NOT be advertised to site A (and all other BGP prefixes will be adveritsed including 192.168.33.0/27).

And the same way 192.168.33.0/27 will NOT be advertised to site B (and all other BGP prefixes will be adveritsed including 192.168.33.0/24).

 

Is this what you need?

 

Best regards,

Milan

 

View solution in original post

4 Replies 4

John Blakley
VIP Alumni
VIP Alumni

You should be able to do this with a combination of address aggregation, unsuppress maps and route-maps. Is there a reason that you can't advertise just the summary to both neighbors?

HTH,

John

HTH, John *** Please rate all useful posts ***

Thanks for your reply John, The reason i need this setup is that I have a scenario that I am trying to test. 

Would the route map be used with the network command or instead of it?

Also would it be applied on the network or neighbour command?

Can you please give me an example of the configuration or a document where it explains it.

 

Thanks,

 

 

Hi,

 

here is a config example:

!

ip prefix-list not_to_A seq 5 permit 192.168.33.0/24

ip prefix-list not_to_B seq 5 permit 192.168.33.0/27

!

route-map to_A deny 10

 match ip address prefix-list not_to_A

route-map to_A permit 20

!

route-map to_B deny 10

 match ip address prefix-list not_to_B

route-map to_B permit 20

!

router bgp ...

neighbor A route-map to_A out

neighbor B route-map to_B out

network 192.168.33.0 mask 255.255.255.0

network 192.168.33.0 mask 255.255.255.224

!

 

This way the 192.168.33.0/24 will NOT be advertised to site A (and all other BGP prefixes will be adveritsed including 192.168.33.0/27).

And the same way 192.168.33.0/27 will NOT be advertised to site B (and all other BGP prefixes will be adveritsed including 192.168.33.0/24).

 

Is this what you need?

 

Best regards,

Milan

 

Perfect. It's clear now, thank you.