I am currently running a webserver with Debian 5.0.2. It has been working (more or less) fine for the past 2-3 years but recently it went down due to some power-outage. Ever since I have brought it back online it has been unable to connect to the network.

I have disabled and re-enabled the ethernet port but still can't connect. Here is the following information when running ifconfig eth0:

Link encap: Ethernet  HWaddr:00:02:a5:95:e6:21 
inet6 addr:fe80::202:a5ff:fe95:e621/64 scope:Link 
RX packets:255593 errors:0 droped:0 overruns:0 frame:0 
TX packets: 15 errors:0 droped:0 overruns:0 carrier:0 
collisions:0 txqueuelen:1000
RX bytes:21904751 (20.8MiB)  TX bytes:5821  (5.6KiB)

As well, in the etc/network/interfaces file I do have the line:

iface eth0 inet dhcp

I am afraid I am stumped as to why it will not connect. I understand that there is still a value missing for the inet address, but it should be getting this from the network (and before anyone asks; everything is fine with the network, it is a university wide network) yet it cannot connect to it... The Ethernet port and cable are also functioning correctly.

  • 1
    Have you tried manually setting the IP instead of using DHCP? The DHCP server might be down (which can be undetected as long as the server keeps online)?
    – mreithub
    Nov 19, 2012 at 18:32
  • Debian 5.0 is past the end of life. Security updates are no longer being maintained. You should consider updating in the near future.
    – Zoredache
    Nov 19, 2012 at 21:55
  • Do you already have Tcpdump installed? Can you run tcpdump -qni eth0 on one virtual console, and then on another restart your network interface? You might be able to see the problem. You should be seeing at least some traffic even if you don't restart the network.
    – Zoredache
    Nov 19, 2012 at 21:58
  • He's definitely seeing data on that interface - his ifconfig shows his interface has received 255593 packets. It's only sent 15 packets, which seems low if he has a live DHCP client that's repeatedly trying to request an IP address. That's why I suggested below that maybe dhclient is not running.
    – Johnny
    Nov 19, 2012 at 22:06
  • Do you have any firewall rules that might be preventing traffic? What's the output of iptables -nvL? What happens if you do ifdown eth0; ifconfig eth0 down; ifup eth0? Nov 19, 2012 at 23:41

3 Answers 3


Could be that your DHCP client isn't starting for some reason. Maybe a bad lease file, or a pid file is hanging around making it think it's still running.

I'm not familiar with Debian so I'm not sure where it keeps its application files, but try deleting /var/run/dhclient* to get rid of any extra pid files, and rm /var/lib/dhcp/dhclient* to get rid of lease files, then reboot the server.

  • iface eth0 inet dhcp in /etc/network/interfaces is the Debian way to cause the DHCP client to be started. Nov 19, 2012 at 23:26
  • Yes, that may be the way to tell Debian that you want to use DHCP to get your IP address, but is the DHCP client really started? Since the interface is up, apparently seeing traffic, but doesn't have an IP address, that suggests that either your server is not requesting an IP address, or the campus network is not responding to your requests.
    – Johnny
    Nov 20, 2012 at 18:28
  • Many thanks for all the help. I went along those lines and found the command #dhclient eth0 That started up the connection as required. I will look into these ideas to make this a permanent and by default behavior. Many thanks!
    – Ronan
    Nov 20, 2012 at 19:52

Check the contents of /etc/network/interfaces. If you are using DHCP, it should be specified there. You may be missing an auto clause to automatically start the network. Documentation can be viewed with the command man interfaces.

This file can also be used to set a fixed IP address. As this is a webserver, you should be using a fixed IP address rather than a dynamic address from DHCP. It is possible the network you are connecting to does not have a DHCP server.

You can restart the interface using the commands ifdown eth0 followed by ifup eth0. The output of dmesg after this may give a hint as to what the problem is.

The command ps -ef | grep dhc should show if you have a dhcp client process running. It won't set an address unless there is a DHCP server on the network you are connecting to.


First add

auto eth0

as the first line in /etc/network/interfaces, before inet eth0...

Then restart the network service (/etc/init.d/networking restart), or even the whole box.

If it does not help, then you should check the DHCP setup, at the DHCP server, as well as on your box.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .