Re: Routing doesn't start automatically
Hi Andrew,
[snips:]
Andrew Perrin wrote:
> In setting up my new machine, I've run into an odd problem. When the
> machine boots, the routing table doesn't get restored correctly. I have
> to type the following:
>
> route add 192.168.0.3 eth0
> route add default gw 192.168.0.3
...
> # /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
> auto eth0
> iface eth0 inet static
> address 192.168.0.14
> netmask 255.255.255.252
> network 192.168.0.12
> broadcast 192.168.0.15
> gateway 192.168.0.3
The trouble is the gateway you want to use as your default is not on
your network as specified by the netmask.
192.168.0.3 is not on the 192.168.12/30 net, that is why you must
manually add a route for that network and then the default gateway.
Just adjust /etc/network/interfaces and you should be all set, either
make the netmask /24, (255.255.255.0) and remove the "network" and
"broadcast" lines (advisable from the looks of things) or dig deeper
to find out why you set such a small netmask to begin with and what
_should_ be your gateway.
hth,
jereme
--
+--------------------------------------------------------------+
Jereme Corrado <jereme@restorative-management.com>
System Administrator
Restorative Management Corp.
"He has the right to criticize who has the heart to help."
--Abraham Lincoln
Reply to: