0

To specify a path by minimum cost for sending a flow, I want to calculate the cost of link in Ryu controller by the following equation:

cost(e)=delay(e) + PL(e) ∀ e ε E

delay(e) is delay of link e. PL(e) is packet loss of link e. How to get delay and packet loss of a link in realtime using Ryu and OpenFlow?

Thanks.

ali
  • 21
  • 1
  • 6

1 Answers1

2

The packet loss can be calculated by querying statistics from the switches using OFPFlowStatsRequest messages . Similar to the examples provided by the Ryu book:

https://osrg.github.io/ryu-book/en/html/traffic_monitor.html

With these statistics the delta of sent packets by switch A and received packets by switch B can be calculated, which equals the loss packet ratio: pl(A,B) = (tx_packets(A) - rx_packets(B)) / tx_packets(A)).

The delay can be measured using e.g. the approach proposed by Phemius et. al. "Monitoring latency with OpenFlow" https://ieeexplore.ieee.org/document/6727820

Justus
  • 23
  • 4