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

  • 27 August 2020
  • 3 replies

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. 


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 remote-as 10029
 neighbor peer-group IXP-peers
 neighbor description ISP-Citycom

 neighbor remote-as 9498
 neighbor peer-group IXP-peers
 neighbor 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

Userlevel 3

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.

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

Userlevel 3

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

ip prefix-list export-routes-as9498 seq 50 permit
ip prefix-list export-routes-as9498 seq 100 permit

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 route-map out as9498-out

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