David Kempe wrote: > Patrick Lesslie wrote: > > > >auto eth0 > >iface eth0 inet static > > address 192.168.1.42 > > network 192.168.1.0 > > netmask 255.255.255.128 > > broadcast 192.168.1.0 > > up route add -net 192.168.1.128 netmask 255.255.255.128 gw 192.168.1.2 > > up route add default gw 192.168.1.200 > > down route del default gw 192.168.1.200 > > down route del -net 192.168.1.128 netmask 255.255.255.128 gw > > 192.168.1.2 > > I don't know why you wouldn't user the 'gateway' directive to add a > gateway - unless theres some funny subnet maths there I couldn't be > bothered working out....
Yes I know how you feel. I just pasted a bit of network-interfaces.gz to illustrate the idea of adding up and down commands generally. Also route isn't the greatest command for adding routes anyway, as Rob pointed out; ip is much nicer. > we add a '||true' at the end of the route statements so everything > parses ok if the card doens't come up or something. Patrick -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html