Hi First time user of bird here so please be gentle. :) I am trying to use bird for a project and I'd like to use it for creating separate routing tables in linux. I tried to simplify my setup as much as possible like this: [root@host1 etc]# cat bird.conf log stderr all; router id 172.30.2.20; protocol device { scan time 2; # Scan interfaces every 2 seconds } protocol kernel { learn; # Learn all alien routes from the kernel persist; # Don't remove routes on bird shutdown scan time 2; # Scan kernel routing table every 2 seconds graceful restart; export all; # Default is export none merge paths; # enable ecmp } protocol direct { debug all; interface "-dummy0", "dummy1", "eth*", "em*", "en*", "br-mgmt"; } table extra; protocol kernel kernelextra { learn; persist; scan time 2; table extra; kernel table 100; import all; export all; } protocol pipe { table extra; peer table master; import all; export all; } [root@host1 etc]# ip link add mylink type dummy [root@host1 etc]# ip link set mylink up [root@host1 etc]# ip route add 10.0.2.3/32 dev mylink [root@host1 etc]# systemctl restart bird [root@host1 etc]# ip r default via 172.29.0.1 dev eth1 10.0.2.3 dev mylink scope link 172.29.0.0/25 dev eth1 proto kernel scope link src 172.29.0.20 172.30.2.0/25 dev eth0 proto kernel scope link src 172.30.2.20 [root@host1 etc]# ip r show table 100 default via 172.29.0.1 dev eth1 proto bird Is there any way that I can have the 10.0.2.3/32 route show up in kernel table 100? [root@host1 etc]# bird --version BIRD version 1.6.8 Thank you so much for an awesome piece of software! //Per
On Mon, May 04, 2020 at 11:34:38AM -0700, David Haupt wrote:
Hi
First time user of bird here so please be gentle. :) I am trying to use bird for a project and I'd like to use it for creating separate routing tables in linux.
..
[root@host1 etc]# ip link add mylink type dummy [root@host1 etc]# ip link set mylink up [root@host1 etc]# ip route add 10.0.2.3/32 dev mylink [root@host1 etc]# systemctl restart bird [root@host1 etc]# ip r default via 172.29.0.1 dev eth1 10.0.2.3 dev mylink scope link 172.29.0.0/25 dev eth1 proto kernel scope link src 172.29.0.20 172.30.2.0/25 dev eth0 proto kernel scope link src 172.30.2.20 [root@host1 etc]# ip r show table 100 default via 172.29.0.1 dev eth1 proto bird
Is there any way that I can have the 10.0.2.3/32 route show up in kernel table 100?
Hi You should check 'birdc show route' and 'birdc show route table extra' to see where on the path bird lost it. Also, you do not need restart bird after adding the route. But i think that in BIRD 1.6.x there is special exception for device routes (i.e. routes without gateway address) so they are not exported to kernel, you need to use 'device routes' option for the second kernel protocol: https://bird.network.cz/?get_doc&v=16&f=bird-6.html#krt-device-routes -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
You are also missing import all in the first kernel protocol, if I see correctly. Maria On May 5, 2020 1:04:37 AM GMT+02:00, Ondrej Zajicek <santiago@crfreenet.org> wrote:
On Mon, May 04, 2020 at 11:34:38AM -0700, David Haupt wrote:
Hi
First time user of bird here so please be gentle. :) I am trying to use bird for a project and I'd like to use it for creating separate routing tables in linux.
..
[root@host1 etc]# ip link add mylink type dummy [root@host1 etc]# ip link set mylink up [root@host1 etc]# ip route add 10.0.2.3/32 dev mylink [root@host1 etc]# systemctl restart bird [root@host1 etc]# ip r default via 172.29.0.1 dev eth1 10.0.2.3 dev mylink scope link 172.29.0.0/25 dev eth1 proto kernel scope link src 172.29.0.20 172.30.2.0/25 dev eth0 proto kernel scope link src 172.30.2.20 [root@host1 etc]# ip r show table 100 default via 172.29.0.1 dev eth1 proto bird
Is there any way that I can have the 10.0.2.3/32 route show up in kernel table 100?
Hi
You should check 'birdc show route' and 'birdc show route table extra' to see where on the path bird lost it. Also, you do not need restart bird after adding the route.
But i think that in BIRD 1.6.x there is special exception for device routes (i.e. routes without gateway address) so they are not exported to kernel, you need to use 'device routes' option for the second kernel protocol:
https://bird.network.cz/?get_doc&v=16&f=bird-6.html#krt-device-routes
-- Elen sila lumenn' omentielvo
Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
On Tue, May 05, 2020 at 12:24:42PM +0200, Maria Matějka wrote:
You are also missing import all in the first kernel protocol, if I see correctly. Maria
Well, that is default.
On May 5, 2020 1:04:37 AM GMT+02:00, Ondrej Zajicek <santiago@crfreenet.org> wrote:
On Mon, May 04, 2020 at 11:34:38AM -0700, David Haupt wrote:
Hi
First time user of bird here so please be gentle. :) I am trying to use bird for a project and I'd like to use it for creating separate routing tables in linux.
..
[root@host1 etc]# ip link add mylink type dummy [root@host1 etc]# ip link set mylink up [root@host1 etc]# ip route add 10.0.2.3/32 dev mylink [root@host1 etc]# systemctl restart bird [root@host1 etc]# ip r default via 172.29.0.1 dev eth1 10.0.2.3 dev mylink scope link 172.29.0.0/25 dev eth1 proto kernel scope link src 172.29.0.20 172.30.2.0/25 dev eth0 proto kernel scope link src 172.30.2.20 [root@host1 etc]# ip r show table 100 default via 172.29.0.1 dev eth1 proto bird
Is there any way that I can have the 10.0.2.3/32 route show up in kernel table 100?
Hi
You should check 'birdc show route' and 'birdc show route table extra' to see where on the path bird lost it. Also, you do not need restart bird after adding the route.
But i think that in BIRD 1.6.x there is special exception for device routes (i.e. routes without gateway address) so they are not exported to kernel, you need to use 'device routes' option for the second kernel protocol:
https://bird.network.cz/?get_doc&v=16&f=bird-6.html#krt-device-routes
-- Elen sila lumenn' omentielvo
Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
-- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
Hi Thank you so much! device routes was it, I should have read the documentation more carefully. //David
participants (3)
-
David Haupt -
Maria Matějka -
Ondrej Zajicek