<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic xml:lang="en-us" id="network_vde">
  <title>VDE Networking</title>
  
  <body>
    <p>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 <ph conkeyref="vbox-conkeyref-phrases/product-name"/> which is only included in the source
      code. </p>
    <p>VDE is a project developed by Renzo Davoli, Associate Professor at the University of Bologna, Italy. </p>
    <p>The basic building blocks of the infrastructure are VDE switches, VDE plugs, and VDE wires which interconnect the
      switches. </p>
    <p>The <ph conkeyref="vbox-conkeyref-phrases/product-name"/> 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. </p>
    <p>The following basic example shows how to connect a virtual machine to a VDE switch. </p>
    <ol>
      <li>
        <p>
          Create a VDE switch:
        </p>
        <pre xml:space="preserve">vde_switch -s /tmp/switch1</pre>
      </li>
      <li>
        <p>
          Configure VMs using the command-line:
        </p>
        <pre xml:space="preserve">VBoxManage modifyvm "VM name" --nic&lt;x&gt; generic</pre>
        <pre xml:space="preserve">VBoxManage modifyvm "VM name" --nic-generic-drv&lt;x&gt; VDE</pre>
        <p>
          To connect to an automatically allocated switch port:
        </p>
        <pre xml:space="preserve">VBoxManage modifyvm "VM name" --nic-property&lt;x&gt; network=/tmp/switch1</pre>
        <p>
          To connect to a specific switch port
          <varname>n</varname>:
        </p>
        <pre xml:space="preserve">VBoxManage modifyvm "VM name" --nic-property&lt;x&gt; network=/tmp/switch1[&lt;n&gt;]</pre>
        <p>
          This command can be useful for VLANs.
        </p>
      </li>
      <li>
        <p>
          (Optional) Map between a VDE switch port and a VLAN.
        </p>
        <p>
          Using the switch command line:
        </p>
        <pre xml:space="preserve">vde$ vlan/create &lt;VLAN&gt;</pre>
        <pre xml:space="preserve">vde$ port/setvlan &lt;port&gt; &lt;VLAN&gt;</pre>
      </li>
    </ol>
    <p>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. </p>
    <note>
      <p>For Linux hosts, the shared library libvdeplug.so must be available in the search path for shared libraries. </p>
    </note>
    <p>For more information on setting up VDE networks, please see the documentation accompanying the software. See also
        <ph>http://wiki.virtualsquare.org</ph>. </p>
  </body>
  
</topic>
