Comment 4 for bug 577908

Revision history for this message
Irek Szczesniak (irek-szczesniak) wrote :

I tested the SLIRP's DNS server of compiled QEMU v. 0.12.5 and v. 0.13.

I created the thread on the Qemu-devel mailing list (http://lists.nongnu.org/archive/html/qemu-devel/2010-12/msg01893.html), but I think it's good to restate what I wrote there, especially since the thread stalled.

I have a problem with the SLIRP's DNS server. I built from sources
QEMU v 0.13 on Linux debian 2.6.26-2-686 with gcc version 4.3.2
(Debian 4.3.2-1.1).

When I don't pass any network options to QEMU, then I should get a
user networking with SLIRP. According to the man page, QEMU should
create a private network 10.0.2.0/24, and run a DHCP server on
10.0.2.2, and a DNS server on 10.0.2.3. And indeed such a network is
created, the DHCP server assigns the 10.0.2.15 IP address, but in the
DHCP transaction it seems there is no DNS server mentioned, and my
system complains about a missing DNS server.

Let me describe how I got this problem. I start the CentOS installer this way:

qemu -cdrom CentOS-5.5-i386-netinstall.iso

The installer runs, asks questions, and something goes wrong. On the
third console (Alt + F3 in the virtual machine), I can read errors:

DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6
DHCPOFFER from 10.0.2.2
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPACK from 10.0.2.2
bound to 10.0.2.15 -- renewal in 33026 seconds.
DHCPv4 eth0 - obtained lease 10.0.2.15
DHCPv4 eth0 - option subnet-mask: 255.255.255.0
DHCPv4 eth0 - option subnet-mask: - prefix_len: 24 broadcast: 10.0.2.255
DHCPv4 eth0 - option routers:
no DNS servers, can't look up hostname

The installer complains that a DNS server is missing, but it seems
that the DHCP also doesn't provide a default gateway.

I ran the installer again, asking it to manually configure the network. There I put 10.0.2.15/24 as my address, 10.0.2.2 as the default gateway, and my DNS server. With those settings, the network worked fine. Later in the setup process, I was able to use a shell, and test the DNS at 10.0.2.3.

The interesting thing is that when I tried nslookup with the 10.0.2.3 server, then my requests got resolved. The installer later in the process spawns a root shell on tty2, where I issued the nslookup command. So it seems that the DNS server works (or starts working after sometime), but that the DHCP server doesn't mention the DNS server.

Can I help somehow diagnose the problem further?