File: README.ovs-vtep

package info (click to toggle)
openvswitch 2.3.0%2Bgit20140819-3
  • links: PTS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 24,156 kB
  • sloc: sh: 223,720; ansic: 153,459; python: 13,272; xml: 12,432; perl: 408; makefile: 382
file content (82 lines) | stat: -rw-r--r-- 2,433 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
                       How to Use the VTEP Emulator
                       ============================

This document explains how to use ovs-vtep, a VTEP emulator that uses
Open vSwitch for forwarding.  The emulator is a Python script that
invokes calls to vtep-ctl and various OVS commands, so these commands
will need to be available in the emulator's path.

Startup
=======

These instructions describe how to run with a single ovsdb-server
instance that handles both the OVS and VTEP schema.

1. Create the initial OVS and VTEP schemas:

    ovsdb-tool create /etc/openvswitch/ovs.db vswitchd/vswitch.ovsschema
    ovsdb-tool create /etc/openvswitch/vtep.db vtep/vtep.ovsschema

2. Start ovsdb-server and have it handle both databases:

    ovsdb-server --pidfile --detach --log-file \
      --remote punix:/var/run/openvswitch/db.sock \
      /etc/openvswitch/ovs.db /etc/openvswitch/vtep.db

3. Start OVS as normal:

    ovs-vswitchd --log-file --detach --pidfile \
      unix:/var/run/openvswitch/db.sock

4. Create a "physical" switch in OVS:

    ovs-vsctl add-br br0
    ovs-vsctl add-port br0 eth0

5. Configure the physical switch in the VTEP database:

    vtep-ctl add-ps br0
    vtep-ctl add-port br0 eth0
    vtep-ctl set Physical_Switch br0 tunnel_ips=192.168.0.3

6. Start the VTEP emulator:

    ovs-vtep --log-file=/var/log/openvswitch/ovs-vtep.log \
      --pidfile=/var/run/openvswitch/ovs-vtep.pid \
      --detach br0

7. Configure the VTEP database's manager to point at a NVC:

    vtep-ctl set-manager tcp:192.168.0.99:6632

The example provided creates a physical switch with a single physical
port attached to it.  If more than one physical port is needed, it would
be added to "br0" to both the OVS and VTEP databases:

    ovs-vsctl add-port br0 eth1
    vtep-ctl add-port br0 eth1


Simulating a NVC
================

A VTEP implementation expects to be driven by a Network Virtualization
Controller (NVC), such as NSX.  If one does not exist, it's possible to
use vtep-ctl to simulate one:

1. Create a logical switch:

    vtep-ctl add-ls ls0

2. Bind the logical switch to a port:

    vtep-ctl bind-ls br0 eth0 0 ls0
    vtep-ctl set Logical_Switch ls0 tunnel_key=33

3. Direct unknown destinations out a tunnel:

    vtep-ctl add-mcast-remote ls0 unknown-dst 192.168.1.34

4. Direct unicast destinations out a different tunnel:

    vtep-ctl add-ucast-remote ls0 11:22:33:44:55:66 192.168.1.33