Using The "New NetVirt" with OpenStack
Author: Andre Fredette
This wiki documents an approach for using The new NetVirt, which is based on the VPN Service code. This document is essentially a way to run the OVSDB Tutorial using the odl-netvirt-openstack feature as a replacement for the odl-ovsdb-openstack feature. These instructions currently assume an external OpenDaylight controller as opposed to an all-in-one config.
NOTE: I started with the instructions given on the NetVirt: L2Gateway HowTo, but I'm not using the L2Gatway feature, and these instructions include a few more details.
Prerequisites (Getting the Environment)
1. Use the NetVirt Demo VMs from here:
Use the following:
2. Import the ova file into VirtualBox
3. Get a version of the OpenDaylight controller with the vpnservice NetVirt code
- Pull the latest Netvirt code and compile it.
git clone https://git.opendaylight.org/gerrit/netvirt.git cd netvirt mvn clean install
Running VPN Service NetVirt
1. Launch karaf
~/git/netvirt/vpnservice/distribution/karaf/target/assembly/bin/karaf (Update path based on where you cloned the netvirt repo above.)
2. Install the feature
3. Start router, odl31 and odl32 VMs you got above (if you haven't already)
IMPORTANT: When using odl-netvirt-openstack with devstack, you must modify the local.conf files in both odl31 and odl32 by commenting out the following line:
4. Stack both odl31 and odl32
cd /opt/devstack ./stack.sh
5. Transport Zone
Originally, it was necessary to manually create "transport zones" to carry the traffic between nodes. For VXLAN, a transport zone essentially defines a set of tunnels connecting the appropriate nodes. However, support has been added to automatically create transport zones as needed. By default, "use-transport-zone" is set to true.
NOTE: As of 8/11/16, I have not been able to verify the auto transport zone/tunnel creation.
5.1 Optional Manual Transport Zone Configuration
TODO: Define steps to disable auto transport zone creation.
See L2Gateway HowTo for instrucitons and/or use postman collection in netvirt/resources/commons/VPN-Service-NetVirt.postman_collection.json
If using the postman collection, use "Get DPID's" to get the datapath ids.
You can figure out which dpid is which by running the following command on each vm:
sudo ovs-vsctl show
Then compare the UUID at the top of the command output to the UUID's associated with the DPID's from the Get DPID's request.
Then, use the DPIDs for the br-int's in the "Create TZA" request.
6. Run os_doitall.sh (https://github.com/shague/odl_tools/blob/master/os_doitall.sh)
7. Test It
ssh to one of the vms created
source openrc admin admin ../tools/os_ssh.sh 10.100.5.3
ping the other:
ping an external address to test floating IP support:
ping www.google.com (Note: this isn't working as of the writing of this wiki).
Note: To cleanup state between runs, do the following:
On odl31 and odl32: osreset.sh (https://github.com/shague/odl_tools/blob/master/osreset.sh)
rm -rf ~/git/netvirt/vpnservice/distribution/karaf/target/assembly/data/* ~/git/netvirt/vpnservice/distribution/karaf/target/assembly/snapshots/* ~/git/netvirt/vpnservice/distribution/karaf/target/assembly/journal/* (Update path based on where you cloned the netvirt repo above.)