[dev] Issue with route-map on route-reflector?

François Serman francois.serman at corp.ovh.com
Mon Aug 21 12:54:33 EDT 2017


Hi,

First of all, I hope this is the appropriate ML :)

I have an issue with route-map applied to reflected route, in the following scheme:

A [ exaBGP ] --- advertises prefixes ---> B [ FRR ] --- appends attributes ----> C [ FRR ]
10.1.0.1                                                     10.2.0.1                                                10.3.0.254


A advertises prefixes (1.1.1.1-24/32 with next hop 1.2.3.4).
B is supposed to set a community (I've added local-pref and changed the next-hop to make for tests purposes).
C is supposed to have an aggregated view of the prefixes decorated with the communities.

My issue is : A's advertised-routes output seems OK (next hop, local pref) but only the local network (as in bgp router id block) is actually changed.

I didn't find anything in the documentation about that. I've only found a mention in the cisco documentation (https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/iproute_bgp/configuration/xe-3s/irg-xe-3s-book/configuring_internal_bgp_features.html) :

"The use of set clauses in outbound route maps can modify attributes and possibly create routing loops. To avoid this behavior, most set clauses of outbound route maps are ignored for routes reflected to iBGP peers. The only set clause of an outbound route map on a route reflector (RR) that is acted upon is the set ip next-hop clause. The set ip next-hop clause is applied to reflected routes. "

Is there something I'm missing? 
Also, I've been checking who was right using tcmdump, attached to this email.

Here is B's config:

router bgp 65001
 bgp router-id 10.2.0.1
 bgp log-neighbor-changes
 neighbor my_route_advertisers peer-group
 neighbor my_route_reflectors peer-group
 neighbor my_route_reflectors remote-as internal
 neighbor my_route_reflectors description route-forwarder
 neighbor 10.3.0.254 remote-as 65001
 neighbor 10.3.0.254 peer-group my_route_advertisers
 neighbor 10.1.0.1 peer-group my_route_reflectors
 !
 address-family ipv4 unicast
  network 192.168.21.0/24
  neighbor my_route_advertisers route-map deny-in in
  neighbor my_route_reflectors route-reflector-client
  neighbor my_route_reflectors route-map deny-out out
  neighbor 10.3.0.254 route-map apply-community out
 exit-address-family
 vnc defaults
  response-lifetime 3600
  exit-vnc
!
route-map apply-community permit 10
 set community 65001:1010
 set ip next-hop 8.8.8.8
 set local-preference 10
!
route-map deny-in deny 5
!
route-map deny-out deny 5



and its advertised routes:

# sh ip bgp neighbors 10.3.0.254 advertised-routes 
BGP table version is 25, local router ID is 10.2.0.1
Status codes: s suppressed, d damped, h history, * valid, > best, = multipath,
              i internal, r RIB-failure, S Stale, R Removed
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 1.1.1.1/32       8.8.8.8                  0     10      0 i
....
*> 1.1.1.24/32      8.8.8.8                  0     10      0 i
*> 192.168.21.0     8.8.8.8                  0     10  32768 i

Total number of prefixes 25


And now, C's config:

router bgp 65001
 bgp router-id 10.3.0.254
 bgp log-neighbor-changes
 neighbor my_route_advertisers peer-group
 neighbor my_route_reflectors peer-group
 neighbor my_route_reflectors remote-as internal
 neighbor my_route_reflectors description route-forwarder
 neighbor 10.4.0.254 remote-as 65001
 neighbor 10.4.0.254 peer-group my_route_advertisers
 neighbor 10.2.0.1 peer-group my_route_reflectors
 neighbor 10.2.0.2 peer-group my_route_reflectors
 !
 address-family ipv4 unicast
  neighbor my_route_advertisers route-map deny-in in
  neighbor my_route_reflectors route-reflector-client
  neighbor my_route_reflectors route-map deny-out out
  neighbor 10.2.0.1 soft-reconfiguration inbound
 exit-address-family
 vnc defaults
  response-lifetime 3600
  exit-vnc
!
route-map deny-in deny 5
!
route-map deny-out deny 5


rr# show ip bgp neighbors 10.2.0.1 received-routes
BGP table version is 0, local router ID is 10.3.0.254
Status codes: s suppressed, d damped, h history, * valid, > best, = multipath,
              i internal, r RIB-failure, S Stale, R Removed
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 1.1.1.1/32       1.2.3.4                  0    100      0 i
.....
*> 1.1.1.24/32      1.2.3.4                  0    100      0 i
*> 192.168.21.0     8.8.8.8                  0     10      0 i

Total number of prefixes 25

Thanks!

François
-------------- next part --------------
A non-text attachment was scrubbed...
Name: frr.pcap
Type: application/vnd.tcpdump.pcap
Size: 3267 bytes
Desc: frr.pcap
URL: <http://lists.frrouting.org/pipermail/dev/attachments/20170821/97cec573/attachment.pcap>


More information about the dev mailing list