How to debug network lockups and test /etc/network/interfaces config?
Short Summary: I have an Etch install that does not behave like all my other
etch installs" it locks up when I restart the networking, even if I haven't
changed the configuration. I can't find anything strange
in /etc/network/interfaces, and nothing helpful in the logs.
I'd also like to know what tool /etc/init.d/networking uses to test
the /etc/network/interfaces file for a valid config.
------------
Longer version:
I setup Debian etch systems on a regular basis and normally I setup them up on
our business LAN where I have a DHCP server, then manually setup the dual NIC
card with a copy of a know-good-and-working /etc/network/interfaces file.
I have noticed a few times (though I have not made notes of the exact
problems) that when the DHCP server is not available it has an effect both on
the rest of the installation process and a permanent effect on the way the
network behaves on that system forever more. I consider it to be a bug
(networking should always act the same, and certainly the installer should,
DHCP available or not), but haven't had time to do anything about it.
Also, it has never caused me a real problem before: until yesterday.
I had to setup a new etch install at a remote location with no DHCP server. Of
course the installer prompted me to manually provide the network config info.
On new thing I noticed as being different from sarge installs (with manual
config) is that it prompted for the "network" address, and stuck it
in /etc/network/interfaces - I don't recall Sarge ever doing that (though
I'm not certain).
Now, currently I have about 30 Debian installations, mostly Etch, most of them
colocated in another city. I have always been able to
run "/etc/init.d/networking restart" on them without having the machine "fall
off" the network. For example, to add a secondary IP I've been in the habit
for years of using ifconfig aliases, and I add new additional IPs
to /etc/network/interfaces like this:
auto eth0:2
iface eth0:2 inet static
address 72.nnn.nnn.nnn
netmask 255.255.255.0
broadcast 72.nnn.nnn.255
Then I call "/etc/init.d/networking restart", the new address gets added and I
don't even lose my ssh connection. This is how it acts, anyway, on the ones
that I initially setup with DHCP.
However on this latest Etch 4.0r1 install that I had to configure manually
during installation, whenever I call "/etc/init.d/networking restart" even if
I have not modified the interfaces file _at_all_, the network completely
locks up (there's 2 Nics, one for external/internet and one for internal/LAN,
and both of them "freeze") and I can no longer access the machine - can't
even ping it. The only way to recover is to reboot.
So the first question I want to know is, /why/ does this one behave
differently than all the others when I restart the network (even with no
changes to the configuration)? I'm using the same installer CD that I've used
on most of the others, so the installation media is the same - base system
must be the same. Of course I /do/ use network installs and something major
may have changed or been updated in the past several days - but I did some
other installs just last week and they behave just fine. Obviously the
default configuration on the system in question isn't totally broken, because
when it boots up it applies all the right settings to both NICs (address,
netmask, gateway, and so on). But it freaks out when trying to restart the
network. I have not been able to find anything useful printed to the message
logs.
Can any provide any tips on how I might be able to find out what it causing
this system to stop responding to the network when I try to restart
networking?
The other part of my question is: I first found this lockup problem when I was
trying to add a second IP address to the external NIC with aliases like I
always do (as mentioned above). At first I thought I must be configuring the
interfaces file wrong so I tried using "ip route add" commands in interfaces
instead. When I tried "/etc/init.d/networking restart" it warned me that it
wasn't going to even try to restart because the interfaces file was
mis-configured - and even showed the line number.
I thought it was be handy to have a tool to test the interfaces file - much
like "apachectl configtest" - but I looked through /etc/init.d/networking and
couldn't find what was actually testing the file. Does anyone know, or does
anyone know of any tools that will parse /etc/network/interfaces to make sure
it's configured right?
Thanks,
JW
--
----------------------
System Administrator - Cedar Creek Software http://www.cedarcreeksoftware.com
http://jwadmin.blogspot.com/
Reply to: