-1- Georgia State UniversitySensorweb Research Laboratory CSC4220/6220 Computer Networks Dr. WenZhan Song Professor, Computer Science.

Slides:



Advertisements
Similar presentations
Chapter 3 The Data Link Layer.
Advertisements

The Data Link Layer Chapter 3. Data Link Layer Design Issues Services Provided to the Network Layer Framing Error Control Flow Control.
William Stallings Data and Computer Communications 7th Edition
5/31/05CS118/Spring051 twisted pair hub 10BaseT, 100BaseT, hub r T= Twisted pair (copper wire) r Nodes connected to a hub, 100m max distance r Hub: physical.
5-1 Link Layer: Introduction Some terminology: r hosts and routers are nodes r communication channels that connect adjacent nodes along communication path.
EEC-484/584 Computer Networks Lecture 6 Wenbing Zhao
PART III DATA LINK LAYER. Position of the Data-Link Layer.
15 – Data link layer Chapter 5: The Data Link Layer Our goals: r understand principles behind data link layer services: m error detection, correction.
1 Data Link Layer Lesson 6 NETS2150/ Position of the data-link layer McGraw-Hill © The McGraw-Hill Companies, Inc., 2004.
The Data Link Layer Chapter 3. Position of the data-link layer.
5: DataLink Layer5-1 Chapter 5 Link Layer and LANs Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross.
1 ITC242 – Introduction to Data Communications Week 10 Topic 16 Data link control.
The OSI Reference Model
VLANs Port-based VLAN: switch ports grouped (by switch management software) so that single physical switch …… Switch(es) supporting VLAN capabilities can.
The Data Link Layer. Data Link Layer Design Issues Services Provided to the Network Layer Framing Error Control Flow Control.
Chapter 5 Link Layer slides are modified from J. Kurose & K. Ross CPE 400 / 600 Computer Communication Networks Lecture 20.
1 Interconnection ECS 152A. 2 Interconnecting with hubs r Backbone hub interconnects LAN segments r Extends max distance between nodes r But individual.
EEC-484/584 Computer Networks Lecture 7 Wenbing Zhao (Part of the slides are based on materials supplied by Dr. Louise Moser at UCSB and.
The Data Link Layer Chapter 3. Data Link Layer Design Issues Services Provided to the Network Layer Framing Error Control Flow Control.
Adapted from Tanenbaum's Slides for Computer Networking, 4e The Data Link Layer Chapter 3.
Point to Point protocol (PPP) Point to point, wired data link easier to manage than broadcast link: no Media Access Control Several Data Link Protocols:
HDLC and PPP. The Data Link Layer in the Internet A home personal computer acting as an internet host. Technology like Ethernet cannot provide “high-level”
3-1 Last time □ Finished introduction and overview: ♦ Network access and physical media ♦ Internet structure and ISPs ♦ Delay & loss in packet-switched.
Introduction 1 Lecture 23 Link Layer (Error Detection/Correction) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science.
5: DataLink Layer5-1 Chapter 5 Link Layer and LANs Part 1: Overview of the Data Link layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose,
Chapter 5 outline 5.1 Introduction and services
Introduction 1 Lecture 26 Link Layer (PPP, Virtualization) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science &
TOBB ETÜ ELE46/ELE563 Communications Networks Lecture 01 May 6, 2014 Fall 2011 Tuesday 10:30 – 12:20 (310) Thursday 15:30 – 17:20 (372) İsrafil Bahçeci.
1 Data Link Layer Lecture 20 Imran Ahmed University of Management & Technology.
PART III DATA LINK LAYER. Position of the Data-Link Layer.
جلسه هشتم شبکه های کامپیوتری به نــــــــــــام خدا.
Chapt 3 Data Link Layer1 Data Link Layer Functions –Provides services to network layer Well-defined interface –Framing –Flow control – between adjacent.
4: DataLink Layer1 Chapter 4: The Data Link Layer Our goals: r understand principles behind data link layer services: m error detection, correction m sharing.
Data Link Layer : Services, Framing, Error Detection and Correction2.
The data link layer. Data Link Layer Design Issues Services Provided to the Network Layer Framing Error Control Flow Control.
The Data Link Layer. Functions of the Data Link Layer Provide service interface to the network layer Dealing with transmission errors Error detection.
The Data Link Layer. Functions of the Data Link Layer Provide service interface to the network layer Frame delineation Dealing with transmission errors.
The Data Link Layer Chapter 3 10/28/2015www.noteshit.com1.
ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 13.
ECE453 – Introduction to Computer Networks Lecture 4 – Data Link Layer (I)
Chapter 5 Link Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A note on the use of these.
5: DataLink Layer5-1 Chapter 5 Link Layer and LANs Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross.
5: DataLink Layer5-1 Error Detection EDC= Error Detection and Correction bits (redundancy) D = Data protected by error checking, may include header fields.
Chapter 5 Link Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 Link Layer introduction,
5: DataLink Layer5-1 Link Layer r 5.1 Introduction and services r 5.2 Error detection and correction r 5.3Multiple access protocols r 5.4 Link-Layer Addressing.
5: DataLink Layer5-1 Chapter 5 Link Layer and LANs Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross.
The Data Link Layer Chapter 3 1/21/2016www.ishuchita.com1.
5: DataLink Layer5-1 Chapter 5 Link Layer and LANs A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students,
5: DataLink Layer5a-1 Chapter 5: The Data Link Layer Our goals: r understand principles behind data link layer services: m error detection, correction.
Shashank Srivastava Motilal Nehru national Institute Of Information Technology, Allahabad Data Link Layer.
5: DataLink Layer5-1 Hubs Hubs are essentially physical-layer repeaters: m bits coming from one link go out all other links m at the same rate m no frame.
Network Layer4-1 Chapter 5: The Data Link Layer Our goals: r understand principles behind data link layer services: m error detection, correction m sharing.
5: DataLink Layer5-1 Chapter 5 Link Layer and LANs Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross.
1 The Data Link Layer A. S. Tanenbaum Computer Networks W. Stallings Data and Computer Communications Chapter 3.
CS 457 – Lecture 3 Link Layer Protocols Fall 2011.
The Data Link Layer RIS 251 Dr. ir. S.S. Msanjila.
CS4470 Computer Networking Protocols
Data Link Layer Objective: to achieve reliable and efficient communication between 2 adjacent machines Data link layer design issues services provided.
Data Link Layer.
Part III. Data Link Layer
Hubs Hubs are essentially physical-layer repeaters:
Point to Point Data Link Control
Hubs Hubs are essentially physical-layer repeaters:
Link Layer and LANs Its not about how hard you hit... It's about how hard you can get hit and keep moving forward 5: DataLink Layer.
Data Link Layer Objective: to achieve reliable and efficient communication between 2 adjacent machines Data link layer design issues services provided.
Instructor Mazhar Hussain
EEC-484/584 Computer Networks
Data Link Layer: Overview; Error Detection
Data Link Layer. Position of the data-link layer.
Presentation transcript:

-1- Georgia State UniversitySensorweb Research Laboratory CSC4220/6220 Computer Networks Dr. WenZhan Song Professor, Computer Science

-2- Georgia State UniversitySensorweb Research Laboratory Course roadmap Introduction Application Layer: WWW, FTP, , DNS, multimedia Transport Layer: reliable end-end data transfer principles, UDP, TCP Network Layer: IP addressing, routing and other issues Data Link Layer: framing, error control, flow control Medium Access Control (MAC) Layer: multiple-access, channel allocation Physical Layer: wired, wireless, satellite Other Topics: network security, social issues, hot topics, research directions

-3- Georgia State UniversitySensorweb Research Laboratory Data Link Layer Our goals: understand principles behind data link layer services: error detection, correction sharing a broadcast channel: multiple access link layer addressing reliable data transfer, flow control: done! instantiation and implementation of various link layer technologies

-4- Georgia State UniversitySensorweb Research Laboratory Link Layer: Introduction Some terminology: hosts and routers are nodes communication channels that connect adjacent nodes along communication path are links wired links wireless links LANs layer-2 packet is a frame, encapsulates datagram “link” data-link layer has responsibility of transferring datagram from one node to adjacent node over a link

-5- Georgia State UniversitySensorweb Research Laboratory Data Link Layer Road Map Data link layer design issues Framing Error Control Example data link protocols HDLC and PPP Multiple Access Protocols Static channel allocation Dynamic channel allocation LAN technologies and their MAC protocols Ethernet WiFi and WiMax

-6- Georgia State UniversitySensorweb Research Laboratory Functions of the Data Link Layer Provide service interface to the network layer Dealing with transmission errors Regulating data flow Slow receivers not swamped by fast senders Sharing broadcast channels: multiple access channels Determine who gets to use the channel when there is competition for it

-7- Georgia State UniversitySensorweb Research Laboratory Functions of the Data Link Layer Relationship between packets and frames.

-8- Georgia State UniversitySensorweb Research Laboratory Services Provided to Network Layer Various services Unacknowledged connectionless service Without ack, no logical connection Appropriate when error rate is low, real-time traffic (voice, late data worse than bad data) Most LANs Acknowledged connectionless service No logical connection, but individually acked Useful over unreliable channels (wireless) Acknowledged connection-oriented service Guarantee frame received only once and in right order Three phases: connection established, frames transmitted, connection released

-9- Georgia State UniversitySensorweb Research Laboratory Adaptors Communicating link layer implemented in “adaptor” (called NIC) Ethernet card, PCMCI card, card sending side: encapsulates datagram in a frame adds error checking bits, rdt, flow control, etc. receiving side looks for errors, rdt, flow control, etc extracts datagram, passes to rcving node adapter is semi-autonomous link & physical layers sending node frame rcving node datagram frame adapter link layer protocol

-10- Georgia State UniversitySensorweb Research Laboratory Framing Encapsulate datagram into frame, adding header and trailer Break the bit stream up into discrete frames and compute the checksum of each frame Relationship between packets and frames

-11- Georgia State UniversitySensorweb Research Laboratory Framing – Character Count A character stream. (a) Without errors. (b) With one error.

-12- Georgia State UniversitySensorweb Research Laboratory Framing (2) – Flag Bytes (a) A frame delimited by flag bytes. (b) Four examples of byte sequences before and after stuffing. Actually, after insert ESC control byte, it also inverts the fifth bit of (or XOR 0x20 with) the following data byte. See wiki or textbook p491. For simplicity, many textbooks do not mention it.wiki

-13- Georgia State UniversitySensorweb Research Laboratory Framing (3) – Bit Flags Delimit frame at both ends using May close one frame and open another Receiver hunts for flag sequence to synchronize Bit stuffing used to avoid confusion with data containing inserted after every sequence of five 1s If receiver detects five 1s it checks next bit If 0, it is deleted If 1 and seventh bit is 0, accept as flag If sixth and seventh bits 1, sender is indicating abort

-14- Georgia State UniversitySensorweb Research Laboratory Framing (4) – Bit Flags Bit stuffing (a) The original data. (b) The data as they appear on the line. (c) The data as they are stored in receiver’s memory after destuffing.

-15- Georgia State UniversitySensorweb Research Laboratory Error Control Error Detection: errors caused by signal attenuation, noise. receiver detects presence of errors: error-detection codes signals sender for retransmission or drops frame Error Correction: receiver identifies and corrects bit error(s) without resorting to retransmission error-correction codes

-16- Georgia State UniversitySensorweb Research Laboratory Error Detection and Correction EDC= Error Detection and Correction bits (redundancy) D = Data protected by error checking, may include header fields Error detection not 100% reliable! protocol may miss some errors, but rarely larger EDC field yields better detection and correction

-17- Georgia State UniversitySensorweb Research Laboratory Error-Detection & Correction Code Single Bit Parity: Detect single bit errors Only odd bit errors detection Examine: Number of 1s in the code is even Consider a code with only 4 valid codewords: They have Hamming diatance 5 with each other, hence can correct double errors. Example: must be Rules To correct d errors, you need a distance 2d+1 code To detect d errors, you need a distance d+1 code Hamming distance of x and y is XOR(x,y)

-18- Georgia State UniversitySensorweb Research Laboratory Error-Correction Code Theoretical lower limit A code with m message bits and r check bits which will allow all single errors to be corrected 2 m legal messages – legal codewords For each legal message, there is n illegal codewords Total number of bit pattern is 2 n Therefore, (n+1)2 m  2 n n=m+r, (m+r+1)  2 r => the limit can be achieved by Hamming code Hamming Code It can correct any single bit error bits in power of 2 positions (1,2,4,8,) are check bits, the rest are m data bits Check bit forces the parity of some collection of bit “1” to be even To see which check bits the data bit in position k contributes to, rewrite k as a sum of powers of 2. 11=1+2+8, 29= Hamming code

-19- Georgia State UniversitySensorweb Research Laboratory Hamming Code Example If a 12-bit hamming code 0x9B8 = arrives at receiver, is there any bit error? If so, which bit is wrong? Chec k bit Checked Data bitsBits Sequence (Yes) (No) (No) (Yes) = =4+1 6 =4+2 7 = = = = = Hence bit 6 = 2+4 is wrong, so correct hamming code should be 0x9F8 =

-20- Georgia State UniversitySensorweb Research Laboratory Correct burst errors Use of Hamming code to correct k burst errors by send k ASCII character together, column by column. (Read Tanenbaum textbook page 195)

-21- Georgia State UniversitySensorweb Research Laboratory Error-Detection Codes Note When adding numbers, a carryout from the most significant bit needs to be added to the result Example: add two 16-bit integers wraparound sum checksum Internet checksum

-22- Georgia State UniversitySensorweb Research Laboratory Error-Detection Codes view data bits, D, as a binary number choose r+1 bit pattern (generator), G goal: choose r CRC bits, R, such that exactly divisible by G (modulo 2) receiver knows G, divides by G. If non-zero remainder: error detected! can detect all burst errors less than r+1 bits, and odd number of bit errors widely used in practice (ATM, HDCL) Cyclic Redundancy Check

-23- Georgia State UniversitySensorweb Research Laboratory CRC Example Want: D. 2 r XOR R = nG equivalently: D. 2 r = nG XOR R equivalently: if we divide D. 2 r by G, want remainder R R = remainder[ ] If G has r+1 bit, R has r bit D.2rGD.2rG Operation is XOR, not +, or -!!! Notice: x^3+1 is a generator! Left shift r bit

-24- Georgia State UniversitySensorweb Research Laboratory Another Example Calculation of the polynomial code checksum. G CRC-32 =

-25- Georgia State UniversitySensorweb Research Laboratory CRC generator preference Generator G(x) with degree k can detect: All single-bit errors, as long as the x k and x 0 terms have nonzero coefficients. All double-bit errors, as long as G(x) has a factor with at least three terms. Any odd number of errors, as long as G(x) contains the factor (x+1). Any “burst” error(i.e., sequence of consecutive errored bits) with the length less than (including equal) k bits. Burst errors of larger than k bits can also be detected with high probability 1-1/2 k ) * Refer textbook page

-26- Georgia State UniversitySensorweb Research Laboratory Flow Control Ensuring the sending entity does not overwhelm the receiving entity Preventing buffer overflow Transmission time Time taken to emit all bits into medium Propagation time Time for a bit to traverse the link

-27- Georgia State UniversitySensorweb Research Laboratory Model of Frame Transmission X

-28- Georgia State UniversitySensorweb Research Laboratory Data Link Layer Road Map Data link layer design issues Framing Error Control Example data link protocols HDLC and PPP Multiple Access Protocols Static channel allocation Dynamic channel allocation LAN technologies and their MAC protocols Ethernet WiFi and WiMax

-29- Georgia State UniversitySensorweb Research Laboratory Point to Point Data Link Control one sender, one receiver, one link: easier than broadcast link: no Media Access Control no need for explicit MAC addressing e.g., dialup link, ISDN line popular point-to-point DLC protocols: PPP (point-to-point protocol) HDLC: High level data link control (Data link used to be considered “high layer” in protocol stack!

-30- Georgia State UniversitySensorweb Research Laboratory HDLC (High-Level Data Link Control) Frame format for bit-oriented protocols. Data link layer protocol used in IBM mainframe world, X.25 network, etc  Using slide window protocol (GBN, SR, or variations) for flow control and reliable data transfer

-31- Georgia State UniversitySensorweb Research Laboratory HDLC (High-Level Data Link Control) Control field of (a) An information frame. (b) A supervisory frame ACK or RECEIVE READY NAK or REJECT: follow GBN protocol RECEIVE NOT READY: ask sender to stop SELECTIVE REJECT: follow SR protocol (c) An unnumbered frame used for control purpose or carry data when unreliable connectionless service needed ACKed/NAKed frame#

-32- Georgia State UniversitySensorweb Research Laboratory The Data Link Layer in the Internet A home personal computer acting as an internet host.

-33- Georgia State UniversitySensorweb Research Laboratory PPP Design Requirements [RFC 1557] packet framing: encapsulation of network-layer datagram in data link frame carry network layer data of any network layer protocol (not just IP) at same time ability to demultiplex upwards bit transparency: must carry any bit pattern in the data field error detection (no correction) connection liveness: detect, signal link failure to network layer network layer address negotiation: endpoint can learn/configure each other’s network address

-34- Georgia State UniversitySensorweb Research Laboratory PPP non-requirements no error correction/recovery no flow control out of order delivery OK no need to support multipoint links (e.g., polling) Error recovery, flow control, data re-ordering all relegated to higher layers!

-35- Georgia State UniversitySensorweb Research Laboratory PPP Data Frame Flag: delimiter (framing) Address: does nothing (only one option) Control: does nothing; in the future possible multiple control fields Protocol: upper layer protocol to which frame delivered (eg, PPP-LCP, IP, IPCP, etc)

-36- Georgia State UniversitySensorweb Research Laboratory PPP Data Frame info: upper layer data being carried check: cyclic redundancy check for error detection Not bit-oriented, e.g., bit-stuffing, it uses byte-stuffing!

-37- Georgia State UniversitySensorweb Research Laboratory Byte Stuffing “data transparency” requirement: data field must be allowed to include flag pattern Q: is received data or flag? Sender: adds (“stuffs”) extra byte after each data byte Receiver: two bytes in a row: discard first byte, continue data reception single : flag byte

-38- Georgia State UniversitySensorweb Research Laboratory Byte Stuffing flag byte pattern in data to send flag byte pattern plus stuffed byte in transmitted data

-39- Georgia State UniversitySensorweb Research Laboratory PPP Data Control Protocol Before exchanging network-layer data, data link peers must LCP: configure PPP link (max. frame length, authentication) NCP: learn/configure network layer information for IP: carry IP Control Protocol (IPCP) msgs (protocol field: 8021) to configure/learn IP address LCP configuration

-40- Georgia State UniversitySensorweb Research Laboratory Reading Assignment Chapter – 5.6