BGP Community No Advertise

The BGP No Advertise community is one of the four well known communities. If you have no idea what BGP communities are about, I would suggest to check the introduction lesson first. That’s where you will learn about the basics of BGP communities.

When you add the no-advertise community to a prefix then the receiving BGP router will use and store the prefix in its BGP table but it won’t advertise the prefix to any other neighbors.

Let’s look at an example, this is the topology I will use:

BGP Community No Advertise Topology

Above you can see R1 with a loopback interface that has network 1.1.1.1 /32. We will advertise this network in BGP towards R2 with the no advertise community set. As a result, R2 will not advertise it to R3 (eBGP) or R4 (iBGP).

Configuration

Here’s the basic BGP configuration in case you want to try this example yourself.

Configurations

Want to take a look for yourself? Here you will find the startup configuration of each device.

R1

hostname R1
!
ip cef
!
interface Loopback0
 ip address 1.1.1.1 255.255.255.255
!         
interface GigabitEthernet0/1
 ip address 192.168.12.1 255.255.255.0
!
router bgp 1
 bgp log-neighbor-changes
 network 1.1.1.1 mask 255.255.255.255
 neighbor 192.168.12.2 remote-as 24
!
end

R2

hostname R2
!
ip cef
!
interface GigabitEthernet0/1
 ip address 192.168.12.2 255.255.255.0
!
interface GigabitEthernet0/2
 ip address 192.168.23.2 255.255.255.0
!
interface GigabitEthernet0/3
 ip address 192.168.24.2 255.255.255.0
!
router bgp 24
 bgp log-neighbor-changes
 neighbor 192.168.12.1 remote-as 1
 neighbor 192.168.23.3 remote-as 3
 neighbor 192.168.24.4 remote-as 24
 neighbor 192.168.24.4 next-hop-self
!
end

R3

hostname R3
!
ip cef
!
interface GigabitEthernet0/1
 ip address 192.168.23.3 255.255.255.0
!
router bgp 3
 bgp log-neighbor-changes
 neighbor 192.168.23.2 remote-as 24
!
end

R4

hostname R4
!
ip cef
!
interface GigabitEthernet0/1
 ip address 192.168.24.4 255.255.255.0
!
router bgp 24
 bgp log-neighbor-changes
 neighbor 192.168.24.2 remote-as 24
!
end

Let’s see if R2, R3 and R4 have learned our prefix:

R2#show ip bgp | include 1.1.1.1
*> 1.1.1.1/32       192.168.12.1             0             0 1 i
R3#show ip bgp | include 1.1.1.1
*> 1.1.1.1/32       192.168.23.2                           0 24 1 i
R4#show ip bgp | include 1.1.1.1
* i1.1.1.1/32       192.168.24.2             0    100      0 1 i

It’s in the BGP table of these routers. Now let’s configure R1 to add the no advertise community:

R1(config)#router bgp 1
R1(config-router)#neighbor 192.168.12.2 send-community

First we have to tell R1 to send BGP communities, by default this is disabled. Now we can create a route-map that sets the community value:

R1(config)#route-map NO_ADVERTISE permit 10
R1(config-route-map)#set community no-advertise

This route-map doesn’t have any match statements so it will set the no advertise community to all prefixes. Let’s activate it:

We're Sorry, Full Content Access is for Members Only...

If you like to keep on reading, Become a Member Now! Here is why:

  • Learn any CCNA, CCNP and CCIE R&S Topic. Explained As Simple As Possible.
  • Try for Just $1. The Best Dollar You've Ever Spent on Your Cisco Career!
  • Full Access to our 657 Lessons. More Lessons Added Every Week!
  • Content created by Rene Molenaar (CCIE #41726)

521 Sign Ups in the last 30 days

satisfaction-guaranteed
100% Satisfaction Guaranteed!
You may cancel your monthly membership at any time.
No Questions Asked!

Tags:


Forum Replies

  1. Let me give an example to avoid confusion. To keep it simple and fast, I’ll use EIGRP and a distribute-list. Here’s R1:

    R1#show run | begin router eigrp
    router eigrp 1
     network 0.0.0.0
    

    and R2:

    R2#show run | begin router eigrp
    router eigrp 1
     network 0.0.0.0
    

    R1 has two loopback interfaces that are advertised to R2:

    R2#show ip route eigrp 
    
          1.0.0.0/24 is subnetted, 1 subnets
    D        1.1.1.0 [90/130816] via 192.168.12.1, 00:02:32, GigabitEthernet0/1
          11.0.0.0/24 is subnetted, 1 subnets
    D        11.11.11.0 [90/130816] via 192.168.12.1, 00:02:32, Gigab
    ... Continue reading in our forum

  2. I think this should be the other way around:

    “As a result, R2 will not advertise it to R3 (iBGP) or R4 (eBGP).”

    Since R4 is in the same AS as R2, they would use iBGP and since R3 is in another AS it would use eBGP.

  3. Hello Elias

    Yes you are correct. It should read:

    “As a result, R2 will not advertise it to R3 (eBGP) or R4 (iBGP).”

    Thanks, I’ll let @ReneMolenaar know.

    Laz

  4. Hello Card

    The point of the No Advertise community is that you can advertise a prefix to you iBGP neighbor, but you can instruct that neighbor not to advertise it to any other neighbors downstream. The result is that R1’s neighbor (R2) learns of the prefix but R3 and R4 don’t.

    If the prefix was not advertised in the first place, R2 would not know the prefix either. This is a different result than when the No Advertis

    ... Continue reading in our forum

  5. Thanks

    This website is REALLY REALLY good to understand basic to advance level!

19 more replies! Ask a question or join the discussion by visiting our Community Forum