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

Re: default route



Matt Chipman wrote:
> 
> Hi all
> 
> Just getting used to debian and need to add a default route at boot time. i
> have the route but what file do i need to add it to?
> 
> Currently i add it manually after the machine boots.
> 
> Lucky its not windows or i'd have to do it every day at least! :)

Can you add routes to a Windoze box?!!? ;-)

I do it this way:

  in /etc/network/interfaces

iface eth0 inet static
    address 192.168.1.1
    netmask 255.255.255.0
    network 192.168.1.0
    broadcast 192.168.1.0
    up route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.1.6
eth0
    down route del -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.1.6
eht0

Obviously change the IPs as appropricate. Most of the above should
already be there. YOu should just have to add the up and down.

Pete



Reply to: