Thank you for you help.I will go to study the documents again.
At 2013-03-18 12:53:49,"Ben Pfaff" <b...@nicira.com> wrote: >On Mon, Mar 18, 2013 at 10:33:47AM +0800, Fang wrote: >> Packets with a none zero VLAN ID that ingresses on an access port will be >> dropped. >> Packets whose VLAN ID is the access port's VLAN ID that engresses on an >> access port will be carried,and stripped it's 802.1Q header. >> When vm1 ping vm3,I think the process is like below: >> >> >> Packets will be add header(VLAN ID=7) when ingress OVS.Openflows rules >> change the VLAN ID to 9.Packets will be stripped their header when engress >> OVS. >> Anything wrong? > >Yes, it seems that you don't understand that the difference between >access ports and trunk ports is only part of the "normal" action. OVS >doesn't otherwise do the VLAN changes that you mention by itself. If >you're writing OpenFlow rules then you have to do any VLAN changes as >part of the rules you write. > >This is in the FAQ: > >Q: My OpenFlow controller doesn't see the VLANs that I expect. > >A: The configuration for VLANs in the Open vSwitch database (e.g. via > ovs-vsctl) only affects traffic that goes through Open vSwitch's > implementation of the OpenFlow "normal switching" action. By > default, when Open vSwitch isn't connected to a controller and > nothing has been manually configured in the flow table, all traffic > goes through the "normal switching" action. But, if you set up > OpenFlow flows on your own, through a controller or using ovs-ofctl > or through other means, then you have to implement VLAN handling > yourself. > > You can use "normal switching" as a component of your OpenFlow > actions, e.g. by putting "normal" into the lists of actions on > ovs-ofctl or by outputting to OFPP_NORMAL from an OpenFlow > controller. In situations where this is not suitable, you can > implement VLAN handling yourself, e.g.: > > - If a packet comes in on an access port, and the flow table > needs to send it out on a trunk port, then the flow can add > the appropriate VLAN tag with the "mod_vlan_vid" action. > > - If a packet comes in on a trunk port, and the flow table > needs to send it out on an access port, then the flow can > strip the VLAN tag with the "strip_vlan" action.
_______________________________________________ discuss mailing list discuss@openvswitch.org http://openvswitch.org/mailman/listinfo/discuss