Data link Layer
1] Data link Layer- Types of errors
In the data link layer of a communication system, errors can occur due to various reasons such as signal attenuation, noise, interference, and transmission errors. These errors can be categorized into three types:
Single Bit Error: A single bit error occurs when only one bit of data in a transmission is changed from its original value. This can be caused by noise or interference during transmission.
Burst Error: A burst error occurs when multiple bits in a transmission are changed from their original values. This can be caused by signal attenuation or interference during transmission.
Frame Error: A frame error occurs when the entire data frame is corrupted during transmission. This can be caused by physical damage to the transmission medium or by a synchronization problem between the sender and receiver.
In order to detect and correct these errors, various error detection and correction techniques are used, such as checksums, cyclic redundancy checks (CRC), and forward error correction (FEC).
2] Data link Layer framing(character and bit stuffing)
The data link layer in computer networking is responsible for transmitting data frames between devices over a shared communication medium. One of the key tasks of the data link layer is to divide the stream of data into smaller frames that can be transmitted efficiently over the network. This process is called framing.Framing is typically achieved using two techniques: character stuffing and bit stuffing.
Character stuffing involves adding an extra character to the data to differentiate it from the control characters used for signaling. For example, if the data being transmitted contains the control character "STX" (start of text), the data link layer would insert an additional character "DLE" (data link escape) before it. The receiver then knows to ignore the extra "DLE" character and only process the original data.
Bit stuffing, on the other hand, involves adding extra bits to the data to avoid confusion with the control bits used for signaling. In bit stuffing, the data link layer inserts an extra "0" bit after every sequence of five consecutive "1" bits. This ensures that the receiver can differentiate between the end of a data frame and the start of a new one, even if there are long sequences of consecutive "1" bits in the data.
Both character and bit stuffing are important techniques used in the data link layer to ensure that data frames are transmitted accurately and efficiently over the network.
3] Error detection & correction method
The Data Link Layer in computer networking is responsible for the reliable transfer of data between two network nodes. One important aspect of this is detecting and correcting errors that may occur during the transmission of data. There are several error detection and correction methods used in the Data Link Layer, including:Parity Check: Parity checking is a simple method of error detection. It involves adding an extra bit (called the parity bit) to each byte of data being transmitted. The value of the parity bit is such that the total number of 1s in the byte (including the parity bit) is either odd or even. If the number of 1s is odd and an error occurs during transmission, the parity bit will be incorrect, and the receiver will know that an error has occurred.
Checksum: A checksum is a more sophisticated method of error detection. It involves adding up all the bytes of data being transmitted and creating a checksum value based on the sum. The receiver then performs the same calculation and compares its checksum value to the sender's checksum value. If the values match, the data has been transmitted without error. If they don't match, an error has occurred.
Cyclic Redundancy Check (CRC): The CRC method is a more powerful error detection technique than the parity check and checksum methods. It involves adding a CRC code to the data being transmitted. The CRC code is generated by dividing the data by a predetermined polynomial. The receiver then performs the same division and compares its result to the sender's result. If the results match, the data has been transmitted without error. If they don't match, an error has occurred.
Hamming Code: Hamming codes are a type of error-correcting code. They involve adding extra bits to the data being transmitted to allow for the correction of errors. The extra bits are added in such a way that the receiver can determine the location and type of the error and correct it.
Overall, error detection and correction methods are essential for ensuring the reliability of data transmission in the Data Link Layer. Different methods may be used depending on the specific requirements of the network and the level of error protection needed.
4] Data link Layer Flow control
Flow control in the data link layer is a mechanism that regulates the rate of data transmission between two devices to prevent buffer overflows, data loss, and other transmission errors.The two primary methods of flow control in the data link layer are:
Stop-and-wait flow control: In this method, the sender sends a single data frame and waits for an acknowledgment (ACK) from the receiver before sending the next frame. The receiver sends an ACK to the sender to confirm that the frame has been received successfully. If the ACK is not received within a certain time period, the sender resends the frame.
Sliding window flow control: This method allows the sender to transmit multiple data frames without waiting for an ACK from the receiver for each frame. The sender maintains a window of frames that can be sent without acknowledgement, and the receiver sends an ACK for all the frames it receives successfully. The sender can adjust the size of the window based on the network conditions and the available buffer space at the receiver's end.
Flow control is essential in the data link layer to ensure reliable data transmission over the network. It helps to prevent network congestion, buffer overflow, and other issues that can result in data loss or corruption.
5] Protocols: Stop & wait ARQ
Stop-and-wait ARQ (Automatic Repeat Request) is a protocol used in telecommunications and computer networks to ensure reliable transmission of data over unreliable communication channels. It is a simple and efficient protocol that requires the receiver to send an acknowledgment (ACK) message to the sender after receiving a packet. The sender will only send the next packet if it receives the ACK for the previous packet.Here is a brief overview of the steps involved in the Stop-and-wait ARQ protocol:Sender sends a packet to the receiver
Receiver receives the packet and sends an ACK message to the sender
Sender waits for the ACK message before sending the next packet
If the sender doesn't receive an ACK within a specified time period, it retransmits the packet.
The protocol works by ensuring that only one packet is in transit at any given time, and the sender will not send another packet until it has received confirmation that the previous packet has been received.
Stop-and-wait ARQ is a simple and reliable protocol, but it can be slow and inefficient for long-distance communication. To improve efficiency, more complex ARQ protocols such as Go-Back-N ARQ and Selective Repeat ARQ are often used.
6] Go-Back- N ARQ
Go-Back-N ARQ (Automatic Repeat Request) is a type of error control mechanism used in communication protocols, particularly in the data link layer of the OSI model. It is a form of selective repeat ARQ, where multiple frames can be sent before receiving an acknowledgement.In Go-Back-N ARQ, the sender can transmit multiple frames, called a window, before receiving an acknowledgement from the receiver. The receiver acknowledges the receipt of a frame by sending an acknowledgement (ACK) back to the sender. The sender keeps track of the last frame that was successfully acknowledged by the receiver and retransmits all unacknowledged frames after that frame if a timeout occurs or if it receives a negative acknowledgement (NAK) from the receiver.
The sender maintains a sliding window of frames that can be sent without waiting for an acknowledgement. If the receiver receives a frame out of order or with errors, it discards the frame and sends a NAK for the expected frame number. The sender then retransmits all frames from that expected frame number and beyond.
Go-Back-N ARQ is a simple and efficient technique for handling errors in communication protocols. However, it requires a buffer at the sender and the receiver, and it can be inefficient in cases where errors are frequent or the network is heavily congested. Therefore, more advanced ARQ techniques such as Selective Repeat ARQ are often used in modern communication protocols.
7] Selective repeat ARQ
Selective Repeat Automatic Repeat Request (ARQ) is a type of error control protocol used in data communication. It is a variation of the Go-Back-N protocol and is used to ensure reliable data transfer over unreliable communication channels. In selective repeat ARQ, the sender sends multiple packets, and the receiver acknowledges each received packet individually.In selective repeat ARQ, the sender maintains a buffer of packets that have been sent but not yet acknowledged. When the receiver receives a packet, it sends an acknowledgment (ACK) back to the sender, indicating that the packet has been received successfully. The sender then removes the acknowledged packet from its buffer and sends the next packet.
If a packet is lost or corrupted during transmission, the receiver sends a negative acknowledgment (NAK) to the sender, requesting retransmission of the lost/corrupted packet. Unlike Go-Back-N, the sender only retransmits the lost/corrupted packet, not all the packets after it. The sender continues to send packets until it receives an ACK or NAK from the receiver.
Selective repeat ARQ provides a more efficient use of network resources than Go-Back-N, as only the lost/corrupted packets are retransmitted, which reduces the overall network traffic. However, it requires more complex buffering and processing at both the sender and receiver ends, which can increase the complexity and overhead of the protocol.
8] High-level Data Link Control
HDLC stands for High-level Data Link Control. It is a communication protocol used for transmitting data over serial links, such as leased lines or satellite links. HDLC is widely used in networking and is the basis for many other protocols, including LAPB (Link Access Procedure, Balanced), which is used in X.25 networks.HDLC is a bit-oriented protocol, meaning that it operates at the data link layer and deals with individual bits of data rather than bytes or characters. It uses a combination of flags, control characters, and data characters to establish and maintain a connection between two devices, to transfer data, and to detect and correct errors.
The HDLC protocol provides both connection-oriented and connectionless services. In connection-oriented mode, the devices establish a logical connection and exchange data in a synchronized manner. In connectionless mode, the devices exchange data without establishing a connection beforehand.
9] Point to Point Protocol
Point-to-Point Protocol (PPP) is a communication protocol used for establishing a direct connection between two nodes in a network. It is commonly used to connect a computer to an Internet Service Provider (ISP) over a phone line, cable, or satellite link.PPP operates at the data link layer of the OSI (Open Systems Interconnection) model and supports several network layer protocols, such as Internet Protocol (IP), Internetwork Packet Exchange (IPX), and AppleTalk. It provides a method for transmitting packets of data between two nodes, as well as error detection, packet framing, and link control.
PPP provides three main functions:
Link establishment: PPP uses a series of messages to establish a connection between two nodes, including negotiation of connection parameters such as authentication and encryption settings.
Authentication: PPP supports several authentication protocols, such as Password Authentication Protocol (PAP) and Challenge Handshake Authentication Protocol (CHAP), to verify the identity of each node before allowing access to the network.
Link termination: PPP provides a method for gracefully terminating the connection between two nodes, either by request or due to a failure in the network.
PPP is widely used in various networking applications, including dial-up connections, broadband Internet access, and virtual private networks (VPNs).
10] Multiple access protocols in data link network
Multiple Access Protocols are used in data link networks to allow multiple devices to access a shared communication channel simultaneously. There are several types of Multiple Access Protocols, including:Carrier Sense Multiple Access (CSMA): In CSMA, each device listens to the communication channel to check if it is busy before transmitting data. If the channel is busy, the device waits until it becomes free to transmit data.
CSMA/CD: CSMA/CD (Carrier Sense Multiple Access with Collision Detection) is similar to CSMA, but it includes collision detection. If two devices transmit data simultaneously, a collision occurs. The colliding devices detect the collision and wait for a random time before re-transmitting.
Time Division Multiple Access (TDMA): TDMA divides the communication channel into time slots, with each device allocated a specific time slot for transmitting data.
Frequency Division Multiple Access (FDMA): FDMA divides the communication channel into frequency bands, with each device allocated a specific frequency band for transmitting data.
Code Division Multiple Access (CDMA): CDMA allows multiple devices to transmit data simultaneously by assigning unique codes to each device. Each device uses its assigned code to encode its transmissions, and the receiver uses the same code to decode the transmissions.
Space Division Multiple Access (SDMA): SDMA divides the communication channel into physical areas, with each device allocated a specific area for transmitting data. This is commonly used in wireless communication systems.
The choice of Multiple Access Protocol depends on the specific requirements of the communication system, such as the number of devices, data rate, and channel characteristics.
Post a Comment
0 Comments