203 | | |
204 | | |
| 203 | === Anatomy of !OpenFlow Protocol (8/3) === |
| 204 | !OpenFlow Switch has a [http://www.openflowswitch.org/documents/openflow-spec-v0.9.0.pdf paper] you can read for information on how the protocol works. The initial handshake is the important piece of info that makes a switch communicate with what it considers a controller. |
| 205 | |
| 206 | ==== The Handshake ==== |
| 207 | The OFP handshake contains the following steps: |
| 208 | |
| 209 | 1. OFPT_HELLO message - sent by both parties to negotiate what version of !OpenFlow to use |
| 210 | 1. SSL connection (optional) |
| 211 | 1. OFPT_FEATURES_REQUEST - sent by controller |
| 212 | 1. OFPT_FEATURES_REPLY - returned by switch |
| 213 | 1. ECHO reply/request or some flow actions |
| 214 | |
| 215 | The steps need to be recreated, but there are several things that need to be done: |
| 216 | * when creating a socket in Ruby you need a port number, but it is a passive connection (ptcp) - the port can be anything |
| 217 | * pick apart either OF reference system or NOX for handshake code |