PDA

View Full Version : [ubuntu] [SOLVED] No Internet. But my VBox XP guest is OK?



SpideySpirit
November 19th, 2008, 05:00 AM
Initially after installing Ubuntu Intrepid 8.10 firefox connected to the internet via my ADSL router modem, after I installed VBox and configured Host Interfaces for guest OS XP, Ubuntu doesn't see the internet, however, my VBox Windows XP guest surfs ok. I'm confused, does anyone know how to solve this??

Another:confused: Newbie

superprash2003
November 19th, 2008, 05:12 PM
post output of ifconfig from the terminal of ubuntu.. is your router's ip address 192.168.1.1 ?

SpideySpirit
November 20th, 2008, 04:02 AM
superprash thx for your reply, my router ip is 10.0.0.138

Also the interfaces file:


auto lo
iface lo inet loopback
auto br0
iface br0 inet dhcp
bridge_ports eth0




$ ifconfig
br0 Link encap:Ethernet HWaddr 00:30:1b:b3:28:0f
inet addr:10.0.0.6 Bcast:10.0.0.255 Mask:255.255.255.0
inet6 addr: fe80::230:1bff:feb3:280f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:496 errors:0 dropped:0 overruns:0 frame:0
TX packets:78 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:25220 (25.2 KB) TX bytes:7130 (7.1 KB)

eth0 Link encap:Ethernet HWaddr 00:30:1b:b3:28:0f
inet addr:10.0.0.6 Bcast:10.0.0.255 Mask:255.255.255.0
inet6 addr: fe80::230:1bff:feb3:280f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:506 errors:0 dropped:0 overruns:0 frame:0
TX packets:167 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:34788 (34.7 KB) TX bytes:16851 (16.8 KB)
Interrupt:19

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:122 errors:0 dropped:0 overruns:0 frame:0
TX packets:122 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:7668 (7.6 KB) TX bytes:7668 (7.6 KB)

vbox Link encap:Ethernet HWaddr 92:bf:6c:d9:73:2a
inet6 addr: fe80::90bf:6cff:fed9:732a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:432 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

vbox1 Link encap:Ethernet HWaddr b6:b2:28:3c:07:23
inet6 addr: fe80::b4b2:28ff:fe3c:723/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:432 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

vbox2 Link encap:Ethernet HWaddr da:f2:0a:35:bf:64
inet6 addr: fe80::d8f2:aff:fe35:bf64/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:432 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

Hope this helps:)

superprash2003
November 20th, 2008, 04:39 PM
are you able to ping your router?? ping 10.0.0.138 ?

SpideySpirit
November 21st, 2008, 03:46 PM
The ubuntu Host can ping the router, but not, eg www.google.com or it's ip address. However, the VBox guest WinXP can ping google & surf.... Also I have a laptop connected to the router, Ubuntu can ping laptop & visa-versa... Just ubuntu host has no internet...:(

superprash2003
November 21st, 2008, 04:48 PM
ok.. in windows do you use a dialer to connect to the internet?? or does the internet work as soon as you switch on your modem?

SpideySpirit
November 21st, 2008, 05:00 PM
As soon as I boot ubuntu, it has no access, start vbox the guest connects immediately in the same way as my laptop (also XP), no dialer dialogue

superprash2003
November 22nd, 2008, 11:40 AM
could be a problem with DNS.. post output of cat /etc/resolv.conf

SpideySpirit
November 23rd, 2008, 02:31 AM
# Generated by NetworkManager
domain gateway.2wire.net
search gateway.2wire.net
nameserver 10.0.0.138

superprash2003
November 24th, 2008, 04:48 PM
use opendns servers..follow this http://prash-babu.blogspot.com/2008/04/how-to-configure-dns-servers-in-linux.html

ubernatural
November 25th, 2008, 08:15 AM
SpideySpirit,

I bit the bullet and spent an evening reading about bridges, taps, etc etc. Here's what I've got:

When you create a bridge, that becomes the new interface that your host uses. eth0 sort of fades into the background as just a part of that bridge (with vbox0). Since eth0 isn't the main interface any more, it should not have an IP assigned to it - all of the eth0 settings should actually transfer over to the bridge, including gateway, netmask, etc. This automatically happens when we add the entry to our interfaces file with dhcp, but what *doesn't* happen is those settings being removed from eth0. I think it's a deficiency in the VirtualBox documentation that that is not mentioned.

If you want to get connectivity back to your host "live", do the following:

sudo ifconfig eth0 0.0.0.0
This kind of sucks cause you'll need to do this after every reboot. I added the following to my /etc/network/interfaces file:

auto eth0
iface eth0 inet static
address 0.0.0.0
Now when I reboot, I get host and guest connectivity automatically. One thing that's missing (though I haven't noticed any difference so far) is that eth0 is supposed to be set to "promiscuous" mode (naughty...). You can just do

sudo ifconfig eth0 promisc
once your computer starts, or there's also probably a way to include that in the interfaces file, maybe with a line under the address for eth0 reading:

post-up ifconfig eth0 promisc
but I haven't tried that and I probably won't unless things just don't work the way they are.

This is a bit of the blind leading the blind I'm afraid so take what I say with a grain of salt. Hopefully if there's anything very wrong in what I've said some guru will speak up.

SpideySpirit
November 27th, 2008, 11:22 AM
Ubernatural, you rock...... :guitar: thx for your effort, tried what u suggested, & I'm all connected & I'm all smiles, without the promiscuity...:lolflag: