Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

bgp community no-export not working 1

Status
Not open for further replies.

norteldude78

IS-IT--Management
Nov 10, 2005
214
US
Hello,

I have a problem with BGP communities. I cannot get the no-export community value to work (if I am misunderstanding something, please let me know). I have the following topology:

AS65400: R4 (connected to R2)
|
AS65000: R2 ----- R1
|
AS65500: R5 (connected to R1)

I have a loopback on R4 (4.4.4.4/24) advertised to R2 (and thus AS65000).
I have a route-map on R4 setting the community value to no-export.

Code:
R4
interface Loopback0
 ip address 4.4.4.4 255.255.255.0
router bgp 65400
 network 4.4.4.0 mask 255.255.255.0
 neighbor 172.12.24.2 remote-as 65000
 neighbor 172.12.24.2 send-community
 neighbor 172.12.24.2 route-map NOEXPORT4 out
access-list 4 permit 4.4.4.0 0.0.0.255
route-map NOEXPORT4 permit 10
 match ip address 4
 set community no-export
route-map NOEXPORT4 permit 20

On R2 I see the community value has been set (see bottom line):

Code:
R2#show ip bgp 4.4.4.0
BGP routing table entry for 4.4.4.0/24, version 34
Paths: (1 available, best #1, table Default-IP-Routing-Table, not advertised to EBGP peer)
Flag: 0x208
  Advertised to non peer-group peers:
  172.12.123.1
  65400
    172.12.24.4 from 172.12.24.4 (14.14.14.14)
      Origin IGP, metric 0, localpref 100, valid, external, best
      Community: no-export

On R1 it is not set:

Code:
R1#show ip bgp 4.4.4.0
BGP routing table entry for 4.4.4.0/24, version 3
Paths: (2 available, best #1, table Default-IP-Routing-Table)
  Advertised to non peer-group peers:
  172.12.15.5 172.12.123.3
  65400, (Received from a RR-client)
    172.12.123.2 from 172.12.123.2 (2.2.2.2)
      Origin IGP, metric 0, localpref 100, valid, internal, best
  65400, (Received from a RR-client)
    172.12.123.3 from 172.12.123.3 (3.3.3.3)
      Origin IGP, metric 0, localpref 100, valid, internal

R1#show ip bgp community no-export

R1#

The route is advertised to R5 by R1. I thought the community value is "optional transitive" which means that it gets passed to neighbor routers, so R1 should see "no-export". Do I need to set the community value again on R2 in order to prevent this route from being advertised to R5?

Am I missing something?

-B
 
do you have send community in the bgp peering between r1 and r5 ? it definitely looks like its been stripped out somewhere...
 
Thanks plshlpme! I needed to put it on R2's neighbor statement to R1. It worked perfectly after that command. Can't believe I forgot that! :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top