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/

--

0

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: How to debug network an test /etc/network/interfaces config?

hi, i came across your post because i had a similar problem. i solved the problem and thought i post the solution in case your problem is related.

when i unloaded and re-loaded the network kernel module (of course, this is not possible remoely), i got some message from udev saying that the networking device was renamed from eth0 to eth2. google brought me to this page explaining udev: http://www.debianadmin.com/rename-network-interface-using-udev-in-linux.html

it turned out that i had conflicting entries in the networking device naming rules in /etc/udev/rules.d/z25_persistent-net.rules
(seemingly from an old network card that has been replaced years ago). don't know how the networking was working at all before but removing the conflicts fixed it.

hope that helps in your case.

Re: How to debug network an test /etc/network/interfaces config?

Hi there I am trying to setup a wireless network useng NETGEAR wireless Router MR814V2 with "windows 98 se" that seams to be working fine, but on the other P/C upstairs I have just recently installed debian-lenny beta 2 -i386-CD iso ,the O/s is runing fine when it came to deteckting the debian mirror it could not finde it,I am starting to think that it is something to do with the "network everywher" wireless USB 2.4 GHZ Adapter that is not picking up the sigenal from downstairs,could some one pleas point me in the right direction.
HOST NAME THEALSKY.gv.shawcable.net
DNS SERVERS 192.168.0.1
NODE TYPE Broadcast
Netbios scope Id blank
Ip routing Enabled blank WINS Proxy Enabled Blank

NetBIOS Resolution Uses DNS Blank

Ethernet Adapter Information
SMCEZ Card 10/100(SMC1224TX)
Adapter Address 00-50-BF-78-C8-0B
IP Address 192.168.0.2
Subnet Mask 255.255.255.0
Default Gateway 192.168.0.1
DHCP_ Server 192.168.0.1

Primary Wins Server Blank
Secondary Wins Server Blank

Syndicate content