## 2 Routing Protocol Design
### TSR Design
(4) If node \(z\) received a packet from node \(y\), then it registers \(y\) as its sub-node (in the \(n\)+1 layer)  
(5) Any non-sink node \(x\) (time slot is \(a_{5}\)), after receiving a packet\(<\)0, \(y\), \(x\), \(a\), CRC \(>\) from another node \(y\), will send back a packet \(<\)_l_, \(x\), \(y\), \(x\), \(x_{Parent}\), \(a\), CRC\(>\) in its own time slot in the next period if \(x\)\(>\)y. Node x will integrate all packets (such as from x and y) when received in the same period into one packet\(<\)_l_, \(x\), \(y\), \(z\), \(x\), \(x_{Parent}\), \(a\), CRC\(>\). (6) Any non-sink node x\({}_{1}\) (time slot is \(a\)? ), when it receives a feedback packet\(<\)_l_, \(x\), \(y\), \(x\), \(x_{Parent}\), \(a\), CRC\(>\)_ sent to it from another node (time slot is \(a_{8}\)), it will send back a packet \(<\)_l_, \(x_{l}\), \(y\), \(x\), \(x_{IParent}\), \(a\), Info\(>\)_ to its father-node \(x_{IParent}\) in its own time slot if \(x_{l}>x\). Otherwise it sends it in its own time slot \(a_{7}T\). If \(x_{l}\) received packets from more than one node, it will integrate the messages of all nodes into one packet and determine whether the packet size is more than 1 K bits. If yes, it then sends it in its own time slot. Otherwise, it divides the packet into several packets and orders them based on the time of reception and it will send the packet in the next \(a_{7}T\) time slot. (7) Repeat the above process, until all nodes have been registered. In TSR, each underwater node has to maintain two tables: a state table and a table of destinations. The state table contains residual energy, total data size of sent packets, throughout capacity, error rates, average delay and repeat send times. The table of destinations contains the addresses of destinations, next hop addresses, and time messages created by the route. The sink has to know the message status for all nodes and the node stable of all source nodes. Since the network power is supplied by batteries and it is difficult to replace batteries, we must pay more attention to reducing the consumption of energy to avoid the failure of a whole underwater network because of a few nodes whose energy is exhausted. A node seeks a route table firstly when it wants to send data which it has collected by itself or to forward data coming from other nodes to choose a route which has less hop time and more energy. Every node would update the current route table and node status table after a data sending action. This management model can ensure packets will be forwarded along an optimal route to the sink. Based on the above algorithm, underwater sensor nodes can communicate with each other through the established route. However, affected by inescapable factors, such as channel conflicts, noise jamming, overhearing and encumbrance, nodes may disconnect and underwater networks may break down. Because of their limited energy, underwater networks may also break down when some node has exhausted its power supply. In such case, we have to maintain networks in a timely fashion. Breakdown situations can be divided to two categories: one is when some nodes have exhausted their energy; the other one is that the packets are missed in the forwarding process. We present two kinds of methods to resolve the above problems. 1. Resolution method when a node has died. In the packet forwarding process, some underwater sensor nodes may exhaust their energy because of oversized communication. Thus, the underwater sensor network breaks down as a result. We employ the following strategy to resolve this situation: in the sending process, if node A has found the next hop node died because of energy exhaustion, it will broadcast a route maintaining packet in its own time slot. A node which receives the route maintaining packet will reply to node \(A\) with one packet containing its residual energy and sub-node number. Node \(A\) would compare all the reply packets and select the node that has least sub-nodes as next hop.