Virtual network devices

Discussions related to using VirtualBox on Linux hosts.
Post Reply
Angry
Posts: 24
Joined: 4. Sep 2008, 17:36

Virtual network devices

Post by Angry »

Is there a way to implement the use of virtual network devices like virtual routers and virtual switches in VB? I'd like to test connecting virtual machines to a virtual switch, virtual router (gateway) so I can trace connectivity between machines.

I suppose I could just bridge the machines to their own host NIC and plug them into a physical network device but just wondered if I could do it virtually.
bmwiedemann
Posts: 32
Joined: 23. Mar 2008, 06:41
Location: $HOME
Contact:

Post by bmwiedemann »

You could have a look at the Virtual Distributed Ethernet (VDE) project with their vde_switch. I think they have a vdetap wrapper to allow tap device ("Host Interface") networking to plug into their virtual switch.

You get a virtual router by installing linux into a VM with multiple network interfaces and enabling IP-forwarding (e.g. echo 1 > /proc/sys/net/ipv4/ip_forward )

you might even be able to create a virtual switch this way by using the "internal networking" kind and bridge some together within the VM.
I am who I am
Angry
Posts: 24
Joined: 4. Sep 2008, 17:36

Post by Angry »

Ha, that looks pretty sweet! VDE is in the Ubuntu repos too. I'll check it out. I've not heard of IP-forwarding with respect to VM's before so I'll read up on that as well. This will help me understand what goes wrong when I have DHCP assign the incorrect default gateway and other things. Have you ever used VDE or IP forwarding before?
bmwiedemann
Posts: 32
Joined: 23. Mar 2008, 06:41
Location: $HOME
Contact:

Post by bmwiedemann »

I used IP-forwarding a lot on my real routers and also on my user-mode-linux(UML) VM which hosts my openVPN-server. This part is all about IP-routing-tables and such.

I read a lot about VDE... but only used uml_switch til now in productive envionment which is less general than vde_switch and the tools around it.

As for the "DHCP" ... it probably means that you run your VM's network interfaces in NAT mode which will not bring you very far, because you can not easily get IP packets into it. And only TCP/IP and UDP/IP out of it.
Try "Host networking" or "Internal Network"
I am who I am
sunshout
Posts: 1
Joined: 8. Dec 2008, 08:29
Contact:

Install routing software

Post by sunshout »

After installation of virtualbox, you can install zebra, quagga.

Zebra, Quagga is open source routing software.

Or you can install Junos (Juniper commercial router). search Olive + Juniper.
Post Reply