## 4 Medium Access and Network Layer Protocols
### Network Layer Protocols  
#### 4.2.1 Flooding  
Flooding is a component of routing protocols where packets are broadcasted to all nodes within the network. This behavior is known as \"flooding\". In this routing mode, package delivery is ensured to be over 100%. However, if flooding is uncontrolled, each node will relay packets to all its neighboring nodes, resulting in an overwhelming number of broadcast messages and a network failure (known as a \"broadcast storm\"). This can severely degrade bandwidth and necessitate substantial network resources. To prevent a broadcast storm, conditional logic must be implemented. The Dynamic Probabilistic Flooding Protocol (DPF flooding) [11] determines whether to forward a received data packet based on the current count of neighboring nodes (i.e., available connections). For each node, a probability value is generated based on this count, and the node uses this value to decide whether to transmit the last received data packet further across the network. The more \"neighbors\" a network node has, the less likely it is to retransmit the last received data packet. As a result of this operational logic, the volume of redundant information transmitted over the network is significantly reduced. To prevent fatal network overflow due to re-received data packets and ensure the reliability of controlled flooding, the SNCF (Sequence Number Controlled Flooding) algorithm is employed. In SNCF, retransmitted packets are equipped with the number and address of the transmitting node within the network. Upon receiving a packet, the recipient node compares its number with the list of previously received packet numbers. Only packets with new numbers are eligible for further transmission. Since each node maintains sequence numbers and address information, the SNCF protocol appends its own sequence number and addresses to the packet. If a packet arrives at a node that already has the same packet in memory, the node promptly discards it. RPF (Reverse Path Forwarding) is a technique that involves controlled flooding. The node forwards the packet only in the forward direction to the next node. If the packet arrives from the next node, it is sent back to the original sender. Selective Flooding (SF) is a variant of the flooding algorithm that directs packets to routers in a single specific direction. Instead of forwarding every incoming packet across all available connections, nodes selectively transmit packets only along the lines that approximately align with the desired direction. Preferably, the digital hydroacoustic network is a dynamic ad hoc network with a decentralized wireless self-organizing structure. In this design, user devices, especially underwater sensors or vehicles, can connect on the fly. Each network node is capable of forwarding (retransmitting) data intended for other nodes. The order of data transfer is dynamically determined based on the network's connectivity. Features of flooding protocols: during packet forwarding, all available routes between the source and destination are utilized for transmission; there is always a shortest route; successfully delivering data along this path results in the shortest delivery time; all nodes discovered on the network are utilized for transmission; no network-related information is needed, including topology and network load; since the network comprises all nodes connected either directly or indirectly, there is no possibility of any node being overlooked during data propagation; they are highly reliable; even if several intermediate nodes fail, data packets are still likely to reach their destinations; and relatively easy to implement and configure, as each network node can only be aware of its \"neighbors\". Appendix A (Algorithm A3) shows the algorithm for the DPF flooding protocol using controlled flooding (the network topology is shown in Figure 9).