[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Re making routes permanent



On Thu, 1 May 2003 10:44 am, Craig Sanders wrote:
> unless you want to use a routing daemon like zebra (which is overkill for
> this job),  look at the man page for interfaces(5), the "up" command is
> probably what you want.
>
> e.g. something like this in /etc/network/interfaces:
>
> iface eth0 inet static
>   address x.x.x.x
>   netmask 255.255.255.0
>   broadcast x.x.x.255
>   up route add -net y.y.y.y gw z.z.z.z
>   up route add -net a.a.a.a gw z.z.z.z

And you should really put corresponding "route del"s in there too, otherwise 
you could end up with duplicated routes and all sorts of funniness if your IP 
is changing a bit (not too likely, but better to be neat than sorry).

Something like :

down route del -net y.y.y.y gw z.z.z.z
down route del -net a.a.a.a gw z.z.z.z

etc...

t
-- 
GPG : http://n12turbo.com/tarragon/public.key



Reply to: