BGP No-Export Community

BGP No-Export ensures prefixes to not get advertised outside of an AS. In the diagram below, I’m going to configure R2 to advertise the network to R3 using the no-export community so that R3 does not advertise this to R4.

Let’s jump on R4 to ensure the prefix has been received.

R4#sh ip bgp | b Network
Network Next Hop Metric LocPrf Weight Path
*> 0 20 i
*> 0 0 20 i
r> 0 0 20 i
*> 0 20 10 i
*> 0 20 10 i
Okay let’s set this up. On R2 I’m going to configure a route-map that sets this prefix with a community of no-export, and apply it outbound towards R3.

R2(config)#ip prefix-list 100_network seq 5 permit
R2(config)#route-map no_export_100_network
R2(config-route-map)#match ip address prefix-list 100_network
R2(config-route-map)#set community no-export
R2(config)#route-map no_export_100_network permit 20
R2(config-route-map)#router bgp 20
R2(config-router)#neighbor route-map no_export_100_network out
R2(config-router)#neighbor send-community
R2#clear ip bgp * in
R2#clear ip bgp * out
Let’s check the affect on R3’s BGP entry. Hopefully it will have sent the prefix with a no-export community.

R3#sh ip bgp
BGP routing table entry for, version 7
Paths: (1 available, best #1, table Default-IP-Routing-Table, not advertised to EBGP peer)
Flag: 0x880
Not advertised to any peer
10 from (
Origin IGP, metric 0, localpref 100, valid, internal, best
Community: no-export
Easy as that. Let’s verify that this prefix no longer gets sent to R4.

R4#sh ip bgp | b Network
Network Next Hop Metric LocPrf Weight Path
*> 0 20 i
*> 0 0 20 i
r> 0 0 20 i
*> 0 20 10 i
There we have it. R4 no longer receives this prefix.


Share on facebook
Share on twitter
Share on linkedin

Leave a Reply

Your email address will not be published. Required fields are marked *

Become a member

Full Access to 739 Lessons. New Lessons Added Every Week!

Awesome Deal! Get 2 Months for FREE!

No Obligations. Cancel At Any Time!