Virtual Network with SUN VirtualBox

Thesis oh Thesis… :)

For my thesis purpose, I need to have more than 1 PCs, so I decided to install SUN Virtualbox from an rpm package which I got from here.

First, I need to tell you that my laptop runs on top of Fedora 10.

Be sure that you enter as the root user in the command shell. Just type su -

I install the package by typing

yum -y install VirtualBox-2.1.4_42893_fedora9-1.i386.rpm

After the installation, you can access Virtualbox in GUI mode by going to Applications -> System Tools -> SUN xVM Virtualbox

You can start installing guest OS.

I installed OpenSuse 11, Ubuntu 8.10, and Red Hat Enterprise Linux 5.2 on it.

I think that’s all for the preparation :)

Let’s start building the virtual network.

First, create a virtual ethernet card for each guest OS

in your terminal, type:

VBoxTunctl -t theExpectedNameForYourVirtualEthCard -u OwnerName

I wish to have three eth card to be assigned to each guest OS,.So I did the following in my system:

[root@localhost ~]# VBoxTunctl -t vbSuse -u rya
Set ‘vbSuse’ persistent and owned by uid 500

[root@localhost ~]# VBoxTunctl -t vbUbuntu -u rya
Set ‘vbUbuntu’ persistent and owned by uid 500

[root@localhost ~]# VBoxTunctl -t vbRhel -u rya
Set ‘vbRhel’ persistent and owned by uid 500

All of them are not automatically started…So I need to start them by typing:

[root@localhost ~]# ifconfig vbSuse up

[root@localhost ~]# ifconfig vbUbuntu up

[root@localhost ~]# ifconfig vbRhel up

And I need to assign IP for each of them…

[root@localhost ~]# ifconfig vbUbuntu

[root@localhost ~]# ifconfig vbSuse

[root@localhost ~]# ifconfig vbRhel


The next step is to do the routing…

[root@localhost ~]# route add -net gw
[root@localhost ~]# route add -net gw
[root@localhost ~]# route add -net gw

after all, I configure each guest OS to have IP address and default gateway set.

Ooops….I almost forget to tell you about how to assign those virtual ethernet card to your Guest OS…

  • First, you select a guest OS, then,
  • in the right panel, you will see the network configuration
  • Click on it
  • Another window will show up
  • Thick on the check box “Enable Network Adapter”
  • For the “Attached To” drop down menu, select “Host Interface”. There will be a lists of available Host interface.
  • Choose one of the, and click OK



In my Ubuntu Guest OS. I assign IP and default gateway as follows:

ifconfig eth0 up

ifconfig eth0

route add default gateway

I did the same things for OpenSuse and RHEL guest OS.


ifconfig eth0 up

ifconfig eth0

route add default gateway


ifconfig eth0 up

ifconfig eth0

route add default gateway

After all, from your host, try to ping to all IP address of you guest OSes, from your guest OS to your host, and for one guest OS to another guest OS.

And Everything is done. :)

Written by admin in: Tutorial |


RSS feed for comments on this post. TrackBack URL

Powered by MarSim TerRomnite | Theme: by SalleyTam and MikeWils, design by Danbed Inc NTU.
Our Team:Living Snug Cen Nac Nordic Fact Socal Lily DRC Villa NYC Pacific Tea Winns