8

I'm setting up a new Debian system. I have a static IP configured on an interface in /etc/networks/interfaces like so:

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth4
iface eth4 inet static
        address <redacted>
        netmask 255.255.254.0
        network <redacted>
        broadcast <redacted>
        gateway <redacted>
        dns-nameservers <redacted>
        dns-search <redacted>

I've hidden the addresses, but the configuration matches an older Debian system except the IP address of course. I can bring it up with 'ifup eth4' and it works fine for a while but eventually crashes somewhere between 1 and 24 hours later. I don't see any information in the logs concerning why it goes down. I'm able to bring it up the next day from the physical console... running 'ifdown eth4' reports that it isn't up to begin with. Running 'ifup eth4' brings it up without issue.

While I'd like to get that sorted out, I've noticed while looking for errors concerning eth4 that dhclient is running in the background making DHCPREQUESTs on eth4 every 2 minutes. It's happening even right now while eth4 is running properly with the static IP configured. What's that about and might it be causing the interface to go down? It seems like I ought to stop dhclient from doing this unnecessarily regardless of whether it's causing the trouble or not. The older system doesn't have a 'dhclient' process running.

Sorry if this is basic stuff, there are some holes in my Linux knowledge.

  • You will get this behavior if dhclient was already running when you changed it to a static configuration. Just kill dhclient. – jordanm Mar 12 '15 at 15:20
  • Ah, that makes sense. I went ahead and just rebooted and it is indeed gone. Was this also the likely cause of the interface going down or is that another issue? – Scott J Mar 12 '15 at 18:00
  • ... eventually crashes ...: what does this mean? A kernel panic? Or just that the interface is down? – wurtel Mar 13 '15 at 12:57
  • It doesn't leave a trace in the logs, so probably not a kernel issue. At some point the network interface simply goes down. However, it is no longer occurring since I've rebooted to stop the dhclient process, so presumably that was doing something to cause the interface to go down. Lesson learned... reboot after a major networking change if you don't know enough about the nuts and bolts to avoid doing it. – Scott J Mar 23 '15 at 13:47
6

dhclient process does not stop when you change /etc/network/interfaces file from dhcp to static type. see https://askubuntu.com/questions/459140/why-dhclient-is-still-running-when-i-choose-static-ip for more info

-1

I had the same problem, And finally I found out that it was due to the ConnMan service. Indeed, ConnMan configure the interfaces Automatically for us.

So stop the service

sudo /etc/init.d/connman stop

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.