Every time I am configuring a Debian or Centos machine with a static IP address, I forget about that behavior of not taking in account my IPV4 configuration. Then, I search for the 1000th time the parameter to put in sysctl.conf to disable IPV6, and finally I reboot the beast.

  • An example to illustrate :

    Linux deb-router 3.2.0-4-amd64 #1 SMP Debian 3.2.81-2 x86_64 GNU/Linux

It has 2 interfaces; eth0 is configured in IPV4 for some time (1 year maybe).

ETH1 is bridged on my physical network and was addressed by the DHCP, in IPV4. I talk to the VM through this interface.

Tonight I lost my Internet gateway; this device is also my DHCP server.

I realized I cannot reach my VM anymore, so I checked ifconfig and saw a nice IPV6 instead of the old IPV4 bound to ETH1.

So, action !

$ sudo vim /etc/network/interfaces

allow-hotplug eth1
# was dhcp before
iface eth1 inet static

$ sudo ifdown eth1 && sudo ifup eth1

Deception :(

ifconfig outputs only an ipv6; I cannot reach my VM. I must disable IPV6 (net.ipv6.conf.eth1.disable_ipv6 = 1), and reboot, to get the connection back.

  • I don't understand this choice to favor IPV6 over IPV4: Most of people are working with IPV4, from what I know.

  • Is it technical, or is it political to influence people to adopt IPV6 ?

  • 2
    IPv4 and IPv6 are not mutually exclusive, it's very normal these days you have them on the same interface side by side. There is nothing wrong with that. Disabling IPv6 might even break some software. If your interface IPv4 doesn't work there is another reason because IPv6 is a different protocol and it doesn't affect your IPv4 settings. Commented Oct 5, 2016 at 22:57
  • 2
    If disabling IPv6 somehow made IPv4 work, then something else on your system is broken. No such thing actually happens alone. As for IPv6, it's preferred because it's the default protocol. If you hadn't heard, IPv4 ran out of addresses, so everyone must switch to IPv6. Many people do not even get their own IPv4 addresses anymore. Commented Oct 5, 2016 at 23:04
  • @SanderSteffann In theory I totally agree with you, from my experience I often encountered this situation, especially with a fresh Centos install. From what I remember with Debian this is the first time it happens to me. Can you demonstrate me how to concretely achieve this cohabitation between the 2 stack ? or pointing me out to a source which explain how it works ?
    – Kuruwan
    Commented Oct 6, 2016 at 10:57
  • 1
    /etc/gai.conf # For sites which prefer IPv4 connections change the last line to ` precedence ::ffff:0:0/96 100`; it could well be your IPv6 network infra-structure is broken...once here in the beginnings of the IPv6 project everything was well with the IPv4 firewall rules, but IPv6 was not that well tested. Commented Oct 6, 2016 at 12:06
  • 2
    The address fe80::20c:29ff:febe:d6fa is a link-local address. Every interface has one, and it's only usable on your local LAN. It's not a routable IPv6 address. Why your IPv4 wasn't working: no idea, sounds like a bug somewhere. The information you provide is not enough to determine the cause. But having IPv6 enabled isn't it, that assumption is almost certainly wrong. Commented Oct 6, 2016 at 13:54

1 Answer 1


ipv6 is not the problem! You are missing a line auto eth1 in your /etc/network/interfaces in order to let ifup eth1 work.

The reason you see an ipv6 in the ifconfig-output is that your server simply doesn't has an ipv4 because -- as you stated -- your dhcp-server went down.

ip is a much more useful tool than ifconfig (on Linux machines):

ip -4 address ... shows only v4 addresses ip -6 address ... shows only v6 addresses

You must log in to answer this question.

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