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.
Virtual network devices
-
bmwiedemann
- Posts: 32
- Joined: 23. Mar 2008, 06:41
- Location: $HOME
- Contact:
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.
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
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:
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 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
Install routing software
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.
Zebra, Quagga is open source routing software.
Or you can install Junos (Juniper commercial router). search Olive + Juniper.