Hi Ben Thanks for your quick and kind reply.
Port mirroring is a good way and I did that. But, I can not create multiple port mirroring on a single bridge. For example, H1 packet will be duplicated to H4 port, and H3 packet will be duplicated to H5 port. Based on my understanding, port mirroring policy can not be set on a single bridge with multiple times. I tried and found the second policy will flush and replace the first one. That means, I can only forward the packets What is more, sometime, I want the packet to be duplicated and forward to an VM on other host. That means a port on the other OVS. How OVS1 know, for example, port x on OVS2 ? In my openstack environment, all OVS brige (br-int) are connected through a layer 2 gre tunnel. Thus, use mac is also working. do you have any idea on how to implement that ? I know using the openflow controller can probably do that but if the ovs CLI can do that, that would be greatly awesome and save a lot of time. Thanks very much for your kind reply, On Mon, Nov 11, 2013 at 12:54 PM, Ben Pfaff <b...@nicira.com> wrote: > On Mon, Nov 11, 2013 at 10:45:53AM -0800, terryxing wrote: > > I have a question about the ovs-ofctl command line to add flow. > > > > What I want is that, assume that I have 4 vms (H1, H2, H3 and H4) > > connecting to the same bridge. when H1 send a packet for H2, I want it > also > > forwards to H4. > > You could do this with OVS, without the need for OpenFlow, by setting > up a port mirror. See ovs-vsctl(8) for an example. > > > I can append the H4 output port to the actions output ports > > but I dont want to use the ovs port to do that since it only works in the > > single OVS environment. When I have two OVS, OVS1 can not know the output > > port of OVS2. > > I don't understand the statements above. > > > Thus, I wondering that can I do like this as below: > > > > First forward the packet just based on the layer 2 learning swtich, > > forwarding the packet to the destination where it should do, like H2 in > the > > previous example, and then, rewrite the des_ip on the packet and forward > it > > based on the des_ip again (for example, H4 ip address). Because using IP > > address, I do need to worry about the port across different OVS (all OVSs > > are connected through tunnel. All VMs are in the same subnet even they > are > > located on different servers.) > > It sounds like you're looking for routing, since you want to forward > based on the IP address. OVS doesn't have built-in support for > routing, although a controller can implement routing with OVS using > OpenFlow. >
_______________________________________________ discuss mailing list discuss@openvswitch.org http://openvswitch.org/mailman/listinfo/discuss