CSIS 6251 CSIS 625 Week 6 Data Link Layer Copyright 2001, 2002 - Dan Oelke For use by students of CSIS 625 for purposes of this class only.

Slides:



Advertisements
Similar presentations
CH. 7 Data Link Control. Requirements & Objectives of Data Link Control Frame Synchronization Flow Control Error Control Addressing Control and Data on.
Advertisements

Data Link Protocols(HDLC & PPP). Data Link Protocols The set of specifications used to implement the DLL. DLL Protocols Synchronous Protocols Character-oriented.
HIGH-LEVEL DATA LINK CONTROL (HDLC) HDLC was defined by ISO for use on both point-to-point and multipoint data links. It supports full-duplex communication.
William Stallings Data and Computer Communications 7th Edition
Multiple access What if multiple machines are sharing the same link?
ICSA341 Data Communications and Computer Networks 1 Data Link Control •General principles.
Chapter 11 Data Link Control (DLC) Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Data and Computer Communications Updated: 2/9/2009.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Chapter 11 Data Link Control and Protocols.
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Data Link Control Slide 1 Data Link Control Chapter 7.
Piggybacking A method to combine a data frame with ACK. Station A and B both have data to send. Instead of sending separately, station A sends a data frame.
11-6 HDLC High-level Data Link Control (HDLC) is a bit-oriented protocol for communication over point-to-point and multipoint links. It implements the.
Data Link Control Protocols Data link control protocol Provides a layer of control between systems on a transmission medium referred to as data link. DLC.
11-6 HDLC High-level Data Link Control (HDLC) is a bit-oriented protocol for communication over point-to-point and multipoint links. It implements the.
William Stallings Data and Computer Communications 7 th Edition Chapter 7 Data Link Control Protocols.
CSIS 6251 CSIS 625 Week 4 Statistical TDM, Traffic Engineering, Error Detection & Correction Data Link Layer Copyright Dan Oelke For use by students.
1 K. Salah Module 4.0: Data Link Layer The Logical Link Control (LLC) sublayer –Framing –Flow Control –Error Control The Media Access Control (MAC) sublayer.
Chapter 9: Data Link Control Business Data Communications, 4e.
Studying Local Area Networks Via Media Access Control (MAC) SubLayer
Networks: Local Area Networks1 LANs Studying Local Area Networks Via Media Access Control (MAC) SubLayer.
Semester EEE449 Computer Networks The Data Link Layer Part 2: Media Access Control En. Mohd Nazri Mahmud MPhil (Cambridge, UK) BEng (Essex,
Example Data Link Protocols Quick review Reference Models? Layers? Flow Control? Bit stuffing? Connection Oriented? Synchronous transmission?
Data Link Protocols Asynchronous Protocols Synchronous Protocols
Gursharan Singh Tatla DATA LINK PROTOCOLS 24-Mar
Link-Level Flow and Error Control
Network Technology CSE Network Technology CSE3020 Week 6.
D ATA L INK L AYER By Dr. Nawaporn Wisitpongphan.
Data and Computer Communications Eighth & Ninth Edition by William Stallings Chapter 7 – Data Link Control Protocols.
McGraw-Hill © The McGraw-Hill Companies, Inc., 2004 Chapter 12 Multiple Access Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction.
Data Link Control Protocols
Data Link Control Protocols Dr. Muazzam A. Khan. Flow Control Ensuring the sending entity does not overwhelm the receiving entity —Preventing buffer overflow.
Aegis School of Telecommunication Chapter 7 Data Link Control Protocols Telecom Systems I by Dr. M. G. Sharma, Phd.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction.
William Stallings Data and Computer Communications 7th Edition
Data and Computer Communications Ninth Edition by William Stallings Chapter 7 – Data Link Control Protocols Data and Computer Communications, Ninth Edition.
Data and Computer Communications Tenth Edition by William Stallings Data and Computer Communications, Tenth Edition by William Stallings, (c) Pearson Education.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Data Link Control and Protocols.
1 Kyung Hee University Data Link Protocols. 2 Kyung Hee University 11 장 Data Link Control and Protocols 11.1 Flow and Error Control 11.2 Stop-and-Wait.
Computer Networks Module 3: Data Link Layer (Framing) Dr. Vikram Shete St. Francis Institute of Technology.
CS3505: DATA LINK LAYER. data link layer  phys. layer subject to errors; not reliable; and only moves information as bits, which alone are not meaningful.
Chapter 6 Multiple Radio Access
Chapter 11 Data Link Protocols A data link protocol is a set of specifications used to implement the data link layer [A protocol is the set of rules or.
Chapter 11 Data Link Control
Eighth Edition by William Stallings Chapter 7 – Data Link Control Protocols Data Link Control Protocols need layer of logic above Physical to manage exchange.
Data Link Layer: Data Link Control : Data Communication and Computer Networks Asst. Prof. Chaiporn Jaikaeo, Ph.D.
DATA LINK CONTROL PROTOCOLS. 2 Introduction Data link control layer – often abbreviated simply to data link layer – is concerned with the transfer of.
CIS : Data Link Control. Flow Control Ensuring the sending entity does not overwhelm the receiving entity —Preventing buffer overflow Transmission.
LECTURE9 NET301 11/5/2015Lect 9 NET DYNAMIC MAC PROTOCOL: CONTENTION PROTOCOL Carrier Sense Multiple Access (CSMA): A protocol in which a node verifies.
Data Link Protocols ผศ.ดร. อนันต์ ผลเพิ่ม
EE 122: Lecture 6 Ion Stoica September 13, 2001 (* this talk is based in part on the on-line slides of J. Kurose & K. Rose)
FIT – Monash University High-Level Data Link Control
Data and Computer Communications Data Link Control Protocols.
1 The Data Link Layer A. S. Tanenbaum Computer Networks W. Stallings Data and Computer Communications Chapter 3.
11.1 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 9: Data Link Control Business Data Communications, 4e.
Data and Computer Communications Data Link Control Protocols.
THE MEDIUM ACCESS CONTROL SUBLAYER 4.1 THE CHANNEL ALLOCATION PROBLEM 4.2 MULTIPLE ACCESS PROTOCOLS.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Chapter 11 Data Link Control and Protocols 1.
Data Communications Data Link Layer.
Data Link Control Protocols  need layer of logic above Physical  to manage exchange of data over a link frame synchronization frame synchronization flow.
2.10 Flow and Error Control Before that ...
Chapter 11 Data Link Control and Protocols
Part III Datalink Layer 10.
3.2 Data Link Layer : Error & Flow Control
CIS 321 Data Communications & Networking
Data Link Layer: Data Link Control
Chapter 10 Data Link Control
Flow control refers to a set of procedures used to restrict the amount of data that the sender can send before waiting for acknowledgment. Error control.
William Stallings Data and Computer Communications
Multiple Access Control (MAC) Protocols
Presentation transcript:

CSIS 6251 CSIS 625 Week 6 Data Link Layer Copyright 2001, Dan Oelke For use by students of CSIS 625 for purposes of this class only.

CSIS 6252 Overview Data Link Layer –Line Discipline –Flow Control –Error Control Byte Oriented Link Control Bit Oriented Link Control –HDLC MAC Protocols –Wireless –Ethernet

CSIS 6253 Line Discipline Line Discipline defines who can send and when they can send. Simplex system –Who is always known –When is usually any time In a duplex system, the sender should send only when it knows that the receiver is ready. –This is in theory, but in practice it only sometimes works this way

CSIS 6254 Line Discipline Three phases of communication –Establishment of communication Determines who is sending to whom –Data transfer Moving the data –Termination Tying up loose ends

CSIS 6255 ENQ/ACK system Process Sender sends a ENQ (Enquiry) to the intended receiver. Receiver sends back an ACK (Acknowledgement) when it is ready to receive Sender sends data Sender sends EOT (End of Transmission) when done sending. Receiver may send a NAK (Negative Acknowledgement) if it isn’t ready. Used in point to point systems

CSIS 6256 ENQ/ACK system Common to have one node a primary and another a secondary –Primary is responsible for initiating communication Some systems have nodes as peers –Either can initiate a transfer In full-duplex system, data and control messages can be sent simultaneously

CSIS 6257 Poll & Select system Always has a primary and secondary nodes Process - Poll –Primary node requests data from the secondary –If no data, secondary responds with a NAK –Otherwise secondary responds with the data Process - Select –Primary node selects a secondary node and sends data to it –Secondary responds with ACK after successful transfer of data

CSIS 6258 Network Addresses –In a multi-point system, addresses needed so that nodes know who is talking to who –Simple in some systems where physical position or dip-switch sets it. –Ethernet defines that all manufactures of devices include a unique 48-bit (6-byte) address in every device. –Polling 2^48 devices isn’t practical at 10Mbps, with a 60 byte poll it would take –2^24 / 10Mbps * 60 * 8 bytes = 1.35E+10 seconds –or about 428 years

CSIS 6259 Media Access Control MAC - Media access Control A multipoint network with no clear master and slave. –master == primary –slave == secondary In this system, there needs to be more complicated protocol than ENQ/ACK or select/poll to figure out who sends when See later on in this lecture….

CSIS Flow Control Flow control - a protocol to ensure that the sender does not overwhelm a receiving station Incoming data must be checked and processed before it can be used –This is often slower than the transmission rate –Receivers need to buffer received data until it is processed –Buffers are always limited

CSIS Flow Control - Stop-n-Wait Stop and Wait flow control is simplest form of flow control Process –Sender sends one frame of data –Sender waits for ACK before sending more –Receiver can slow down process by waiting to send ACK May be simple - but it is inefficient

CSIS Stop-n-Wait efficiency –Entire set of data is divided into n frames –t prop = time to go from sender to receiver depends on distance and medium –t frame = time to send one data frame depends on bit rate and frame size –T D = n(2 t prop + t frame ) = Time to send data –Actual transmission of data is n* t frame –Efficiency is (n* t frame )/ n(2 t prop + t frame ) –= 1 / (1 +2(t prop / t frame )) –If t prop is small and t frame for frame is large, it approaches 100%, but never reaches it.

CSIS Sliding Window Protocol Sliding Window flow control allows for more than one frame to be sent before an acknowledgement is received frames are numbered from 0 to n-1 Sender sends frames up until it has sent n-1 frames Receiver sends back an ACK with the number of the next frame it expects Sender can now send up to this new number Maximum window size is n-1 frames

CSIS Figure WCB/McGraw-Hill  The McGraw-Hill Companies, Inc., 1998 Sliding Window Example

CSIS Sliding Window Efficiency If the sliding window is big enough, and the receiver is fast enough, then 100% efficiency can be achieved To get 100% - –2 * t prop  ((n - 1) * t frame ) –t prop = Time for a frame to propagate from one end to the other of the system –t frame = Time to send a frame (based on frame size and bit rate)

CSIS Error Control Error detection and retransmission Error detection is achieved using parity, checksums, CRC, etc –Extra data added to each frame ARQ - Automatic Repeat Request –This abbreviation isn’t really used much

CSIS Stop-n-Wait Error Control Extension of Stop-n-Wait flow control –When a good frame is received, an ACK sent back to originator. –When a damaged frame is received, a NAK is sent back to originator –When a NAK is received, the same frame is retransmitted

CSIS Stop-n-Wait Error Control Any frame may be dropped - data or NAK or ACK. –If ACK isn’t received after some time, a NAK is assumed –If a NAK is lost - timeout and retransmission –If a ACK is lost timeout and retransmission Frames must be numbered so receiver can throw away duplicates –If data is lost - timeout and retransmission Has same efficiency issues

CSIS Go-back-N Error Control Uses a Sliding window If a NAK is received or an ACK timeout occurs –all data since last ACK received is resent –This may be several frames ACKs contain next expected frame number NAKs contain errored frame number

CSIS Selective-Reject Error Control Uses a Sliding window –If a NAK is received, only the damaged frame is resent Selective Reject is more complicated to implement –Receiver must contain the sorting logic to enable it to reorder frames –Sending device must contain searching mechanism to enable it to find and select only the requested frame for retransmission –Buffer in the receiver must keep all previously received frames on hold until all retransmissions have been sorted, duplicates identified and discarded –ACK numbers must refer to the frame received instead of next frame expected

CSIS Selective-Reject Error Control More efficient as it resends less data –If errors don’t occur very often - there isn’t a big difference in efficiency Selective Reject is rarely implemented over Go-back-N method

CSIS Byte Oriented Link Control List here is all from Modem communications world –Normally people don’t address these as link layer controls Not just data-link as most of these protocols addressed issues of file-transfer XMODEM –Stop-n-Wait error control –Fixed data field of 128 bytes, CRC-8 YMODEM –increased data field to 1024 bytes, CRC-16

CSIS Byte Oriented Link Control ZMODEM –More features –Sliding window Kermit –sliding window –Also a terminal emulation package BSC - Binary synchronous communication –No-one cares about this one

CSIS Bit Oriented Link Control Many bit Oriented protocols today are oriented around HDLC Ethernet, Token-Ring and other LAN technologies are also bit-oriented SONET, T1, and most telephony systems are bit-oriented. It is common to use HDLC over a SONET or T1 system

CSIS HDLC node types Primary station –Has complete control over the link –Can be used in point-to-point or multi-link Secondary station –Receives commands from the primary and responds accordingly Combined station –Can both command and respond to commands –Used in peer to peer (or balanced) configurations

CSIS HDLC Configurations Unbalanced –One primary node and one or more secondary nodes –May be point-to-point or multi-point –Full or half-duplex Balanced –point-to-point topology only –Both nodes are combined stations

CSIS HDLC Modes of Communication NRM - Normal Response mode –Standard Primary-secondary relationship –Secondary can transmit only when polled ARM - Asynchronous Response Mode –A secondary may initiate a transmission without permission from the primary ABM - Asynchronous Balanced Mode –Combined stations - either can initiate –Point-to-point topology

CSIS HDLC Frame structure Frame of data consists of: –Flag: 8 bits –Address: 1 or more bytes –Control: 8 or 16 bits –Information: many bits –Frame Check Sequence (FCS): 16 or 32 bits –Flag: 8 bits

CSIS HDLC Flag byte The flag is a special bit pattern that signifies the start/end of a frame. A single flag byte may be used to end one frame and start another Flag bit pattern is Bit stuffing is used to make sure this pattern does not occur any where else. Bit stuffing occurs on all bytes (control or data) that are not flag bytes

CSIS HDLC Address field First seven bits are used for address Last bit - if a 1 then there are no more address bytes Last bit - if a 0 then there is another address byte Last bit of last address byte is always a 1 Number of address bits is a multiple of 7

CSIS HDLC Control Field One or two byte segment for flow management Control fields change based on type of frame If first bit is 0 –frame is an I-Frame If first bit is 1 and second 0 –frame is an S-Frame If first bit is 1 and second 1 –frame is a U-Frame

CSIS HDLC Control Field I-Frame - Information Frame –3 bits for send sequence number –3 bits for receive sequence number (ACKs) –1-bit - Poll/Final bit From secondary - set to 1 if last I-frame of response From primary - set to 1 if polling secondary for data S-Frame - Supervisory Frame –3 bits for receive sequence number –2 bits for “supervisory” functions –1 bit - Poll/final bit –S-Frames used for ACK when no data

CSIS HDLC Control Field U-Frame - Unnumbered frame –1 bit- Poll/Final bit –5 bits - “Unnumbered function” bits S-frames can be used for: reject selective rejects receiver ready receiver not ready

CSIS HDLC Control Field U-frames can be used for Mode setting (primary/secondary) unnumbered information transfer recovery - bad commands, etc initialization disconnect test command/response

CSIS HDLC - Information field The information field is a series of bits until the next flag byte is found S-Frame has no information field The last 16 or 32 bits of the Information field is actually the FCS FCS - Frame check sequence –a 16 or 32-bit CRC on the data

CSIS MAC - Media Access Control When there are multiple nodes that can all transmit on a given link, a means of controlling them is necessary The MAC layer is a sub-layer of data link layer in these situations. The Logical Link Control (LLC) Layer is the other sub-layer MAC is the lower sub-layer, LLC is the upper sub-layer

CSIS MAC assumptions 1 - Station Model There are N independent stations (aka nodes) that generates frames of data for transmission 2 - Single Communications Channel 3 - Collision detection All stations can detect collisions 4 - Time frame Continuous time - any frames starts at any time Slotted time - Time divides into discrete slots 5 - Carrier sense (or not) The nodes can detect if the channel is busy

CSIS ALOHA protocol Ground based radio broadcasting Developed at University of Hawaii Pure ALOHA –Any node starts transmitting at any time –Receiving node detects if a collision occurs Same if partially or completely clobbered –If data not properly received, the transmitter waits a random amount of time and resends.

CSIS ALOHA Protocol Slotted ALOHA –A special node emits a “pip” at the start of each interval. –All frames start at the beginning of an interval Both Pure ALOHA and Slotted ALOHA have a point at which adding more traffic results in worse throughput –The collisions keep piling up and causing more and more collisions –Slotted ALOHA will take about 2x as much load as Pure ALOHA

CSIS Carrier Sense Multiple Access (CSMA) Protocols Nodes listen to see if someone else is transmitting before they send their packet. –Better performance than ALOHA 1-Persistent CSMA –Transmitter waits until the the line is idle and sends immediately Nonpersistent CSMA –Transmitter waits random time time if the line isn’t idle –Leads to better utilization AND longer delays

CSIS CSMA Protocols continued p-Persistent CSMA –Uses slotted channels - If slot is idle there is a probability of p that transmitter will use the channel.

CSIS CSMA/CD - Carrier Sense Multiple Access with Collision Detection Extend the idea so that if two nodes detect a collision they stop transmitting immediately Quickly terminating the transmission saves time and bandwidth To detect collision, need to transmit for 2x the maximum propagation time. –Time for signal to transmit from one end to the other –PLUS Time for colliding signal to transmit from far end back

CSIS Wireless Protocols Typically nodes are all trying to talk with a central (wired) hub Sometimes (but not always) the nodes can “hear” one another Hidden station problem –When one node can’t hear another and tromps on transmission to a third node Exposed station problem –When one node hears another node and so won’t transmit to a third, even through it could.

CSIS Wireless Protocols and CSMA CSMA tells the transmitter if there is activity near, but you want to know if there is activity by the receiver. MACA - Multiple Access with Collision Avoidance. MACAW - MACA with refinements CSMA/CA - another name for MACA like system –Carrier Sense Multiple Access with Collision Avoidance

CSIS Wireless Protocols continuted MACAW basics - A sending to B –A sends B an RTS (Request to Send) frame with length –B sends A a CTS (Clear to Send) frame with length –A sends B the data frame –Other nodes that hear CTS know to be quiet for that time period (based on length)

CSIS Further reference htm