Open vSwitch supports tunneling in userspace. Tunneling is implemented in a platform-independent way.
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.
Connect to VXLAN tunnel endpoint logical IP: 192.168.1.2
and
192.168.1.1
.
Configure OVS bridges as follows.
Let's assume
172.168.1.2/24
network is reachable viaeth1
. Create physical bridgebr-eth1
. Assign IP address (172.168.1.1/24
) tobr-eth1
. Addeth1
tobr-eth1
.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
Add integration bridge
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
Assign IP address to
int-br
.
The final topology should looks like so:
Diagram 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.
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 delete route:
$ ovs-appctl ovs/route/del <IP address>/<prefix length>
To look up and display the route for a destination:
$ ovs-appctl ovs/route/lookup <IP address>
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 ovs-vswitchd:
$ ovs-appctl tnl/ports/show
To set range for VxLan UDP source port:
$ ovs-appctl tnl/egress_port_range <num1> <num2>
To show 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