On Fri, Mar 15, 2013 at 06:52:33PM +0800, Fang wrote:
> Hello.I have three VMs on my host.
>
> Bridge "br0"
> Port "br0"
> Interface "br0"
> type: internal
> Port "tap1"
> tag: 7
> Interface "tap1"
> Port "tap2"
> tag: 7
> Interface "tap2"
> Port "tap3"
> tag: 9
> Interface "tap3"
> Port "eth0"
> Interface "eth0"
> ovs_version: "1.7.1"
>
> I want to make vm1 communicate with vm3 by modifying the vlan tag.
>
> VM1(tap1):192.168.0.11
> VM2(tap2):192.168.0.22
> VM3(tap3):192.168.0.33
>
> I set
> ovs-ofctl add-flow br0
> cookie=1,nw_src=192.168.0.11,nw_dst=192.168.0.33,ip,actions=mod_vlan_vid:9,NORMAL
> but it did not work.
This does not work for packets coming from vm1 because vm1 has an access
port, not a trunk port, so "normal" drops packets that have 802.1Q
headers.
> I tried
> ovs-ofctl add-flow br0
> cookie=1,priority=10,in_port=4,dl_vlan=7,actions=mod_vlan_vid:9,NORMAL
> ("4" is port tap1)
> and I also tried dl_src,dl_dst.All did not work.
This does not work because packets received from vm1 do not have an
802.1Q header, thus "dl_vlan=7" will not match them.
You will need to write a rule that matches the packets you want and then
sends them directly to their destination, rather than trying to go
through "normal".
_______________________________________________
discuss mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/discuss