126 | | An alternative way to accomplish this is, by querying Flow statistics directly from the OpenFlow switch. [[BR]] |
127 | | Upon the arrival of a new TCP flow, the OpenFlow controller should send out a `FlowStatsRequest` message to the OpenFlow switch. The OpenFlow switch will reply with statistics information about all flows in its flow table. This flow statistics message will be fetched by the `stats_reply` function in Trema. Based on the statistics, experimenters can apply their own policy on which path to choose in different situations. For more information about !FlowStatsRequest and !FlowStatsReply, please refer to http://rubydoc.info/github/trema/trema/master/Trema/FlowStatsRequest and http://rubydoc.info/github/trema/trema/master/Trema/FlowStatsReply. [[BR]] |
| 126 | |
| 127 | An alternative way to accomplish this is by querying Flow statistics directly from the OpenFlow switch. [[BR]] |
| 128 | |
| 129 | '''Process: ''' Upon the arrival of a new TCP flow, the OpenFlow controller should send out a `FlowStatsRequest` message to the OpenFlow switch. The OpenFlow switch will reply with statistics information about all flows in its flow table. |
| 130 | This flow statistics message will be fetched by the `stats_reply` function in the openflow controller implemented by the user on node `switch`. Based on the statistics, experimenters can apply their own policy on which path to choose in different situations. |
| 131 | The !FlowStatsReply message is in the following format: |
| 132 | {{{ |
| 133 | FlowStatsReply.new( |
| 134 | :length => 96, |
| 135 | :table_id => 0, |
| 136 | :match => Match.new |
| 137 | :duration_sec => 10, |
| 138 | :duration_nsec => 106000000, |
| 139 | :priority => 0, |
| 140 | :idle_timeout => 0, |
| 141 | :hard_timeout => 0, |
| 142 | :cookie => 0xabcd, |
| 143 | :packet_count => 1, |
| 144 | :byte_count => 1, |
| 145 | :actions => [ ActionOutput.new ] |
| 146 | ) |
| 147 | }}} |
| 148 | For more information about !FlowStatsRequest and !FlowStatsReply, please refer to http://rubydoc.info/github/trema/trema/master/Trema/FlowStatsRequest and http://rubydoc.info/github/trema/trema/master/Trema/FlowStatsReply. [[BR]] |