BGP Community No Advertise
Control how far one received prefix can travel while the BGP sessions stay established.
Lab and baseline
R1 in AS 65010 originates the host route. R2 and R4 share AS 65024; R3 is external in AS 65030. R2 sets next-hop-self toward R4 so its internal path is usable, and sends communities so R4 retains any scope tag.
| Link | First endpoint | Second endpoint |
|---|---|---|
| R1–R2 | R1 GigabitEthernet1: 192.0.2.1/30 | R2 GigabitEthernet1: 192.0.2.2/30 |
| R2–R3 | R2 GigabitEthernet2: 192.0.2.5/30 | R3 GigabitEthernet1: 192.0.2.6/30 |
| R2–R4 | R2 GigabitEthernet3: 192.0.2.9/30 | R4 GigabitEthernet1: 192.0.2.10/30 |
Complete baseline configurations
R1
hostname R1
ip cef
interface Loopback0
ip address 10.255.0.1 255.255.255.255
exit
interface Loopback10
ip address 198.51.100.1 255.255.255.255
exit
interface GigabitEthernet1
ip address 192.0.2.1 255.255.255.252
no shutdown
exit
router bgp 65010
bgp router-id 10.255.0.1
no bgp default ipv4-unicast
neighbor 192.0.2.2 remote-as 65024
address-family ipv4 unicast
no auto-summary
neighbor 192.0.2.2 activate
network 198.51.100.1 mask 255.255.255.255
exit-address-family
endR2
hostname R2
ip cef
interface Loopback0
ip address 10.255.0.2 255.255.255.255
exit
interface GigabitEthernet1
ip address 192.0.2.2 255.255.255.252
no shutdown
exit
interface GigabitEthernet2
ip address 192.0.2.5 255.255.255.252
no shutdown
exit
interface GigabitEthernet3
ip address 192.0.2.9 255.255.255.252
no shutdown
exit
router bgp 65024
bgp router-id 10.255.0.2
no bgp default ipv4-unicast
neighbor 192.0.2.1 remote-as 65010
neighbor 192.0.2.6 remote-as 65030
neighbor 192.0.2.10 remote-as 65024
address-family ipv4 unicast
no auto-summary
neighbor 192.0.2.1 activate
neighbor 192.0.2.6 activate
neighbor 192.0.2.10 activate
neighbor 192.0.2.10 next-hop-self
neighbor 192.0.2.10 send-community
exit-address-family
endR3
hostname R3
ip cef
interface Loopback0
ip address 10.255.0.3 255.255.255.255
exit
interface GigabitEthernet1
ip address 192.0.2.6 255.255.255.252
no shutdown
exit
router bgp 65030
bgp router-id 10.255.0.3
no bgp default ipv4-unicast
neighbor 192.0.2.5 remote-as 65024
address-family ipv4 unicast
no auto-summary
neighbor 192.0.2.5 activate
exit-address-family
endR4
hostname R4
ip cef
interface Loopback0
ip address 10.255.0.4 255.255.255.255
exit
interface GigabitEthernet1
ip address 192.0.2.10 255.255.255.252
no shutdown
exit
router bgp 65024
bgp router-id 10.255.0.4
no bgp default ipv4-unicast
neighbor 192.0.2.9 remote-as 65024
address-family ipv4 unicast
no auto-summary
neighbor 192.0.2.9 activate
exit-address-family
endR2# show ip bgp 198.51.100.1/32
Network Next Hop Metric LocPrf Weight Path
*> 198.51.100.1/32 192.0.2.1 0 0 65010 iR3# show ip bgp 198.51.100.1/32
Network Next Hop Metric LocPrf Weight Path
*> 198.51.100.1/32 192.0.2.5 0 65024 65010 iR4# show ip bgp 198.51.100.1/32
Network Next Hop Metric LocPrf Weight Path
*>i 198.51.100.1/32 192.0.2.9 0 100 0 65010 iAll three receiving routers have a usable baseline route. Each scope experiment starts from this untagged baseline.
Set the community
R1 adds the well-known tag as it exports the test prefix to R2. Other prefixes pass unchanged. R2 receives the tag and enforces its scope on subsequent advertisements.
R1
ip prefix-list TARGET seq 5 permit 198.51.100.1/32
route-map TAG-TARGET permit 10
match ip address prefix-list TARGET
set community no-advertise additive
exit
route-map TAG-TARGET permit 20
exitrouter bgp 65010
address-family ipv4 unicast
neighbor 192.0.2.2 route-map TAG-TARGET out
neighbor 192.0.2.2 send-community
exit-address-familyR1# clear ip bgp 192.0.2.2 soft outCheck the boundary
R2# show ip bgp 198.51.100.1/32
BGP routing table entry for 198.51.100.1/32
Paths: (1 available, best #1, table default)
65010
192.0.2.1 from 192.0.2.1
Origin IGP, metric 0, localpref 100, valid, external, best
Community: no-advertiseR3# show ip bgp 198.51.100.1/32
% Network not in tableR4# show ip bgp 198.51.100.1/32
% Network not in tableR2# show ip route 198.51.100.1
Routing entry for 198.51.100.1/32
Known via "bgp 65024", distance 20, metric 0
* 192.0.2.1, via GigabitEthernet1R2 retains and can use the route, but withdraws it from both R3 and R4. No Advertise stops further advertisement over both eBGP and iBGP.
The missing table entry is a route-distribution result, not evidence that a neighbor session failed.
Compare the scope
| Received tag at R2 | R3: external | R4: same AS |
|---|---|---|
| None | Receives | Receives |
| No Advertise | Suppressed | Suppressed |
| No Export | Suppressed | Receives with tag |
In a confederation, No Export allows distribution between member ASes but blocks export outside the confederation. The next lesson contrasts Local AS, which also blocks the member boundary. These tags constrain route announcements, not packets in an access list.
Restore advertisements
router bgp 65010
address-family ipv4 unicast
no neighbor 192.0.2.2 route-map TAG-TARGET out
exit-address-familyR1# clear ip bgp 192.0.2.2 soft outR3# show ip bgp 198.51.100.1/32
Network Next Hop Metric LocPrf Weight Path
*> 198.51.100.1/32 192.0.2.5 0 65024 65010 iR4# show ip bgp 198.51.100.1/32
Network Next Hop Metric LocPrf Weight Path
*>i 198.51.100.1/32 192.0.2.9 0 100 0 65010 iAfter convergence, the untagged route reaches both neighbors again. A soft outbound refresh avoids tearing down R1’s session.
Key Takeaways
- No Advertise stops a receiver from advertising the tagged route to any other BGP peer.
- It applies to iBGP as well as eBGP.
- The receiver may retain and use a valid tagged route.
- An outbound tag on R1 must reach R2 before R2 can enforce its scope.
- Removing the policy and refreshing advertisements restores the baseline route distribution.
Protocol and command references
Standard communities · Confederation behavior · Community lists and transmission · Router-symbol attribution.