D'oh!

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Tue Dec 11 16:40:04 UTC 2007


On Tue, Dec 11, 2007 at 11:13:08AM -0500, chris-n/jUll39koHNgV/OU4+dkA at public.gmane.org wrote:
> I'm okay now (Internet and pinging local addresses). I guess I figured it 
> out while you were sending this. Here is my /etc/network/interfaces file 
> now (same as yours only I had to add a connection for Internet): 
> 
> # The loopback network interface
> auto lo
> iface lo inet loopback 
> 
> # The primary network interface 
> 
> auto eth0 eth1 
> 
> iface eth0 inet static
> address 192.168.0.2
> netmask 255.255.255.0
> network 192.168.0.0
> broadcast 192.168.0.255
> gateway 192.168.0.1 
> 
> #iface eth0 inet dhcp 
> 
> iface eth1 inet dhcp
> address 192.168.0.225
> netmask 255.255.255.0
> gateway 192.168.0.1 
> 
> I'm assuming that the cable modem will reset the Internet interface IP info 
> (in /etc/network/interfaces) whenever I reboot the modem or PC or 
> whatever.. 

That configuration makes no sense.  You can NOT have two interfaces on
the same subnet (192.168.0.* in your case).  It simply doesn't know
which one it should send data out of in that case.

Of course the dhcp line should simple be:
iface eth1 inet dhcp

No more.  That's it.  Done.  Perhaps things are working because dhcp is
in fact using some completely different address and ignores the rest.

At the same time, I would have thought the dhcp interface would be the
one to provide the default gateway in general, in which case eth0 should
not have any gateway line at all.

broadcast and network lines are also completely redundant since the
netmask and address are enough to calculate the other two (and is in
fact what is being done).

--
Len Sorensen
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list