Thank you for your advice!
Sadly, I managed to run into a problem: packets do not forward after the
vlans are modified (even though I do see evidence of packets ingressing
into the bridges and matching the modify vlan rules).
I've looked at docs and tried many commands and tried to do my best....
1) Here is how I added the openflow entries:
# ovs-vsctl show
7fd1e9d9-0a50-4dfa-bf3d-bedceb9600a6
Bridge SUB
Port SUB
Interface SUB
type: internal
Port "ens1f0"
Interface "ens1f0"
Port "vnet2"
Interface "vnet2"
Bridge INT
Port "vnet3"
Interface "vnet3"
Port "ens1f1"
Interface "ens1f1"
Port INT
Interface INT
type: internal
ovs_version: "2.5.0"
# ovs-ofctl add-flow SUB "in_port=1, actions=mod_vlan_vid:2600"
# ovs-ofctl add-flow INT "in_port=1, actions=mod_vlan_vid:2500"
2) Here are the bridge stats after adding rules above (you can see that
rx_pkts on both port 1's did increment)
root@TPC-G11-14:~# ovs-ofctl dump-ports SUB
OFPST_PORT reply (xid=0x2): 3 ports
port LOCAL: rx pkts=0, bytes=0, drop=1873, errs=0, frame=0, over=0, crc=0
tx pkts=0, bytes=0, drop=0, errs=0, coll=0
port 1: rx pkts=79875, bytes=4792668, drop=0, errs=0, frame=0, over=0,
crc=0
tx pkts=4027, bytes=243464, drop=0, errs=0, coll=0
port 2: rx pkts=761, bytes=48704, drop=0, errs=0, frame=0, over=0, crc=0
tx pkts=991, bytes=63560, drop=0, errs=0, coll=0
root@TPC-G11-14:~# ovs-ofctl dump-ports INT
OFPST_PORT reply (xid=0x2): 3 ports
port LOCAL: rx pkts=0, bytes=0, drop=1867, errs=0, frame=0, over=0, crc=0
tx pkts=0, bytes=0, drop=0, errs=0, coll=0
port 1: rx pkts=79866, bytes=4792098, drop=0, errs=0, frame=0, over=0,
crc=0
tx pkts=4000, bytes=241720, drop=0, errs=0, coll=0
port 2: rx pkts=733, bytes=46912, drop=0, errs=0, frame=0, over=0, crc=0
tx pkts=1019, bytes=65352, drop=0, errs=0, coll=0
root@TPC-G11-14:~# ovs-ofctl dump-flows SUB
NXST_FLOW reply (xid=0x4):
cookie=0x0, duration=142.908s, table=0, n_packets=455, n_bytes=29120,
idle_age=0, in_port=1 actions=mod_vlan_vid:2600
cookie=0x0, duration=2337.648s, table=0, n_packets=1873, n_bytes=119872,
idle_age=1966, priority=0 actions=NORMAL
root@TPC-G11-14:~# ovs-ofctl dump-flows INT
NXST_FLOW reply (xid=0x4):
cookie=0x0, duration=137.337s, table=0, n_packets=442, n_bytes=28288,
idle_age=0, in_port=1 actions=mod_vlan_vid:2500
cookie=0x0, duration=2336.291s, table=0, n_packets=1867, n_bytes=119488,
idle_age=1968, priority=0 actions=NORMAL
3) But I have confirmed that no packets are leaving the bridge out the
other port.
Further, this command seems to show that packets are being dropped (and
also, oddly, shows the ports being named "3" and "4" not "1" for both as I
expected):
root@TPC-G11-14:~# ovs-dpctl dump-flows | head
recirc_id(0),in_port(4),eth(src=00:09:35:94:6e:72,dst=00:09:35:94:75:ac),eth_type(0x8100),vlan(vid=2600),encap(eth_type(0x0800),ipv4(frag=no)),
packets:476, bytes:30464, used:2.288s, actions:drop
recirc_id(0),in_port(3),eth(src=00:09:35:94:75:b7,dst=00:09:35:94:6e:bb),eth_type(0x8100),vlan(vid=2500),encap(eth_type(0x0800),ipv4(frag=no)),
packets:476, bytes:30464, used:4.500s, actions:drop
recirc_id(0),in_port(4),eth(src=00:09:35:94:6e:67,dst=00:09:35:94:75:a8),eth_type(0x8100),vlan(vid=2600),encap(eth_type(0x0800),ipv4(frag=no)),
packets:476, bytes:30464, used:4.768s, actions:drop
recirc_id(0),in_port(4),eth(src=00:09:35:94:6e:ac,dst=00:09:35:94:75:b2),eth_type(0x8100),vlan(vid=2600),encap(eth_type(0x0800),ipv4(frag=no)),
packets:476, bytes:30464, used:4.228s, actions:drop
recirc_id(0),in_port(4),eth(src=00:09:35:94:6e:bb,dst=00:09:35:94:75:b7),eth_type(0x8100),vlan(vid=2600),encap(eth_type(0x0800),ipv4(frag=no)),
packets:476, bytes:30464, used:4.500s, actions:drop
recirc_id(0),in_port(4),eth(src=00:09:35:94:6e:6c,dst=00:09:35:94:75:aa),eth_type(0x8100),vlan(vid=2600),encap(eth_type(0x0800),ipv4(frag=no)),
packets:476, bytes:30464, used:4.153s, actions:drop
recirc_id(0),in_port(3),eth(src=00:09:35:94:75:aa,dst=00:09:35:94:6e:6c),eth_type(0x8100),vlan(vid=2500),encap(eth_type(0x0800),ipv4(frag=no)),
packets:476, bytes:30464, used:4.153s, actions:drop
recirc_id(0),in_port(3),eth(src=00:09:35:94:75:b3,dst=00:09:35:94:6e:af),eth_type(0x8100),vlan(vid=2500),encap(eth_type(0x0800),ipv4(frag=no)),
packets:477, bytes:30528, used:2.381s, actions:drop
recirc_id(0),in_port(3),eth(src=00:09:35:94:75:b4,dst=00:09:35:94:6e:b2),eth_type(0x8100),vlan(vid=2500),encap(eth_type(0x0800),ipv4(frag=no)),
packets:477, bytes:30528, used:1.913s, actions:drop
recirc_id(0),in_port(3),eth(src=00:09:35:94:75:ac,dst=00:09:35:94:6e:72),eth_type(0x8100),vlan(vid=2500),encap(eth_type(0x0800),ipv4(frag=no)),
packets:477, bytes:30528, used:2.289s, actions:drop
I am at a lost for why:
1) Packets are not being forwarded
2) Why in_port is labelled with 3/4 in the dpctl command, but 1/1 in the
ofctl commands.
Any guidance would be helpful.
On Wed, Nov 9, 2016 at 8:06 PM, Michael Ben-Ami <[email protected]>
wrote:
> yup match on dl_vlan and use action mod_vlan_vid
>
> On Wed, Nov 9, 2016 at 7:52 PM, Lax Clarke <[email protected]> wrote:
>
>> Hi,
>>
>> Is there a way to set up OVS to modify VLAN tags? Or something else in
>> combination with an OVS switch?
>>
>> E.g.
>>
>>
>> <---VLAN X trunk ----> [OVS] <-- VLAN Y trunk --->
>>
>>
>> Thanks
>>
>> _______________________________________________
>> discuss mailing list
>> [email protected]
>> https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
>>
>>
>
_______________________________________________
discuss mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss