IPv6 static addresses in multiple interfaces can't be configured thru interfaces file

Bug #1608054 reported by Jordi Palet Martinez
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ifupdown (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Just installed 16.04 over a 14 version. I discovered that the actual interfaces file is not working correctly. Tried many choices, even using pre-up sleep 10 before configuring the IPv6 manual addresses, but didn't worked. This is the example file:

auto lo
iface lo inet loopback

allow-hotplug eth0
iface eth0 inet static
 mtu 9000
 address 172.16.0.7
 netmask 255.255.255.0
 dns-nameservers 10.10.10.3 80.58.61.250 80.58.61.254 8.8.8.8 8.8.4.4 2001:470:1f09:495::3 2001:470:20::2

iface eth0 inet6 auto

allow-hotplug eth1
iface eth1 inet static
 mtu 9000
 address 10.10.10.7
 netmask 255.255.255.0

iface eth1 inet6 static
 autoconf 0
 accept_ra 0
 address 2001:470:1f09:495::7
 netmask 64

allow-hotplug eth2
iface eth2 inet static
 mtu 9000
 address 10.10.9.7
 netmask 255.255.255.0
 gateway 10.10.9.1

iface eth2 inet6 static
 autoconf 0
 accept_ra 0
 address 2001:470:1f1d:275::7
 netmask 64
 gateway fe80::1

As you can see, both, eth1 and eth2 have manual/static IPv6 addresses. Each one is in a different router. Only eth2 is the default gateway (eth1 is usen only for internal communication with another LAN). However, after reboot, the ifconfig shows:

eth0 Link encap:Ethernet direcciónHW 00:0c:29:64:c6:32
          Direc. inet:172.16.0.7 Difus.:172.16.0.255 Másc:255.255.255.0
          Dirección inet6: fe80::20c:29ff:fe64:c632/64 Alcance:Enlace
          ACTIVO DIFUSIÓN FUNCIONANDO MULTICAST MTU:9000 Métrica:1
          Paquetes RX:17 errores:0 perdidos:0 overruns:0 frame:0
          Paquetes TX:32 errores:0 perdidos:0 overruns:0 carrier:0
          colisiones:0 long.colaTX:1000
          Bytes RX:1500 (1.5 KB) TX bytes:3805 (3.8 KB)

eth1 Link encap:Ethernet direcciónHW 00:0c:29:64:c6:3c
          Direc. inet:10.10.10.7 Difus.:10.10.10.255 Másc:255.255.255.0
          Dirección inet6: 2001:470:1f09:495::7/64 Alcance:Global
          Dirección inet6: fe80::20c:29ff:fe64:c63c/64 Alcance:Enlace
          ACTIVO DIFUSIÓN FUNCIONANDO MULTICAST MTU:9000 Métrica:1
          Paquetes RX:291 errores:0 perdidos:2 overruns:0 frame:0
          Paquetes TX:144 errores:0 perdidos:0 overruns:0 carrier:0
          colisiones:0 long.colaTX:1000
          Bytes RX:34692 (34.6 KB) TX bytes:16360 (16.3 KB)

eth2 Link encap:Ethernet direcciónHW 00:0c:29:64:c6:46
          Direc. inet:10.10.9.7 Difus.:10.10.9.255 Másc:255.255.255.0
          Dirección inet6: fe80::20c:29ff:fe64:c646/64 Alcance:Enlace
          ACTIVO DIFUSIÓN FUNCIONANDO MULTICAST MTU:9000 Métrica:1
          Paquetes RX:1281 errores:0 perdidos:0 overruns:0 frame:0
          Paquetes TX:755 errores:0 perdidos:0 overruns:0 carrier:0
          colisiones:0 long.colaTX:1000
          Bytes RX:105008 (105.0 KB) TX bytes:1554705 (1.5 MB)

lo Link encap:Bucle local
          Direc. inet:127.0.0.1 Másc:255.0.0.0
          Dirección inet6: ::1/128 Alcance:Anfitrión
          ACTIVO BUCLE FUNCIONANDO MTU:65536 Métrica:1
          Paquetes RX:818 errores:0 perdidos:0 overruns:0 frame:0
          Paquetes TX:818 errores:0 perdidos:0 overruns:0 carrier:0
          colisiones:0 long.colaTX:1
          Bytes RX:136866 (136.8 KB) TX bytes:136866 (136.8 KB)

All what I tried fails. If I issue a manual:
ip -6 addr add 2001:470:1f1d:275::7/64 dev eth2

it works.

I've noticed not sure if this is relevant, that the file /etc/network/run/ifstate.eth2 is empty, and /etc/network/run/ifstate only contains the other interfaces, but not eth2:

eth1=eth1
eth0=eth0
lo=lo

Before the upgrade it contained all the interfaces.

I've used GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0", to keep the original interface names, not sure if that's relevant, just in case.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ifupdown (Ubuntu):
status: New → Confirmed
Revision history for this message
William Atwood (williamatwood41) wrote :

I also have this same bug. Details are in a posting in the forum with title "Three-interface system fails to add one IPv6 address", located at https://answers.launchpad.net/ubuntu/+question/632391.

The systems are all running Ubuntu 16.04 LTS, with all updates applied.

Revision history for this message
serguei (smokhov) wrote :

Hi, any new update on resolving this this? It seems to be a timing/race condition issue.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0" -> is not recommended at all, and might be harmful.

Do you have persistent interface names udev .rules file generated? That alone should be sufficient as that locks the eth* names by macaddress. The problem is that there is no guarantee that same interface keeps the same eth number across reboots. If you do not have persistent-net-rules generated, please do so if you insist on using eth* names instead of stable device names.

We have discovered that race conditions exist in ifupdown with systemd as pid1 resulting in certain paragraphs not executed correctly under certain rare circumstances. It might be possible to mitigate them, for your particular case, by adding a few more dependencies between ifup@.service and netowkring.service units.

For general case, I can only recommend to stop using ifupdown and migrate to netplan/networkd based configuration which is more reliable. On the other hand it is declarative, rather than arbitrary/turning-complete ifupdown configuration format.

Nonetheless such a simple case of just static IP addresses should really ought to work without a hitch....

tags: added: rls-aa-incoming
tags: added: rls-bb-incoming rls-x-incoming
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Sorry, there was no response to questions above? Do you have persistent net-device names udev rules on the system? (to correctly fix, the ethX names to where you expect them)

Also can you please attach journal logs of the ifup@.service for the missing/broken interfaces.

Marking bug report incomplete in the mean time.

Note there are too many dns-servers specified:
 dns-nameservers 10.10.10.3 80.58.61.250 80.58.61.254 8.8.8.8 8.8.4.4 2001:470:1f09:495::3 2001:470:20::2
All of them will not be supported.

Changed in ifupdown (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for ifupdown (Ubuntu) because there has been no activity for 60 days.]

Changed in ifupdown (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.