[ovs-discuss] Ports in sflow samples from OVS

Adam Pavlidis adampavlidis at gmail.com
Thu May 14 10:08:49 UTC 2015


Hello all,

I am currently trying to use sflow in an SDN environment (mininet).
I have successfully set up the sflow agent in the ovs bridge that is
created by mininet.

My main problem is this that the rules installed by my openflow controller
specify some ports (e.g. port 1, port 2).
However the ports i see in sflow samples are not the same ones. Each time
mininet topology is re-estabilished, ingress and egress ports in the sflow
sample vary.

This is a sample from an ICMP Reply from host1 to host2.



*sflow sample:*
startSample ----------------------
sampleType_tag 0:1
sampleType FLOWSAMPLE
sampleSequenceNo 20
sourceId 2:1000
meanSkipCount 1
samplePool 20
dropEvents 0

*inputPort 675outputPort 677*
flowBlock_tag 0:1001
extendedType SWITCH
in_vlan 0
in_priority 0
out_vlan 0
out_priority 0
flowBlock_tag 0:1
flowSampleType HEADER
headerProtocol 1
sampledPacketSize 102
strippedBytes 4
headerLen 98
headerBytes
00-00-00-00-00-02-00-00-00-00-00-01-08-00-45-00-00-54-CC-BC-00-00-40-01-99-EA-0A-00-00-01-0A-00-00-02-00-00-36-5F-64-2C-00-01-D4-CE-54-55-00-00-00-00-6F-7C-0E-00-00-00-00-00-10-11-12-13-14-15-16-17-18-19-1A-1B-1C-1D-1E-1F-20-21-22-23-24-25-26-27-28-29-2A-2B-2C-2D-2E-2F-30-31-32-33-34-35-36-37
dstMAC 000000000002
srcMAC 000000000001
IPSize 84
ip.tot_len 84
srcIP 10.0.0.1
dstIP 10.0.0.2
IPProtocol 1
IPTOS 0
IPTTL 64
ICMPType 0
ICMPCode 0
endSample   ----------------------


*ovs-dpctl dump-flows <DPath>*

*in_port(2),*
eth(src=00:00:00:00:00:01,dst=00:00:00:00:00:02),
eth_type(0x0800),
ipv4(src=10.0.0.1,dst=10.0.0.2,proto=1,tos=0,ttl=64,frag=no),
icmp(type=0,code=0),
packets:0,
bytes:0,
used:never,
*actions:sample(sample=100.0%,actions(userspace(pid=4294962193,sFlow(vid=0,pcp=0,output=677)))),
3*


*ovs-ofctl dump-flows s1*

cookie=0x0, duration=1.939s, table=0, n_packets=1, n_bytes=98,
idle_timeout=10, hard_timeout=30, idle_age=1, priority=65535,icmp,
*in_port=1*,vlan_tci=0x0000,dl_src=00:00:00:00:00:01,dl_dst=00:00:00:00:00:02,nw_src=10.0.0.1,nw_dst=10.0.0.2,nw_tos=0,icmp_type=0,icmp_code=0

*actions=output:2*





Is there any way to map the ports in the sflow sample, to the ports
understood by the openflow controller, and virtual topology?

My aim is to find something like the following mapping:

sflow  -> openflow

"675" -> "port 1"
"677" -> "port 2"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20150514/cc39c322/attachment-0002.html>


More information about the discuss mailing list