0% found this document useful (0 votes)
31 views12 pages

Data Link Layer I

Computer Networks Unit 3 DLL notes

Uploaded by

Shruti Gupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
31 views12 pages

Data Link Layer I

Computer Networks Unit 3 DLL notes

Uploaded by

Shruti Gupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 12
Pata Link Layer—1 Bw vided to the network layer, So, it can be said that physical layer) and service provider (to network oe data link layer is both a service user (from services Offered by the Data Link Layer se data link layer accepts service from the physical 0 rye Theses testi a de serviges to the network layer. This includes petted rele of data ink ye i to network layer on source Pothine tothe network layer on destination machine, Vari : oi jnacknowledged Connect Ghana se --eaia neal provided by data link layer are: + Acknowledged connectionless service. + Acknowledged connection-oriented service. In unacknowledged connectionle: ii i. : a acknowledgement is sent by the So ee ey eee ee - Gyeto noise on the line, no endeavour is made to recover from trols fate deta ik ee service is best suited for real-time traffi ns nthe C2 Bi eed of service 1s : or real-time traffic, such as speech. The problem with this service is, reliability— most LANs use this service in the data link layer. in terms of reliability, acknowledged connectionless service is preferable. When this service is offered, still no direct connections are established between source and destination machines, Put each frame sent is individually acknowledged. ‘The most sophisticated type of service that the data link layer can provide to the network layer is acknowledged connection-oriented service. Here, before transferring any data, first direct connection i: established between the source and destination machines. Each frame seve Ove" the connection is numbered and acknowledged if properly received by the destination ‘machine. When connection-oriented service is used, data transfer occurs in three distinct phases: «Phase 1: Connection is established between the source and destination machines. 2 phase 2: Variables and counters are initialized on both sides 10 keep track of frames. One or more data frames are transmitted. + Phase 3: The connection is released. Framing The data link layer uses the services of the physical layer to be able to provide services to the network : i . * ane i vides the continuous bit stream that physical layer uses into units: layer. The data link layer divides the co it as a field called frame check sequence frames, and tes the checksum for each frame and pu ame (FCS) fe faae format, i.e. the way bits are organized in ie frame, Atthe destination, the checksum i the frame arrives. This facilitates eo ection, si oe ees boundaries as @ synchronous bit pattern arrives 1s called framing. watieg the bit oa ae frames involves considering a lot of factors, One way (0 achieve this framing is insert time gaps between frames. But there A chances of these gaps getting squeezed or others getting ingen transmission. Since it is not feasible to use timing 10 ‘mark the frames, other metho have been devised. ; , ren devine pamung meds ae maton Pl Dat ink tayer=1 Lh 3 Vt SEFRI LEN CG agian a 2 haus oF8 i TB Wea (B/G ey aa I m orlrrod 1 wm OLLVOTUVIT OL PAP rorni dort iy ped Stufled bits © OL LOUt ta a aa a Wt Tt Wohnen ae Fig. 17.2. Bit Seuffing(a) The Original Data. (b) The Data Appear on the Line (o) Te Bat ity are Sred HON ts shee eae Ta ea physical Layer Coding Violation if encoding on the physical medium contains some redundancy, then this method ean be used for: sraming. In this method an invalid sequence, in eee ee sant and end of the frame The receiver is able to detect the encoding scheme code violation and thus finds the b frame. In Manchester encoding, each bit is specified by a high-low or low-high transitie or low-low transition would be a violation. ® Error Control Transmitting bit st producing errors in the bits and thus data. Error control defines how a sender or: for errors and what steps should be taken to correct them. There are two techniques of implementing error control, one at the sender's receiver's end. These are called forward error control and reverse error < ‘There can be two kinds of errors; Content Error Content error, where *I" bit is received as ‘0 Flow Integrity Error Flow integrity error refers to missing block impairments or having been delivered to wrong destination. Additional checkbits are introduced in data to de methods available. Sometimes, itis easier to ask for a conection , ’ Thus, the content errors are detected using retransmission of the frame. the flow control mechanisms. The sender and receiver acknowledgment Acknowledgments are of receipt of data frame. If & treams over a communication channel suffers from a number of Data Communication and Computer Networks ling from t sknowledgement frame travel 1 ade for this acknowledgement pach ossible that th n the sender will wait indefinitely Further. itis pt Jost; then i sed time out fail is used. ime and then if it does not receive an vi certain time an en ™ ‘ oh ‘The sender waits for a te cctrnamits i THIEN i ‘ive the data frame that the receiver did not rece! ame and probe. jie. instead of the data packet missing, it was the acknowled; comupted, so now the receiver will be burdened by duplicate copies of thes this problem, sequence number is added to each packet so that the recei' packet asa duplicate one and discard it Flow Control The two machines communicating could be of different configurations, transfer rate. A sender may be sending data faster than the receiver is able t receiver incapable of handling it, resulting in data loss. To strike a balance bet sender sends data and the rate at which the receiver accepts it, a techmiqui utilised. This control is in the form of an acknowledgement (ACK) which i This acknowledgement serves the purpose of error control by ‘implicitly spec data packets have been received and it also signals the sender to transmit | commonly used flow control mechanisms are stop-and-wait and sliding wind in detail in the next chapter. (4) Link Management ‘The process of data transfer between two devices consists of the follox Connect Phase Connect i i phase involves functic i between the two devices. ae an Establishment Phase Link establishment phase includes ‘ink, call the other end, and set the mode of data transfer, Data Transfer Phase Data transfer phase covers exchange Termination Phase Termination phase consists of processes Clear Phase Clear hase: i . the to devices. Phase consists of functions concern Networks may work i mary. the different configuration, crea ance DATA LINK PROTOCOLS —— Pata Link Layer—T #2 |. Asynchronous protocols 2, Synchronous protocols Asynchronous Protocols In asynchronous protocol, cach character is treated as an independent bit stream. All these protacols mainly used in modems. The main disadvantage of this scheme is that it issow Wecaase eae spaces between frames as each frame starts with a start bit and ends witha stop bit. ‘Some asynehronous pwoeols are: XMODEM, YMODEM, ZMODEM, BLAST, Kermit, cic. —_ Asynchronous protocols are simple and easy to implement. Some asynchronous protocols are described below XMODEM jn 1979, Ward Cristiansen designed a file transfer protocol, known as XMODEM, basics jele-communication between computers. XMODEM is a half-duplex stop and wait ARQ f XMODEM frame format, the first field is Start Of Header (SOH) field and has the ler ‘The second field is header field of length two bytes. The fixed data field holds 128 bytes. text, boolean, ASCH, etc.). The last field is Cyclic Redundancy Check (CRC) field checking in the data field only. (=) OL Oe Je Header—=| _ [+—Data: 128 bytes ————+ 2 bytes ’ Fig. 17.3 XMODEM Frame Format es YMODEM een ‘ese i ‘YMODEM frame format is similar to XMOI except for one thing. ‘ 1024 bytes long. For error checking procedure it uses ITU-T CRC-16 codes. In multiple files can be sent simultaneously. . ZMODEM a ZMODEM protocol combines the features of both the XMODEM and BLAST BLAST is Blocked Asynchronous Transmission Protocol. Its more uses full-duplex operation with sliding window flow eontrol KERMIT Kermit is one of the most widely used asynchronous Protocol, Synchronous Protocols Synchronous protocols take the Protocols are of two types? |, Character Oriented P 2 Bit Ori ‘The CHARACTE and Computer Networks pata C ‘ommunication ili sections. re described in etal in the followin sect are des D proTOcoLs known as byte oriented protocols that inte one byte (oF eight bits). s an addition t0 existing data frames. code words carry de words. These The most popular character oriet se oo proocols p ORIENTE! protoco eparately of & in the form of CO* \d line discipline. BSC). i xt and US frame racer a information can Be inserte\ vs, this information iS control, error control an’ Wt vynchronous Communication ( (BSC) ronous Communication In 1964, IBM developed a popular character oriented protocol for data link layer Synchronous Communication (BSC), for both point-to-point and multipoint con half-duplex operation using stop-and-wait ARQ flow control and error control mect Control Characters The standard control characters use Table 17.1 Control Characters for BSC provoc flow Binary S Binary Synch Jin BSC frame ae given in TaBIEAIE Character ASCII Code Function ae Bs = : Good even frame received or ready te Ae ote Good odd frame received ee ae Data transparency marker an ae Request for a response Sender terminating ETB E ae ae End of transmission block; ACI ns at End of text in a message aie mn End of intermediate block i xo eae Bad frame received or a DLE and < a ae Urgent message STX STX * SYN STK and DLE an NQ BSC Frames BSC frames Olcee te (ii) Data frames * Control Frames Contro fray _— Data Link Layer—1 wy Control frames are used for the following, three purposes: {i) To establish connections (ii) For flow control and error control and (ii) To terminate the connections Dati Frames. The dnta frames begin with two Fig. 17.4 BSC Control Frame or more SYNC (Synchronization) characters. These characters notify the receiver that the S|S|S E new group of data is about to begin. y|t| daa |r} Bee | Usually, there must be some sort of infor- NIN|X x i out the address of sending and receiving device. So, the header field is used Fig. 17.5 A Simple BSC Daca Frame for this purpose: The last field is BCC (Block Check Count). Tg] g fg) Ts]? [ey 0 used for error detection. A BCC field can bea cne-eharacter Longitudinal Redundadey iit) /c/aese a) aa a Check (LRC) or’ 4 two-chatacter @yelio. (S012) //= linia is Latmermais YC Redundaney Cheek (CRC). BIT ORIENTED PROTOCOLS Bit oriented protocols are more useful than character oriented protocols. The most important data | bit-oriented protocol is HDLC (High-level Data Link Control) protocal.. HDLC was developed by ISO and is one of the most common data link, oriented protocol and supparts both palf-duplex and full-duplex communication. In s are treated as bit streams and not as byte values, 5 - snake HDLC protocol applicable to various possible network configurations, hres been defined. These are primary, secondary and combined stations. Primary Station ‘The primary station manages the link, The Station asking if it has data to send. If so, the secondary station § ‘ext secondary station, Primary stations may also establish and Secondary Station secondary station responds t0 the ‘tions that primary issues are called corm and the | Secondaries do not have the capability to issue eC Other Control Characters < o Fig. 17.6 A BSC Frame with 2 Header Combined Station “They ean act both es pHMmar Sommands and send responses. Data Transfer Modes in HDLC Stations running HDLC can: Normal Response sti Jink, one primary © In Multipoint ink point NRM. civesan example of mult Station Fig. 17.8 Multipoint NRM This mode is most common for p ‘t command but it is more independ n without any ex} ‘Asynchronous Response Mode (ARM) though a secondary cannot issue an explici ie. it can send data or control information to the primary station “Asynchronous Balanced Mode (ABM) It is used for combined stations. B commands and give responses (refer Fig. 17.9). Commands and Responses [sf ‘Commands and Responses The Modes of Operation in HDLC ‘The modes of operation in HDLC are: Normal Disconnect Mode (NI : DI iar setting commands are mae Can aa Se Primary station, a secondary Asynchronous Disconnected, enter asynchronous response Mode bee ) When secondary sation can equst the primary sation toe re Inidatzation Mode(IM) Operational by a primary station if it finds oe unable to function properly, abnormal Data Link Layer—I Frame Format HDLC uses oe transmission 0 all transmissions are in the form of frames. There are basically use oes of HDL frames, i¢. Information frames (frames), Supervisory frames (S-frames) and Van ed eee Each is a minor variation of a single frame format. This frame sontains flag, address ntrol fields as a head : on ae ler, data field, FCS (Frame Check Sequence) and flag Number of bits: Variable 16 or 32 8 Fig. 17.10 HDLC Frame Format ‘The flag field marks the beginning and end of each frame and is specified by the bit pattern 01111110. pit stuffing (as discussed earlier) can be used to overcome the problem of this pattem occurring as data. The address field can be of 8 or 16-bit and specifies the address of the destination. This field occurs in bit is called extended format. The choice of the format (standard or the above two sizes, ic decided when the link is established. If the secondary station is sending the frame, the address field contains the identity of the sender. In some C0368, the address field might contain a broadcast address fall's) implying that the frame is meant for all secondaries i also be standard and extended, i.e. 8 or 16-bit long commands. Its contents vary according to the 1yP® of first one or two bits define the frame tyPe- - Number of bits: 1 3 1 a ial (a) Information frame Number ofbits: 1! pata com! . . er, The data field contains the da ™ Fit ame iS used only to convey contr ce ion, THs field may Be in 8 mer “i Ne nis a 16-bit field usin, e Roane of pits. Most commo! .d forma es : Information Frames (-Frames) sean etd UsgONE foe used primarily (0 transfer information in Ha ic Goel a Ta ec ee window. it and next three bits are th i Ba stb frame is‘ bits are trol field of n james The ist iO ty () ad fit Bt ise Poll/Final er i F ses e ie bei 3 sare of the frame Pye by the primary station and F signifies the 7 me comet Ss ae three pits specify the sequence number of the ac nowledgé The last thre : » and is represented Dy NV (R)- Frame (S-Frames) station ‘on the J-frat Supervisory This frame has no data field ; g and requests for retransmission The first two bits I that can ake RR (Receive Ready), RNR (Receiv® Not Ready), REJ (Reject) and! acknowledgements. The fifth bit is (P/F) bit and last three bits are the sequence next frame: RR (00) A receiver sends this frame wI acknowledge the receipt of frames. and is used for sending flow and error s of control field are hhen it is ready to accept inform: i .e when it is not ready to receive further ff RNR (10) Axeceiver sends this fram of empty buffers or some error in the link. REJ(O1) Thisissimilac to negative acknowledgements. Itisa request f starting from the number specified in NV (R). SRE] (11) \c requests that the sender retransmits the frame whose n Unnumbered Frames (U-Frames) ‘These establish how the i y protocol will proceed. link mangement nde seting ik a ae aa its for TYPE field. The fifth bit is (PIF) bit and th ee e unnumbered function bits). a Procedures of HDLC HDLC operation consists sists of th frames, It involves the following Neel me Initialization : It involves signallin; i ig the other side requested along with the length of re ‘Data Link Layer B quest it sends back an unnumbered acknowledge (UA) frame to primary cise a (DM) disconnected voge frame is Se. Data Transfer poth sides after connection establishment are ready for data transfer, Bs ides frames qarting with sequence number 0, N(R) and N(S) elds of J-frame are ee ie i = flow control implementation Sequence number is modulo 8 or 128 depending on it being 4 or 7 bit long. ve isthe acknowledgement frame and an indication as to which f-frame the eee next. 5- wees are also used for error and flow control, a The RR, REJ, RNR, SREJ are all used for this purpose, connect Link disconnect 18 similar to link connect. The secondary sends an unnumbered acknow] ie the F bit set to “I? in response to the (DISC) disconnect frame issued by the SEE ve Ghility of primary station to ensure that all frames have been received by the receiver correctly the link 1s disconnected. Other Bit-Oriented Data Link Protocols

You might also like