forked from openvswitch/ovs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Following patch adds support for userspace tunneling. Tunneling needs three more component first is routing table which is configured by caching kernel routes and second is ARP cache which build automatically by snooping arp. And third is tunnel protocol table which list all listening protocols which is populated by vswitchd as tunnel ports are added. GRE and VXLAN protocol support is added in this patch. Tunneling works as follows: On packet receive vswitchd check if this packet is targeted to tunnel port. If it is then vswitchd inserts tunnel pop action which pops header and sends packet to tunnel port. On packet xmit rather than generating Set tunnel action it generate tunnel push action which has tunnel header data. datapath can use tunnel-push action data to generate header for each packet and forward this packet to output port. Since tunnel-push action contains most of packet header vswitchd needs to lookup routing table and arp table to build this action. Signed-off-by: Pravin B Shelar <[email protected]> Acked-by: Jarno Rajahalme <[email protected]> Acked-by: Thomas Graf <[email protected]> Acked-by: Ben Pfaff <[email protected]>
- Loading branch information
Pravin B Shelar
committed
Nov 12, 2014
1 parent
0746a84
commit a36de77
Showing
46 changed files
with
2,144 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
|
||
Open vSwitch supports tunneling in userspace. Tunneling is implemented in | ||
platform independent way. | ||
|
||
Setup: | ||
====== | ||
Setup physical bridges for all physical interfaces. Create integration bridge. | ||
Add VXLAN port to int-bridge. Assign IP address to physical bridge where | ||
VXLAN traffic is expected. | ||
|
||
Example: | ||
======== | ||
Connect to VXLAN tunnel endpoint logical ip: 192.168.1.2 and 192.168.1.1. | ||
|
||
Configure OVS bridges as follows. | ||
|
||
1. Lets assume 172.168.1.2/24 network is reachable via eth1 create physical bridge br-eth1 | ||
assign ip address (172.168.1.1/24) to br-eth1, Add eth1 to br-eth1 | ||
2. Check ovs cached routes using appctl command | ||
ovs-appctl ovs/route/show | ||
Add tunnel route if not present in OVS route table. | ||
ovs-appctl ovs/route/add 172.168.1.1/24 br-eth1 | ||
3. Add integration brdge int-br and add tunnel port using standard syntax. | ||
ovs-vsctl add-port int-br vxlan0 -- set interface vxlan0 type=vxlan options:remote_ip=172.168.1.2 | ||
4. Assign IP address to int-br, So final topology looks like: | ||
|
||
|
||
192.168.1.1/24 | ||
+--------------+ | ||
| int-br | 192.168.1.2/24 | ||
+--------------+ +--------------+ | ||
| vxlan0 | | vxlan0 | | ||
+--------------+ +--------------+ | ||
| | | ||
| | | ||
| | | ||
172.168.1.1/24 | | ||
+--------------+ | | ||
| br-eth1 | 172.168.1.2/24 | ||
+--------------+ +---------------+ | ||
| eth1 |----------------------------------| eth1 | | ||
+--------------+ +---------------- | ||
|
||
Host A with OVS. Remote host. | ||
|
||
With this setup, ping to VXLAN target device (192.168.1.2) should work | ||
There are following commands that shows internal tables: | ||
|
||
Tunneling related commands: | ||
=========================== | ||
Tunnel routing table: | ||
To Add route: | ||
ovs-appctl ovs/route/add <IP address>/<prefix length> <output-bridge-name> <gw> | ||
To see all routes configured: | ||
ovs-appctl ovs/route/show | ||
To del route: | ||
ovs-appctl ovs/route/del <IP address>/<prefix length> | ||
|
||
ARP: | ||
To see arp cache content: | ||
ovs-appctl tnl/arp/show | ||
To flush arp cache: | ||
ovs-appctl tnl/arp/flush | ||
|
||
To check tunnel ports listening in vswitchd: | ||
ovs-appctl tnl/ports/show | ||
|
||
To set range for VxLan udp source port: | ||
To set: | ||
ovs-appctl tnl/egress_port_range <num1> <num2> | ||
Shows Current range: | ||
ovs-appctl tnl/egress_port_range | ||
|
||
To check datapath ports: | ||
ovs-appctl dpif/show | ||
|
||
To check datapath flows: | ||
ovs-appctl dpif/dump-flows | ||
|
||
Contact | ||
======= | ||
[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
FAQ.md | ||
INSTALL.DPDK.md | ||
README-native-tunneling.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.