The data link layer isalso responsible for:· Encapsulation of network layer data packet intoframesIn order for thedata to be transmitted to other devices, the protocol data units (PDUs) fromthe upper layers or application layers of an OSI model must be passed down tothe next lower level for transmitting and eventually passed to the physicallayer as it is the only layer with hardware connection.
The data is passed downfrom the 7th layer where it has a header and the data to the 6thlayer where the 6th layer’s header is added to the 7thlayer’s header and data and then passed down to the 5th layer where5th layer’s header is added to the 6th layer’s data. Itis then passed down to the 4th layer (Transport layer) which is oneof the most important places where encapsulation occurs where the virtualcircuit is set up. The two main transfer layer protocols, TCP or UDP allow datapassage to the next lower network layer, 3rd layer by attachingTCP/UDP headers. The data stream from the above layers is broken into headersat the transport layer which is also called ‘segment’. Each segment is sequencedso that receiver gets the data stream in the same way as it is transmitted fromthe sender. The data sometimes can be too large to be transmitted, in that casethe data is ‘fragmented’ by which an IP datagram may contain only a portion ofdata received from the upper layer.
And many such datagrams put together willfrom the data originally sent from the above layer. The receiving device’stransport layer reassembles the data by combining all these datagrams. In the network layer,the data is again encapsulated into the body of an IP message which is usuallycalled as IP Datagram or IP packet. Thisprocess of encapsulating at the network layer is also called ‘Packaging’. Here a header is added to the segmentreceived from the above layer and then pass it down to the data link layer. The3rd (Network) layer and the 4th (Transport) layer worktogether to build the data steam to be sent to the destination, however theycannot directly place their protocol data units on the destination and it hasto pass through or be transmitted through the lowest layer. The data layer thenencapsulates the IP datagram or IP packet from the network layer into a frameby adding a header which has the source MAC (media access control) address anddestination MAC address.
If the destination is not on the same local network,then the frame is forwarded to the router to be transmitted through an interconnected network. The information in the IP datagram’s header allowstransmission across the internetwork and ensure the datagram delivery. It hasinformation such as the destination’s address, identification of the type ofthe frame and control bits. Theframes are handed to the lowest level of the OSI model, the physical layer.
Theframes which are the logical representation of digits 1s and 0s, are thenencapsulated to digital symbols at this physical layer and punt on the networkmedium to be transmitted to the destination.Once the sender is donewith the transmission of the data, the receiving device at the destinationestablishes synchronization using the digital signals and then extracts 1s and0s. the 1s and 0s are built into data frames at the receiving end’s data linklayer and a Cyclic Redundancy Check (CRC) is performed to check the outputgenerated against the output in the received data frame from the sender. If theinformation matches, then the data packet information is processed, if there isno match then it is rejected. This process is called decapsulation orde-encapsulation.
The receiving end processes the packet and sends it to thenetwork layer where IP address is validated and checked against what is sentfrom the sender. If the IP address matches, the segment is extracted from thepacket. It is then sent to the layer above it which is the transport layer,where the data stream is rebuilt, and an acknowledgment of delivery is sent tosource device that each segment is received without any errors. · The data link layer also ensures error detectionand correction. In order to detect and identify the error and then to correctit, the data link layer engages in the process where the sender device appendsan error detection code to the frame which is usually in the form of bits and thentransfers the data frame to the receiver.
Once the receiver starts decoding thedata and rebuilds the frame, it recomputes the error detection code and iftheir code matches the sender’s code, that means that frame is receivedcorrectly, and it is error free.· Flow Control: The data link layer ensures flowcontrol between sender and receiver so that if the receiver is slower atprocessing than at receiving and sender continuously sends frames, there is apossibility of frames to get lost in that process. Data link layer makes sure boththe sender and receive are on the same pace to transmit and receive. IEEE 802 standards are used in manyareas of computer networking like token ring, VLANs, LAN, bridging etc. Each ofthe standards focus on one area of networking. Some examples are:Ø IEEE802.1(LAN/WAN) – It is responsible for managing the local and other networksand ensuring the connection between them is established.
It has many sunstandards in it. It is also responsible for creation of the networks andenables configurations settings to enable transfer through multiple bridges orroutes.Ø IEEE802.
3(Ethernet) – It provides its support to the 802.1 standard and enablestransfer with access control and collision detection by which it senses ifthere are other frames being transmitted, so it stops and sends signal beforeretransmitting again or resuming the transmission again.Ø IEEE802.
4(Token Bus) – this is the concept of virtual ring created for successfultransmission of data. It is defined as the nodes carrying the token ring can onlytransmit data; hence the token ring is passed across all nodes that arranged inthe form of a virtual ring. Protocols were added to this to ensure success.Ø IEEE802.
11(Wireless LAN) – It can popularly be called as Wi-Fi creating thepossibility of many people accessing the local network if they are in the rangeof the network. As multiple devices attempt to use a mediumsimultaneously, there is a high possibility of frame collisions to occur. Theprotocols which are a set of rules to govern the communication are located ateach layer are responsible for passing down the data from the upper layer tothe layer below it. The data link layer houses the layer 2 protocols. TheData-link protocols have many specific mechanisms in place to define how theconnected devices detect and identify the errors and what errors schemes theyuse to recover from such errors or data collisions during transmission.
Thesedata link protocols are responsible for communication between two nodes in theform of bits and bytes on the same local area network or neighboring/adjacentnodes in the wide area network. There are multiple ways to connect the nodes ordevices to transfer the data as there are the data link protocols. Based on thetechnology and other factors, the data link layer uses diverse set of protocolswhen encapsulating the data into frames. Data link layer cannot encapsulateusing a universal protocol for various IP datagrams or packets coming fromvarious WAN technologies. The factor that classifies them is the way thedevices are connected. Point-to-pointNetworks: The devices are connected to by point-to-point links.Broadcast Networks: Theconnected devices share a common link or cable.
AsynchronousTransmission – Each bit or character is transmitted independent of otherbits/characters. The characters are separated by a start bit in front of eachcharacter and a stop bit at the back of each character as there is no clockinformation. The start bit signals the receiver that bits of a character are coming,and the stop bit signals the receiver that the character has been received andresets the receiver for the next start bit to be recognized.Typesof Asynchronous protocol:Xmodem: Xmodemis communication protocol which is half duplex and mostly used for filetransfer.
It is mainly used to transmit files between two computers when theyuse modem. Xmodem manipulates the data into packets that are sent by receiver.Files are transferred one packet at a time by using ‘check sum’ and waits forfile confirmation receipt. All that has communication package has XModemprotocol. It can be implemented in both software and hardware, and used todetect errors. The main disadvantage with Xmodem is data transmission speed.Ymodem:Ymodem is successor to Xmodem and was designed to give betterperformance.
It is mainly used to transmit files between twomicrocomputers when they use modem, and it has bigger packet size when comparedto Xmodem. Also, the wait time is less between file transmissions to confirmthe file receipt when compared to Xmodem. It process the data transfer inbatches. Data transmission speeds are faster in Ymodem than Xmodem,and it cantransmit exact file size. It also sends file name as part of file transmissionhence we are not required to file name every computers time.Zmodem: Zmodem was designed for morereliability. It has sliding window support for high performance. It is alsoused for faster file transmission rates and error findings when compared toXmodem.
It is similar to Ymodem where it won’t wait for file confirmationreceipt. We can able to alter or cancel the file transmission anytime usingZmodem. It is mostly used in bulletin board systems. It provides crash recoverywhen something happens.Blast: It was one ofthe most important asynchronous protocols during the 80s with features like,error detection, retransmission and data delivery assurance etc. It allows atwo-way file or data transfer allowing for a faster communicaton.
Kermit: It is very similarto XMODEM, but better in cases of poor connections. It allows data transfer ina two-way direction simultaneously or half duplex by which sending andreceiving is done one after another. It uses a sliding window protocol by whichdelivery acknowledgement is necessary. The packets of data are assigned asequential number which the receiver uses to form the data stream in thecorrect order and identify the missing ones or duplicate ones, hence bettererror detection.Synchronous DataProtocols: These are categorized into two types. 1.Character-oriented protocols – It is also called as byte-oriented protocols.
The data frames or data packets are represented in the form of bytes orcharacters. Example:§ Binary Synchronous Communication (BSC) – Itallows a half-duplex communication by which there is two-way communicationbetween the devices but not at the same time. It can be used withASCII, EBCDIC, and Six Bit Transcode.
It includes control characterswhich have information in the form of code words or data words. Itregulates link control by which it tries to minimize the errors and alsoacknowledge each and every data transfer, it alsoregulates flow control by ensuring that both the sender andreceiver are in sync and the receiver is not overwhelmed with messages and tryto detect error and correct if possible using theerror control mechanisms.§ Digital Data Communications Message Protocol(DDCMP) – It works both in asynchronous and synchronous communications.
Thisprotocol is situated above the physical layer and is responsible for definingon the structure, the data, the sequencing of data into blocks etc. It works onboth point to point link or multipoint links by establishing data paths fortransmission of data. It is mainly focused on integrity of the data and thedata sequencing. 2. Bit-oriented protocols – The data frames or datapackets are represented in the form of bits. Examples: § High-level Data Link Control (HDLC) – Thebit-oriented protocols are in someway related to HDLC.
It works both on pointto point and multi point networks in both half duplex and full duplex (two-waycommunication simultaneously) way of communication. It is mainly concentratedon establishing the reliable communication between the sender and the receiverto transmit the data and acknowledgement of the success of the data transfer.The data is encapsulated here into a frame where a header is attached which hasaddress information at the beginning of the frame and a trailer at the end ofthe frame which contains cycle redundancy code for possible error detectionduring the transmission.
The frames at this data link layer are separated bysequence of bits which are also known as ‘flags’.§ Synchronous Data Link Control (SDLC) – It wasbasically formed to replace binary synchronous protocol. It is also concernedwith successful transfer of data between the sender and receiver. It uses theprimary and secondary station model for communication where it has full controlof the link and it sends commands to other secondary stations and sometimesrespond to the commands. It works well with multi point networks but can alsobe used on point to point networks.§ Link Access Procedure (LAP): It is developedoriginally from HDLC.
It mainly focusses on transmitting error free data andensuring that the data is received and arranged in the correct sequence. It wasrenamed later to Link Access procedure balanced (LAPD). Types of LAPs are: i. Link Access Procedurefor Modems (LAPM) – It is anerror control protocol which is concerned with error free transmission of dataand retransmitting it, if there are any errors. It sends data frames with aheader added in the beginning and a trailer in the end which has the redundantcode (Cycle code redundancy) to detect errors and wait for the acknowledgmentand retransmit the data through ‘Automatic Repeat Request’ (ARQ) to ensure successfultransmission.
ii. Link Access Procedures,D channel (LAPD) – It is concerned witherror detection and sequencing of the frames. It forms the second layer ofprotocol in the D channel of ISDN (Integrated Services Digital Network) whichhouses the control information and various signaling related data. iii. Link Access Procedurefor Frame Relay (LAPF) –It is heavily based on SDLC.
It focuses on communication standards in terms ofsignaling between physical and data link layers of source computer to thedestination through routers and frame relay switches.