Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 06-14-2008, 12:00 PM   #1
LQ Newbie
Registered: Mar 2003
Location: Virginia
Distribution: RedHat 8, RedHat 7.3, Gentoo
Posts: 2

Rep: Reputation: 0
VirtualBox networking does not work with Host Interface

I've installed Ubuntu Hardy Heron 8.04 on my laptop, which uses a wireless network, and then installed VirtualBox. I want to set up a virtual machine for development, etc etc. So I set up CentOS 5.1. Installation went fine, but upon booting, it gives the error when trying to start the network:

Bringing up interface eth0: Error, some other host already uses address

Let me tell you how I created the networking for this machine. I followed the instructions given at to set up parprouted as per the "Wireless Networking" instructions:

apt-get install parprouted
cat > /etc/network/if-up.d/vbox_network << EOF
sysctl net.ipv4.ip_forward=1
VBoxTunctl -b -u bps7j
ip link set tap0 up
ip addr add dev tap0
parprouted wlan0 tap0
chmod 700 /etc/network/if-up.d/vbox_network
(The user I'm running the virtual machine as is 'bps7j').

This creates a network device called tap0, which I can ping from my laptop, etc etc. Then in the VirtualBox network settings, I selected Host Interface and typed in tap0.

I read around on some of the forums and in Google, and found and which seem to be addressing similar-but-different issues, and didn't give me any hints.

Anyway, I thought OK, what might be happening. I'm pretty much a networking novice. But I did an arping from within the virtual machine, to check whether the IP address was already in use:

arping -c 2 -w 3 -D -I eth0
ARPING from eth0
Unicast reply from [00:FF:C8:8A:04:DB] 1.162ms
Sent 1 probes (1 broadcast(s))
Received 1 response(s)
There is no other physical machine on my network with that IP address, by the way; my router's DHCP starts at (This is a home network.)

Hmmm. OK, so what if I try to set the device up manually? My wireless router is

ifconfig eth0 netmask up
route add default gw
It never gets a reply. I can't ping the outside world either (like a Google IP address.) I can't wget or otherwise communicate with the outside world. ifconfig shows what appears to be a correctly set up device -- it just never gets any reply from the outside.

I read a little more about all this, and added the following line to my network start script as suggested here

route add -net netmask tap0
Still no dice. I tried rebooting my host machine. No luck.

Looks like for whatever reason, the little parprouted sleight-of-hand isn't working for this virtual machine the way it ought to be. Any ideas? Remember I don't know much about networking, so if you have any suggestions for me I would appreciate if you can help me understand all the steps I'll have to take.
Old 06-15-2008, 05:29 AM   #2
LQ Addict
Registered: Oct 2003
Location: Australia
Distribution: MX 16
Posts: 5,298

Rep: Reputation: Disabled
I would suggest you download the pdf documentation off

it goes into a number of scenarios including bridge

2) but why not think virtual?

pretend your vm is called centos
click on settings click on network

add a network card....its virtual intelpro is the easy one

what you get on boot up of the a virtual ethernet card that your host thinks is a real card so you can talk between the 2 machines host to vm

3) I have done something very similar on a diffent distro vm to get net saves mucking about adding bridge tools etc
Old 06-15-2008, 05:50 AM   #3
Registered: Aug 2003
Distribution: Debian, Ubuntu
Posts: 188

Rep: Reputation: 30
Hi bps7j,

don't know, how to get your attempt finally working, but here is the way, I painlessly got my vbox working fine. But first: If you did not find until now, there is a nice manual for VirtualBox: get it here.

I'm writing out of my memory, so please excuse, if I miss a command parameter. Everything should be verifyable with the manual.

What I did was:

1) setting up a virtual bridge,
2) plugging my physical network adapter into this bridge
3) creating a virtual adapter for my vmachine and plug it into the bridge
4) making everything persistent

You need to have installed (synaptic or apt-get): bridge-utils

1) as root, run on console: brctl addbr br0
2) as root, run on console: brctl addif eth0
3) as root, run on console: VBoxAddIF vbox0 <user_name> br0
4) edit /etc/network/interfaces as follows:

leave your physical adapter (e.g. eth0) as it is! For your bridge, add:
auto br0  
iface br0 inet static
address <unused_ip> # e.g. 
gateway <your_gateway> # e.g. 
bridge_ports <your_physical_device> # e.g. eth0
Or, if you prefer DHCP:
auto br0  
iface br0 inet dhcp
bridge_ports <your_physical_device> # e.g. eth0
If I remember correctly, everything should be fine, now. You can use vbox0 as hostinterface for your virtual machine.

Some caveats:
- It is said, that you don't have to set an owning usr in step 3), but a group - as vboxusers. This did not work here. I did not spent much time to discover why.
- I am not 100% sure, but I strongly believe, that it is enough to do steps 3) and 4). If I am right, steps 1) and 2) are needed to get virtual networking up and running on a running systen. If booting up your host machint, step 4) makes your system to set up a new bridge and to plug the physical device into the bridge. As said, I am not 100% sure.

Last edited by Clemente; 06-15-2008 at 05:53 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
VirtualBox Networking (NAT) not working on XP host with Mandriva guest FreeRadical2600 Linux - Newbie 9 10-29-2008 09:12 AM
HOW TO : Host Interface Networking setup in VirtualBox simjii SUSE / openSUSE 1 08-01-2008 10:35 PM
VirtualBox and networking AQG Linux - Software 2 06-02-2008 01:50 PM
Ubuntu Host Virtualbox guest Networking weirdness ddales Linux - Networking 0 01-20-2008 03:24 PM
Virtualbox Networking problem 00yahoo Ubuntu 1 07-13-2007 08:54 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:29 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration