On Mon, Jul 28, 2014 at 12:02:22PM +0200, Wenqin SHAO wrote:
> Hi list,
>
> New to here, and I encountered some seem-to-be-very-basic problems
> concerning flow installation. Here it goes:
>
> First, it's about matching normalisation, I tried to install a rule
> manually via ovs-ofctl.
>
> sudo ovs-ofctl -O OpenFlow13 add-flow s1
> dl_src=00:00:00:00:aa:bb,dl_dst=aa:aa:00:00:00:00,nw_src=192.168.0.1,nw_dst=8.8.8.8,tp_src=7788,actions=output:1
> 2014-07-28T09:40:16Z|00001|ofp_util|INFO|normalization changed ofp_match,
> details:
> 2014-07-28T09:40:16Z|00002|ofp_util|INFO| pre:
> dl_src=00:00:00:00:aa:bb,dl_dst=aa:aa:00:00:00:00,nw_src=192.168.0.1,nw_dst=8.8.8.8,tp_src=7788
> 2014-07-28T09:40:16Z|00003|ofp_util|INFO|post:
> dl_src=00:00:00:00:aa:bb,dl_dst=aa:aa:00:00:00:00
>
> I was informed that the matching has been normalised. As we can see, only
> the datalink part of the matching is conserved. It must be more than a
> simple normalisation, I'd say. I'd appreciate explanation on that.
This is in the FAQ.
Q: I ran "ovs-ofctl add-flow br0 nw_dst=192.168.0.1,actions=drop"
but I got a funny message like this:
ofp_util|INFO|normalization changed ofp_match, details:
ofp_util|INFO| pre: nw_dst=192.168.0.1
ofp_util|INFO|post:
and when I ran "ovs-ofctl dump-flows br0" I saw that my nw_dst
match had disappeared, so that the flow ends up matching every
packet.
A: The term "normalization" in the log message means that a flow
cannot match on an L3 field without saying what L3 protocol is in
use. The "ovs-ofctl" command above didn't specify an L3 protocol,
so the L3 field match was dropped.
In this case, the L3 protocol could be IP or ARP. A correct
command for each possibility is, respectively:
ovs-ofctl add-flow br0 ip,nw_dst=192.168.0.1,actions=drop
and
ovs-ofctl add-flow br0 arp,nw_dst=192.168.0.1,actions=drop
Similarly, a flow cannot match on an L4 field without saying what
L4 protocol is in use. For example, the flow match "tp_src=1234"
is, by itself, meaningless and will be ignored. Instead, to match
TCP source port 1234, write "tcp,tp_src=1234", or to match UDP
source port 1234, write "udp,tp_src=1234".
_______________________________________________
discuss mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/discuss