On Wed, Oct 22, 2014 at 08:10:06PM +0200, Alexander Demenshin wrote:
Hi,
It would be nice to be able to use "indirect" gateways, i.e. which are routed via interface but are not part of interface networks, like this:
protocol static { route 10.1.1.0/24 via "eth0"; route 10.2.1.0/24 via 10.1.1.1; }
Hi This works, but the route must have special 'recursive' nexthop. In that case its nexthop is resolved through the table and found route is used for nexthop, combined with the original nexthop in the case where found nexthop is a device: protocol static { route 192.168.90.0/24 via 192.168.81.1; route 192.168.91.0/24 recursive 192.168.90.10; } bird> show route 192.168.81.0/24 dev eth0 [direct1 21:56:40] * (240) 192.168.90.0/24 via 192.168.81.1 on eth0 [static1 21:57:36] * (200) 192.168.91.0/24 via 192.168.81.1 on eth0 [static1 21:56:40] * (200) protocol static { route 192.168.90.0/24 via "eth0"; route 192.168.91.0/24 recursive 192.168.90.10; } bird> show route 192.168.81.0/24 dev eth0 [direct1 21:56:39] * (240) 192.168.90.0/24 dev eth0 [static1 22:00:20] * (200) 192.168.91.0/24 via 192.168.90.10 on eth0 [static1 22:08:54] * (200) -- 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."