How to unset "gw" attribute when exporting
Hi list, I just tried running BGP over WireGuard link and noticed that routes were exported to kernel with "via x.x.x.x" attributes. It's a L3 point-to-point link. While routing works with or without this attribute, I am wondering if there is a way to eliminate it. 10.168.222.0/24 via 169.254.169.1 dev wg1 proto bird metric 32 vs. 10.168.222.0/24 wg1 scope link I tried setting "gw = 0.0.0.0" using an export filter, but bird will complain "Invalid gw address" because 0.0.0.0 is considered as IADDR_INVALID. I am relatively new with routing daemons and protocols at the moment, so any comments are welcome. Thanks in advance. Regards, yousong
On 03.12.19 13:22, Yousong Zhou wrote:
Hi list,
I just tried running BGP over WireGuard link and noticed that routes were exported to kernel with "via x.x.x.x" attributes. It's a L3 point-to-point link. While routing works with or without this attribute, I am wondering if there is a way to eliminate it.
10.168.222.0/24 via 169.254.169.1 dev wg1 proto bird metric 32
vs.
10.168.222.0/24 wg1 scope link
I tried setting "gw = 0.0.0.0" using an export filter, but bird will complain "Invalid gw address" because 0.0.0.0 is considered as IADDR_INVALID.
I am relatively new with routing daemons and protocols at the moment, so any comments are welcome. Thanks in advance.
Regards, yousong
Hi Yousong. As you have not a flat L2 subnet on the other site with the same L3, I think you definitely need a Gateway Address for your route. On a typical LAN you can just use `${network} dev ${dev}` when all devices on that L2 are using the same L3. But if you want to route, you need `via ${gateway}`. Maybe there are exception I'm not aware of, but "normally" you will need it. Maybe not an issue but keep an eye on your bgo config regarding 'next hop self' Best, Bernd
Hi, You do not need to set gw to zeroes. You can set ifname for the route and it makes route via an interface. Please look at this tread: https://bird.network.cz/pipermail/bird-users/2018-November/012836.html On Tue, Dec 3, 2019 at 1:28 PM Yousong Zhou <yszhou4tech@gmail.com> wrote:
Hi list,
I just tried running BGP over WireGuard link and noticed that routes were exported to kernel with "via x.x.x.x" attributes. It's a L3 point-to-point link. While routing works with or without this attribute, I am wondering if there is a way to eliminate it.
10.168.222.0/24 via 169.254.169.1 dev wg1 proto bird metric 32
vs.
10.168.222.0/24 wg1 scope link
I tried setting "gw = 0.0.0.0" using an export filter, but bird will complain "Invalid gw address" because 0.0.0.0 is considered as IADDR_INVALID.
I am relatively new with routing daemons and protocols at the moment, so any comments are welcome. Thanks in advance.
Regards, yousong
On Wed, 4 Dec 2019 at 00:16, Alexander Zubkov <green@qrator.net> wrote:
Hi,
You do not need to set gw to zeroes. You can set ifname for the route and it makes route via an interface. Please look at this tread: https://bird.network.cz/pipermail/bird-users/2018-November/012836.html
Thanks, this is it! It's also very informative to know that there are also efforts in the linux kernel to have separate nexthops objects with associated netdevice. Regards, yousong
On Tue, Dec 3, 2019 at 1:28 PM Yousong Zhou <yszhou4tech@gmail.com> wrote:
Hi list,
I just tried running BGP over WireGuard link and noticed that routes were exported to kernel with "via x.x.x.x" attributes. It's a L3 point-to-point link. While routing works with or without this attribute, I am wondering if there is a way to eliminate it.
10.168.222.0/24 via 169.254.169.1 dev wg1 proto bird metric 32
vs.
10.168.222.0/24 wg1 scope link
I tried setting "gw = 0.0.0.0" using an export filter, but bird will complain "Invalid gw address" because 0.0.0.0 is considered as IADDR_INVALID.
I am relatively new with routing daemons and protocols at the moment, so any comments are welcome. Thanks in advance.
Regards, yousong
participants (3)
-
Alexander Zubkov -
Bernd Naumann -
Yousong Zhou