Setting tag sliver-openvswitch-2.2.90-1
[sliver-openvswitch.git] / vtep / README.ovs-vtep
1                        How to Use the VTEP Emulator
2                        ============================
3
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.
8
9 Startup
10 =======
11
12 These instructions describe how to run with a single ovsdb-server
13 instance that handles both the OVS and VTEP schema.
14
15 1. Create the initial OVS and VTEP schemas:
16
17     ovsdb-tool create /etc/openvswitch/ovs.db vswitchd/vswitch.ovsschema
18     ovsdb-tool create /etc/openvswitch/vtep.db vtep/vtep.ovsschema
19
20 2. Start ovsdb-server and have it handle both databases:
21
22     ovsdb-server --pidfile --detach --log-file \
23       --remote punix:/var/run/openvswitch/db.sock \
24       /etc/openvswitch/ovs.db /etc/openvswitch/vtep.db
25
26 3. Start OVS as normal:
27
28     ovs-vswitchd --log-file --detach --pidfile \
29       unix:/var/run/openvswitch/db.sock
30
31 4. Create a "physical" switch in OVS:
32
33     ovs-vsctl add-br br0
34     ovs-vsctl add-port br0 eth0
35
36 5. Configure the physical switch in the VTEP database:
37
38     vtep-ctl add-ps br0
39     vtep-ctl add-port br0 eth0
40     vtep-ctl set Physical_Switch br0 tunnel_ips=192.168.0.3
41
42 6. Start the VTEP emulator:
43
44     ovs-vtep --log-file=/var/log/openvswitch/ovs-vtep.log \
45       --pidfile=/var/run/openvswitch/ovs-vtep.pid \
46       --detach br0
47
48 7. Configure the VTEP database's manager to point at a NVC:
49
50     vtep-ctl set-manager tcp:192.168.0.99:6632
51
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:
55
56     ovs-vsctl add-port br0 eth1
57     vtep-ctl add-port br0 eth1
58
59
60 Simulating a NVC
61 ================
62
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:
66
67 1. Create a logical switch:
68
69     vtep-ctl add-ls ls0
70
71 2. Bind the logical switch to a port:
72
73     vtep-ctl bind-ls br0 eth0 0 ls0
74     vtep-ctl set Logical_Switch ls0 tunnel_key=33
75
76 3. Direct unknown destinations out a tunnel:
77
78     vtep-ctl add-mcast-remote ls0 unknown-dst 192.168.1.34
79
80 4. Direct unicast destinations out a different tunnel:
81
82     vtep-ctl add-ucast-remote ls0 11:22:33:44:55:66 192.168.1.33