# A Research Study on Protocol Stack of Space-Based Optical Backbone Network
## 3 Design of the Protocol Stack
### Design of Control Plane
#### 3.1.2 Routing Protocol  
The routing protocol is used to support functions such as automatic neighbor discovery, resource maintenance and route calculation. Here, we used the improved OSPF (open shortest path first) protocol as the routing protocol, which could collect and maintain resources of the whole network and support the use of unidirectional links. Figure 5 shows the state machine of signal protocol which has been improved to support the use of unidirectional links. It can be seen that there are nine states in the state machine, which are defined as follows:  
1. Down: in this state, the port sends Hello messages periodically to discover neighbors automatically. 2. Init: when a port has received a Hello message with its own node ID not included, the state changes into this state. In this state, the Hello messages sent by the port include the node ID of the corresponding node. 3. Two-way: when a port has received a Hello message with its own node ID included, the state changes into this state. In this state, the port enters the election of DR (designated router)/BDR (backup designated router), which is only made in a MA (multiple access) network. As the space-based optical backbone network is not an MA network, the election will not be made here. That is to say, this state will change into the next state automatically. 4. Exstart: in this state, the port holds the primary election to confirm the master/slave relationship by sending an empty DD (database description) message with a DD sequence number in it. In the election, the port with a bigger node ID is the master and the other is the slave. The master port leads the exchange of DD messages. 5. Exchange: after the primary election, the port state changes into this state. In this state, the port sends DD messages to exchange description information of the LSDB (link state data base). 6. Loading: after the exchange of DD messages, the port state changes into this state. In this state, the port compares the description of the LSDB received from the correspondent node with its own LSDB to find out if there is any LSA (link state advertisement) which does not exist in its own LSDB. If this is the case, the port sends an LSR (link state require) message including the description of the lacking LSAs to acquire the complete information. Accordingly, when the port of the correspondent node receivesthe LSR message, it replies with an LSU (link state update) message including the complete information of required LSAs. * Full: after the two ports have exchanged all the information of LSAs, the port state changes into this state. This state means that the LSDBs of the two ports have already been synchronized. * UnidSnd: this state is added to support the use of unidirectional links. When a port in the full state has received a Hello message with its own node ID not included, the port state changes into this state. In this state, the node where the port is located sends unidirectional messages to the corresponding node, to inform that the link between them is a unidirectional link. In addition, if the port has not received a Hello message within the threshold time (HelloInterval), the node sends NonUnidirectional messages to the corresponding node to inform that the unidirectional link has been broken. * UnidRcv: this state is also added to support the use of unidirectional links. When a port in the down state has received a unidirectional message, the port state changes into this state. In this state, the port adds the unidirectional link into the LSDB and sends an LSA to all other nodes to update their LSDBs. In addition, when the port in this state has received a nonunidirectional message, the port state changes into the down state. The functions of messages mentioned above are defined as follows:  
1. Hello Message: used to discover neighbors automatically, including the IDs of its own node and the correspondent node. 2. DD Message: used to exchange the brief description of the LSDB to support the rapid comparison between LSDBs in the two nodes. 3.