openvswitch: Userspace tunneling.
[cascardo/ovs.git] / README-native-tunneling.md
1
2 Open vSwitch supports tunneling in userspace. Tunneling is implemented in
3 platform independent way.
4
5 Setup:
6 ======
7 Setup physical bridges for all physical interfaces. Create integration bridge.
8 Add VXLAN port to int-bridge. Assign IP address to physical bridge where
9 VXLAN traffic is expected.
10
11 Example:
12 ========
13 Connect to VXLAN tunnel endpoint logical ip: 192.168.1.2 and 192.168.1.1.
14
15 Configure OVS bridges as follows.
16
17 1. Lets assume 172.168.1.2/24 network is reachable via eth1 create physical bridge br-eth1
18    assign ip address (172.168.1.1/24) to br-eth1, Add eth1 to br-eth1
19 2. Check ovs cached routes using appctl command
20    ovs-appctl ovs/route/show
21    Add tunnel route if not present in OVS route table.
22    ovs-appctl ovs/route/add 172.168.1.1/24 br-eth1
23 3. Add integration brdge int-br and add tunnel port using standard syntax.
24    ovs-vsctl add-port int-br vxlan0 -- set interface vxlan0 type=vxlan  options:remote_ip=172.168.1.2
25 4. Assign IP address to int-br, So final topology looks like:
26
27
28        192.168.1.1/24
29        +--------------+
30        |    int-br    |                                   192.168.1.2/24
31        +--------------+                                  +--------------+
32        |    vxlan0    |                                  |    vxlan0    |
33        +--------------+                                  +--------------+
34              |                                                 |
35              |                                                 |
36              |                                                 |
37         172.168.1.1/24                                         |
38        +--------------+                                        |
39        |    br-eth1   |                                  172.168.1.2/24
40        +--------------+                                  +---------------+
41        |    eth1      |----------------------------------|    eth1       |
42        +--------------+                                  +----------------
43
44        Host A with OVS.                                      Remote host.
45
46 With this setup, ping to VXLAN target device (192.168.1.2) should work
47 There are following commands that shows internal tables:
48
49 Tunneling related commands:
50 ===========================
51 Tunnel routing table:
52     To Add route:
53        ovs-appctl ovs/route/add <IP address>/<prefix length> <output-bridge-name> <gw>
54     To see all routes configured:
55        ovs-appctl ovs/route/show
56     To del route:
57        ovs-appctl ovs/route/del <IP address>/<prefix length>
58
59 ARP:
60     To see arp cache content:
61        ovs-appctl tnl/arp/show
62     To flush arp cache:
63        ovs-appctl tnl/arp/flush
64
65 To check tunnel ports listening in vswitchd:
66      ovs-appctl tnl/ports/show
67
68 To set range for VxLan udp source port:
69      To set:
70          ovs-appctl tnl/egress_port_range <num1> <num2>
71      Shows Current range:
72          ovs-appctl tnl/egress_port_range
73
74 To check datapath ports:
75      ovs-appctl dpif/show
76
77 To check datapath flows:
78      ovs-appctl dpif/dump-flows
79
80 Contact
81 =======
82 bugs@openvswitch.org