On Sat, Feb 09, 2013 at 02:17:33PM +0800, Hong Wayne wrote: > 2013/2/9 Ben Pfaff <b...@nicira.com> > > > On Sat, Feb 09, 2013 at 02:58:51AM +0800, Hong Wayne wrote: > > > OK, my orginal question is when I command: > > > # ovs-ofctl dump-flows br-int > > > > > > I see the flow entries in flow table, and the field dl_vlan default is 0. > > > > What do you mean by that? > > > > For example: > # ovs-ofctl dump-flows br-int > > cookie=0x0, duration=9.329s, table=0, n_packets=3, n_bytes=308, > idle_timeout=10, hard_timeout=30, priority=65535,icmp,dl_vlan=0 > ,dl_vlan_pcp=0,dl_src=90:94:e4:d4:f0:91,dl_dst=bc:ae:c5:62:8b:fd, > nw_src=192.168.15.110,nw_dst=192.168.15.197,nw_tos=0,icmp_type=0,icmp_code=0 > actions=output:46
I don't see any dl_vlan default there. I see that whoever wrote the flow chose to make it match on dl_vlan=0. > > > 1. If I use OpenFlow Controller to modify the value of dl_vlan field to > > 15, > > > does it means that it will match the packets which packet the vlan tag is > > > 15? > > > > Can you define what you mean by "modify the value of dl_vlan field"? > > I can think of two possible meanings. > > > > Using OF Controller to modified the match field for dl_vlan to 15, like > below: > > cookie=0x0, duration=9.329s, table=0, n_packets=3, n_bytes=308, > idle_timeout=10, hard_timeout=30, priority=65535,icmp,dl_vlan=15 > ,dl_vlan_pcp=0,dl_src=90:94:e4:d4:f0:91,dl_dst=bc:ae:c5:62:8b:fd, > nw_src=192.168.15.110,nw_dst=192.168.15.197,nw_tos=0,icmp_type=0,icmp_code=0 > actions=output:46 I don't see any attempt to modify dl_vlan here. I see a flow that matches on dl_vlan=15. > > > 3. What's the situation that I need to use OpenFlow Controller to add the > > > action field with OFPAT_SET_VLAN_VID? > > > > I don't understand the question. > > > > If I use the following commands on Open vSwitch1: > #ovs-vsctl set port vnet0 tag=15 (VM1) > #ovs-vsctl add-port br-int eth1 trunks=15 (Trunk port) > > And use the following commands on Open vSwitch2: > #ovs-vsctl set port vnet0 tag=15 (VM2) > #ovs-vsctl add-port br-int eth1 trunks=15 (Trunk port) > > Did I also need to use OF Controller to modify the VLAN_VID for flow > table's entry in order to connect the VM2 on the Open vSwitch2 successfully? > The code like below: > actions.append( [openflow.OFPAT_SET_VLAN_VID, int(block['dl_vlan']) ] ) I don't know. Your question is too vague for me. _______________________________________________ discuss mailing list discuss@openvswitch.org http://openvswitch.org/mailman/listinfo/discuss