11-19-2014 01:29 AM - edited 03-05-2019 12:11 AM
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,
Solved! Go to Solution.
11-25-2014 12:55 AM
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
11-19-2014 04:46 AM
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
11-23-2014 01:19 AM
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,
11-25-2014 12:55 AM
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
11-25-2014 01:19 AM
Perfect. It's clear now, thank you.
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