Thanks Ben for your response. As mentioned, I have tried matching on dl_vlan previously. Furthermore, vlan_tci=0 is perfectly matching the untagged incoming packets. I am able to switch Native vlan traffic from vlan 10 (untagged traffic).  But the tagged traffic does not match vlan_tci=0x1000/0x1000 rule. Here is what I have tried so far.
 
Packets are tagged with vlan_id = 20
 
ovs-ofctl add-flow br0 "table=0, in_port=1, actions=output:2"
ovs-ofctl add-flow br0 "table=0, in_port=2, actions=output:1"
 
ovs-ofctl add-flow br0 "table=0, in_port=1, dl_vlan=20, actions=output:2"
ovs-ofctl add-flow br0 "table=0, in_port=2, dl_vlan=20, actions=output:1"
 
ovs-ofctl add-flow br0 "table=0, in_port=1, vlan_tci=0x1000/0x1000, actions=output:2"
ovs-ofctl add-flow br0 "table=0, in_port=2, vlan_tci=0x1000/0x1000, actions=output:1"
 
ovs-ofctl add-flow br0 "table=0, in_port=1, dl_type=0x8100, actions=output:2"
ovs-ofctl add-flow br0 "table=0, in_port=2, dl_type=0x8100, actions=output:1"
 
just to check if the rules are being triggered, I also tried dropping the packets on OVS.
ovs-ofctl add-flow br0 "table=0,  dl_type=0x8100, actions=drop"
ovs-ofctl add-flow br0 "table=0,  vlan_tci=0x1000/0x1000, actions=drop"
ovs-ofctl add-flow br0 "table=0,  dl_vlan=20, actions=drop"
 
I am using cisco router and here is my router's confguration
 
conf ter
interface FastEthernet0/1
 no ip address
!
interface FastEthernet0/1.1
 description Client-Side
 encapsulation dot1Q 10 native
 ip address 10.1.10.1 255.255.255.0
!
interface FastEthernet0/1.2
 description Client-Side
 encapsulation dot1Q 20
 ip address 10.1.20.1 255.255.255.0
!
end
 
 
Sent: Friday, August 19, 2016 at 11:11 AM
From: "Ben Pfaff" <b...@ovn.org>
To: "james hopper" <jameshop...@email.com>
Cc: "OVS Discussion" <discuss@openvswitch.org>
Subject: Re: [ovs-discuss] Vlan Tagged packets switching issue
OVS ports are trunks by default. As I said, the setting for "trunks"
does not matter in your case because you are not using "normal".

To match on traffic that is tagged or untagged, match on vlan_tci or
dl_vlan. See ovs-ofctl(8).

On Fri, Aug 19, 2016 at 08:02:55PM +0200, james hopper wrote:
> Aren't OVS ports trunks by default? I tried matching dl_type=0x8100 as well as
> dl_vlan without explicitly setting ports as trunks. But it also did not work.
>
> So what options do I have, if I have to pass tagged traffic through OVS? or if
> i have to take certain actions against tagged traffic?
>
> Sent: Friday, August 19, 2016 at 6:59 AM
> From: "Ben Pfaff" <b...@ovn.org>
> To: "james hopper" <jameshop...@email.com>
> Cc: "OVS Discussion" <discuss@openvswitch.org>
> Subject: Re: [ovs-discuss] Vlan Tagged packets switching issue
> On Fri, Aug 19, 2016 at 03:10:01PM +0200, james hopper wrote:
> > Hey everyone,
> > I have a small test setup in which Router-1 <---> OVS-2.5 <-----> Router-2 I
> > want OVS to switch packets between two interfaces seamlessly. However, I am
> > facing issue in switching Vlan tagged packets whereas untagged traffic is
> > passing without any issue. I have used very simple two rules as mentioned
> > below. Can anyone point me what I am missing here ?
> >
> > ovs-ofctl add-flow br0 table=0, in_port=1,action=""> > > ovs-ofctl add-flow br0 table=0, in_port=2,action=""> > >
> > I have made both ports (1 and 2 trunk ports)
> >
> > ovs-vsctl set port eth1 trunks=0,10,20
> > ovs-vsctl set port eth2 trunks=0,10,20
>
> There are two issues here. First, VLAN 0 includes untagged traffic.
> Second, "trunks" affects only the behavior of the "normal" action. It
> does not influence other OpenFlow matches or actions in any way.
_______________________________________________
discuss mailing list
discuss@openvswitch.org
http://openvswitch.org/mailman/listinfo/discuss

Reply via email to