0

I'm running a standard Raspbian installation (2014-01-07 image version, no extra software installed). All I want to do is to shut down the eth0 interface. The problem is that this works for a few seconds only, and then the interface all of a sudden is automatically up again.

My /etc/network/interfaces file:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

auto eth1
iface eth1 inet dhcp

I've tried shutting the interface down with both sudo ifconfig eth0 down and sudo ifdown eth0 to no avail. I suspect this problem is somehow related to DHCP or the dhclient program itself, since the interface releases its DHCP-assigned IP address for a short time, but apparently re-installs that same IP address just a few seconds later again.

Can anybody help me here? I'm stuck with this. Thank you very much!

1

Just use sudo ifdown eth0. You're correct that if dhclient is still running it'll probably bring the interface back up. If you use ifconfig that won't stop dhclient. Using ifdown should do that.

0

Not sure what caused this problem, but upgrading to the latest Raspbian image (version 2014-09-09) solved the problem for me.

  • Have you tried the solution suggested by @MarkKomarinski before upgrading your system? – Morgan Courbet Sep 26 '14 at 11:34
  • Yes, I did try sudo ifdown eth0 (as already posted within the question itself). Unfortunately, it didn't work for me. The interface always was automatically back up just a few seconds after that. No idea why. – emkey08 Sep 26 '14 at 14:10
-1

There's an answer to this specific problem on the raspbian page at https://www.raspbian.org/PiscesImages - at the bottom a note attached to description of version 1 of the pisces system release.

  • Welcome to raspberrypi@se. Please do include the relevant part of the solution into the post itself, to prevent link-rot. I'll set -1 just until the post is edited. – Bex Sep 17 '15 at 7:24
-3

Try these commands:

ip link set eth0 down

ip link set eth0 up

  • 1
    This is a very low quality answer. It provides nothing but a couple of commands. How does this work? why does it work when other similar things do not (sudo ifdown eth0 etc.)? – Steve Robillard Sep 8 '15 at 22:34

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.