[Sussex] Persistent routes

Simon Story simon.story at catalyst-eu.net
Tue May 15 11:45:38 UTC 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 15/05/12 12:36, Jan Henkins wrote:
> Hey Simon,
> 
> On Tue, May 15, 2012 12:33, Simon Story wrote:
>> You can't specify 'gateway' twice in an debian/ubuntu interfaces
>> file, that is shorthand for setting the default route. You can
>> only have one default route. Remove the gateway line one eth1:0
>> and see what happens.
> Well spotted! :-P Not sure why I did not "see" it...

Copy and paste ;-)

Actually you can have more than one (Because someone is going to
correct me there) but only for each protocol. Since you are only
dealing with ipv4 here, you can only only have one ipv4 default gateway.

Another case is policy routing, where you can say traffic from network
'y' goes via gateway 'x', but traffic from network 'a' goes via
gateway 'b'.

In a debian interfaces file this is done like so (Presuming you have
created an entry in /etc/iproute2/rt_tables) :

  up ip rule add from 12.34.12.0/24 table extraif
  up ip route add default via 12.34.100.1 table extraif

Don't anybody actually use that in an interfaces file, I have not
checked it, but that is the general idea.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iF4EAREIAAYFAk+yQdoACgkQ0t2asVgsCgC0VgD/ZUu/aDVSstgzm9j9L06LjJ48
1XA1E8VZbJBFCdf+cMMA/3xQe/+Z7PFAvYDa9OCNqpHwmDkmEksr6lahWcK82itl
=m20J
-----END PGP SIGNATURE-----



More information about the Sussex mailing list