<div dir="ltr">Give "bgp route-reflector allow-outbound-policy" a try<div><br></div><div>Daniel</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 21, 2017 at 12:54 PM, François Serman <span dir="ltr"><<a href="mailto:francois.serman@corp.ovh.com" target="_blank">francois.serman@corp.ovh.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
First of all, I hope this is the appropriate ML :)<br>
<br>
I have an issue with route-map applied to reflected route, in the following scheme:<br>
<br>
A [ exaBGP ] --- advertises prefixes ---> B [ FRR ] --- appends attributes ----> C [ FRR ]<br>
10.1.0.1                                                     10.2.0.1                                                10.3.0.254<br>
<br>
<br>
A advertises prefixes (1.1.1.1-24/32 with next hop 1.2.3.4).<br>
B is supposed to set a community (I've added local-pref and changed the next-hop to make for tests purposes).<br>
C is supposed to have an aggregated view of the prefixes decorated with the communities.<br>
<br>
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.<br>
<br>
I didn't find anything in the documentation about that. I've only found a mention in the cisco documentation (<a href="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" rel="noreferrer" target="_blank">https://www.cisco.com/c/en/<wbr>us/td/docs/ios-xml/ios/<wbr>iproute_bgp/configuration/xe-<wbr>3s/irg-xe-3s-book/configuring_<wbr>internal_bgp_features.html</a>) :<br>
<br>
"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. "<br>
<br>
Is there something I'm missing?<br>
Also, I've been checking who was right using tcmdump, attached to this email.<br>
<br>
Here is B's config:<br>
<br>
router bgp 65001<br>
 bgp router-id 10.2.0.1<br>
 bgp log-neighbor-changes<br>
 neighbor my_route_advertisers peer-group<br>
 neighbor my_route_reflectors peer-group<br>
 neighbor my_route_reflectors remote-as internal<br>
 neighbor my_route_reflectors description route-forwarder<br>
 neighbor 10.3.0.254 remote-as 65001<br>
 neighbor 10.3.0.254 peer-group my_route_advertisers<br>
 neighbor 10.1.0.1 peer-group my_route_reflectors<br>
 !<br>
 address-family ipv4 unicast<br>
  network <a href="http://192.168.21.0/24" rel="noreferrer" target="_blank">192.168.21.0/24</a><br>
  neighbor my_route_advertisers route-map deny-in in<br>
  neighbor my_route_reflectors route-reflector-client<br>
  neighbor my_route_reflectors route-map deny-out out<br>
  neighbor 10.3.0.254 route-map apply-community out<br>
 exit-address-family<br>
 vnc defaults<br>
  response-lifetime 3600<br>
  exit-vnc<br>
!<br>
route-map apply-community permit 10<br>
 set community 65001:1010<br>
 set ip next-hop 8.8.8.8<br>
 set local-preference 10<br>
!<br>
route-map deny-in deny 5<br>
!<br>
route-map deny-out deny 5<br>
<br>
<br>
<br>
and its advertised routes:<br>
<br>
# sh ip bgp neighbors 10.3.0.254 advertised-routes<br>
BGP table version is 25, local router ID is 10.2.0.1<br>
Status codes: s suppressed, d damped, h history, * valid, > best, = multipath,<br>
              i internal, r RIB-failure, S Stale, R Removed<br>
Origin codes: i - IGP, e - EGP, ? - incomplete<br>
<br>
   Network          Next Hop            Metric LocPrf Weight Path<br>
*> <a href="http://1.1.1.1/32" rel="noreferrer" target="_blank">1.1.1.1/32</a>       8.8.8.8                  0     10      0 i<br>
....<br>
*> <a href="http://1.1.1.24/32" rel="noreferrer" target="_blank">1.1.1.24/32</a>      8.8.8.8                  0     10      0 i<br>
*> 192.168.21.0     8.8.8.8                  0     10  32768 i<br>
<br>
Total number of prefixes 25<br>
<br>
<br>
And now, C's config:<br>
<br>
router bgp 65001<br>
 bgp router-id 10.3.0.254<br>
 bgp log-neighbor-changes<br>
 neighbor my_route_advertisers peer-group<br>
 neighbor my_route_reflectors peer-group<br>
 neighbor my_route_reflectors remote-as internal<br>
 neighbor my_route_reflectors description route-forwarder<br>
 neighbor 10.4.0.254 remote-as 65001<br>
 neighbor 10.4.0.254 peer-group my_route_advertisers<br>
 neighbor 10.2.0.1 peer-group my_route_reflectors<br>
 neighbor 10.2.0.2 peer-group my_route_reflectors<br>
 !<br>
 address-family ipv4 unicast<br>
  neighbor my_route_advertisers route-map deny-in in<br>
  neighbor my_route_reflectors route-reflector-client<br>
  neighbor my_route_reflectors route-map deny-out out<br>
  neighbor 10.2.0.1 soft-reconfiguration inbound<br>
 exit-address-family<br>
 vnc defaults<br>
  response-lifetime 3600<br>
  exit-vnc<br>
!<br>
route-map deny-in deny 5<br>
!<br>
route-map deny-out deny 5<br>
<br>
<br>
rr# show ip bgp neighbors 10.2.0.1 received-routes<br>
BGP table version is 0, local router ID is 10.3.0.254<br>
Status codes: s suppressed, d damped, h history, * valid, > best, = multipath,<br>
              i internal, r RIB-failure, S Stale, R Removed<br>
Origin codes: i - IGP, e - EGP, ? - incomplete<br>
<br>
   Network          Next Hop            Metric LocPrf Weight Path<br>
*> <a href="http://1.1.1.1/32" rel="noreferrer" target="_blank">1.1.1.1/32</a>       1.2.3.4                  0    100      0 i<br>
.....<br>
*> <a href="http://1.1.1.24/32" rel="noreferrer" target="_blank">1.1.1.24/32</a>      1.2.3.4                  0    100      0 i<br>
*> 192.168.21.0     8.8.8.8                  0     10      0 i<br>
<br>
Total number of prefixes 25<br>
<br>
Thanks!<br>
<span class="HOEnZb"><font color="#888888"><br>
François</font></span><br>______________________________<wbr>_________________<br>
dev mailing list<br>
<a href="mailto:dev@lists.frrouting.org">dev@lists.frrouting.org</a><br>
<a href="https://lists.frrouting.org/listinfo/dev" rel="noreferrer" target="_blank">https://lists.frrouting.org/<wbr>listinfo/dev</a><br>
<br></blockquote></div><br></div>