## 3 Medium Access Control Layer  
MAC protocols manage access to the communication medium. Without proper management of the transmission medium, collisions of unrequested communications may degrade overall network performance. Hence, the basic objective of MAC protocols is to avoid collisions. However, they also have to deal with other factors, such as energy efficiency, scalability and latency.  
A collision occurs when two or more data frames arrive at the intended receiver simultaneously. Traditional MAC protocols try to handle this time uncertainty by, for example, slotting time (time-division multiple access, or TDMA) or sensing the channel prior to transmission (carrier sense multiple access, or CSMA). However, because of the long propagation delays of underwater transmission, these networks also suffer from space uncertainty, and it is necessary to take into account the locations of the receivers and their possible interferers. This problem is commonly known in the literature as space-time or spatio-temporal uncertainty [62].  
Another problem that comes along with long propagation delays is spatial unfairness [62]. Because the packet reception time depends on the distance to the transmitter, the channel becomes free first at the transmitter and later on at the receiver. Hence, nodes closer to the transmitter are able to gain access to the channel before nodes closer to the receiver.  
Nevertheless, despite these problems, the two classical schemes in which MAC protocols can be subdivided, _i.e_., contention-free and contention-based schemes, are still valid and used.  
Contention-free schemes assign different frequency bands, time slots or codes to different users of the communication medium. Under this scheme, nodes do not compete with each other in order to obtain access to the channel. The three basic types of this scheme, _i.e_., TDMA, frequency-division multiple access (FDMA) and code-division multiple access (CDMA), are illustrated in Figure 4.  
Contention-based MAC protocols, on the other hand, avoid the pre-allocation of resources by allowing nodes to compete with each other and obtain medium access on demand. This group of protocols  
Figure 4: Contention-free communication can be accomplished by assigning time, frequency or unique codes.  
usually relies on random access to distribute transmissions and normally also includes some recovery mechanisms in case a collision occurs.  
This classification, although widely accepted, is not entirely accurate, because there exist different protocols that share characteristics of both schemes. In Figure 5, we propose a representative classification. The presented protocols are further explained in the remainder of this section, and their main properties are compared in Table 3. This table specifies the type of MAC protocol (time-based, FDMA-based or CDMA-based), whether the protocol uses a random access scheme (CDMA scheme, TDMA scheme or a combination), if the nodes are organized in clusters, whether the MAC protocol also performs routing, if the MAC protocol requires a handshaking process and, finally, if time synchronization is needed or knowledge of the propagation time is required.