0

I am an Old School network guy trying to do some development work on an OVS Bridge. I need help figuring out the syntax to toggle the OVS bridge interfaces between VLANs.

First, some system information… My host box is a Ubuntu box, 16.04.4; my version of OVS is 2.12.1 (DB Schema 8.0.0).

Okay, here’s a simple picture of my development testbed:

enter image description here

Pretty simple. A test client and server pair sit on opposite sides of my OVS bridge, connected to one another through the default VLAN. I also have two virtual routers connected to the bridge, but in this configuration, they are doing nothing. I was able to set this up using a few online tutorials, especially this one here.

Now, here’s the problem. I need to modify the VLAN structure of the OVS bridge to this:

enter image description here

Now things are different. To reach the server, the client’s traffic must be forwarded through VLAN 100, across both vRouters, then out VLAN 200. (Yes, I deliberately want the same packet to traverse through the OVS bridge twice – my project is trying to develop a way to spot packet doublecounting.) VLANs 100 and 200 are plain access VLANs, there is no trunking here. In fact, there can be no trunking, because I want to keep 100’s and 200’s traffic separate.

I can change the IP of the client, no problem. But working with the VLANs in the OVS Bridge has been disastrous.

I originally thought I could just use the “add-port” command to change the VLAN tagging:

ovs-vsctl add-port ovs_bridge dpdk1 tag=100
ovs-vsctl add-port ovs_bridge vy0 tag=100
ovs-vsctl add-port ovs_bridge dpdk2 tag=200
ovs-vsctl add-port ovs_bridge vy1 tag=200

But that threw an error, which I unfortunately lost. I’ve Google-searched “OVS bridge change VLAN tag,” but all the sites I pull up show you how to create a new tagged interface from scratch… not really what I’m looking for.

Also, because of the nature of my testing, I’ll need to toggle between these two testbed configurations. In other words, I’ll need to place all my interfaces into the default VLAN, then move them into VLAN 100/200, then move them back, then back to 100/200, then default again, then 100/200, and so on. I may potentially have to do this hundreds of times.

It’s a pain to tear everything port down and rebuild from scratch. If the bridge were a Cisco or Juniper switch, I could set the VLAN with one command. But I don’t see a way to do this in the OVS bridge world. Any suggestions? Thanks!

0

For anyone following this thread... I also posted my question here, and got the answer. The syntax for moving a port between VLAN 100 and the default VLAN is:

root@liux:~# ovs-vsctl get port dpdk1 tag
[]
root@liux:~# ovs-vsctl set port dpdk1 tag=100
root@liux:~# ovs-vsctl get port dpdk1 tag
100
root@liux:~# ovs-vsctl set port dpdk1 tag=[]
root@liux:~# ovs-vsctl get port dpdk1 tag
[]
root@liux:~# 
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.