[c-nsp] community on bgp update

Oliver Boehmer (oboehmer) oboehmer at cisco.com
Sat Mar 30 06:47:25 EDT 2013



On 29/03/2013 16:46, "Riccardo S" <dim0sal at hotmail.com> wrote:

>Hi
>do I get the same result with route-map test-1 and test-2  in setting
>these community on BGP update ?
>
>*******************************
>route-map test-1 permit 10
>match ip address prefix-list site-a
>set community 1:1 
>set community 1:2 additive
>
>
>*******************************
>route-map test-2 permit 10
>match ip address prefix-list site-a
>set  community 1:1
>continue
>!
>route-map test-2 permit 20
>match ip address prefix-list site-a
>set  community 1:2 additive

the result might be different, as the test-1 config results in this:

route-map test-1 permit 10
 match ip address prefix-list site-a
 set community 1:1 1:2 additive
!


and this one would add both communities to any communities already on the
route, while prefixes processed by test-2 will have only 1:1 1:2, with all
other communities removed.
 

>
>
>And could you please give me an example of a route-map that match the
>route marked before with 1:1 and 1:1 + 1:2 ?
>
>I was wondering if this is ok:
>
>ip policy-list PERMIT100 permit
>match community 1
>!
>ip policy-list PERMIT200 permit
>match community 2
>!
>ip community-list 1 permit 1:1
>ip community-list 2 permit 1:2
>!
>!
>!
>route-map only1-1 permit 10      <---- does it match only if it's present
>1:1 ?
>match policy-list PERMIT100

no, it will also match "1:1 1:2", you would need to use "match community 1
exact-match" in the policy-list.
 

>route-map 1-2 permit 10            <---- does it match only if are
>presend 1:1 AND 1:2 ?
>match policy-list PERMIT100
>match policy-list PERMIT200

no, you would need to do match on "ip community-list 12 permit 1:1 1:2",
which creates an AND.

hth

	oli




More information about the cisco-nsp mailing list