Virtual Distributed Ethernet (VDE[32]) is a flexible, virtual network infrastructure system, spanning across multiple hosts in a secure way. It allows for L2/L3 switching, including spanning-tree protocol, VLANs, and WAN emulation. It is an optional part of VirtualBox which is only included in the source code.
The basic building blocks of the infrastructure are VDE switches, VDE plugs and VDE wires which inter-connect the switches.
The VirtualBox VDE driver has one parameter:
- VDE network
-
The name of the VDE network switch socket to which the VM will be connected.
The following basic example shows how to connect a virtual machine to a VDE switch:
-
Create a VDE switch:
vde_switch -s /tmp/switch1
-
Configuration via command-line:
VBoxManage modifyvm "VM name" --nic<x> generic
VBoxManage modifyvm "VM name" --nicgenericdrv<x> VDE
To connect to automatically allocated switch port, use:
VBoxManage modifyvm "VM name" --nicproperty<x> network=/tmp/switch1
To connect to specific switch port <n>, use:
VBoxManage modifyvm "VM name" --nicproperty<x> network=/tmp/switch1[<n>]
The latter option can be useful for VLANs.
-
Optionally map between VDE switch port and VLAN: (from switch CLI)
vde$ vlan/create <VLAN>
vde$ port/setvlan <port> <VLAN>
VDE is available on Linux and FreeBSD hosts only. It is only available if the VDE software and the VDE plugin library from the VirtualSquare project are installed on the host system[33]. For more information on setting up VDE networks, please see the documentation accompanying the software.[34]