-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[IPv6] RR FRR modifies the NEXT-HOP attribute for ipv6 prefixes sent to eBGP neighbor and imposes its own link-local ipv6 address erroneously #16198
Comments
I was doing some experiments and captures and wanted to provide the following to help debug further ... The following diffs will change the behaviour and prevent the link-local address getting added
Another query is that I don't see part of the code actually adding the RR link-local to the next-hop, only setting:
... so I guess some other part of the code is filling in the blank here? Line 545 in b436e96
Finally, I wonder about this statement in the RFC and the observed behaviour: The link-local address shall be included in the Next Hop field if and Which link-local should be included, the originator of the route (true next-hop) or the intermediary (client)--ibgp-->(RR)--ebgp-->(DCR) where they all share the same subnet. |
But it doesn't say anything about MP_REACH_NLRI attribute. NEXT_HOP is IPv4 only.
Did you use |
If the intent of this code is to either maintain the next-hop as is when policy is applied (`PEER_FLAG_NEXTHOP_LOCAL_UNCHANGED`) OR Pass the next-hop including link-local when we share the network, then we should probably check also if the nh link-local actually exists in the record. Signed-off-by: Richard Cunningham <[email protected]>
FRRouting#16198 - Only pass nh link-local if it exists
@ton31337 - I did some experimentation with those flags but in our scenario they had no effect. I was able to isolate the code where I believe our issue is triggered (see #16200). I think there is an assumption in FFR code that the peer originating the IPv6 prefix, on the shared network, has actually added its link-local as a next-hop. In our case, it hasn't which results in FRR inserting it's own link-local which is not what we want. BIRD on the other hand handles this case more gracefully but we'd really like to avoid having to move all our RRs to BIRD :-( --- update --- Ok #16200 clearly breaks many other cases, but I think it illustrates our problem at least. |
You say it's not working, but bcf094e says it's ( |
The check for Also this code expects to PRESERVE the link-local but in our case it does not exist. So we hit the second (OR) test, since we are on a common network. So now, even in the absence of a link-local next-hop, we do set:
this later causes the update formation code to insert the wrong link-local address. |
For me it makes sense adding this check ( /cc @riw777 |
Is |
If you are asking if this flag is set automatically when the same network segment - then no. |
No that is not what I am asking. I'm asking if, when we two speakers are on the same network segment, we should not be changing any of the next-hop fields regardless of this |
…CAL_UNCHANGED Signed-off-by: Richard Cunningham <[email protected]>
Exclude case for remote peer where the link-local next-hop has not been included. Signed-off-by: Richard Cunningham <[email protected]>
…tion bgpd - Exclude case for remote prefix w/o link-local #16198
Description
We already discussed this in FRR general chat, filing the issue as agreed.
Problem Description
Our testing has shown that FRR does not follow the RFC when it comes to respecting the next-hop unchanged status for ipv6 eBGP sessions.
In essence what we have seen across the versions (including v10) is the following:
[RR-client-VM01] ----> [FRR RR] ---> [GW router]
In this setup RR client is sending the IPv6 prefix A/128 w/ a next-hop of that IPv6 address of the RR-client-VM01.
FRR then takes that prefix and announces it via eBGP but sends both: link-local (of the FRR RR peer itself - which is not following RFC) and a proper IPv6 global IPv6 address as a next-hops. We do use next-hop unchanged, and still FRR imposes its own Link-Local ipv6 address, which breaks the routing.
If we take a look at the RFC for a route-reflector, although no specific mention of IPv6, link-local or global addressing, but it does state:
And in our case, when one does tpcdump we still see the link-local ipv6 in the announcements in the next-hop, which is in this case erroneous.
This behavior is not seen in other implementations like Cisco/Juniper/BIRD and co...
We did see: #10009 and couple of more issues filed in GitHub around this, but the result seems always the same: people just get told to try to enforce the peer to prefer global next-hop.
Unfortunately the peers we are dealing with (GW router) do not have an option to set set ipv6 next-hop prefer-global in a route map, which actually breaks our entire IPv6 deployment and makes FRR not usable in this use-case for ipv6 load…
Potential portion of the code that does not seem right
It seems to be this particular check that is causing the LL NH to be added:
frr/bgpd/bgp_route.c
Line 2485 in d5b0c76
w/o this portion (that erroneous modifies the NH and adds LL), we get properly formed announcement, and RR does not impose its LL on top of the global.
Thanks & best regards.
Version
How to reproduce
We can provide the configurations (cleaned up), but in essence:
Observe tcpdump and announcements from FRR RR towards GW FRR - where one will notice that RR FRR imposes its link-local address by mistake towards ebgp peer.
Expected behavior
FRR RR does not try to get in the way and respects RR RFC and does not modify in any way NEXT_HOP attribute.
Actual behavior
NEXT_HOP as:
Additional context
No response
Checklist
The text was updated successfully, but these errors were encountered: