[ovs-discuss] Tracing packets using ofproto/trace after integration with Conntrack-OVN

Piyush R Srivastava1 pirsriva at in.ibm.com
Thu Feb 4 18:58:31 UTC 2016


Hi Ben,

Thanks for the reply. My problem still remains unsolved-

I did as you suggested-

[root at rhel7-devstack-ovn-154 ~]# ovs-appctl ofproto/trace br-int
ip,in_port=2,dl_src=fa:16:3e:67:8e:03,dl_dst=fa:16:3e:b6:14:52,nw_proto=1,nw_src=10.10.1.3,nw_dst=10.10.1.1
Bridge: br-int
Flow:
icmp,in_port=2,vlan_tci=0x0000,dl_src=fa:16:3e:67:8e:03,dl_dst=fa:16:3e:b6:14:52,nw_src=10.10.1.3,nw_dst=10.10.1.1,nw_tos=0,nw_ecn=0,nw_ttl=0,icmp_type=0,icmp_code=0

Rule: table=0 cookie=0 priority=100,in_port=2
OpenFlow actions=set_field:0x1->reg5,set_field:0x2->
metadata,set_field:0x2->reg6,resubmit(,16)

        Resubmitted flow:
icmp,reg5=0x1,reg6=0x2,metadata=0x2,in_port=2,vlan_tci=0x0000,dl_src=fa:16:3e:67:8e:03,dl_dst=fa:16:3e:b6:14:52,nw_src=10.10.1.3,nw_dst=10.10.1.1,nw_tos=0,nw_ecn=0,nw_ttl=0,icmp_type=0,icmp_code=0
        Resubmitted regs: reg0=0x0 reg1=0x0 reg2=0x0 reg3=0x0 reg4=0x0
reg5=0x1 reg6=0x2 reg7=0x0
        Resubmitted  odp: drop
        Resubmitted megaflow:
recirc_id=0,ip,reg5=0,reg6=0,metadata=0,in_port=2,vlan_tci=0x0000/0x1000,dl_src=fa:16:3e:67:8e:03,nw_frag=no
        Rule: table=16 cookie=0
priority=50,reg6=0x2,metadata=0x2,dl_src=fa:16:3e:67:8e:03
        OpenFlow actions=resubmit(,17)

                Resubmitted flow: unchanged
                Resubmitted regs: reg0=0x0 reg1=0x0 reg2=0x0 reg3=0x0
reg4=0x0 reg5=0x1 reg6=0x2 reg7=0x0
                Resubmitted  odp: drop
                Resubmitted megaflow:
recirc_id=0,ip,reg5=0,reg6=0,metadata=0,in_port=2,vlan_tci=0x0000/0x1000,dl_src=fa:16:3e:67:8e:03,nw_frag=no
                Rule: table=17 cookie=0 priority=100,ip,metadata=0x2
                OpenFlow actions=ct(table=18,zone=NXM_NX_REG5[0..15])

Final flow:
icmp,reg5=0x1,reg6=0x2,metadata=0x2,in_port=2,vlan_tci=0x0000,dl_src=fa:16:3e:67:8e:03,dl_dst=fa:16:3e:b6:14:52,nw_src=10.10.1.3,nw_dst=10.10.1.1,nw_tos=0,nw_ecn=0,nw_ttl=0,icmp_type=0,icmp_code=0
Megaflow:
recirc_id=0,ip,in_port=2,vlan_tci=0x0000/0x1000,dl_src=fa:16:3e:67:8e:03,nw_frag=no
Datapath actions: ct(zone=1),recirc(0x56)


ADDED recirc_id=0x56

[root at rhel7-devstack-ovn-154 ~]# ovs-appctl ofproto/trace br-int
recirc_id=0x56,ip,in_port=2,dl_src=fa:16:3e:67:8e:03,dl_dst=fa:16:3e:b6:14:52,nw_proto=1,nw_src=10.10.1.3,nw_dst=10.10.1.1
Bridge: br-int
Flow:
recirc_id=0x56,icmp,in_port=2,vlan_tci=0x0000,dl_src=fa:16:3e:67:8e:03,dl_dst=fa:16:3e:b6:14:52,nw_src=10.10.1.3,nw_dst=10.10.1.1,nw_tos=0,nw_ecn=0,nw_ttl=0,icmp_type=0,icmp_code=0

Final flow:
recirc_id=0x56,icmp,in_port=2,vlan_tci=0x0000,dl_src=fa:16:3e:67:8e:03,dl_dst=fa:16:3e:b6:14:52,nw_src=10.10.1.3,nw_dst=10.10.1.1,nw_tos=0,nw_ecn=0,nw_ttl=0,icmp_type=0,icmp_code=0
Megaflow: recirc_id=0x56,ip,in_port=2,nw_frag=no
Datapath actions: drop
Translation failed (No recirculation context), packet is dropped.

It says no recirculation context
( I tried -generate option as well BUT got the same issue )


I expected-
1- Packet to hit the Table 18 and continue tracing
2- Expected to see ct_state values based on already existing flows by
conntrack module

Also, how do i explicitly mention ct_states in ofproto/trace
For instance-
# ovs-appctl ofproto/trace br-int
recirc_id=0x56,ct_state=new,ip,in_port=2,dl_src=fa:16:3e:67:8e:03,dl_dst=fa:16:3e:b6:14:52,nw_proto=1,nw_src=10.10.1.3,nw_dst=10.10.1.1

Works
But in Flows the format is like +new,-inv,-est,+trk
How do i supply these values to ofproto/trace

I understand that doing
#ovs-appctl ofproto/trace br-int recirc_id=0x56,ct_state=
+new,ip,in_port=2,dl_src=fa:16:3e:67:8e:03,dl_dst=fa:16:3e:b6:14:52,nw_proto=1,nw_src=10.10.1.3,nw_dst=10.10.1.1

or,
#ovs-appctl ofproto/trace br-int recirc_id=0x56,ct_state=
+new,-est,-inv,+trk,ip,in_port=2,dl_src=fa:16:3e:67:8e:03,dl_dst=fa:16:3e:b6:14:52,nw_proto=1,nw_src=10.10.1.3,nw_dst=10.10.1.1

would be wrong.

Kindly guide me on how to achieve the packet trace.

Thanks and regards,
Piyush Raman





From:	Ben Pfaff <blp at ovn.org>
To:	Piyush R Srivastava1/India/IBM at IBMIN
Cc:	discuss at openvswitch.org
Date:	02/04/2016 11:31 PM
Subject:	Re: [ovs-discuss] Tracing packets using ofproto/trace after
            integration with Conntrack-OVN



On Thu, Feb 04, 2016 at 04:00:49PM +0530, Piyush R Srivastava1 wrote:
> Datapath actions: ct(zone=1),recirc(0x41)
>
> THE ABOVE COMMAND IS TRACING TILL TABLE 17 ONLY AND NOT FURTHER.
> Last rule in it hit Table 17 says-
>  cookie=0x0, duration=250750.685s, table=17, n_packets=369,
n_bytes=50101,
> idle_age=5659, hard_age=65534, priority=100,ip,metadata=0x2 actions=ct
> (table=18,zone=NXM_NX_REG5[0..15])
>
>
> Now how do i trace where the packet went / what happened further in
> connection tracker and Table 18?
> It is possible to trace using ofproto/trace or is there some other method
> needed for tracing the exact pipeline of packet?

You can then trace a packet supplying recirc_id 0x41.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20160205/ef351ef8/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20160205/ef351ef8/attachment-0002.gif>


More information about the discuss mailing list