1 How to Use the VTEP Emulator
2 ============================
4 This document explains how to use ovs-vtep, a VTEP emulator that uses
5 Open vSwitch for forwarding. The emulator is a Python script that
6 invokes calls to vtep-ctl and various OVS commands, so these commands
7 will need to be available in the emulator's path.
12 These instructions describe how to run with a single ovsdb-server
13 instance that handles both the OVS and VTEP schema.
15 1. Create the initial OVS and VTEP schemas:
17 ovsdb-tool create /etc/openvswitch/ovs.db vswitchd/vswitch.ovsschema
18 ovsdb-tool create /etc/openvswitch/vtep.db vtep/vtep.ovsschema
20 2. Start ovsdb-server and have it handle both databases:
22 ovsdb-server --pidfile --detach --log-file \
23 --remote punix:/var/run/openvswitch/db.sock \
24 /etc/openvswitch/ovs.db /etc/openvswitch/vtep.db
26 3. Start OVS as normal:
28 ovs-vswitchd --log-file --detach --pidfile \
29 unix:/var/run/openvswitch/db.sock
31 4. Create a "physical" switch in OVS:
34 ovs-vsctl add-port br0 eth0
36 5. Configure the physical switch in the VTEP database:
39 vtep-ctl add-port br0 eth0
40 vtep-ctl set Physical_Switch br0 tunnel_ips=192.168.0.3
42 6. Start the VTEP emulator:
44 ovs-vtep --log-file=/var/log/openvswitch/ovs-vtep.log \
45 --pidfile=/var/run/openvswitch/ovs-vtep.pid \
48 7. Configure the VTEP database's manager to point at a NVC:
50 vtep-ctl set-manager tcp:192.168.0.99:6632
52 The example provided creates a physical switch with a single physical
53 port attached to it. If more than one physical port is needed, it would
54 be added to "br0" to both the OVS and VTEP databases:
56 ovs-vsctl add-port br0 eth1
57 vtep-ctl add-port br0 eth1
63 A VTEP implementation expects to be driven by a Network Virtualization
64 Controller (NVC), such as NSX. If one does not exist, it's possible to
65 use vtep-ctl to simulate one:
67 1. Create a logical switch:
71 2. Bind the logical switch to a port:
73 vtep-ctl bind-ls br0 eth0 0 ls0
74 vtep-ctl set Logical_Switch ls0 tunnel_key=33
76 3. Direct unknown destinations out a tunnel:
78 vtep-ctl add-mcast-remote ls0 unknown-dst 192.168.1.34
80 4. Direct unicast destinations out a different tunnel:
82 vtep-ctl add-ucast-remote ls0 11:22:33:44:55:66 192.168.1.33