Unexpected behavior of static routes
Alexander Demenshin
aldem-bird.201704 at nk7.net
Tue May 9 21:11:28 CEST 2017
On 2017-05-09 20:18, Michael McConnell wrote:
> You have a physical interface (e.g. eth0) with an address assigned to
> the 10.1.0.1/24 on the system?
No, I don't - this is exactly the problem. It has a completely different
address
in different network, and I do not want a router to have an address in
10.1.0.0/24
network (it only sends packets and is not used as a default gateway).
Just for example:
eth0 has address 192.168.1.1/24 (one and only)
When it is active (up), I want to route network 10.1.0.0/24 via this
interface,
and network 10.2.0.0/24 via gateway 10.1.0.1 (which is a separate host).
Manual setup is easy:
ip route add 10.1.0.0/24 dev eth0
ip route add 10.2.0.0/24 via 10.1.0.1
or even (if I don't want to route 10.1/24) just as
ip route add 10.2.0.0/24 via 10.1.0.1 dev eth0 onlink
though the latter is not possible to define in bird.
The problem is that adding route in linux works but only as long
as interface is up, it will be removed automatically otherwise,
that's why I need bird, to keep those extra routes alive automatically,
and no, ospf nor any other kind of dynamic protocol is not an option.
Currently bird only keeps active either interface routes or routes
via gateways which are directly connected, i.e. only when interface
itself
has assigned address from those networks (though any network routed
via interface is kind of directly connected too, just without a local
address).
--
With best regards,
Alexander.
More information about the Bird-users
mailing list