cancel
Showing results for 
Search instead for 
Did you mean: 

Need to exclude some prefixes from no-export community in BGP

Need to exclude some prefixes from no-export community in BGP

ddpatil89
New Contributor III

I am (AS 24029) advertising all the prefixes received via one of the EBGP peer (As 10029) to my one of the EBGP peer (AS 9498) with no-export community set.

(AS 10029) <----received routes---->(AS 24029)<----advertised routes with no-export community--->(AS 9498)

Now I need to advertise below 2 networks without no-export community. 

1. 180.151.0.0/24
2. 125.63.64.0/24

Please let me know how to achieve it.

BGP configuration running currently on MLXe-8

 

router bgp
 local-as 24029

 neighbor IXP-peers peer-group
 neighbor IXP-peers password 2 $WFMrM2c9Qz0xPUNTSQ==
 neighbor IXP-peers soft-reconfiguration inbound

 neighbor 218.100.48.10 remote-as 10029
 neighbor 218.100.48.10 peer-group IXP-peers
 neighbor 218.100.48.10 description ISP-Citycom

 neighbor 218.100.48.20 remote-as 9498
 neighbor 218.100.48.20 peer-group IXP-peers
 neighbor 218.100.48.20 description Bharti-Airtel

 address-family ipv4 unicast
 neighbor IXP-peers route-map out set-no-export
 neighbor IXP-peers send-community

 route-map set-no-export permit 10
 set community  no-export

3 REPLIES 3

joergkost
Contributor II

Seeing the configuration snippets from above, I would assume the following will work for you:

ip prefix-list export-routes-as9498 seq 50 permit 180.151.0.0/24
ip prefix-list export-routes-as9498 seq 100 permit 125.63.64.0/24

route-map as9498-out permit 25
match ip address prefix-list export-routes-as9498
route-map as9498-out permit 50
set community no-export

router bgp
# replace outside route-map
neighbor 218.100.48.20 route-map out as9498-out

# exec mode
clear ip bgp neighbor 218.100.48.20 (soft? hard? depends on current state)

 

ddpatil89
New Contributor III

Yes. We have many peers on the router all having no-export community set. I only pasted configuration for which i required help.

joergkost
Contributor II

Do you have any other peers on that router?

I would also recommend you, to re-edit your posting and remove at least the password phrase. You can also alter the IP addresses, e.g. peer-48.10 would be enough to understand.

GTM-P2G8KFN