codeblock

2016年5月3日 星期二

Ryu Controller - Traffic Monitor

- Traffic monitor provides a periodically triggered inspector to obtain the flow/port status of each switches.
- A simple sample code is available here: https://github.com/osrg/ryu-book/blob/master/en/source/sources/simple_monitor.py 
- Note that it should be executed in Openflow 1.3

- Function "_state_change_handler": monitor switch add/delete event, and maintain a switch list (self.datapaths) to know how many and which switches should be requested.
- Function "_monitor": a thread to periodically request info to switches, period is also set here
- Function "_request_stats": make requests to switches in self.datapaths
- Function "_flow_stats_reply_handler": will trigger when switches reply flow status, every flow info could be seen here
- Function "_port_stats_reply_handler": similar to _flow_stats_reply_handler but the port status is reported

- This module is a subclass of SimpleSwitch13, so just put this in the same directory and execute this file.


- Tips: don't want to see verbose "EVENT ofp_event -> XXX XXX" created by lots of LLDP packets? just remove the "--verbose" in your cmd!


- Question: why the flow between the first host and the last host cannot be added in the switches in a tree topology after a pingall instruction ?(while the flow between 1st host and the other hosts are fine??)

沒有留言:

張貼留言