146 | | 1. ''The "server-side" channels.'' A control unit expects two types of incoming connections, 1) from switches, and 2) from other units (peer and downstream). These two are identified by default TCP port values of 6633 and 6644, respectively. The switch channel is handles using OFChannelHandler, which implements the classic !OpenFlow handshake. The unit channel, which we add as the UnitChannelHandler to our Controller.java derivative class (!UnitController.java), deals with the inter-unit handshake, which uses a modified version of !OpenFlow. Both are initialized and added to the same !ChannelGroup when the !UnitController run() method is called. |
| 146 | 1. ''The "server-side" channels.'' A control unit expects two types of incoming connections, 1) from switches, and 2) from other units (peer and downstream). These two are identified by default TCP port values of 6633 and 6644, respectively. The switch channel is handles using OFChannelHandler, which implements the classic !OpenFlow handshake. The unit channel, which we add as the !UnitChannelHandler to our Controller.java derivative class (!UnitController.java), deals with the inter-unit handshake, which uses a modified version of !OpenFlow. Both are initialized and added to the same !ChannelGroup when the !UnitController run() method is called. |
148 | | 2. ''client-side channels.'' A controller unit with upstream or peer units will connect to other units as clients. Each client connection is handled by a !UnitConnector, which attempts to connect to each remote socket specified in a topology file located, by default, under resources/ . This file specifies peer and upstream units in separate lists, to facilitate differentiation between the two kinds of server units. We define a unit that accepts connection to be a server unit, and ones connecting, client units. A separate channel handler is supplied for this connections. |
| 148 | 2. ''client-side channels.'' A controller unit with upstream or peer units will connect to other units as clients. Each client connection is handled by a !UnitConnector, which attempts to connect to each remote socket specified in a topology file located, by default, under resources/ . Each entry describing a unit has the following form: |
| 149 | |
| 150 | {{{ |
| 151 | { |
| 152 | "name":"unit_name", |
| 153 | "host":"localhost", |
| 154 | "port": 6644 |
| 155 | } |
| 156 | }}} |
| 157 | This can of course be easily changed, along with its parser (!UnitConfigUtil.java) and structure holding the information for each entry (!UnitPair.java). This file specifies peer and upstream units in separate lists, in order to facilitate the differentiation between the two kinds of server units. We define a unit that accepts connection to be a server unit, and ones connecting, client units. A separate channel handler is supplied for this connections. |