# A QoS-Enabled Medium-Transparent MAC Protocol for Fiber-Wireless 5G RAN Transport Networks
## 3 The QoS-Aware MT-MAC Protocol
### State-of-the-Art MT-MAC Protocol Operational Rules  
All data interchange is managed by the CO, which is connected via fiber to a number of RAUs, which in turn give wireless connectivity to the lamppost units, according to the protocol's specifications. Two separate Contention Periods (CPs) are used to accommodate the medium's dual nature: the first CP seeks to distribute optical wavelengths across RAUs currently serving active wireless nodes, while the second CP allocates wireless capacity among them. The CO produces a short beacon pulse on a specially dedicated channel known as the Control Channel at the start of the first CP, which is then broadcast to all in-range wireless nodes. When nodes detect the pulse, they quickly respond with a brief pulse of the same duration, if they contain pending data to transmit in their buffers. The CO determines which RAUs contain active nodes and, consequently, assigns wavelengths to them by collecting the received pulses based on the energy detection method [26] and calculating the time difference between their receptions to identify the originating RAU based on the reception window, as shown in Figure 2. If the number of RAUs containing active nodes is greater than the number of available wavelengths in the system, the wavelengths are cycled through the RAUs using a Round Robin algorithm. The CO starts the second CP, which is logically divided into SFs, after obtaining the complete list of capacity-demanding RAUs. An SF contains two independent and non-intermixing sets of frame types: Resource Request Frames (RRFs) and Data Frames (DFs), with the RRFs always coming first. The DFs are in charge of real data transmission, whereas the RRFs provide the CO with information about the number and IDs (i.e., MAC addresses) of each specific node before any data exchange can begin, essentially acting as service setup protocol exchange. As seen in Figure 3a, the RRFs are further subdivided into groups of \(m\) slots, with each slot containing POLL, ID, and ACK packets in the order specified. Each active node chooses a random integer value \(y\) in the interval \([0,\ m]\) at the start of each RRF, where \(y\) is the number of POLL packets that must be received, before replying with an ID packet that contains the node's MAC address and its Buffer Status (BuS), i.e., how many packets are present in the nodes' buffers. In the best-case scenario, each node selects a distinct \(y\) value and transmits its own ID packet in its own slot. The CO responds with an ACK after receiving the ID + BuS packet correctly, indicating that this node has been successfully recognized and should not participate in any additional  
Figure 2: First Contention Period example for determining which RAUs contain active nodes. Based on reporting pulses’ arrival times, the CO can detect which RAUs contain active nodes and which do not. In the example above, RAUs 1 and 3 contain active nodes. RRFs. A collision happens when two or more nodes choose the same value for \(y\), and as a result, the CO does not send an ACK, forcing these nodes to participate in the next RRF, which follows soon afterwards. The CO continues to send RRFs until no collisions occur, thereby indicating that all active nodes have been identified and the second CP has come to an end. The CO then commences the DATA_TX phase, during which the major data exchange takes place in the form of a sequence of DF broadcasts until the SF ends. In order to update their BuS to the CO, nodes will piggyback their BuS information into the last DF transmission of the current SF and will therefore not partake in any subsequent second CP that will be initiated by the CO. The CO periodically initiates new second CPs, as a means for previously inactive nodes to report their status and be thusly included in the upcoming SF.