Xen domU sort of ignores /etc/network/interfaces

networkingxen

I have a Debian based Linux installation, that gets around:

It started out on a physical system, then I moved the OS into a VMware container and then into a Xen container. As physical and VMware installation this /etc/network/interfaces worked:

auto lo
iface lo inet loopback


auto eth0
iface eth0 inet6 auto
    privext 0
    post-up ip a a fe80::1337/64 dev eth0
    post-up ip a a fc0e::1337/64 dev eth0

Where working means eth0 is up and has all addresses/subnets configured on eth0 and privacy extensions are disabled.

When run as Xen VM, privacy extentions are enabled (/proc/sys/net/ipv6/conf/eth0/use_tempaddr is 2), eth0 is up, but it has only its link local fe80::/64 address. I can log into the VM and manually do

    ip a a fe80::1337/64 dev eth0
    ip a a fc0e::1337/64 dev eth0

, which works without any problems. I can reach this machine using these manually assigned addresses just as one would expect … and as it used to work when the OS was a physical machine or a VMware VM.

So what is different about a (pv) Xen guest, that this doesn't work? In the log files there are two very suspicious entries:

syslog:Oct 31 10:41:48 hostname kernel: [    6.926601] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
syslog:Oct 31 10:41:48 hostname kernel: [    9.842540] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

Suspicious, because they occur at the same wall clock time. I tried creating the VM but leaving it paused, so that the Open vSwitch has time to its thing, before the VM fully powers up. But that doesn't remedy the situation.

I also tried adding post-up sleep 5 and pre-up sleep 5 to help with timing issues … yet its still a VM …

It looks like a timing issue to me. How can I fix this?

Best Answer

You said the interface is up, but is it up as far as ip link is concerned or as far as ifup is concerned? A failure of the post-up commands would mean the latter. To debug why IPv6 ND isn't working, you have to run something like a packet tracer (tcpdump, tshark, ...) and see if you're getting router advertisements. If you are, verify that /proc/sys/net/ipv6/{default,eth0}/accept_ra is turned on. See http://www.tldp.org/HOWTO/Linux+IPv6-HOWTO/proc-sys-net-ipv6..html for more details.

Related Question