0

My Ubuntu computer is connected to ISP via eth0. There's another subnet which is accessible via br0. This subnet is used to connect VirtualBox virtual Ubuntu to my host. IPs in this subnet are static.

In order to set this up I use on the host:

         tunctl -t tap1 -u root
         ip link set up dev tap1
         brctl addbr br0
         brctl addif br0 tap1
         ip link set up dev br0
         ip addr add 10.1.1.1/24 dev br0
         ip route append 10.1.1.0/24 dev br0

... and on the virtual machine client: IP: 10.1.1.15; Netmask: 255.255.255.0; Default gateway: 10.1.1.1; Name server: 10.1.1.1.

But ping http://google.com on the client says:

    ping: unknown host http://google.com

Changing client's nameserver to the IP I looked up in host's /etc/resolv.conf didn't work for me either.

How to set up the client Ubuntu to use ISP's name servers?

UPD: The problem came out to be routing, discussed here.

3 Answers 3

6

Try this:

ping google.com

Instead of this:

ping http://google.com
2
  • It didn't work as well :(
    – Alex
    Aug 26, 2009 at 8:02
  • However your notice is right. Ping uses URLs with hosts (no protocols). My problem came out to be different. I have to configure routing first. I'm creating another question for that.
    – Alex
    Aug 26, 2009 at 8:06
0

You would need to change the Name Server from 10.1.1.1 to your ISP's name server. You could also set this to be your router's IP address, or a name server on the internet, if your IPs are routing properly.

It is saying "unknown host" because there is no name server running on 10.1.1.1, or because it can not reach 10.1.1.1. Can you ping this host?

You could also install a name server on your Ubuntu host if you wanted to handle it locally.

0

my recommendation is to install a caching name server on your network (your main ubuntu machine, for example) if you don't already have one, and configure every machine on your network to use it - physical machines and virtual machines.

it's worthwhile having a local dns cache anyway even without virtualisation - having a DNS cache a small fraction of a millisecond away is much better than using one that is 10s or 100s of milliseconds away at your ISP.

some of the DNS servers you could use are bind9 (probably overkill) or dnsmasq, unbound, or maradns.

if you were using kvm or xen or something instead of virtualbox, dnsmasq would probably be the best choice as it also does DHCP and TFTP which would make it useful for netbooting virtual machines....but virtualbox does its own dhcp & tftp anyway.

2
  • @anonymous downvoter: if you're going to downvote two reasonable answers (mine and dave drager's), at least give some hint about what you think is wrong with them.
    – cas
    Aug 26, 2009 at 0:06
  • They be hatin', our answers Aug 26, 2009 at 16:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .