Data Link Layer
The Data Link Layer is the second layer of the OSI (Open Systems Interconnection) model, which is a conceptual framework used to understand how different networking protocols communicate over a network. The Data Link Layer is responsible for establishing reliable communication links between adjacent network nodes (e.g., between two devices on the same local area network, or LAN) and ensuring the error-free transmission of data across these links.
Need
Reliable communication: The Data Link Layer establishes reliable communication links between adjacent network nodes, ensuring that data is transmitted accurately and without errors. It provides error detection and correction mechanisms to detect and correct errors that may occur during data transmission, ensuring that data arrives at its destination intact.
Framing and addressing: The Data Link Layer divides data into smaller units called frames and adds header and trailer information to each frame, which contains control information such as source and destination addresses. This allows devices on a network to identify each other and send data to the correct destination, ensuring that data is delivered to the intended recipient.
Media access control: The Data Link Layer manages access to the physical medium, such as Ethernet or Wi-Fi, to avoid collisions and ensure that only one device transmits data at a time. This prevents data collisions and ensures efficient use of the network medium.
Flow control: The Data Link Layer implements flow control mechanisms to regulate the flow of data between sender and receiver. This prevents overwhelming the receiver with too much data too quickly, avoiding data loss or buffer overflow.
Interoperability: The Data Link Layer provides a standardized interface for network devices, allowing devices from different manufacturers and with different technologies to communicate with each other. This enables interoperability and facilitates communication between devices from different vendors in a heterogeneous network environment.
Security: The Data Link Layer may implement security mechanisms, such as MAC address filtering or VLAN (Virtual Local Area Network) segmentation, to secure the network and prevent unauthorized access to the data being transmitted over the network.
Services Provided
Framing: The Data Link Layer breaks data into smaller units called frames, adding header and trailer information to each frame. This framing process establishes the boundaries of each frame, allowing the receiver to properly identify and extract the data. Framing also includes error detection codes, such as checksums or CRC (Cyclic Redundancy Check), which help in detecting errors during data transmission.
Physical addressing: The Data Link Layer assigns unique physical addresses, typically known as MAC (Media Access Control) addresses, to devices on a network. MAC addresses are used to identify network interfaces at the Data Link Layer and enable devices to send data to the correct destination.
Media access control: The Data Link Layer manages access to the shared physical medium, such as Ethernet or Wi-Fi, to avoid collisions and ensure that only one device transmits data at a time. Different media access control methods, such as CSMA/CD (Carrier Sense Multiple Access with Collision Detection) or CSMA/CA (Carrier Sense Multiple Access with Collision Avoidance), are used depending on the network type and technology.
Flow control: The Data Link Layer implements flow control mechanisms to regulate the flow of data between sender and receiver. Flow control ensures that data is transmitted at a rate that the receiver can handle, preventing data loss or buffer overflow. Common flow control techniques include stop-and-wait, sliding window, and selective repeat.
Error detection and correction: The Data Link Layer may implement error detection and correction techniques to ensure reliable data transmission. Error detection methods, such as CRC, allow the receiver to detect errors in received frames. Error correction techniques, such as Hamming code or Reed-Solomon code, can be used to correct errors in data.
Link management: The Data Link Layer may provide link management services to establish, maintain, and terminate communication links between network devices. This may include link establishment protocols, such as PPP (Point-to-Point Protocol), and link termination protocols, such as LCP (Link Control Protocol).
Media control: The Data Link Layer may provide media control services, such as controlling the transmission power, modulation, or coding schemes used in wireless networks, to optimize the performance and reliability of the physical medium.
Framing
Framing is the process of breaking data into smaller units called frames at the Data Link Layer of the OSI (Open Systems Interconnection) model or the Data Link Layer of the TCP/IP protocol suite. Frames are used to encapsulate data for transmission over a network medium and provide the necessary structure for efficient and reliable data communication. The framing process involves adding header and trailer information to the data to create a complete frame.
The following are the key aspects of framing at the Data Link Layer:
Frame delimitation: Frames need to be clearly defined to allow the receiver to properly identify the beginning and end of each frame. Frame delimitation is achieved by using special characters or bit patterns, known as start and end delimiters, which mark the beginning and end of a frame. These delimiters are added to the data by the sender and removed by the receiver to extract the original data.
Frame header: The frame header contains control information that is used to manage the frame, such as source and destination addresses, frame type, and other protocol-specific information. The header is typically placed at the beginning of the frame and is used by the receiver to process the frame properly.
Frame trailer: The frame trailer is placed at the end of the frame and typically contains error detection codes, such as checksums or CRC (Cyclic Redundancy Check), which are used to detect errors in the frame during transmission. The receiver can use these error detection codes to check the integrity of the received frame.
Byte stuffing or bit stuffing: In some cases, the data being transmitted may contain characters or bit patterns that are the same as the start or end delimiters used for frame delimitation. To avoid confusion, byte stuffing or bit stuffing techniques are used. In byte stuffing, a special escape character is added before any occurrence of the start or end delimiter in the data, and the receiver removes the escape characters to extract the original data. In bit stuffing, a special bit pattern is inserted into the data whenever a specific bit pattern occurs, and the receiver removes the inserted bit pattern to extract the original data.
Flow Control
Flow control is a mechanism used in the Data Link Layer of the OSI (Open Systems Interconnection) model or the Data Link Layer of the TCP/IP protocol suite to regulate the flow of data between sender and receiver. Flow control prevents data loss or buffer overflow caused by a fast sender overwhelming a slower receiver. It ensures that data is transmitted at a rate that the receiver can handle, preventing data congestion and improving the overall reliability of data communication.
There are several common techniques used for flow control at the Data Link Layer:
Stop-and-wait: In stop-and-wait flow control, the sender sends one frame at a time and waits for an acknowledgement (ACK) from the receiver before sending the next frame. The receiver sends an ACK for each correctly received frame, indicating that it is ready to receive the next frame. If the sender does not receive an ACK within a certain timeout period, it assumes that the frame was lost or corrupted and retransmits the frame. This method ensures that the sender does not overwhelm the receiver with data, but it may result in low efficiency due to the waiting time for ACKs.
Sliding window: Sliding window flow control allows the sender to transmit multiple frames without waiting for individual ACKs for each frame. The sender maintains a "window" of allowable sequence numbers for frames that can be sent without waiting for ACKs. The receiver sends ACKs for correctly received frames, and the sender can continue to send new frames as long as the window allows. The window size can be adjusted dynamically based on the network conditions and the receiver's buffer capacity, allowing for more efficient data transmission.
Selective repeat: Selective repeat flow control is similar to sliding window flow control but with a difference in how lost or corrupted frames are handled. In selective repeat, the receiver selectively requests retransmission of only the lost or corrupted frames, instead of the entire window as in sliding window. This reduces the amount of unnecessary retransmission, improving the efficiency of data transmission.
Flow control mechanisms can be implemented using various control frames, such as ACK frames, NACK (Negative ACK) frames, or flow control frames, which are exchanged between the sender and receiver to manage the flow of data.
Error Control
Error control is a mechanism used in the Data Link Layer of the OSI (Open Systems Interconnection) model or the Data Link Layer of the TCP/IP protocol suite to detect and correct errors that may occur during data transmission. Errors can occur due to various factors, such as noise, interference, signal attenuation, or transmission errors, and can result in corrupted data being received by the receiver. Error control techniques are employed to ensure the integrity and reliability of data communication.
There are several common error control techniques used at the Data Link Layer:
Error detection: Error detection techniques involve adding redundant information, such as checksums or CRC (Cyclic Redundancy Check) codes, to the data being transmitted. The sender calculates the checksum or CRC code based on the data and adds it to the frame as a form of error detection. The receiver then calculates the checksum or CRC code based on the received data and compares it with the checksum or CRC code received in the frame. If they match, the data is assumed to be error-free; otherwise, an error is detected.
Positive acknowledgement (ACK)/Negative acknowledgement (NACK): After receiving a frame, the receiver sends an acknowledgement (ACK) frame to the sender to indicate that the frame was received successfully. If the receiver detects an error in the frame, it may send a negative acknowledgement (NACK) frame to request retransmission of the frame. The sender uses the ACK or NACK frames to determine if the frame was received correctly or if retransmission is necessary.
Automatic Repeat request (ARQ): ARQ is a commonly used error control technique that combines error detection and retransmission. When the sender transmits a frame, it waits for an ACK frame from the receiver. If an ACK frame is received, the sender assumes the frame was received correctly and proceeds to send the next frame. If a NACK frame or no frame is received, the sender assumes an error occurred and retransmits the frame. ARQ can be further classified into various types, such as Stop-and-Wait ARQ, Go-Back-N ARQ, and Selective Repeat ARQ, depending on the specific retransmission strategy used.
Forward error correction (FEC): FEC is a technique that allows the receiver to correct errors without requesting retransmission of frames. In FEC, redundant information is added to the data being transmitted, allowing the receiver to correct errors using the redundant information. This helps to minimize the need for retransmission and reduces the latency in the data communication process.
Data Link Layer Protocol
Elementary Window protocol
The Elementary Window Protocol is a simple form of flow control used in data link layer protocols. It allows the sender to transmit a fixed number of frames, known as the window size, without waiting for acknowledgements from the receiver. Once the sender reaches the window size, it must wait for acknowledgements from the receiver before sending additional frames.
Here are the key characteristics of the Elementary Window Protocol:
Fixed window size: The Elementary Window Protocol has a fixed window size, meaning the sender can only transmit a specific number of frames before waiting for acknowledgements. This fixed window size is predetermined and cannot be dynamically adjusted based on the network conditions.
Limited error handling: The Elementary Window Protocol typically relies on positive acknowledgements (ACK) from the receiver for received frames, and negative acknowledgements (NAK) for frames with errors or frames that are missing. However, it has limited error-handling capabilities. If the receiver sends a NAK for a missing or error-filled frame, the sender must retransmit the entire window, even if only one frame is missing or has an error. This can result in inefficient bandwidth utilization.
Simple implementation: The Elementary Window Protocol is relatively simple to implement compared to more advanced flow control techniques, such as the Sliding Window Protocol. It has fewer overheads in terms of processing and memory requirements, making it suitable for simple networks or situations where resource constraints are a concern.
Limited adaptability: The fixed window size of the Elementary Window Protocol may not be adaptable to changing network conditions, such as varying link speeds or network congestion. It does not provide dynamic adjustments to the window size based on network conditions, which can limit its performance in certain situations.
Basic error detection: The Elementary Window Protocol may use basic error detection mechanisms, such as parity bit, to detect errors in frames. However, it lacks more sophisticated error correction mechanisms, such as CRC, which are commonly used in more advanced flow control techniques.
Sliding Window protocol
The Sliding Window Protocol is a widely used flow control technique in data link layer protocols. It allows the sender to transmit a variable number of frames, known as the window size, without waiting for acknowledgements from the receiver. The window "slides" as acknowledgements are received, allowing for continuous transmission of frames. The Sliding Window Protocol offers several advantages over simpler flow control techniques like the Elementary Window Protocol, including increased efficiency, error handling, and adaptability to changing network conditions.
Here are the key characteristics of the Sliding Window Protocol:
Variable window size: The Sliding Window Protocol allows for a dynamic window size, which can be adjusted based on the network conditions. The sender can transmit a variable number of frames within the window size without waiting for acknowledgements. As acknowledgements are received, the window "slides" to allow for continuous transmission of frames.
Selective retransmission: The Sliding Window Protocol provides selective retransmission, meaning that only the unacknowledged frames need to be retransmitted in case of errors or missing frames. This can significantly improve bandwidth utilization compared to simpler flow control techniques that require retransmission of the entire window, even if only one frame is affected.
Advanced error handling: The Sliding Window Protocol typically uses more advanced error detection and correction mechanisms, such as CRC (Cyclic Redundancy Check), to detect and correct errors in frames. This can enhance the reliability of the communication at the data link layer.
Flexibility: The dynamic window size of the Sliding Window Protocol allows for adaptability to changing network conditions, such as varying link speeds or network congestion. The window size can be adjusted based on feedback from the receiver, allowing for efficient utilization of the available bandwidth.
More complex implementation: The Sliding Window Protocol is more complex to implement compared to simpler flow control techniques like the Elementary Window Protocol. It requires additional processing and memory requirements to manage the sliding window, handle selective retransmission, and implement advanced error-handling mechanisms.
1-bit
The 1-bit Sliding Window Protocol is a type of Stop-and-Wait Protocol, which is a simple form of Sliding Window Protocol used for flow control in data link layer protocols. It is called "1-bit" because it uses only a single bit in the sequence number field of the frames to indicate the next expected frame.
Here's how the 1-bit Sliding Window Protocol works:
- Sender side:
The sender sends one frame at a time and waits for an acknowledgement (ACK) from the receiver before sending the next frame.
Each frame sent by the sender has a sequence number, which can be either 0 or 1, to indicate the next expected frame.
After sending a frame, the sender starts a timer to wait for the ACK from the receiver. If the ACK is received within the timeout period, the sender proceeds to send the next frame with the updated sequence number.
If the ACK is not received within the timeout period, the sender assumes the frame was lost or corrupted and retransmits the same frame with the same sequence number.
- Receiver side:
The receiver receives a frame from the sender and checks its sequence number.
If the sequence number matches the expected sequence number, the receiver sends an ACK with the same sequence number to acknowledge the receipt of the frame.
If the sequence number does not match the expected sequence number, the receiver discards the frame as it is considered out of order, and sends an ACK for the last correctly received frame.
- Error handling:
The 1-bit Sliding Window Protocol typically uses simple error detection mechanisms, such as parity bit or checksum, to detect errors in frames.
If an error is detected in a received frame, the receiver discards the frame and does not send an ACK, causing the sender to timeout and retransmit the same frame.
Advantages and limitations:
The 1-bit Sliding Window Protocol is simple and easy to implement, requiring minimal processing and memory requirements.
It ensures reliable data transmission by using acknowledgements and retransmissions to handle lost or corrupted frames.
However, it has low efficiency as it requires a round-trip time (RTT) for each frame due to the sender waiting for ACK before sending the next frame.
It is suitable for scenarios with low data rates or short distances where the chances of frame errors or losses are minimal.
Go-Back-N
The Go-Back-N (GBN) Sliding Window Protocol is a type of Continuous Automatic Repeat Request (ARQ) Protocol used in data link layer protocols for reliable data transmission. It allows the sender to transmit multiple frames without waiting for acknowledgements, and the receiver acknowledges correctly received frames and indicates the expected sequence number of the next frame it is expecting to receive. If an acknowledgement is not received within a specified time, the sender retransmits all the unacknowledged frames in the window.
Here's how the Go-Back-N Sliding Window Protocol works:
- Sender side:
The sender maintains a window of allowable unacknowledged frames, which can be sent consecutively without waiting for acknowledgements.
The sender can send up to "N" frames (hence the name "Go-Back-N") where "N" is the window size.
Each frame sent by the sender has a sequence number to uniquely identify it.
After sending the frames in the window, the sender starts a timer to wait for acknowledgements.
- Receiver side:
The receiver receives frames from the sender and checks their sequence numbers.
If a frame with the expected sequence number is received, the receiver sends an acknowledgement (ACK) for that frame and delivers the data to the higher layer.
If a frame with a sequence number that is not the expected next sequence number is received, the receiver discards the frame as it is considered out of order, but sends an ACK for the last correctly received frame to acknowledge receipt of all frames up to that point.
If a frame with a sequence number that is lower than the expected sequence number is received, the receiver discards the frame and sends an ACK for the last correctly received frame, indicating that the sender needs to retransmit from the last acknowledged frame.
- Error handling:
The Go-Back-N Sliding Window Protocol typically uses error detection mechanisms, such as parity bit or checksum, to detect errors in frames.
If an error is detected in a received frame, the receiver discards the frame and sends an ACK for the last correctly received frame, indicating that the sender needs to retransmit the entire window of unacknowledged frames.
- Retransmission:
If the sender's timer expires without receiving an ACK for a particular frame or frame, the sender retransmits all the unacknowledged frames in the window, starting from the last acknowledged frame.
The sender keeps retransmitting the entire window of unacknowledged frames until it receives ACKs for all the frames in the window.
Advantages and limitations:
The Go-Back-N Sliding Window Protocol is efficient as it allows the sender to send multiple frames without waiting for acknowledgements, maximizing bandwidth utilization.
It provides reliable data transmission by using acknowledgements and retransmissions to handle lost or corrupted frames.
However, it can lead to wasteful retransmissions of frames that were not lost or corrupted, as the sender retransmits the entire window even if only one frame is lost.
It requires a larger buffer space at the receiver to handle out-of-order frames.
It is suitable for scenarios with higher data rates or longer distances where the chances of frame errors or losses are higher.
Selective Repeat
Selective Repeat (SR) Sliding Window Protocol is another type of Continuous Automatic Repeat Request (ARQ) Protocol used in data link layer protocols for reliable data transmission. Similar to the Go-Back-N protocol, it allows the sender to transmit multiple frames without waiting for acknowledgements, but it differs in how it handles lost or corrupted frames on the receiver side.
Here's how the Selective Repeat Sliding Window Protocol works:
- Sender side:
The sender maintains a window of allowable unacknowledged frames, which can be sent consecutively without waiting for acknowledgements.
The sender can send up to "N" frames (the window size) where "N" is the maximum number of frames that can be transmitted without receiving an acknowledgement.
Each frame sent by the sender has a sequence number to uniquely identify it.
After sending the frames in the window, the sender starts a timer to wait for acknowledgements.
- Receiver side:
The receiver receives frames from the sender and checks their sequence numbers.
If a frame with the expected sequence number is received, the receiver sends an acknowledgement (ACK) for that frame, delivers the data to the higher layer, and updates the expected sequence number for the next frame.
If a frame with a sequence number that is not the expected next sequence number is received, the receiver buffers the frame, sends an ACK for the last correctly received frame, indicating that the sender needs to retransmit only the missing frame(s), and updates the expected sequence number for the next frame.
If a frame with a sequence number that is lower than the expected sequence number is received, the receiver discards the frame as it is considered a duplicate, but sends an ACK for the last correctly received frame, indicating that the sender needs to retransmit only the missing frame(s), and updates the expected sequence number for the next frame.
- Error handling:
The Selective Repeat Sliding Window Protocol typically uses error detection mechanisms, such as parity bit or checksum, to detect errors in frames.
If an error is detected in a received frame, the receiver discards the frame, sends an ACK for the last correctly received frame, and requests retransmission of the missing frame(s) by updating the expected sequence number.
- Retransmission:
If the sender's timer expires without receiving an ACK for a particular frame or frames, the sender retransmits only the missing frame(s) based on the ACK received from the receiver, rather than retransmitting the entire window of unacknowledged frames as in the Go-Back-N protocol.
The sender keeps retransmitting only the missing frame(s) until it receives an ACK for all the frames in the window.
Advantages and limitations:
The Selective Repeat Sliding Window Protocol is more efficient than Go-Back-N in terms of retransmission, as it only requires the retransmission of the missing frame(s) rather than the entire window of unacknowledged frames, reducing wasteful retransmissions.
It provides reliable data transmission by using acknowledgements and retransmissions to handle lost or corrupted frames.
It requires a larger buffer space at the receiver to handle out-of-order frames.
It is suitable for scenarios with higher data rates or longer distances where the chances of frame errors or losses are higher.
Hybrid ARQ
Hybrid Automatic Repeat Request (HARQ) is a combination of Automatic Repeat Request (ARQ) techniques used in data communication to achieve reliable transmission of data. It combines the advantages of both error correction and error detection methods to improve the reliability and efficiency of data transmission in communication systems.
In HARQ, the sender and receiver use a combination of error correction codes and retransmission strategies to ensure the reliable delivery of data. When errors are detected at the receiver, the receiver can request retransmission of only the corrupted data, rather than the entire frame, which reduces the overhead of retransmissions and improves overall efficiency.
HARQ can be classified into two main types:
Incremental Redundancy (IR): In this type of HARQ, the sender initially transmits a coded version of the data, usually using error correction codes. If errors are detected at the receiver, instead of requesting a retransmission of the entire frame, the receiver only requests additional redundant bits that can be used to correct the detected errors. This approach allows for more efficient retransmissions as only the additional redundant bits need to be sent, rather than retransmitting the entire frame.
Chase Combining (CC): In this type of HARQ, the sender initially transmits a coded version of the data. If errors are detected at the receiver, the receiver requests retransmission of the entire frame. However, when the retransmitted frame is received, the receiver combines it with the previously received frame (hence the term "Chase Combining") to correct errors. This approach improves the chances of successful decoding as it combines multiple copies of the data, and reduces the need for multiple retransmissions.
Protocol verification
Protocol verification is the process of formally verifying the correctness and performance of a communication protocol. Communication protocols are sets of rules and procedures that govern the exchange of data and control information between devices or systems in a network. Protocol verification aims to ensure that a protocol behaves correctly, adheres to its specifications, and meets its intended goals.
Protocol verification can be done using Finite State Machines (FSMs) or Petri Nets, which are formal methods for modelling and analyzing the behaviour of systems, including communication protocols.
Finite State Machine Models
Protocol verification using Finite State Machines (FSMs) involves modelling the behaviour of a communication protocol as a set of states and transitions between states, and then formally analyzing the FSM to verify its correctness, adherence to specifications, and absence of undesirable behaviours.
The steps for protocol verification using FSMs typically include the following:
Define the states: Identify the possible states that the protocol can be in during its operation. States represent the different modes or phases of the protocol, such as idle, setup, data transfer, and termination.
Define the transitions: Identify the events or conditions that trigger transitions between states. Transitions represent the changes in the protocol's behaviour based on the inputs and outputs it receives, such as sending or receiving messages, changing parameters, or detecting errors.
Specify the protocol properties: Define the desired properties or requirements of the protocol that need to be verified, such as correctness, safety, liveness, fairness, and performance. These properties serve as the criteria for verifying the correctness of the protocol behaviour.
Model the FSM: Use a formal notation, such as state transition diagrams, state transition tables, or formal languages like Promela, to model the FSM that represents the protocol's behaviour. The FSM should capture all the possible states, transitions, and conditions.
Perform formal analysis: Use formal analysis techniques such as model checking, simulation, or theorem proving to analyze the FSM and verify its correctness and adherence to the desired properties. Model checking involves systematically exploring all possible states and transitions of the FSM to check for violations of specified properties. Simulation involves running the FSM in a simulated environment and observing its behaviour to check for correctness and performance. Theorem proving involves using formal logic and mathematical proofs to establish the correctness of the FSM.
Fix potential issues: If issues or violations of desired properties are identified during formal analysis, the FSM model may need to be modified or corrected to fix the issues. This may involve refining the states, transitions, or conditions, or adding additional states or transitions to ensure the protocol behaves correctly and meets the specified requirements.
Iterate and refine: The process of protocol verification using FSMs may involve multiple iterations of modelling, analysis, and refinement until the desired properties are satisfied and the protocol is deemed correct and reliable.
Petri net models
A Petri net is a mathematical modelling tool that can be used to model and analyze the behaviour of concurrent systems. It is a directed bipartite graph, where the nodes are divided into two types: places and transitions. Places represent states of the system, and transitions represent events that can occur in the system. Arcs connect places to transitions and transitions to places, and they represent the flow of tokens between places and transitions.
Petri nets can be used to model a wide variety of systems, including communication protocols, computer programs, and manufacturing systems. They are particularly well-suited for modelling systems with concurrent behaviour, as they can be used to track the flow of control and data through the system.
Petri nets can be used to verify the correctness of communication protocols. A Petri net model of the protocol can be created, and then the model can be analyzed to verify that it meets the desired properties. For example, the model can be checked to ensure that it is deadlock-free and live.
Petri nets can also be used to analyze the performance of communication protocols. A Petri net model of the protocol can be created, and then the model can be used to simulate the behaviour of the protocol under different load conditions. This information can be used to design and tune the protocol to meet the desired performance requirements.
Petri nets are a powerful tool for modelling and analyzing the behaviour of concurrent systems. They can be used to verify the correctness of communication protocols and to analyze their performance.
Here are some of the advantages of using Petri nets for protocol verification:
Petri nets are a graphical formalism, which makes them easy to understand and visualize.
Petri nets are a formal formalism, which means that they have a well-defined semantics. This makes them amenable to formal analysis and verification techniques.
Petri nets are a versatile formalism, which can be used to model a wide variety of systems.
Here are some of the disadvantages of using Petri nets for protocol verification:
Petri nets can be complex to create and analyze.
Petri nets are not always precise enough to model all aspects of a system.
Petri nets are not always able to capture all of the possible behaviours of a system.
ARP/RARP/GARP
ARP
Address Resolution Protocol (ARP) is a protocol used in computer networks to resolve an IP address to a physical machine address, also known as a MAC address. When a host wants to send a packet to another host, it first needs to resolve the destination IP address to a MAC address. This is done by sending an ARP request to the network. The ARP request is a broadcast packet that contains the destination IP address. Any host that knows the MAC address for the destination IP address will respond with an ARP reply. The ARP reply contains the destination MAC address. The host that sent the ARP request can then use the destination MAC address to send the packet.
RARP
Reverse Address Resolution Protocol (RARP) is a protocol used in computer networks to resolve a physical machine address to an IP address. When a host boots up, it does not know its IP address. It must therefore use RARP to find its IP address. RARP works by sending a RARP request to the network. The RARP request contains the host's physical machine address. Any host that knows the IP address for the host's physical machine address will respond with a RARP reply. The RARP reply contains the host's IP address. The host that sent the RARP request can then use its IP address to communicate with other hosts on the network.
GARP
Gratuitous ARP (GARP) is a protocol used in computer networks to announce a host's IP address and MAC address to the network. GARP is typically used when a host's IP address or MAC address changes. When a host's IP address or MAC address changes, it sends a GARP packet to the network. The GARP packet contains the host's old and new IP addresses and MAC addresses. Any host that receives the GARP packet will update its ARP cache with the host's new IP address and MAC address.