Gateway on routed network problem (aka: Received route with strange next-hop)
Hi, I've a static protocol which has routes like: route 10.0.0.0/24 via "uplink"; route 192.168.0.0/24 via 10.0.0.1; Obviously, this does not work in Bird, though this is perfectly valid and accepted by the Linux kernel (as long as "uplink" is up). When adding this route manually (ip route), I see in the log file messages like: KRT: Received route 192.168.0.0/24 with strange next-hop 10.0.0.1 I've found why this is so (from http://permalink.gmane.org/gmane.network.bird.user/2042): "BIRD generally assumes tha that gateway of routes is a direct neighbor according to IP addresses on interfaces, not according to routing tables." Well, now the question - *why* Bird assumes so and how to remove this assumption? In my situation, "uplink" is actually ethernet, not any kind of PtP interface, and I really want to avoid adding local IP which is in gateway's network (in some cases this is simply impossible due to tiny transfer networks and multiple gateways). Is there any easy fix for this? I feel that only few lines could be changed to allow this, but I don't know the code well (yet). Thank you! -- With best regards, Alexander.
If you add the routes with iproute2 on Linux, use the "onlink" flag: http://marc.info/?l=bird-users&m=139809577125938&w=2 On Thu, Sep 04, 2014 at 02:16:58AM +0200, Alexander Demenshin wrote:
Hi,
I've a static protocol which has routes like:
route 10.0.0.0/24 via "uplink"; route 192.168.0.0/24 via 10.0.0.1;
Obviously, this does not work in Bird, though this is perfectly valid and accepted by the Linux kernel (as long as "uplink" is up).
When adding this route manually (ip route), I see in the log file messages like:
KRT: Received route 192.168.0.0/24 with strange next-hop 10.0.0.1
I've found why this is so (from http://permalink.gmane.org/gmane.network.bird.user/2042):
"BIRD generally assumes tha that gateway of routes is a direct neighbor according to IP addresses on interfaces, not according to routing tables."
Well, now the question - *why* Bird assumes so and how to remove this assumption?
In my situation, "uplink" is actually ethernet, not any kind of PtP interface, and I really want to avoid adding local IP which is in gateway's network (in some cases this is simply impossible due to tiny transfer networks and multiple gateways).
Is there any easy fix for this? I feel that only few lines could be changed to allow this, but I don't know the code well (yet).
Thank you!
On 2014-09-04 09:06, Baptiste Jonglez wrote:
If you add the routes with iproute2 on Linux, use the "onlink" flag:
Well, this does not really help - what I want is that Bird will install the route once network becomes accessible (i.e. when interface is up), merely allowing it to import the [manually installed] route is insufficient. With best regards, Alexander.
participants (2)
-
Alexander Demenshin -
Baptiste Jonglez