My goal is to send to a specific interface all ethernet traffic with a special ethertype. I have thus a virtual switch with OpenVSwitch
on my interface eth0
, and I use tap interfaces to retrieve specific frames in order to process them. The normal flow is sent to tap1
, while the special flow is sent to tap0
. Here is the OpenVSwitch configuration:
# ovs-vsctl show
44c95237-25bd-45fd-bb97-d596aecf5f46
Bridge brLan
Port "tap0"
Interface "tap0"
Port "tap1"
Interface "tap1"
Port eth0
Interface eth0
Port brLan
Interface brLan
type: internal
ovs_version: "2.5.0"
On the bridge brLan
, with 3 ports (eth0
, tap0
, and tap1
), I'd like to switch all frames with ethertype = 0x88B5
to tap0
, while all other frames are going though tap1
.
I made thus these OpenFlow rules:
# ovs-ofctl add-flow brLan "idle_timeout=0,priority=33100,in_port=1,dl_type=0x88b5,actions=output:6"
# ovs-ofctl add-flow brLan "idle_timeout=0,priority=33100,in_port=1,actions=output:7"
where 6
is the ID of tap0
and 7
is the ID of tap1
, displayed with # ovs-ofctl show brLan
Now, if I send the frames to this interface eth0
with the ethertype 0x88B5
, they aren't switched to tap0
, as shows the command:
# ovs-ofctl dump-flows brLan
NXST_FLOW reply (xid=0x4):
cookie=0x0, duration=54229.821s, table=0, n_packets=27269, n_bytes=1636190, idle_age=0, priority=33100,in_port=1 actions=output:7
cookie=0x0, duration=54229.790s, table=0, n_packets=0, n_bytes=0, idle_age=54229, priority=33100,in_port=1,dl_type=0x88b5 actions=output:6
The first flow is the normal flow of usual ethernet frames, and I see it's OK, well switched to tap1. But about the flow to output:6
, no frames arrive, even though I can display them using WireShark!
Any ideas on how to solve this, to make the switching of frames with ether_type = 0x88B5
arrive to tap0
?