Internet connection issues in Ubuntu 9.10

Discussions about using Linux guests in VirtualBox.
Post Reply
Skutti
Posts: 3
Joined: 28. Mar 2010, 14:11
Primary OS: MS Windows XP
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Linux Ubuntu 9.10

Internet connection issues in Ubuntu 9.10

Post by Skutti »

I have installed VB on a Windows XP host whith a Ubuntu 9.10 guest recently. I can't get the internet connection to work though. I've tried NAT and Bridged networking and on both I get the same problem. I can ping various addresses like yahoo etc and i can connect to my router all the time, but it seems like the internet connection is very unstable and interrupting all the time. Sometimes I manage to load google, but most of the time it just times out.
I think that this might have something to do whith my Adsl router to do. It has NAT and Firewall services and I think that it might somehow not work with the Ubuntu guest. On the host the internet is working like always.
If someone has an Idea on what this might be and how I could solve this I'd be very glad.

best regards
Simon
whit
Posts: 27
Joined: 20. Mar 2010, 20:39
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu 10.04

Re: Internet connection issues in Ubuntu 9.10

Post by whit »

Is this wired or wireless? What have you set up for networking within the Ubuntu guest? What does your /etc/network/interfaces file have in it? What do you see in Ubuntu with "ip addr ls" and "ip ro ls"? In your VB "Network Adapters" setup do you have "Cable connected" checked or not? What does your /etc/resolv.conf file contain? Is there firewall software running on your host?

Knowing all that may or may not clarify where the problem is.
Skutti
Posts: 3
Joined: 28. Mar 2010, 14:11
Primary OS: MS Windows XP
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Linux Ubuntu 9.10

Re: Internet connection issues in Ubuntu 9.10

Post by Skutti »

It's wired and my host has a firewall but I've turned it off for now.

/etc/network/interfaces contains :

Code: Select all

auto lo
iface lo inet loopback
This appears whith " ip addr ls"

Code: Select all

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
    link/ether 08:00:27:0d:0d:6a brd ff:ff:ff:ff:ff:ff
    inet 10.0.2.15/24 brd 10.0.2.255 scope global eth0
    inet6 fe80::a00:27ff:fe0d:d6a/64 scope link 
       valid_lft forever preferred_lft forever
This appears whith "ip ro ls"

Code: Select all

10.0.2.0/24 dev eth0  proto kernel  scope link  src 10.0.2.15  metric 1 
169.254.0.0/16 dev eth0  scope link  metric 1000 
default via 10.0.2.2 dev eth0  proto static 
I have Cable connected checked and the /etc/resolv.conf file contains:

Code: Select all

# Generated by NetworkManager
nameserver 192.168.1.1
whit
Posts: 27
Joined: 20. Mar 2010, 20:39
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu 10.04

Re: Internet connection issues in Ubuntu 9.10

Post by whit »

Skutti wrote:It's wired and my host has a firewall but I've turned it off for now.

/etc/network/interfaces contains :

Code: Select all

auto lo
iface lo inet loopback
Since you're connecting on eth0, you might want an entry for that something like

Code: Select all

auto eth0
iface eth0 inet dhcp
As an alternative to that, you might find the "dhclient" command gets you set up.

So you're using the NAT setting in VB, right?
This appears whith "ip ro ls"

Code: Select all

10.0.2.0/24 dev eth0  proto kernel  scope link  src 10.0.2.15  metric 1 
169.254.0.0/16 dev eth0  scope link  metric 1000 
default via 10.0.2.2 dev eth0  proto static 
That looks right for VB NAT.
I have Cable connected checked and the /etc/resolv.conf file contains:

Code: Select all

# Generated by NetworkManager
nameserver 192.168.1.1
Does your router at 192.168.1.1 have a nameserver running? If you do "dig @192.168.1.1 somedomain.com" does it answer?

Do you have better luck (I have - but my problems weren't so severe) if you go to "Bridged Adapter"? You may need to establish a new DHCP lease after making that switch (e.g. either "dhclient" or if your /etc/network/interfaces file is set up for the interface "ifdown eth0;ifup eth0".
Skutti
Posts: 3
Joined: 28. Mar 2010, 14:11
Primary OS: MS Windows XP
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Linux Ubuntu 9.10

Re: Internet connection issues in Ubuntu 9.10

Post by Skutti »

Thank you for your reply.
I added the lines that you suggested to the interfaces file but it still didnt work :( The only thing that happened was that I couldnt press the "edit" button in "network connections". I tried dhclient aswell.
Then I tried switching to Bridge. I'm not sure what you mean whith "ifdown eth0;ifup eth0" but I ran dhclient. I can ping and I can see the new IP address in my router. But I can't connect to the internet through the browser and I can't download the update packages for Ubuntu. I have no idea what the problem is and I'm out of ideas..
whit
Posts: 27
Joined: 20. Mar 2010, 20:39
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu 10.04

Re: Internet connection issues in Ubuntu 9.10

Post by whit »

Sorry that didn't help. You might be right that it's something problematic in your ADSL device. If, for instance, it doesn't tolerate two separate IPs at the same MAC address, it could foul up bridged mode. And it could be doing NAT in a way that conflicts with VB's own NAT - I seem to see some conflict between VB's NATing and the NATing my Linux router here does on stuff leaving the LAN, not as much as you're reporting, but it does look like different NAT implementations can fail to work well when one's behind another.

Does your ADSL router also offer a bridged mode? If you can reset it to bridged, and then go back to NAT on the VB setup, then at least you wouldn't have potential conflict between the two NAT implementations. (I have an SDSL router bridged here, the other side of my Linux router.) If you do go to bridged mode on the router with a Windows host, though, the host will be more exposed, so you'd want to make sure that firewalling is in place, whether on the router or within Windows.
Post Reply