PacketLab
BGP · Communities

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.

Lab topologyIllustrative network
.1 / .2 · eBGP.5 / .6 · eBGP.9 / .10 · iBGPR1AS 65010R2AS 65024R3AS 65030R4AS 65024
Solid lines: physical links. Link labels use the last octet of 192.0.2.x; every link is a separate /30. AS labels identify the protocol relationship. Loopback0 is 10.255.0.N/32 for router RN. Exact interfaces and subnets are listed below.
LinkFirst endpointSecond endpoint
R1–R2R1 GigabitEthernet1: 192.0.2.1/30R2 GigabitEthernet1: 192.0.2.2/30
R2–R3R2 GigabitEthernet2: 192.0.2.5/30R3 GigabitEthernet1: 192.0.2.6/30
R2–R4R2 GigabitEthernet3: 192.0.2.9/30R4 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
end

R2

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
end

R3

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
end

R4

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
end
Outputs are illustrative, not recorded router results. Each lesson is a separate lab. Allow updates to converge after changes; the selected baseline path is an example when all earlier criteria tie.
R2# 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 i
R3# 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 i
R4# 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 i

All 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
exit
router 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-family
R1# clear ip bgp 192.0.2.2 soft out

Check 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-advertise
R3# show ip bgp 198.51.100.1/32
% Network not in table
R4# show ip bgp 198.51.100.1/32
% Network not in table
R2# 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 GigabitEthernet1

R2 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 R2R3: externalR4: same AS
NoneReceivesReceives
No AdvertiseSuppressedSuppressed
No ExportSuppressedReceives 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-family
R1# clear ip bgp 192.0.2.2 soft out
R3# 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 i
R4# 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 i

After 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.

No Advertise Quiz

Six questions · four options each · select one answer per question. Submit all answers to see your score and explanations.

1. R2 receives No Advertise from R1. Which neighbors may R2 send that route to?
2. Must R2 remove the route from its own BGP table?
3. Why is send-community configured on R1?
4. R4 is in the same AS as R2. Does that exempt it from No Advertise?
5. R3 loses the tagged prefix. Does that alone prove its session failed?
6. What restores the lesson baseline?
Protocol and command references

Standard communities · Confederation behavior · Community lists and transmission · Router-symbol attribution.