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

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

"match community" question

                   Hi,

hopefully an easy question, but when one uses the "match community" command in a route-map, does the following work :

route-map bgp permit 1

match community 65000:2

or does it have to be:

ip community-list 20 permit 65000:2

!

route-map bgp permit 1

match community 20

the platform is SUP2T using IOS 15.0.1SY4

Many Thanks,

Guy

Everyone's tags (2)
3 ACCEPTED SOLUTIONS

Accepted Solutions
Silver

"match community" question

It has to be a community-list, otherwise it will not work.

Best Regards,

Jose.

Cisco Employee

"match community" question

Hi Guy,

I believe that only the second option is supported, i.e. first define a community ACL and then refer to it in a route-map.

Router(config-route-map)#match community ?

  <1-99>     Community-list number (standard)

  <100-500>  Community-list number (expanded)

  WORD       Community-list name

Best regards,

Peter

Silver

"match community" question

Peter,

you are right. The problem is that, if by mistake you add the community directly, IOS will not give you an error message as it will believe that this is a community-list that it really does not exist. I have seen this mistake a couple of times in production networks.

Of course, this will be depend of what community number you are using, but for those in-between 1 and 500 or in the format with the two colons, IOS will not give you any error message as it will believe that they are community-lists. For the others, it gives this message:

R7(config-route-map)#match community 501

% Community name cannot have all digits

R7(config-route-map)#match community 65000

% Community name cannot have all digits

Best Regards,

Jose.

4 REPLIES
Silver

"match community" question

It has to be a community-list, otherwise it will not work.

Best Regards,

Jose.

Cisco Employee

"match community" question

Hi Guy,

I believe that only the second option is supported, i.e. first define a community ACL and then refer to it in a route-map.

Router(config-route-map)#match community ?

  <1-99>     Community-list number (standard)

  <100-500>  Community-list number (expanded)

  WORD       Community-list name

Best regards,

Peter

Silver

"match community" question

Peter,

you are right. The problem is that, if by mistake you add the community directly, IOS will not give you an error message as it will believe that this is a community-list that it really does not exist. I have seen this mistake a couple of times in production networks.

Of course, this will be depend of what community number you are using, but for those in-between 1 and 500 or in the format with the two colons, IOS will not give you any error message as it will believe that they are community-lists. For the others, it gives this message:

R7(config-route-map)#match community 501

% Community name cannot have all digits

R7(config-route-map)#match community 65000

% Community name cannot have all digits

Best Regards,

Jose.

New Member

"match community" question

Thanks Peter, Jose.

I also always used the community list, but noticed this other config on another network

Regardsn

Guy

357
Views
5
Helpful
4
Replies