Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm working on an embedded-x86 Linux device that runs Debian (Linux 3.8.13). This device has two Ethernet ports, eth0 and eth1.

If I boot up this device with only eth0 connected to a switch, and ssh in to it and do an 'ifconfig', I get this:

root@msli-DCP-11234772:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:1c:ab:00:0a:60
          inet6 addr: fe80::21c:abff:fe00:a60/64 Scope:Link
          RX packets:5659 errors:0 dropped:4102 overruns:0 frame:0
          TX packets:1071 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1313254 (1.2 MiB)  TX bytes:224889 (219.6 KiB)
          Interrupt:16 Memory:fc500000-fc520000

eth1      Link encap:Ethernet  HWaddr 00:1c:ab:00:0a:61
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:17 Memory:fc520000-fc540000

Note that eth0 has an "inet6 addr" assigned to it, while eth1 does not.

If/when I plug eth1 into a network switch, an "inet6 addr" line will appear in ifconfig's output at that time (and it will stay present even if I unplug the Ethernet cable from eth1 again).

So it seems that Linux doesn't bother associating an Ethernet device with its IPv6 address until the first time that Ethernet device is actually connected to something.

That sort-of-works, but I have some programs that are supposed to send IPv6 multicast packets out of both ports at all times, and they can't do that on a port that doesn't have an IPv6 address assigned to it.

So what I'd like to do is find a way to force Linux to associate the device's self-assigned IPv6 address (i.e. fe80::blah, where blah is derived from the MAC address on the Ethernet chip) during startup, rather than waiting until the Ethernet port is actually connected. Is there a way to do that?

(The advantage would be that my programs could just scan the list of network devices during launch and use them -- currently they have to set up an AF_NETLINK socket to be notified of network-config changes, which sort-of works but is more complicated than I'd like, and also a bit slow to react)

share|improve this question

How are the interfaces configured in /etc/network/interfaces? I assume they are set to allow-hotplug which enables the interface when a link is detected. Try changing it to auto so your config looks like:

auto eth0
iface eth0 ....

auto eth1
iface eth1 ....
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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