# Can't get a IP inside Virtualbox

## Henning

I'm trying to get XP running within Virtualbox 1.5.4 with Hostinterface in bridge mode on device vbox0.

First of all I followed the gentoo wiki, to configure a bridge. Since I can't get a connection inside Virtualbox/XP I'm running as root, to exclude permission problem's.

my /etc/conf.d/net

```
#ALL interfaces part of a bridge should be null, otherwise oddities may occur.

config_vbox0=( "null")

config_eth0=( "null" )

config_eth1=( "null" )

#this specifies that interface vbox0 will be a tap interface and use the tunctl command to generate itself

tuntap_vbox0="tap"

# #Add port to bridge br0

bridge_br0="eth1 vbox0"

## Give the bridge an address - dhcp

config_br0=( "192.168.100.101" )

#config_br0=( "dhcp" )

gateways_br0=( "192.168.100.1" )

routes_br0=( "default via 192.168.100.1" )

dns_servers=( "192.168.100.1" )

## make sure eth0 is up before configuring br0

depend_br0() {

        need net.eth1

        need net.vbox0

}
```

ifconfig shows

```
br0       Protokoll:Ethernet  Hardware Adresse 00:17:31:40:95:12

          inet Adresse:192.168.100.101  Bcast:192.168.100.255  Maske:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:315009 errors:0 dropped:0 overruns:0 frame:0

          TX packets:279093 errors:0 dropped:0 overruns:0 carrier:0

          Kollisionen:0 Sendewarteschlangenlänge:0

          RX bytes:158447368 (151.1 Mb)  TX bytes:25184226 (24.0 Mb)

eth1      Protokoll:Ethernet  Hardware Adresse 00:17:31:40:95:12

          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1

          RX packets:315015 errors:0 dropped:0 overruns:0 frame:0

          TX packets:279093 errors:0 dropped:0 overruns:0 carrier:0

          Kollisionen:0 Sendewarteschlangenlänge:1000

          RX bytes:162857854 (155.3 Mb)  TX bytes:26324820 (25.1 Mb)

          Interrupt:17 Basisadresse:0xe000

lo        Protokoll:Lokale Schleife

          inet Adresse:127.0.0.1  Maske:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:50 errors:0 dropped:0 overruns:0 frame:0

          TX packets:50 errors:0 dropped:0 overruns:0 carrier:0

          Kollisionen:0 Sendewarteschlangenlänge:0

          RX bytes:3788 (3.6 Kb)  TX bytes:3788 (3.6 Kb)

vbox0     Protokoll:Ethernet  Hardware Adresse 00:FF:E7:01:AE:71

          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:25350 overruns:0 carrier:0

          Kollisionen:0 Sendewarteschlangenlänge:0

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

```

brctl show

```
bridge name     bridge id               STP enabled     interfaces

br0             8000.001731409512       no              eth1

                                                        vbox0
```

syslog of my dhcp server running on another machine (fli4l), when changing from the fixed ip in XP network configuration to dhcp 

```
Jan 22  17:14:46  fli4l  dnsmasq[13499]:  DHCPOFFER(eth0) 192.168.100.172 08:00:27:1c:64:1d

Jan 22  17:14:46  fli4l  dnsmasq[13499]:  DHCPDISCOVER(eth0) 192.168.100.88 08:00:27:1c:64:1d
```

When looking on the XP network statistics I found, that there are many send packages, but 0 received.

When starting the same XP in Virtualbox running on Win2003-Server the XP Network is working fine.

Maybe it's a VirtualBox/Linux problem, but I gess I have a bridging problem on my gentoo box.

Any hints?

Henning

----------

## bpaddock

 *Henning wrote:*   

> I'm trying to get XP running within Virtualbox 1.5.4 with Hostinterface in bridge mode on device vbox0.
> 
> First of all I followed the gentoo wiki, to configure a bridge. Since I can't get a connection inside Virtualbox/XP I'm running as root
> 
> Henning

 

I too can't get an IP address from inside Virtualbox.  I have a AMD64 host, and I'm trying to set up a 32bit Gentoo guest.

I can get the minimal CD to boot up in VBox, and when I run net-setup

it finds the vbox bridge devices as eth0, but anything I try to do,

like ping, returns "network not reachable".  I've also tried running

as root to see if that solved the problem, it did not.

Ideas/suggestions?

----------

## Henning

Whats about the dropped packackes on vbox0?

Is this a bridge or a virtualbox problem?

----------

## manaka

I would bet the cause is this bug. The symptoms are quite the same.

----------

## bpaddock

 *manaka wrote:*   

> I would bet the cause is this bug. The symptoms are quite the same.

 

That did lead me in the correct direction, thank you.  It was actually this  bug.

Unmasking the latest version of openvpn, fixed the VirtualBox problem.  Gad, what a tangle web we weave...

----------

## Henning

You are my hero's.

I have tried both suggestions.

First I have set txqueuelen by hand -> bridge is working 

Then I have set it back and emerged the masked openvpn version. -> bridge is working too.

So why openvpn > 2.0.6 ist still masked for more then a year?

Thank you very very much

Henning

----------

## jcat

FYI, I had a similar issue when I set-up VBox using bridged networking, but it turned out to be IPTables blocking access from the guest to the host and beyond.  I had to add some forwarding and state rules for the bridged interface, then I was able to communicate with the rest of the world from the guest  :Smile: 

Just in case anyone else stumbles across this thread and it's not a bug..

Cheers,

jcat

----------

## Henning

Because I'm not using iptables I'm sure it's a bug.

Henning

----------

