In a network, when a node needs to transmit data to another node, a mechanism must exist to ensure the link is idle. If the node sends data on a busy link, a collision will likely occur, and the data lost. This process is handled via Random Access Protocols such as ALOHA, slotted ALOHA, and CSMA/CD. These protocols assist the node in transmitting data packets with minimal risk of collision using various strategies. Slotted ALOHA is an access protocol that partitions access to the link in slots which are granted based on the number of nodes. In this method, when a node receives a packet, it is allocated the next slot to transmit data. If the node transmits the data and no collision is detected, the node again transmits in the next slot. If a collision occurs, the node retransmits the original packet to the next slot. This method allows each node to transmit packets at the maximum capacity of the line when no collision occurs. However, this method wastes a lot of time due to the allocated slots that go unused.
In pure ALOHA, when a node receives a frame, it can begin transmission immediately. This raises the probability of collisions, and for this reason, this method is not very efficient for managing link access. CDMA/CD is the acronym for Carrier Sensing Multiple Access with Collision Detection. In this algorithm, each node must listen to the link for a predetermined number of milliseconds before it can transmit. If the period passes, the node can begin transmission. This process of listening ensures that a node will only attempt to transmit during an idle period. In cases where two nodes attempt the transmission at the same time, and a collision occurs, in which case the nodes abort the transmission and listen again. Collisions can be detected by measuring signal strength on the wire.
An IP address is a 32-bit address used as a unique identifier of the network layer of a communicating node. This address is used to locate the node to which a packet of data is being sent. A Mac address is a 48-bit address that is used to identify the network device on a local area network. The MAC address of a network device is usually burned in by the manufacturer on the ROM though sometimes it can be assigned using the software.