cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
225
Views
0
Helpful
2
Replies

Remove Community From /24 and Change community From /32

Hi Dears

I recieve Routes X.X.X.X/24 le 32

/24 by community 650001:100

/32 by community 650001:200

Now i Want remove /24 community and change each subnet /32 Get from Neighbor to 650001:300

How do this by route-maps?

2 Replies 2

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello admin@atrinnet.net ,

standard BGP communities are 32 bit integer in the format ASN:value.

You can use ip community-list to match the community values you are interested in.

ip community-list 1 permit 65001:100

ip community-list 2 permit 65001:200

A route-map can match on community values using ip communty-list(s) and it can set community values to none , to a new value or it can add addtional value with the keyword additive.

route-map SETCOM permit 10

match community 1

set community none

route-map SETCOM permit 20

match community 2

set community 65001:300

route-map SETCOM permit 30

! last clause to allow other prefixes with not changes

The question becomes where you can apply a route-map like this.

You can make a single route-map used in ingress using also prefix-lists as match in addition to match the community values

ip prefix-list BLOCK1  seq 5 permit X.X.X.X/24

ip prefix-list SUBNETS seq 5 permit X.X.X.X/24 ge 25 le 32

You can easily combine match address prefix  <name> and match community <com-list-number> in same route-map clause

Hope to help

Giuseppe

 

 

Harold Ritter
Cisco Employee
Cisco Employee

Hi admin@atrinnet.net ,

You can do something as simple as that.

route-map setCommunity permit 10

 match community 1

 set community none           # remove all communities from the path, including 65001:100

route-map setCommunity permit 20

 match community 2

 set community 65001:300           # replace 65001:200 by 65001:300

route-map setCommunity permit 30

!

ip community-list 1 permit 65001:100

ip community-list 2 permit 65001:200

Regards,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México
Review Cisco Networking for a $25 gift card