Bug 799666 - No support for IPv6 on virbr0 with NAT based network
Summary: No support for IPv6 on virbr0 with NAT based network
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-04 03:56 UTC by Frank Crawford
Modified: 2014-06-16 13:30 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-16 13:30:16 UTC


Attachments (Terms of Use)

Description Frank Crawford 2012-03-04 03:56:53 UTC
Description of problem:
While the documentation on libvirt.org describes how to set up IPv6 on a NAT based network, following the steps fails to enable IPv6 on virbr0.

Version-Release number of selected component (if applicable):
libvirt-python-0.9.6-4.fc16.x86_64
libvirt-0.9.6-4.fc16.x86_64
libvirt-client-0.9.6-4.fc16.x86_64
dnsmasq-2.59-4.fc16.x86_64 (out of fedora-updates-testing)

How reproducible:
100%

Steps to Reproduce:
1. Edit /etc/libvirt/qemu/networks/default.xml:
<ip family="ipv6" address="fdd2:7aad:d478:8::1" prefix="64" />
2. Restart libvirt or otherwise rebuild the network
3. ifconfig virbr0 does not show any IPv6 address.
  
Actual results:
No way to setup IPv6, enable radvd or otherwise route IPv6 out of the virtual network.

Expected results:
IPv6 address available on virbr0 to allow radvd to be run and routing out of the virtual network with virbr0 as the local interface.

Additional info:
Some of this appears to be a side-effect of https://bugzilla.redhat.com/show_bug.cgi?id=501934.  Also, it is possible to manually change configurations to do this, but it is not possible to automate this during startup.

Comment 1 Laine Stump 2012-03-04 09:11:11 UTC
Simply restarting libvirtd will *not* rebuild the network. You need to first net-destroy, then virsh net-start the network. Although I am normally running a locally-made upstream build of libvirt, I reinstalled the stock Fedora build to test this, and used your exact example (to assure there was no idiosyncracy about the address used, etc). Here is the output of "ifconfig virbr0":

virbr0    Link encap:Ethernet  HWaddr 52:54:00:02:4D:8E  
          inet addr:192.168.122.1  Bcast:192.168.122.255  Mask:255.255.255.0
          inet6 addr: fdd2:7aad:d478:8::1/64 Scope:Global
          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:0 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)


Additionally, the bug you reference (Bug 501934) is ancient, and was filed prior to IPv6 support being added to libvirt (which happened in libvirt-0.8.7, Jan4, 2011 (Fedora 15 included libvirt-0.8.8, so it had IPv6 support) - one of the prerequisites of adding IPv6 support was specifically re-setting the sysctl parameter that bug discusses.

Please run "virsh net-destroy default; virsh net-start default" and see if you still get the same results. If you do, something is wrong with your system config at a different level (in which case libvirt should have logged an error). If not, this needs to be closed as NOTABUG.

Comment 2 Frank Crawford 2012-03-04 11:29:27 UTC
Yes that fixed it.  You can close this as NOTABUG.

In my defence, it isn't clear in the documentation what to do to enable IPv6 in libvirt, just a lot of hints.

Thanks for the quick assistance.

Comment 3 Dave Allan 2012-03-06 19:54:57 UTC
That's a fair defence.  I've reopened this BZ to reflect that the upstream doc should be better.  If you have notes about what was required, even just a rough list, would you mind adding them to the wiki.libvirt.org so that it gets recorded for posterity?

Comment 4 Frank Crawford 2014-06-16 11:48:47 UTC
Unfortunately, no I don't have any information to add.

Comment 5 Dave Allan 2014-06-16 13:30:16 UTC
I think the combination of the documentation of the networking options, virsh net-* and additional ipv6 support included since this BZ was filed is sufficient, so I'm closing as discussed above.


Note You need to log in before you can comment on or make changes to this bug.