<div dir="ltr">The problem might be that bird does not have direct routes for the nexthop of incoming routes. You can try to drop the interface filter from "protocol direct". And if you do not want to export routes of other interfaces - you can reject them in filters. Or alternatively you can add a "generic" direct protocol for the means of having direct routes in your table, and another direct protocol with interface filter, so you can match routes just by protocol name. And there is one more option, I think you can import those direct options in "proto kernel" with "learn all" option.</div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Wed, Apr 2, 2025 at 7:54 PM Anthony Hoppe <<a href="mailto:ahoppe@backblaze.com">ahoppe@backblaze.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I do have "protocol direct" in my configuration, but am only allowing<br>
loopback and dummy interfaces as I only want BIRD to advertise the<br>
prefixes assigned to these interfaces. Below is my configuration.<br>
The intention here is to accept a default route from its peer (the<br>
access switch it's connected to) and to advertise /32's and/or /128's<br>
assigned to a loopback and/or dummy interface. The switch and host<br>
are on the network fd00:feed::/64 with the switch at fd00:feed::1 and<br>
the host at fd00:feed::3cec:efc4:177a.<br>
<br>
If I remove the interface filters under protocol direct, it does seem<br>
that BIRD automatically resolves the next-hop using link-local<br>
addressing.<br>
<br>
If I leave "protocol direct" as is, and assign the switch<br>
fd00:abcd::1/128 and add:<br>
<br>
protocol static {<br>
ipv6;<br>
route fd00:abcd::1/128 via fd00:feed::1;<br>
}<br>
<br>
And adjust the configuration to peer with fd00:abcd::1, this also works.<br>
<br>
However, the preferred configuration if possible is to peer with the<br>
switch via the directly connected address fd00:feed::1 and also keep<br>
it as the next-hop.<br>
<br>
----------<br>
<br>
log syslog all;<br>
<br>
router id 10.245.0.57;<br>
<br>
protocol device {<br>
}<br>
<br>
protocol direct {<br>
ipv4;<br>
ipv6;<br>
interface "lo*", "dummy*";<br>
}<br>
<br>
protocol kernel {<br>
ipv4 {<br>
import none;<br>
export all;<br>
};<br>
}<br>
<br>
protocol kernel {<br>
ipv6 {<br>
import none;<br>
export all;<br>
};<br>
}<br>
<br>
template bgp Upstream_Peers {<br>
local as 65920;<br>
hold time 30;<br>
multihop 2;<br>
ipv4 {<br>
extended next hop;<br>
import filter {<br>
if ( net ~ [ <a href="http://0.0.0.0/0" rel="noreferrer" target="_blank">0.0.0.0/0</a> ] ) then accept;<br>
reject;<br>
};<br>
export filter {<br>
if ( net ~ [ <a href="http://0.0.0.0/0%7B32,32%7D" rel="noreferrer" target="_blank">0.0.0.0/0{32,32}</a> ] ) then accept;<br>
reject;<br>
};<br>
};<br>
ipv6 {<br>
import filter {<br>
if ( net ~ [ ::/0 ] ) then accept;<br>
reject;<br>
};<br>
export filter {<br>
if ( net ~ [ ::0/0{128,128} ] ) then accept;<br>
reject;<br>
};<br>
};<br>
}<br>
<br>
protocol bgp access_switch_1 from Upstream_Peers { neighbor<br>
fd00:feed::1 as 65921; }<br>
<br>
----------<br>
<br>
~ Anthony<br>
<br>
<br>
<br>
<br>
On Mon, Mar 31, 2025 at 4:46 PM Alexander Zubkov <<a href="mailto:green@qrator.net" target="_blank">green@qrator.net</a>> wrote:<br>
><br>
> Hi,<br>
><br>
> As far as I remember, when multihop option is enabled it enables (or even forces) "gateway recursive". So it changes the behaviour of how the nex hop is selected. This might be your issue. Could you provide more details of what you have? The result might depend on the routes you have in your table. Do you have "protocol direct" in your config, for example?<br>
><br>
> Regards,<br>
> Alexander<br>
><br>
> On Thu, Mar 27, 2025 at 11:04 PM Anthony Hoppe via Bird-users <<a href="mailto:bird-users@network.cz" target="_blank">bird-users@network.cz</a>> wrote:<br>
>><br>
>> Hello,<br>
>><br>
>> I have a situation where I need to enable EBGP multihop even though the peer is directly connected. Backstory: I have hosts running BIRD peered with MLAG paired switches and there are instances where BGP ECMP and LACP hashing don't align. BGP packets destined to one peer (Switch A) will land on the other switch in the pair (Switch B). In this case, the switch in which the packet landed (Switch B) will route the packet to the correct switch (Switch A) causing TTL to decrement.<br>
>><br>
>> When I configure multihop in BIRD, it seems BIRD assumes that the next-hop address is unreachable and expects there to be a static route to the peer before it will consider accepted routes reachable. I can't add a static route that points to itself, so in my testing environment I ended up adding a /128 to the loopback interface on both switches and configured BIRD peer with that address. Then I was able to add the static route BIRD is expecting (and is now actually necessary), and multihop works fine.<br>
>><br>
>> However, if possible, I'd like to avoid having to do this. Is there a way?<br>
>><br>
>> Thanks!<br>
>><br>
>> ~ Anthony<br>
>><br>
>><br>
>> This email, including its contents and any attachment(s), may contain confidential and/or proprietary information and is solely for the review and use of the intended recipient(s). If you have received this email in error, please notify the sender and permanently delete this email, its content, and any attachment(s). Any disclosure, copying, or taking of any action in reliance on an email received in error is strictly prohibited.<br>
<br>
-- <br>
This email, including its contents and any attachment(s), may contain <br>
confidential and/or proprietary information and is solely for the review <br>
and use of the intended recipient(s). If you have received this email in <br>
error, please notify the sender and permanently delete this email, its <br>
content, and any attachment(s). Any disclosure, copying, or taking of any <br>
action in reliance on an email received in error is strictly prohibited.<br>
</blockquote></div>