11-17-2022
	
		
		02:00 PM
	
	
	
	
	
	
	
	
	
	
	
	
	
	
 - last edited on 
    
	
		
		
		11-21-2022
	
		
		01:20 AM
	
	
	
	
	
	
	
	
	
	
	
	
	
	
 by 
		
	
	
	
			
				
		
		
			Translator
		
		
		
 
		
		
		
		
		
	
			
		
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
Solved! Go to Solution.
			
    
	
		
		
		11-17-2022
	
		
		02:41 PM
	
	
	
	
	
	
	
	
	
	
	
	
	
	
 - last edited on 
    
	
		
		
		11-21-2022
	
		
		01:17 AM
	
	
	
	
	
	
	
	
	
	
	
	
	
	
 by 
		
	
	
	
			
				
		
		
			Translator
		
		
		
 
		
		
		
		
		
	
			
		
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,
			
    
	
		
		
		11-17-2022
	
		
		02:34 PM
	
	
	
	
	
	
	
	
	
	
	
	
	
	
 - last edited on 
    
	
		
		
		11-21-2022
	
		
		01:18 AM
	
	
	
	
	
	
	
	
	
	
	
	
	
	
 by 
		
	
	
	
			
				
		
		
			Translator
		
		
		
 
		
		
		
		
		
	
			
		
I want to edit my comment, I test it match and set community under same
route-map
and it work prefect. 
thanks 
			
    
	
		
		
		11-17-2022
	
		
		02:41 PM
	
	
	
	
	
	
	
	
	
	
	
	
	
	
 - last edited on 
    
	
		
		
		11-21-2022
	
		
		01:17 AM
	
	
	
	
	
	
	
	
	
	
	
	
	
	
 by 
		
	
	
	
			
				
		
		
			Translator
		
		
		
 
		
		
		
		
		
	
			
		
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,
11-18-2022 07:42 AM - edited 11-18-2022 07:42 AM
11-18-2022 08:17 AM
You are very welcome Mustafa and thanks for the update
 
					
				
				
			
		
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