# KVM Guest DNS not Resolving.

## dman777

In my apartment, I  have a linux bridge on my Gentoo host. I have a kvm Gentoo  guest.. I have my system behind my router which is leased a ip address from my isp. Nothing complex. I use tap networking to use my kvm with the internet. On the host I did not asssign an ipaddress to eth0 or tap1. But in the Guest I brought up eth0 and assigned it an ip address. Networking in the guest works but I can not get my KVM guest to do any DNS resolving. In the /etc/resolv.conf of my guest I tried 8.8.8.8, the br0 ip address, and the routers ipaddress for the nameserver directive. I can ping 8.8.8.8 from the guest, but the guest will not resolve any DNS names. 

I am using Virtio if that matters. 

```
kvm -drive file=/mnt/guests/email_server.img,if=virtio,boot=on -net nic,model=virtio,macaddr=3d:d2:e6:e2:d9:d1 -net tap,ifname=tap0,script=no,downscript=no -m 1024
```

Any suggestions?

----------

## Hu

An error message would be a good place to start.  How do you know the guest cannot resolve DNS queries?  What messages does dig print?  Is the host able to resolve names when the guest cannot?  How is your guest connected to the physical world?  You say you use "tap networking" but that is ambiguous.  You could mean that you use a tap device so that the host kernel can NAT the guest connection outbound or you could mean that you created a bridge containing your tap device and your host interface.  The first part of your post implies the latter.

What is the output of brctl show; ip a; ip r; ls -l /etc/resolv.conf; dig www.google.com @8.8.8.8; cat /proc/sys/net/ipv4/ip_forward; iptables-save -c on the host and ip a; ip r; ls -l /etc/resolv.conf; dig www.google.com @8.8.8.8 on the guest?

----------

