简体   繁体   中英

Get packet loss from Open Flow switch

I am using ryu controller (3.22) to monitor switches (Open vSwitch 2.0.2, supporting Open Flow 1.3), which are a part of virtual network created using mininet (2.1.0). It is a tree topology with depth = 2, and fanout = 5. I am using switch_monitor.py

With the help of controller, I can get port statistics using the EventOFPPortStatsReply decorator. I can get values of rx_packets , rx_bytes , rx_errors , tx_packets , tx_bytes , tx_errors , rx_dropped , tx_dropped etc.

But the values of rx_dropped , tx_dropped come out to be zero always, even when the switches are actually dropping packets, as reported by qdisc (linux command).

How to get packet loss statistics from an Open Flow switch?

a. How to get a non zero value?

b. Is there any alternate way?

qdisc reports what the kernel is dropping, not what the network is dropping. You're getting zero's because the switch isn't dropping frames.

(I don't know if your virtual network system supports simulating frame drops.)

I believe that dropped only cares about packets that are dropped due to actual drop rules or due to buffer overflows.

Another way to calculate packet loss is to compare the packet counts for the two switches on the edge of a link. Suppose you have A <--> B and want to calculate the packet loss rate from A to B. Then you take:

plr(A,B) = (tx_packets(A) - rx_packets(B)) / tx_packets(A))

Beware though that sometimes the counters are reset leading to rx_packets being higher that tx_packets . I am facing this behavior in my SDN software and tend to invalidate the results, if there are strange combinations.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM