I intend to test metadata matching in the following scenario:
Initially, I brought up a VM with address 192.168.1.1/24 (tap0) and configure 
NAT to the Internet. Later, I added a couple of flows in the table:
ovs-ofctl add-flow br0 
table=0,in_port=1,ip,nw_src=192.168.1.1,actions="resubmit(,1)",write_metadata:18
 // add metadata 18 to the flow from 192.168.1.1, port 1 and redirect to table 1
ovs-ofctl add-flow br0 table=1,metadata=18,actions=LOCAL // in table 1, match 
the flow with metadata 18 and then output to the local port
However, when I run ovs-ofctl dump-flows br0, no packet hits the entry in table 
1 and VM could not visit the external world.
NXST_FLOW reply (xid=0x4): cookie=0x0, duration=281.992s, table=0, 
n_packets=1255, n_bytes=1213960, idle_age=4, priority=0 actions=NORMAL 
cookie=0x0, duration=62.033s, table=0, n_packets=77, n_bytes=6481, idle_age=2, 
ip,in_port=1,nw_src=192.168.1.1 actions=resubmit(,1),write_metadata:0x12 
cookie=0x0, duration=17.598s, table=1, n_packets=0, n_bytes=0, idle_age=17, 
metadata=0x12 actions=LOCAL << not matched
On the other hand, when I added one more rule without matching metadata in 
table 1, e.g., ovs-ofctl add-flow br0 
ip,nw_src=192.168.1.1,table=1,actions=LOCAL. Then I can see packet hit a rule 
in table 1 and VM can visit the external world.
ovs-ofctl dump-flows br0NXST_FLOW reply (xid=0x4): cookie=0x0, 
duration=424.512s, table=0, n_packets=2336, n_bytes=3417766, idle_age=2, 
priority=0 actions=NORMAL cookie=0x0, duration=204.553s, table=0, 
n_packets=1299, n_bytes=196344, idle_age=2, ip,in_port=1,nw_src=192.168.1.1 
actions=resubmit(,1),write_metadata:0x12 cookie=0x0, duration=35.877s, table=1, 
n_packets=923, n_bytes=155077, idle_age=2, ip,nw_src=192.168.1.1 actions=LOCAL 
<< matched cookie=0x0, duration=60.138s, table=1, n_packets=0, n_bytes=0, 
idle_age=60, metadata=0x12 actions=LOCAL << not matched
Did I configure something wrong or there exists a bug?
By the way, I am using the latest OpenvSwitch from HEAD.
git rev-parse HEAD7f804ea5a3e44b1831e5cfbd09eab46cc36a1459
ovs-vswitchd --versionovs-vswitchd (Open vSwitch) 1.9.90Compiled Jan  2 2013 
11:05:38OpenFlow versions 0x1:0x1



 


                                          
_______________________________________________
discuss mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/discuss

Reply via email to