Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
New Member

BGP Route-Map Question

route-map outbound-policy permit 10

match route-type local

set community 3000:999 64810:1000 additive

!

route-map outbound-policy permit 15

match route-type external

set community 64810:1000 additive

!

route-map outbound-policy permit 20

set community 64810:2000 additive


What are the purposes of above commands


Krishna

2 ACCEPTED SOLUTIONS

Accepted Solutions

BGP Route-Map Question

Hi,

Below is just a crude example.

Here, only matching thing has been shown. Once this route-map is applied to the neighbour statement; it will match all the prefixes with given community-value. Now it depends upon you what you want to do with filtered prefixes.

R1#sh run | i community-list

ip community-list 10 permit 3000:999

R1#

R1#sh run | sec route-map

route-map test permit 10

match community 10

R1#

HTH,

Smitesh

Bronze

Re: BGP Route-Map Question

Hi Krishendu,

As others have said - the Community String is just a flag, similar to the TAG in OSPF.  Setting it on its own does absolutely nothing, but what it does do is allow you to mark prefixes that you advertise so that a downstream router can do something with it.

For example:

  • You have 2 gateways onto a 3rd party controlled Corporate WAN.
  • You have the network 10.10.10.0/24 but you want to load-share the traffic, so that 10.10.10.0/25 comes in via Gateway1, and 10.10.10.128/25 comes in via gateway2.
  • You can apply community strings to these prefix advertisements, so Gateway1 sets community string 3000:100 to 10.10.10.0/25 and 3000:200 to 10.10.10.128/25  gateway 2 sets them the other way around.
  • The WAN PE routers will look for these community strings, and set the BGP Local Preference.  so if they see 3000:100 they set local preference 100.  If they see Community string 3000:200 they set local preference 200
  • This causes traffic coming into you to follow the path that you specify, while still providing failover.

This is just ONE example of why you would set a community string.

Note also that while the first part of the community string is usually set to your ASN, it doesn't have to be - the Community string is completely arbitrary - you could be in AS 64200 peering with AS 64300 and set your community strings to 10:20  it doesn't matter as long as you have agreement with whoever you are peering with.

Hope that helps!

Nick

15 REPLIES

BGP Route-Map Question

Hi Krishna,

Just based on config you have pasted, I guess nobody would be able to provide the purpose.

However, only thing anybody would be able to explain you the meaning for that as well as probable use somewhere in your network.

What I feel is your are tagging your different route type by different community value, so that they can be proccessed somewhere out there in network based on community value.

HTH,

Smitesh

New Member

BGP Route-Map Question

Hi Smitesh,

All Im looking for is how to interpret this line:

set community 3000:999 64810:1000 additive

Krishna

Re: BGP Route-Map Question

Hi Krishna,

If say prefixes which you have recieved has already got some community value attached to it, the above config will add 3000:999 64810:1000 to it; without removing the exisiting community.

Maybe, below link might be usefull to you:

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

HTH,

Smitesh

Message was edited by: smitesh kharecha

New Member

Re: BGP Route-Map Question

Hi Smites,

Sorry for bothering again

3000:999, 64810:1000 : What does this values mean?

I know this is related to BGP community

ASN: Number , what does this stand for?

Krishna

Re: BGP Route-Map Question

Hi Krishna,

Community value is 4 octets.

First two octed as generally AS number, while remaing / last two octets are locally significant.

ASN is number which you need to configure for your BGP, just as you provide EIGRP with AS number or OSPF with Proccess-ID. Only difference is that EIGRP and OSPF are locally significant and doesn't require a governing authority to provide them. However ASN are provided by IANA ( although you can use private ASN in your network, but can't use them for any traffic going on intrenet; It is somewhat similar to IP Addressing where you have private and public IP addresses).

HTH,

Smitesh

New Member

Re: BGP Route-Map Question

Hi Smitesh,

Thanks for clarifying this point.

3000:999 : So this would mean that if ASN matches 3000, then something has to be increased or decreased by 999 ?

Also the value 999 is just locally significant

Krishna

Re: BGP Route-Map Question

Hi,

Nope that doesn't mean anthing close to what you mentioned.

Community-value are use to flag or say mark the BGP updates, so that they can be process somewhere down in the network based on community values.

Let take any example,

Say you tag / flag / mark a BGP update with community value 3000:999 at location A

Now, you have some router which might be across the continent, say location B (and don't know how many hops away). One that BGP update reaches that router B, you can take action (ranging from dropping, routing somewhere else, etc) based on those community-values.

HTH,

Smitesh

New Member

BGP Route-Map Question

Ok another guess.

3000:999 : Does this mean that from Router A we are tagging the routes with community 999.

At the destination, we have a community 999. Whatever defined at the destination community 999, will be applied to the routes.

Krishna

BGP Route-Map Question

Hi,

Partially correct.

However let me clarify on that correctly.

Say at location you are adding community value 3000:999 ( you need to add 3000:999, and not  just 999. Router won't be adding ASN himself.) when it reaches at location B, and say it is also receiving  prefixes with another values; then you have to make a route-map which will filter the prefixes which have the value 3000:999.

Here there is nothing related to community at destination end. Destination end will only be filtering  based on community vale  which has been set by source end.

HTH,

Smitesh

New Member

Re: BGP Route-Map Question

Hi Smitesh,

Im getting the points you saying

'when it reaches at location B, and say it is also receiving  prefixes with another values; then you have to make a route-map which will filter the prefixes which have the value 3000:999.'

I just wanted to how that filtering happens at the destination? Can you show an example if possible?

Krishna

BGP Route-Map Question

Hi,

Below is just a crude example.

Here, only matching thing has been shown. Once this route-map is applied to the neighbour statement; it will match all the prefixes with given community-value. Now it depends upon you what you want to do with filtered prefixes.

R1#sh run | i community-list

ip community-list 10 permit 3000:999

R1#

R1#sh run | sec route-map

route-map test permit 10

match community 10

R1#

HTH,

Smitesh

New Member

BGP Route-Map Question

Found an useful link for learning BGP attribute:

http://www.quagga.net/docs/docs-multi/Using-BGP-Communities-Attribute.html

Krishna

BGP Route-Map Question

Hi Krishna,

Definately there would be tons of information available on the internet for your reference.

PS: If you think your concern has been addressed, can you please close this thread; so that other members don't waste  there time coming to this thread and finding it to be already answered.

Regards,

Smitesh

Bronze

Re: BGP Route-Map Question

Hi Krishendu,

As others have said - the Community String is just a flag, similar to the TAG in OSPF.  Setting it on its own does absolutely nothing, but what it does do is allow you to mark prefixes that you advertise so that a downstream router can do something with it.

For example:

  • You have 2 gateways onto a 3rd party controlled Corporate WAN.
  • You have the network 10.10.10.0/24 but you want to load-share the traffic, so that 10.10.10.0/25 comes in via Gateway1, and 10.10.10.128/25 comes in via gateway2.
  • You can apply community strings to these prefix advertisements, so Gateway1 sets community string 3000:100 to 10.10.10.0/25 and 3000:200 to 10.10.10.128/25  gateway 2 sets them the other way around.
  • The WAN PE routers will look for these community strings, and set the BGP Local Preference.  so if they see 3000:100 they set local preference 100.  If they see Community string 3000:200 they set local preference 200
  • This causes traffic coming into you to follow the path that you specify, while still providing failover.

This is just ONE example of why you would set a community string.

Note also that while the first part of the community string is usually set to your ASN, it doesn't have to be - the Community string is completely arbitrary - you could be in AS 64200 peering with AS 64300 and set your community strings to 10:20  it doesn't matter as long as you have agreement with whoever you are peering with.

Hope that helps!

Nick

New Member

BGP Route-Map Question

Thanks a lot for clarifying this Smitesh and Nick

Krishna

660
Views
0
Helpful
15
Replies
CreatePlease to create content