11-20-2011 08:25 PM - edited 03-07-2019 03:29 AM
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
Solved! Go to Solution.
11-20-2011 11:59 PM
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
11-21-2011 03:35 AM
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:
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
11-20-2011 08:53 PM
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
11-20-2011 09:27 PM
Hi Smitesh,
All Im looking for is how to interpret this line:
set community 3000:999 64810:1000 additive
Krishna
11-20-2011 09:33 PM
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
11-20-2011 09:42 PM
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
11-20-2011 09:57 PM
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
11-20-2011 10:02 PM
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
11-20-2011 10:08 PM
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
11-20-2011 10:36 PM
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
11-20-2011 10:57 PM
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
11-20-2011 11:36 PM
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
11-20-2011 11:59 PM
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
11-21-2011 12:27 AM
Found an useful link for learning BGP attribute:
http://www.quagga.net/docs/docs-multi/Using-BGP-Communities-Attribute.html
Krishna
11-21-2011 01:44 AM
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
11-21-2011 03:35 AM
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:
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide