Thank Ben. 

Now in order to see if traffic is really getting forwarded by the flows created 
by OVN and OVS, I have done following.

1) Created two Linux Containers with MAC addresses as 00::01 and 00::02. They 
are in both same subnet (1.1.1.1/24 and 1.1.1.2/24) with their default gw as 
1.1.1.254.

2) Modified the ovn/env1/setup.sh to add Linux Containers ports instead lport1 
and lport2. The new script looks as following as last two lines:

ovs-vsctl add-port br-int veth_H1-1 -- set Interface veth_H1-1 
external_ids:iface-id=sw0-port1
ovs-vsctl add-port br-int veth_H2-1 -- set Interface veth_H2-1 
external_ids:iface-id=sw0-port2

After having done that, that is how the output of "ovs-ofctl show br-int" looks 
like.

ovn@ovn-VirtualBox:~/ovs/tutorial$ ovs-ofctl show br-int
OFPT_FEATURES_REPLY (xid=0x2): dpid:0000468b623a8547
n_tables:254, n_buffers:256
capabilities: FLOW_STATS TABLE_STATS PORT_STATS QUEUE_STATS ARP_MATCH_IP
actions: output enqueue set_vlan_vid set_vlan_pcp strip_vlan mod_dl_src 
mod_dl_dst mod_nw_src mod_nw_dst mod_nw_tos mod_tp_src mod_tp_dst
 1(veth_H1-1): addr:aa:55:aa:55:02:35
     config:     PORT_DOWN
     state:      LINK_DOWN
     speed: 0 Mbps now, 0 Mbps max
 2(veth_H2-1): addr:aa:55:aa:55:02:36
     config:     PORT_DOWN
     state:      LINK_DOWN
     speed: 0 Mbps now, 0 Mbps max
 LOCAL(br-int): addr:46:8b:62:3a:85:47
     config:     PORT_DOWN
     state:      LINK_DOWN
     speed: 0 Mbps now, 0 Mbps max
OFPT_GET_CONFIG_REPLY (xid=0x4): frags=normal miss_send_len=0
ovn@ovn-VirtualBox:~/ovs/tutorial$


But the ping between two Linux containers doesn't work. None of the flow 
counters increase. Could it because the link config and state are down? If so, 
how can I bring them up. Tried "ovn-nbctl lport-set-enabled sw0-port1 enabled" 
command for both ports, but to no avail.


Below are the flows. 

ovn@ovn-VirtualBox:~/ovs/tutorial$ ovs-ofctl dump-flows br-int
NXST_FLOW reply (xid=0x4):
 cookie=0x0, duration=12552.047s, table=0, n_packets=0, n_bytes=0, 
idle_age=12552, priority=100,in_port=1 
actions=load:0x1->NXM_NX_REG5[],load:0x1->OXM_OF_METADATA[],load:0x1->NXM_NX_REG6[],resubmit(,16)
 cookie=0x0, duration=12527.316s, table=0, n_packets=0, n_bytes=0, 
idle_age=12527, priority=100,in_port=2 
actions=load:0x2->NXM_NX_REG5[],load:0x1->OXM_OF_METADATA[],load:0x2->NXM_NX_REG6[],resubmit(,16)
 cookie=0x0, duration=12552.067s, table=16, n_packets=0, n_bytes=0, 
idle_age=12552, priority=100,metadata=0x1,vlan_tci=0x1000/0x1000 actions=drop
 cookie=0x0, duration=12552.064s, table=16, n_packets=0, n_bytes=0, 
idle_age=12552, 
priority=100,metadata=0x1,dl_src=01:00:00:00:00:00/01:00:00:00:00:00 
actions=drop
 cookie=0x0, duration=12552.068s, table=16, n_packets=0, n_bytes=0, 
idle_age=12552, priority=50,reg6=0x1,metadata=0x1,dl_src=00:00:00:00:00:01 
actions=resubmit(,17)
 cookie=0x0, duration=12552.065s, table=16, n_packets=0, n_bytes=0, 
idle_age=12552, priority=50,reg6=0x2,metadata=0x1,dl_src=00:00:00:00:00:02 
actions=resubmit(,17)
 cookie=0x0, duration=12552.065s, table=17, n_packets=0, n_bytes=0, 
idle_age=12552, priority=0,metadata=0x1 actions=resubmit(,18)
 cookie=0x0, duration=12552.068s, table=18, n_packets=0, n_bytes=0, 
idle_age=12552, 
priority=90,icmp6,reg6=0x2,metadata=0x1,dl_src=00:00:00:00:00:02,icmp_type=136,icmp_code=0,nd_tll=00:00:00:00:00:00
 actions=resubmit(,19)
 cookie=0x0, duration=12552.067s, table=18, n_packets=0, n_bytes=0, 
idle_age=12552, 
priority=90,icmp6,reg6=0x2,metadata=0x1,dl_src=00:00:00:00:00:02,icmp_type=136,icmp_code=0,nd_tll=00:00:00:00:00:02
 actions=resubmit(,19)
 cookie=0x0, duration=12552.066s, table=18, n_packets=0, n_bytes=0, 
idle_age=12552, 
priority=90,icmp6,reg6=0x1,metadata=0x1,dl_src=00:00:00:00:00:01,icmp_type=136,icmp_code=0,nd_tll=00:00:00:00:00:00
 actions=resubmit(,19)
 cookie=0x0, duration=12552.064s, table=18, n_packets=0, n_bytes=0, 
idle_age=12552, 
priority=90,icmp6,reg6=0x1,metadata=0x1,dl_src=00:00:00:00:00:01,icmp_type=136,icmp_code=0,nd_tll=00:00:00:00:00:01
 actions=resubmit(,19)
 cookie=0x0, duration=12552.067s, table=18, n_packets=0, n_bytes=0, 
idle_age=12552, 
priority=90,icmp6,reg6=0x1,metadata=0x1,dl_src=00:00:00:00:00:01,icmp_type=135,icmp_code=0,nd_sll=00:00:00:00:00:01
 actions=resubmit(,19)
 cookie=0x0, duration=12552.066s, table=18, n_packets=0, n_bytes=0, 
idle_age=12552, 
priority=90,icmp6,reg6=0x1,metadata=0x1,dl_src=00:00:00:00:00:01,icmp_type=135,icmp_code=0,nd_sll=00:00:00:00:00:00
 actions=resubmit(,19)
 cookie=0x0, duration=12552.065s, table=18, n_packets=0, n_bytes=0, 
idle_age=12552, 
priority=90,icmp6,reg6=0x2,metadata=0x1,dl_src=00:00:00:00:00:02,icmp_type=135,icmp_code=0,nd_sll=00:00:00:00:00:00
 actions=resubmit(,19)
 cookie=0x0, duration=12552.065s, table=18, n_packets=0, n_bytes=0, 
idle_age=12552, 
priority=90,icmp6,reg6=0x2,metadata=0x1,dl_src=00:00:00:00:00:02,icmp_type=135,icmp_code=0,nd_sll=00:00:00:00:00:02
 actions=resubmit(,19)
 cookie=0x0, duration=12552.065s, table=18, n_packets=0, n_bytes=0, 
idle_age=12552, 
priority=90,arp,reg6=0x1,metadata=0x1,dl_src=00:00:00:00:00:01,arp_sha=00:00:00:00:00:01
 actions=resubmit(,19)
 cookie=0x0, duration=12552.064s, table=18, n_packets=0, n_bytes=0, 
idle_age=12552, 
priority=90,arp,reg6=0x2,metadata=0x1,dl_src=00:00:00:00:00:02,arp_sha=00:00:00:00:00:02
 actions=resubmit(,19)
 cookie=0x0, duration=12552.067s, table=18, n_packets=0, n_bytes=0, 
idle_age=12552, 
priority=80,icmp6,reg6=0x2,metadata=0x1,icmp_type=136,icmp_code=0 actions=drop
 cookie=0x0, duration=12552.066s, table=18, n_packets=0, n_bytes=0, 
idle_age=12552, 
priority=80,icmp6,reg6=0x1,metadata=0x1,icmp_type=136,icmp_code=0 actions=drop
 cookie=0x0, duration=12552.065s, table=18, n_packets=0, n_bytes=0, 
idle_age=12552, 
priority=80,icmp6,reg6=0x1,metadata=0x1,icmp_type=135,icmp_code=0 actions=drop
 cookie=0x0, duration=12552.064s, table=18, n_packets=0, n_bytes=0, 
idle_age=12552, 
priority=80,icmp6,reg6=0x2,metadata=0x1,icmp_type=135,icmp_code=0 actions=drop
 cookie=0x0, duration=12552.065s, table=18, n_packets=0, n_bytes=0, 
idle_age=12552, priority=80,arp,reg6=0x2,metadata=0x1 actions=drop
 cookie=0x0, duration=12552.064s, table=18, n_packets=0, n_bytes=0, 
idle_age=12552, priority=80,arp,reg6=0x1,metadata=0x1 actions=drop
 cookie=0x0, duration=12552.063s, table=18, n_packets=0, n_bytes=0, 
idle_age=12552, priority=0,metadata=0x1 actions=resubmit(,19)
 cookie=0x0, duration=12552.066s, table=19, n_packets=0, n_bytes=0, 
idle_age=12552, priority=0,metadata=0x1 actions=resubmit(,20)
 cookie=0x0, duration=12552.063s, table=20, n_packets=0, n_bytes=0, 
idle_age=12552, priority=0,metadata=0x1 actions=resubmit(,21)
 cookie=0x0, duration=12552.065s, table=21, n_packets=0, n_bytes=0, 
idle_age=12552, priority=0,metadata=0x1 actions=resubmit(,22)
 cookie=0x0, duration=12552.066s, table=22, n_packets=0, n_bytes=0, 
idle_age=12552, 
priority=100,metadata=0x1,dl_dst=01:00:00:00:00:00/01:00:00:00:00:00 
actions=load:0xffff->NXM_NX_REG7[],resubmit(,32)
 cookie=0x0, duration=12552.066s, table=22, n_packets=0, n_bytes=0, 
idle_age=12552, priority=50,metadata=0x1,dl_dst=00:00:00:00:00:01 
actions=load:0x1->NXM_NX_REG7[],resubmit(,32)
 cookie=0x0, duration=12552.063s, table=22, n_packets=0, n_bytes=0, 
idle_age=12552, priority=50,metadata=0x1,dl_dst=00:00:00:00:00:02 
actions=load:0x2->NXM_NX_REG7[],resubmit(,32)
 cookie=0x0, duration=13146.860s, table=32, n_packets=0, n_bytes=0, 
idle_age=13146, priority=0 actions=resubmit(,33)
 cookie=0x0, duration=12552.048s, table=33, n_packets=0, n_bytes=0, 
idle_age=12552, priority=100,reg7=0x1,metadata=0x1 
actions=load:0x1->NXM_NX_REG5[],resubmit(,34)
 cookie=0x0, duration=12552.066s, table=33, n_packets=0, n_bytes=0, 
idle_age=12552, hard_age=12527, priority=100,reg7=0xffff,metadata=0x1 
actions=load:0x1->NXM_NX_REG5[],load:0x1->NXM_NX_REG7[],resubmit(,34),load:0x2->NXM_NX_REG5[],load:0x2->NXM_NX_REG7[],resubmit(,34),load:0xffff->NXM_NX_REG7[]
 cookie=0x0, duration=12527.313s, table=33, n_packets=0, n_bytes=0, 
idle_age=12527, priority=100,reg7=0x2,metadata=0x1 
actions=load:0x2->NXM_NX_REG5[],resubmit(,34)
 cookie=0x0, duration=12552.049s, table=34, n_packets=0, n_bytes=0, 
idle_age=12552, priority=100,reg6=0x1,reg7=0x1,metadata=0x1 actions=drop
 cookie=0x0, duration=12527.313s, table=34, n_packets=0, n_bytes=0, 
idle_age=12527, priority=100,reg6=0x2,reg7=0x2,metadata=0x1 actions=drop
 cookie=0x0, duration=13146.856s, table=34, n_packets=0, n_bytes=0, 
idle_age=13146, priority=0 
actions=load:0->NXM_NX_REG0[],load:0->NXM_NX_REG1[],load:0->NXM_NX_REG2[],load:0->NXM_NX_REG3[],load:0->NXM_NX_REG4[],resubmit(,48)
 cookie=0x0, duration=12552.064s, table=48, n_packets=0, n_bytes=0, 
idle_age=12552, priority=0,metadata=0x1 actions=resubmit(,49)
 cookie=0x0, duration=12552.068s, table=49, n_packets=0, n_bytes=0, 
idle_age=12552, priority=0,metadata=0x1 actions=resubmit(,50)
 cookie=0x0, duration=12552.066s, table=50, n_packets=0, n_bytes=0, 
idle_age=12552, priority=0,metadata=0x1 actions=resubmit(,51)
 cookie=0x0, duration=12552.065s, table=51, n_packets=0, n_bytes=0, 
idle_age=12552, 
priority=100,metadata=0x1,dl_dst=01:00:00:00:00:00/01:00:00:00:00:00 
actions=resubmit(,64)
 cookie=0x0, duration=12552.068s, table=51, n_packets=0, n_bytes=0, 
idle_age=12552, priority=50,reg7=0x2,metadata=0x1,dl_dst=00:00:00:00:00:02 
actions=resubmit(,64)
 cookie=0x0, duration=12552.065s, table=51, n_packets=0, n_bytes=0, 
idle_age=12552, priority=50,reg7=0x1,metadata=0x1,dl_dst=00:00:00:00:00:01 
actions=resubmit(,64)
 cookie=0x0, duration=12552.049s, table=64, n_packets=0, n_bytes=0, 
idle_age=12552, priority=100,reg7=0x1,metadata=0x1 actions=output:1
 cookie=0x0, duration=12527.315s, table=64, n_packets=0, n_bytes=0, 
idle_age=12527, priority=100,reg7=0x2,metadata=0x1 actions=output:2


If I try similar setup with ODL controller, ping works.

Thanks
Maurice
-----Original Message-----
From: Ben Pfaff [mailto:b...@ovn.org] 
Sent: Thursday, May 05, 2016 2:59 PM
To: Maurice Qureshi <maurice.qure...@calix.com>
Cc: Justin Pettit <jpet...@ovn.org>; discuss@openvswitch.org
Subject: Re: [ovs-discuss] OVN Questions

On Thu, May 05, 2016 at 09:19:56PM +0000, Maurice Qureshi wrote:
> I am tracing the packet using the ovn/env1/packet1.sh. Trace seems to 
> show that it is hitting the entry in flow table and eventually action 
> is output port 2. However, The n_packets counters for any of the entry 
> in flow table don't go up. Shouldn't it increase as the packet hits a 
> flow table entry?

Tracing doesn't actually send a packet.
_______________________________________________
discuss mailing list
discuss@openvswitch.org
http://openvswitch.org/mailman/listinfo/discuss

Reply via email to