Bridge networking: WinXP(host) -> Ubuntu 8.10 server (gue

Discussions related to using VirtualBox on Windows hosts.
Post Reply
etylocus
Posts: 2
Joined: 18. Nov 2008, 14:43

Bridge networking: WinXP(host) -> Ubuntu 8.10 server (gue

Post by etylocus »

Hi all,
I need some help troubleshooting my network.

I managed to 'kind of' have networking between the host and guest, but it's far from perfect.

I can access the guest files through the network, but then i've a lot of network adapters in Ubuntu that I would like to get rid of. I found this: http://www.virtualbox.org/ticket/660 so i know how to do that, but then there is a vnet0 adapter that pops out of nowhere (was created even before i switched to host networking) and can't get rid of. As far as i know, I'm getting internet connection out of 1 adapter, and connection to the network from the 2nd adapter.
Add to that that the internet connection drops erratically, which i recover by running a 'network discovery' bash script (That in itself is very cool: whenever i make a change to the host network i run it to know how the new adapter is called and what's not working).
The script can be found here:
http://www.debian-administration.org/articles/128

this is the result of my ifconfig:

Code: Select all

eth4      Link encap:Ethernet  HWaddr 08:00:27:dc:24:62  
          inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fedc:2462/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:219 errors:0 dropped:0 overruns:0 frame:0
          TX packets:309 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:61600 (61.6 KB)  TX bytes:31428 (31.4 KB)
          Interrupt:11 Base address:0xc020 

eth5      Link encap:Ethernet  HWaddr 08:00:27:81:90:54  
          inet addr:192.168.0.21  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe81:9054/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6384 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6258 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:4210932 (4.2 MB)  TX bytes:921600 (921.6 KB)

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:699 errors:0 dropped:0 overruns:0 frame:0
          TX packets:699 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:141425 (141.4 KB)  TX bytes:141425 (141.4 KB)

vnet0     Link encap:Ethernet  HWaddr ce:f3:be:b8:36:7c  
          inet addr:192.168.122.1  Bcast:192.168.122.255  Mask:255.255.255.0
          inet6 addr: fe80::ccf3:beff:feb8:367c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:94 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:14270 (14.2 KB)
this are my routes:

Code: Select all

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.0.2.0        *               255.255.255.0   U     0      0        0 eth4
192.168.0.0     *               255.255.255.0   U     0      0        0 eth5
192.168.122.0   *               255.255.255.0   U     0      0        0 vnet0
default         192.168.0.100   0.0.0.0         UG    100    0        0 eth5
default         10.0.2.2        0.0.0.0         UG    100    0        0 eth4
and the nameserver:

Code: Select all

nameserver 10.0.2.3
Thanks in advance...
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post by Sasquatch »

You can check where the interfaces come from, and even remove the mentioning of them, in /etc/rules.d/udev/70-persistent-net.rules.

The vnet0 might be of an application that creates a virtual interface, like VPN connections.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
etylocus
Posts: 2
Joined: 18. Nov 2008, 14:43

Post by etylocus »

Hi, I can see in the rules where everything is coming from, don't want to touch this as of now i have network and internet access. Then vnet0 is an interface created by VirtualBox, but can't find where (and most important WHY) is it created.

Not sure how the routing should be set up, either.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post by Sasquatch »

The route is just fine. It lists two default routes, because one way to get to the internet is through the NAT network (10.0.2.x) and the other is through your HIF (192.168.0.x).
However, the nameserver is set to 10.0.2.3, so it will use the NAT connection for DNS resolving, and verly likely use NAT to go further.

As for the rules file, you can safely remove the entries, and if you are uncertain about a few things, just leave the lines for eth4 and eth5, and rename the interfaces to eth0 and eth1. Of course, don't forget to update your interfaces file and/or other config files to use the proper interface names. Should only be /etc/network/interfaces.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Post Reply