UNIT 2
DATA LINK LAYER AND MEDIUM ACCESS SUBLAYER
Error detection is the detection of errors caused by Noise or other impairments during transmission from the transmitter to the receiver. Error correction is the detection of errors and reconstruction of the original error free data or signal
The process of correcting errors in data that may have been corrupted during transmission or in storage. Data transmissions are always subject to corruption due to errors, but in video transmissions, error correction needs to deal with the errors but not retransmit the corrupted data.
Error correction that occurs in a channel through the detection of errors by the receiver: the receiver responds to any errors in a block by requesting the transmitter to retransmit the affected block. Backward correction requires a return channel, by contrast with forward error correction.
The most popular Error Detecting Techniques are:
- Single parity check.
- Two-dimensional parity check.
- Checksum.
- Cyclic redundancy check.
Block-based coding utilizes a drag-and-drop learning environment, where programmers use coding instruction “blocks” to construct animated stories and games. It's an entry-level activity, where kids can gain a foundation in computational thinking through visuals as opposed to coding that is based in text.
It normally involves three steps: division, substitution, and combination. In the division step,a sequence of bits is divided into groups of m-bits.
Block-based coding is a form of programming language where the developer issues instructions by dragging and dropping blocks. This helps to prevent syntax errors and developers do not have to memorize syntax to write code.
The Hamming distance between two vectors is the number of bits we must change to change one into the other. Example Find the distance between the vectors 01101010 and 11011011. They differ in four places, so the Hamming distance d(01101010,11011011) = 4.
Hamming distance refers to the number of points at which two lines of binary code differ, determined by simply adding up the number of spots where two lines of code differ.
'The minimum Hamming distance of a linear block code is equal to the minimum Hamming weight among its non-zero codewords'. (The Hamming weight of a codeword is simply the number of ones in it).
Flow control is meant for the proper transmission of the data from sender to the receiver. Error control is meant for delivering the error-free data to the receiver.
Flow Control: Flow control coordinates that amount of data that can be sent before receiving an acknowledgement.
- It is one of the most important duties of the data link layer.
- Flow control tells the sender how much data to send.
- It makes the sender wait for some sort of an acknowledgement (ACK) before continuing to send more data.
- Flow Control Techniques: Stop-and-wait, and Sliding Window
Error Control: Error control in the data link layer is based on ARQ (automatic repeat request), which is the retransmission of data.
- The term error control refers to methods of error detection and retransmission.
- Everytime an error is detected in an exchange, specified frames are retransmitted. This process is called ARQ.
Stop and Wait Flow control:
- The sender has to wait for an acknowledgment of every frame that it sends.
- Only when a acknowledgment has been received is the next frame sent. This process continues until the sender transmits an End of Transmission (EOT) frame.
- In Stop-and-Wait flow control, the receiver indicates its readiness to receive data for each frame.
Se Lective repeat protocol
This protocol(SRP) is mostly identical to GBN protocol, except that buffers are used and the receiver, and the sender, each maintain a window of size. SRP works better when the link is very unreliable. Because in this case, retransmission tends to happen more frequently, selectively retransmitting frames is more efficient than retransmitting all of them. SRP also requires full duplex link. Backward acknowledgements are also in progress.
Sliding window protocol
It is a flow control protocol. It allows the sender to send multiple frames before needing the acknowledgements. Sender slides its window on receiving the acknowledgements for the sent frames. This allows the sender to send more frames.
Piggybacking
Communications are mostly full – duplex in nature, i.e. data transmission occurs in both directions. A method to achieve full – duplex communication is to consider both the communication as a pair of simplex communication. Each link comprises a forward channel for sending data and a reverse channel for sending acknowledgments.
However, in the above arrangement, traffic load doubles for each data unit that is transmitted. Half of all data transmission comprise of transmission of acknowledgments.
Suppose that there are two communication stations X and Y. The data frames transmitted have an acknowledgment field, ack field that is of a few bits length. Additionally, there are frames for sending acknowledgments, ACK frames. The purpose is to minimize the ACK frames.
The three principles governing piggybacking when the station X wants to communicate with station Y are −
- If station X has both data and acknowledgment to send, it sends a data frame with the ack field containing the sequence number of the frame to be acknowledged.
- If station X has only an acknowledgment to send, it waits for a finite period of time to see whether a data frame is available to be sent. If a data frame becomes available, then it piggybacks the acknowledgment with it. Otherwise, it sends an ACK frame.
- If station X has only a data frame to send, it adds the last acknowledgment with it. The station Y discards all duplicate acknowledgments. Alternatively, station X may send the data frame with the ack field containing a bit combination denoting no acknowledgment.
Random Access and multiple access
Random Access Protocols is a Multiple access protocol that is divided into four categories which are ALOHA, CSMA, CSMA/CD, and CSMA/CA. In this article, we will cover all of these Random Access Protocols in detail.
Different Random access methods
- Aloha: It uses a very simple procedure called multiple access (MA).
Aloha is further of two types:- Pure Aloha
- Slotted Aloha
- CSMA: Aloha is improved with the addition of a procedure that forces the station to sense the medium before transmitting. This is called carrier sense multiple access.
CSMA is further of two types:- CSMA/CD
- CSMA/CA
Multiple access protocols are a set of protocols operating in the Medium Access Control sublayer (MAC sublayer) of the Open Systems Interconnection (OSI) model. These protocols allow a number of nodes or users to access a shared network channel. Several data streams originating from several nodes are transferred through the multi-point transmission channel.
The objectives of multiple access protocols are optimization of transmission time, minimization of collisions and avoidance of crosstalks.
Categories of Multiple Access Protocols
Multiple access protocols can be broadly classified into three categories - random access protocols, controlled access protocols and channelization protocols.
Random access protocols assign uniform priority to all connected nodes. Any node can send data if the transmission channel is idle. No fixed time or fixed sequence is given for data transmission.
The four random access protocols are−
- ALOHA
- Carrier sense multiple access (CMSA)
- Carrier sense multiple access with collision detection (CMSA/CD)
- Carrier sense multiple access with collision avoidance (CMSA/CA)
Controlled Access Protocols
Controlled access protocols allow only one node to send data at a given time. Before initiating transmission, a node seeks information from other nodes to determine which station has the right to send. This avoids collision of messages on the shared channel.
The station can be assigned the right to send by the following three methods−
- Reservation
- Polling
- Token Passing
Channelization
Channelization are a set of methods by which the available bandwidth is divided among the different nodes for simultaneous data transfer.
The three channelization methods are−
- Frequency division multiple access (FDMA)
- Time division multiple access (TDMA)
- Code division multiple access (CDMA)