'SIOCSIFFLAGS: Cannot assign requested address' when setting up IPv6 alias

Bug #508996 reported by Mark A. Ziesemer
68
This bug affects 14 people
Affects Status Importance Assigned to Milestone
ifupdown (Debian)
Fix Released
Unknown
ifupdown (Ubuntu)
Fix Released
Undecided
Unassigned
Precise
Won't Fix
Undecided
Unassigned

Bug Description

Binary package hint: ifupdown

This is very similar to Bug #123773, but is specific to IPv6 and should probably be tracked separately.

I don't have an instance ready to retest on, but this apparently worked on Jaunty (9.04) and broke on Karmic (9.10). I'm actually re-using the "/etc/network/interfaces" file that I used successfully under Jaunty before upgrading to Karmic.

Per the IFCONFIG(8) man page, I'm attempting to define an IP alias in /etc/network/interfaces:

auto eth0
iface eth0 inet static
        address 192.168.1.1
        netmask 255.255.255.0

auto eth0:0
iface eth0:0 inet6 static
        address 2001:db8::1
        netmask 64

(2001:db8::1 is only an example address.)

Attempting to perform an "ifup eth0:0" results in:

SIOCSIFFLAGS: Cannot assign requested address
Failed to bring up eth0:0.

Unlike Bug #123773, this is not coming from the wireless-tools or other event scripts, as disabling them does not change the result.

The following command is a work-around, and works as a post-up command in /etc/network/interfaces:
ip addr add 2001:db8::1/64 dev eth0

Defining an IPv4 alias also works correctly using either the alias stanza or the "ip addr add" command.

uname: Linux 2.6.31-17-generic #54-Ubuntu SMP Thu Dec 10 17:01:44 UTC 2009 x86_64 GNU/Linux
ifupdown package version is 0.6.8ubuntu21

Tags: ipv6 network
Changed in ifupdown (Debian):
status: Unknown → New
Revision history for this message
J Queiroz (zekkerj) wrote :

You should need no interface aliases on IPv6, as IPv6 provides for an interface to have more than one address.

Revision history for this message
Mark A. Ziesemer (ziesemer) wrote :

In response to comment #1, isn't that contradictory? Is there something specific within IPv6 that didn't exist in IPv4, as IPv4 also allowed an interface to be assigned multiple addresses? If aliases aren't necessary, how can multiple addresses (either IPv4 and IPv6 or multiple IPv6) be assigned through /etc/network/interfaces?

Revision history for this message
Trent Lloyd (lathiat) wrote :

There is not ifupdown interface for doing multiple addresses without an alias. Aliases do work, even with IPv6. There is a patch in the debian bug to support it.

However, the worst part about this bug is if you do

ifdown eth0:1

With an IPv6 stanza configured, it downs the entire interface, including IPv4. This caused a production server outage for me and is likely to catch people out.

In my opinion that is a much more critical bug.

Changed in ifupdown (Debian):
status: New → Fix Committed
Revision history for this message
Stéphane Graber (stgraber) wrote :

According to Debian it's been merged in January, so we should have the fix in Ubuntu at the moment.

Changed in ifupdown (Ubuntu):
status: New → Fix Released
Changed in ifupdown (Debian):
status: Fix Committed → Fix Released
Revision history for this message
Steve Langasek (vorlon) wrote :

Canonical IS reports that they're still encountering this issue with Ubuntu 12.04, even though the Debian bug was fixed in 0.7~alpha4 and 12.04 shipped with 0.7~beta2ubuntu8. Stéphane, can you take a closer look at this please? David (added to bug subscription) can help with any details needed for reproducing.

Changed in ifupdown (Ubuntu):
assignee: nobody → Stéphane Graber (stgraber)
status: Fix Released → Triaged
Revision history for this message
David Ames (thedac) wrote :

With netowork manager disabled and with an /etc/network/interfaces file that looks like this:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
        address 10.0.0.100
        netmask 255.255.255.0
        gateway 10.0.0.1

auto eth0:1
iface eth0:1 inet6 static
        address 2001:db8::100
        netmask 64
        gateway 2001:db8::1

I get the following error when tyring to bring up an aliased interface

$ sudo ifup eth0:1
error: "net.ipv6.conf.eth0:1.autoconf" is an unknown key
Failed to bring up eth0:1.

Revision history for this message
Stéphane Graber (stgraber) wrote :

Moving the bug back to fix-released. I confirmed that the config above works as expected on 13.04.
I opened a separate task for 12.04.

Changed in ifupdown (Ubuntu):
status: Triaged → Fix Released
Changed in ifupdown (Ubuntu Precise):
status: New → Triaged
assignee: nobody → Stéphane Graber (stgraber)
Revision history for this message
Stéphane Graber (stgraber) wrote :

I also tested on quantal and get the same result as with raring.
So this issue is 12.04 specific. I'll have to figure out exactly which bits we need to cherry-pick to fix that one.

Revision history for this message
Mike de Rhino (m8r-bf9eg5-q) wrote :

Any news on 12.04 LTS ?

Revision history for this message
Thiago Martins (martinx) wrote :

Ubuntu Server 14.04 (or Debian) definitely needs a much better IPv6 support for ifupdown (or something entirely new), it is very hard to maintain a huge IPv6-based /etc/network/interfaces files these days... Basically, no IPv6 Alias or VLANs support for ifupdown... :-(

I'm trying to install Ubuntu Server 14.04 (or 12.04) in a IPv6-Only network and it is a pain (Ubuntu Desktop, Windows and Mac works okay)...

IPv6 management is very easy when with Ubuntu Desktop but, when with Server, it needs much more work to become more admin-friendly. =)

I know that you can have everything of your IPv6 network up and running using "up ip -6 addr add xxxx/64 dev $IFACE and etc" but, it kills the purpose of the /etc/network/interfaces file (if you use it just like a Bash script)...

Long life for Ubuntu / Debian! Lets move to a IPv6-Only-World guys!! IPv4 is a thing of the past... =P

Best,
Thiago

Changed in ifupdown (Ubuntu):
assignee: Stéphane Graber (stgraber) → nobody
Changed in ifupdown (Ubuntu Precise):
assignee: Stéphane Graber (stgraber) → nobody
Revision history for this message
Steve Langasek (vorlon) wrote :

The Precise Pangolin has reached end of life, so this bug will not be fixed for that release

Changed in ifupdown (Ubuntu Precise):
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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