6.9. VDE Networking

Virtual Distributed Ethernet (VDE) is a flexible, virtual network infrastructure system, spanning across multiple hosts in a secure way. It enables L2/L3 switching, including spanning-tree protocol, VLANs, and WAN emulation. It is an optional part of Oracle VM VirtualBox which is only included in the source code.

VDE is a project developed by Renzo Davoli, Associate Professor at the University of Bologna, Italy.

The basic building blocks of the infrastructure are VDE switches, VDE plugs, and VDE wires which interconnect the switches.

The Oracle VM VirtualBox VDE driver has a single parameter: VDE network. This is 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.

  1. Create a VDE switch:

    vde_switch -s /tmp/switch1
  2. Configure VMs using the command-line:

    VBoxManage modifyvm "VM name" --nic<x> generic
    VBoxManage modifyvm "VM name" --nicgenericdrv<x> VDE

    To connect to an automatically allocated switch port:

    VBoxManage modifyvm "VM name" --nicproperty<x> network=/tmp/switch1

    To connect to a specific switch port n:

    VBoxManage modifyvm "VM name" --nicproperty<x> network=/tmp/switch1[<n>]

    This command can be useful for VLANs.

  3. (Optional) Map between a VDE switch port and a VLAN.

    Using the switch command line:

    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.

Note

For Linux hosts, the shared library libvdeplug.so must be available in the search path for shared libraries.

For more information on setting up VDE networks, please see the documentation accompanying the software. See also http://wiki.virtualsquare.org.