<div style="font-family: Arial, sans-serif; font-size: 14px;">Hello BIRDs!</div><div style="font-family: Arial, sans-serif; font-size: 14px;"><br></div><div style="font-family: Arial, sans-serif; font-size: 14px;">I am trying out EVPN in a multi-vendor environment (namely against Arista and Huawei CE6881E) on an IPv4 underlay and I noticed that neither of these vendors are considering EVPN routes received from BIRD as valid.</div><div>When I inspect EVPN routes on Huawei it shows that the next-hop address is an IPv4 mapped to IPv6 on all routes from BIRD. To keep it short I'll only include one IMET route from Arista (10.10.10.1) and one from BIRD (10.10.10.3) where the route from Arista has IPv4 next-hop and route from BIRD does not.</div><div style="font-family: Arial, sans-serif; font-size: 14px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">-----<br><span>[~vx-4]displ bgp evpn all routing-table inclusive-route </span><div><span> Local AS number : 65000</span></div><div><span> BGP Local router ID is 10.10.10.2</span></div><div><span> Status codes: * - valid, > - best, d - damped, x - best external, a - add path,</span></div><div><span> h - history, i - internal, s - suppressed, S - Stale</span></div><div><span> Origin : i - IGP, e - EGP, ? - incomplete</span></div><div><span> </span></div><div><span><span> Route Distinguisher: 10.10.10.1:10010</span><div><span> Network(EthTagId/IpAddrLen/OriginalIp) NextHop</span></div><span> *>i 0:32:10.10.10.1 10.10.10.1</span> </span></div><div><span> Route Distinguisher: 10.10.10.3:10010</span></div><div><span> Network(EthTagId/IpAddrLen/OriginalIp) NextHop</span></div><span> i 0:32:10.10.10.3 ::FFFF:10.10.10.3<br>-----</span></div><div style="font-family: Arial, sans-serif; font-size: 14px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"><span>I also checked with Wireshark and BIRD really sends an IPv6 next hop. I am using the following config for BGP:</span></div><div style="font-family: Arial, sans-serif; font-size: 14px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"><span>-----<br><span>template bgp evpn_peer {</span><div><span> local as 65000;</span></div><div><span> source address 10.10.10.3;</span></div><div><br></div><div><span> ipv4 {</span></div><div><span> import none;</span></div><div><span> # routed by ospf in underlay</span></div><div><span> export none;</span></div><div><span> };</span></div><div><br></div><div><span> evpn {</span></div><div><span> import all;</span></div><div><span> export all;</span></div><div><span> };</span></div><div><span>}</span></div><div><br></div><div><span>protocol bgp bgp_Huawei from evpn_peer {</span></div><div><span> neighbor 10.10.10.2 as 65000;</span></div><div><span>}</span></div><span></span>-----</span></div><div style="font-family: Arial, sans-serif; font-size: 14px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"><span>Looking at the BIRD BGP docs I also tried explicitly setting "next hop address 10.10.10.3" in the evpn block but the result was the same. I understand that this could technically fall under RFC 8950 and the "extended next hop <switch>" option in which case it would be okay to send the next hop as IPv6 however by default this option should be disabled in BIRD and even if I explicitly disable it I still see the next hop as IPv6. I looked over how the BGP packets are constructed and I think this comes down to the <b>bgp_encode_next_hop_ip()</b> function where the <span><b>bgp_channel_is_ipv4(s->channel) </b>only checks for <b>BGP_AFI_IPV4 </b>and returns false for EVPN AF so it falls through and sets the next-hop address as IPv6. I've attached a patch which fixes this behavior but I'm certain it is far from perfect.</span></span></div><div style="font-family: Arial, sans-serif; font-size: 14px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">I also went back to my BIRD-only lab and I can see the same behavior. In this case however I think either the kernel is smart enough to figure out it is an IPv4 mapped to IPv6 and therefore treats it as IPv4 or BIRD handles it because the internal representation is the same.</div><div style="font-family: Arial, sans-serif; font-size: 14px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">Am I right to consider this as a bug or is there something I missed? I don't have any experience with other Address Families in BGP with BIRD so I am not sure how bird behaves there when setting the next-hop address.</div><div style="font-family: Arial, sans-serif; font-size: 14px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"><br></div><div style="font-family: Arial, sans-serif; font-size: 14px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">With my patch applied I am happy to share that the EVPN control-plane works and I don't see any other issues. Received IMET and MAC routes are imported and get propagated into the linux bridge interface and routes exported by BIRD are also installed by the other two vendors. So far I'm only using L2 VNIs and I haven't yet configured Huawei/Arista to include IP address in the Type 2 routes, I expect that BIRD does not support this yet but I am at least curious if it can handle without crashing, or, when used as Route Reflector, if it can reflect such routes. If you have any other ideas what would be worth trying out, please let me know!</div><div style="font-family: Arial, sans-serif; font-size: 14px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"><br></div><div style="font-family: Arial, sans-serif; font-size: 14px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">PS: Thank you Ondřej for including my previous bug report in the latest rebase of the oz-evpn branch!</div><div style="font-family: Arial, sans-serif; font-size: 14px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"><br></div><div style="font-family: Arial, sans-serif; font-size: 14px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">Thank you and have a nice day!</div><div style="font-family: Arial, sans-serif; font-size: 14px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">Tomáš</div><div style="font-family: Arial, sans-serif; font-size: 14px;" class="protonmail_signature_block protonmail_signature_block-empty">
<div class="protonmail_signature_block-user protonmail_signature_block-empty">
</div>
<div class="protonmail_signature_block-proton protonmail_signature_block-empty">
</div>
</div>