BGP communities

Answered Question
Sep 17th, 2008
User Badges:

Hi Guys


Scenerio is


(AS100) (AS100) (AS200)

R4----------R1------------------R2

IBGP EBGP


On R4 (L0 4.4.4.4/32 & L1 44.44.44.44/32) I applied Community no-export and send community to R1


R1 received both the routes


On R1 I applied community none and used access list to permit 4.4.4.4 to advertise it to R2


ITs not happening....


As per Jeff Doyle (Routing TCP/IP ) on page 272 it should happen


Correct Answer by Giuseppe Larosa about 8 years 6 months ago

Hello Anand,

try to give a look at the following:


http://www.cisco.com/en/US/tech/tk365/technologies_configuration_example09186a00801475b2.shtml




Hope to help

Giuseppe


  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4 (1 ratings)
Loading.
Joseph W. Doherty Wed, 09/17/2008 - 11:35
User Badges:
  • Super Bronze, 10000 points or more

Don't have Doyle's book at hand. What's not happening, R2 isn't seeing 4.4.4.4?


Do you have send-community configured on R1's EBGP peer to R2?


PS:

Not too long ago, I ran into an issue where no-exports were being exported because send-community not configured. In other words, correct community processing appear to depend on send-community be configured with peer.

Giuseppe Larosa Wed, 09/17/2008 - 11:55
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

Hello Anand,


you need to use an inbound route-map on R1 in order to remove the no-export community early enough to allow R1 to send the prefix.

If the prefix is accepted on R1 with community no-export it will not advertise it


post your config to get better help


Hope to help

Giuseppe


adahiya Wed, 09/17/2008 - 19:14
User Badges:

R4 config:


R4#show run | b r b

router bgp 100

no synchronization

bgp log-neighbor-changes

network 4.4.4.4 mask 255.255.255.255

network 44.44.44.44 mask 255.255.255.255

neighbor 14.1.1.1 remote-as 100

neighbor 14.1.1.1 send-community

neighbor 14.1.1.1 route-map bbc out

no auto-summary

!

ip classless

no ip http server

!

ip prefix-list 1 seq 5 permit 4.4.4.4/32

!

route-map bbc permit 10

match ip address prefix-list 1

set community no-export

!

route-map bbc permit 20


R1 Config:


R1#show run | b r b

router bgp 100

no synchronization

bgp log-neighbor-changes

network 1.1.1.1 mask 255.255.255.255

neighbor 12.1.1.2 remote-as 200

neighbor 12.1.1.2 next-hop-self

neighbor 12.1.1.2 send-community

neighbor 12.1.1.2 route-map bbc out

neighbor 13.1.1.3 remote-as 300

neighbor 14.1.1.4 remote-as 100

no auto-summary

!

ip classless

no ip http server

!

ip prefix-list 10 seq 5 permit 4.4.4.4/32

!

route-map bbc permit 10

match ip address prefix-list 10

set community none

!

route-map bbc permit 20

vladrac-ccna Wed, 09/17/2008 - 23:52
User Badges:
  • Silver, 250 points or more

Hello,


You need an "neighor R2 route-map bbc in"


to be able to remove the no-export community.


Just curious exactly what you are trying to achieve. Is this a real scenario , or are you just studying the use of these communities?


Regards,

Vlad

adahiya Thu, 09/18/2008 - 00:08
User Badges:

I did that but the Problem is R1 not advertising the 4.4.4.4 route to R2


R1#show ip bgp neighbors 12.1.1.2 advertised-routes

BGP table version is 5, local router ID is 1.1.1.1

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

r RIB-failure, S Stale

Origin codes: i - IGP, e - EGP, ? - incomplete


Network Next Hop Metric LocPrf Weight Path

*> 1.1.1.1/32 0.0.0.0 0 32768 i

*>i44.44.44.44/32 14.1.1.4 0 100 0 i

steve_steele Thu, 09/18/2008 - 00:22
User Badges:
  • Bronze, 100 points or more

On R4 you are advertising the network with the no-export community.


On R1 you need to remove the no-export on the route as you learn it inbound from R4 in order to advertise it on.


You are trying to alter the route as it goes out to R2. but as the route will not be advertised to R2 because of the no-export you can not alter it outbound.


Remove the no-export from the routes as you learn them and they will be advertised.


HTH


Steve

adahiya Thu, 09/18/2008 - 00:28
User Badges:

I understand what u said Steve but how in Jeff doyle (TCP/IP vol2) gave this example.


And u know if I add community none At R1 interface(connected to R4) the route comes but in that situation there is no value of using the community

Giuseppe Larosa Thu, 09/18/2008 - 03:31
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

Hello Anand,

BGP communities are very useful as a way to mark groups of routes in order to give to iBGP neighbors and eBGP peers an abstract criteria for performing some route manipulation:

for example suppose provider A is a client of provider B

provider A offers two internet access services : a basic free access and a premium services.

provider A and provider B agree that provider A will send routes of free service as 1000:1010 and routes for premium services as 1000:2020. Provider B will use this info to provide a different treatment to the two groups of routes.

Without using community every time a change is made in the usage and distribution of subnets to service mapping both provider A and provider B need to change their configs.

By using the BGP community only provider A makes changes like moving a subnet from a service to the other or adding a new subnet: provider B working on BGP community doesn't need to make any change the new/moved IP subnet will be advertised with the appropriate BGP community and treated accordingly by provider B.


In your scenario you can understand that BGP has different tables: one for the received BGP advertisements, one for policies, and one for the BGP prefixes to be advertised : without using a inbound route-map on R1 the BGP community no-export will exclude the prefix from the outgoing table and so when you try to remove the community is too late



Hope to help

Giuseppe


adahiya Thu, 09/18/2008 - 03:56
User Badges:

Guys I am still confused can u provide me some good link to clear the Community fundamentals

Actions

This Discussion