Package: qemu-system-x86
Version: 1:2.7+dfsg-3+b1
Severity: important
Tags: ipv6
Dear Maintainer,
dhcp inside qemu returns an ipv6 address as dns-server. However this is not
working. If i replace it with the ipv4 address '10.0.0.2' dns is working
again. I would expect that the qemu emulated dhcp server responds either an
ipv4 configuration that is working or its dns server/forwarder listens on the
ipv6 address returned by the emulated dhcp server.
I started qemu with the following command:
qemu-system-x86_64 -enable-kvm -M pc -device virtio-rng-pci -device
virtio-net-pci,netdev=user.0 -drive file=buildenv.img,if=virtio,bus=1,unit=0
-no-reboot -netdev user,id=user.0,hostfwd=tcp::5022-:22,hostfwd=tcp::7587-:7588
-m 1024 -usb -nographic -smp 4
buildenv.img is a debian jessie amd64 installation.
Inside qemu the network is configured to use dhcp:
$ cat /etc/network/interfaces
allow-hotplug eth0
iface eth0 inet dhcp
$ ifconfig eth0
eth0 Link encap:Ethernet HWaddr 52:54:00:12:34:56
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::5054:ff:fe12:3456/64 Scope:Link
inet6 addr: fec0::5054:ff:fe12:3456/64 Scope:Site
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:10 errors:0 dropped:0 overruns:0 frame:0
TX packets:28 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3215 (3.1 KiB) TX bytes:3638 (3.5 KiB)
$ cat /etc/resolv.conf
nameserver fec0::3
$ arp google.de
google.de: Host name lookup failure
$ strace -f arp google.de
...
socket(PF_INET6, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 4
connect(4, {sa_family=AF_INET6, sin6_port=htons(53), inet_pton(AF_INET6,
"fec0::3", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = 0
poll([{fd=4, events=POLLOUT}], 1, 0) = 1 ([{fd=4, revents=POLLOUT}])
sendto(4, "\17\320\1\0\0\1\0\0\0\0\0\0\6google\2de\0\0\1\0\1", 27,
MSG_NOSIGNAL, NULL, 0) = 27
poll([{fd=4, events=POLLIN}], 1, 5000) = 0 (Timeout)
poll([{fd=4, events=POLLOUT}], 1, 0) = 1 ([{fd=4, revents=POLLOUT}])
sendto(4, "\17\320\1\0\0\1\0\0\0\0\0\0\6google\2de\0\0\1\0\1", 27,
MSG_NOSIGNAL, NULL, 0) = 27
poll([{fd=4, events=POLLIN}], 1, 5000) = 0 (Timeout)
close(4) = 0
...
$ echo nameserver 10.0.0.2 > /etc/resolv.conf
$ arp google.de
google.de (216.58.208.35) -- no entry
-- System Information:
Debian Release: stretch/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, armhf
Kernel: Linux 4.8.6 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages qemu-system-x86 depends on:
ii ipxe-qemu 1.0.0+git-20161027.b991c67-1
ii libaio1 0.3.110-3
ii libasound2 1.1.2-1
ii libbluetooth3 5.43-1
ii libbrlapi0.6 5.4-2
ii libc6 2.24-5
ii libcacard0 1:2.5.0-2
ii libfdt1 1.4.0+dfsg-2
ii libgcc1 1:6.2.0-13
ii libglib2.0-0 2.50.2-1
ii libgnutls30 3.5.6-4
ii libjpeg62-turbo 1:1.5.1-2
ii libncurses5 6.0+20160917-1
ii libnettle6 3.3-1
ii libpixman-1-0 0.34.0-1
ii libpng16-16 1.6.26-1
ii libpulse0 9.0-5
ii libsasl2-2 2.1.27~72-g88d82a3+dfsg-1
ii libsdl1.2debian 1.2.15+dfsg1-4
ii libseccomp2 2.3.1-2
ii libspice-server1 0.12.8-1
ii libtinfo5 6.0+20160917-1
ii libusb-1.0-0 2:1.0.21-1
ii libusbredirparser1 0.7.1-1
ii libuuid1 2.29-1
ii libvdeplug2 2.3.2+r586-2+b1
ii libx11-6 2:1.6.3-1
ii libxen-4.8 4.8.0~rc5-1
ii libxenstore3.0 4.8.0~rc5-1
ii qemu-system-common 1:2.7+dfsg-3+b1
ii seabios 1.9.3-2
ii zlib1g 1:1.2.8.dfsg-2+b3
Versions of packages qemu-system-x86 recommends:
ii qemu-utils 1:2.7+dfsg-3+b1
Versions of packages qemu-system-x86 suggests:
ii kmod 23-1
ii ovmf 0~20160813.de74668f-2
pn qemu-block-extra <none>
pn samba <none>
ii sgabios 0.0~svn8-3
pn vde2 <none>
-- no debconf information