cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1128
Views
15
Helpful
4
Replies

Route Map not setting BGP Community

mustafa.chapal
Level 1
Level 1

Hi,

I have a Cisco ASR 1001-X with full-feed BGP from multiple upstreams and a /24 IP pool is advertised to them.

When a peer 1.2.3.61 advertises a /32 route over BGP example 1.2.3.15/32 with community as 65001:666, the

route-map

is unable to replace the community (even tried using additive) or remove it (tried using none). Even the other attributes like local-preference are not being set as mentioned in the

route-map

I even changed the

route-map

direction to out but still the same.

I want to set this community 7890:0 so I can advertise the /32 route to upstreams with this updated community.

Please help.

 

 

router bgp 12345
 bgp log-neighbor-changes
 bgp bestpath as-path multipath-relax
 neighbor 1.2.3.61 remote-as 12345
 neighbor 1.2.3.61 transport connection-mode active
 neighbor 1.2.3.61 update-source Port-channel1.100
 neighbor 1.2.3.61 version 4
 neighbor 5.6.8.1 remote-as 7890
 neighbor 5.6.8.1 transport connection-mode active
 neighbor 5.6.8.1 update-source GigabitEthernet0/0/1
 neighbor 5.6.8.1 version 4
 neighbor 5.6.7.1 remote-as 7890
 neighbor 5.6.7.1 transport connection-mode active
 neighbor 5.6.7.1 update-source GigabitEthernet0/0/0
 neighbor 5.6.7.1 version 4
 !
 address-family ipv4
  network 1.2.3.0 mask 255.255.255.0
  neighbor 1.2.3.61 activate
  neighbor 1.2.3.61 send-community
  neighbor 1.2.3.61 route-reflector-client
  neighbor 1.2.3.61 soft-reconfiguration inbound
  neighbor 1.2.3.61 prefix-list reserved in
  neighbor 1.2.3.61 prefix-list none out
  neighbor 1.2.3.61 route-map RTBH in
  neighbor 1.2.3.61 maximum-prefix 1500000
  neighbor 5.6.8.1 activate
  neighbor 5.6.8.1 send-community
  neighbor 5.6.8.1 soft-reconfiguration inbound
  neighbor 5.6.8.1 prefix-list reserved in
  neighbor 5.6.8.1 prefix-list SECONDARY out
  neighbor 5.6.8.1 route-map SECONDARY-IN in
  neighbor 5.6.8.1 route-map SECONDARY-OUT out
  neighbor 5.6.8.1 maximum-prefix 1500000
  neighbor 5.6.7.1 activate
  neighbor 5.6.7.1 send-community
  neighbor 5.6.7.1 soft-reconfiguration inbound
  neighbor 5.6.7.1 prefix-list reserved in
  neighbor 5.6.7.1 prefix-list PRIMARY out
  neighbor 5.6.7.1 route-map PRIMARY-IN in
  neighbor 5.6.7.1 route-map PRIMARY-OUT out
  neighbor 5.6.7.1 maximum-prefix 1500000
  maximum-paths 3
 exit-address-family

ip route 1.2.3.0 255.255.255.0 Null0

route-map RTBH permit 1
 match community 65001:666
 set local-preference 300
 set origin igp
 set community 7890:0




sh ip bgp 1.2.3.15                                             
BGP routing table entry for 1.2.3.15/32, version 427837972
Paths: (1 available, best #1, table default)
Multipath: eBGP
  Advertised to update-groups:
     16         66
  Refresh Epoch 1
  Local, (Received from a RR-client), (received & used)
    192.0.2.1 from 1.2.3.61 (1.2.3.61)
      Origin IGP, metric 0, localpref 250, valid, internal, best
      Community: 65001:666
      rx pathid: 0, tx pathid: 0x0

 

 

 

1 Accepted Solution

Accepted Solutions

Harold Ritter
Spotlight
Spotlight

Hi @mustafa.chapal ,

The match community statement requires a community-list. Try the following instead.

ip community-list 1 permit 65001:666

route-map RTBH permit 1

match community 1

Regards,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)

View solution in original post

4 Replies 4

I want to edit my comment, I test it match and set community under same

route-map 

and it work prefect. 
thanks 

Harold Ritter
Spotlight
Spotlight

Hi @mustafa.chapal ,

The match community statement requires a community-list. Try the following instead.

ip community-list 1 permit 65001:666

route-map RTBH permit 1

match community 1

Regards,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)

Hi @Harold Ritter 

This worked perfectly.

Thank you

Harold Ritter
Spotlight
Spotlight

You are very welcome Mustafa and thanks for the update

 

Regards,
Harold Ritter, CCIE #4168 (EI, SP)