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