Data Link Layer Overview



Similar documents
CMPE 150 Winter 2009

Computer Networks. Data Link Layer

Chapter 3: Sample Questions, Problems and Solutions Bölüm 3: Örnek Sorular, Problemler ve Çözümleri

Data Link Layer(1) Principal service: Transferring data from the network layer of the source machine to the one of the destination machine

High-Level Data Link Control

WAN Data Link Protocols

Module 1. Introduction. Version 2 CSE IIT, Kharagpur

Note! The problem set consists of two parts: Part I: The problem specifications pages Part II: The answer pages

Basic Networking Concepts. 1. Introduction 2. Protocols 3. Protocol Layers 4. Network Interconnection/Internet

EE4367 Telecom. Switching & Transmission. Prof. Murat Torlak

Sheet 7 (Chapter 10)

Indian Institute of Technology Kharagpur. TCP/IP Part I. Prof Indranil Sengupta Computer Science and Engineering Indian Institute of Technology

Candidates should attempt FOUR questions. All questions carry 25 marks.

BCS THE CHARTERED INSTITUTE FOR IT. BCS HIGHER EDUCATION QUALIFICATIONS BCS Level 5 Diploma in IT COMPUTER NETWORKS

(Refer Slide Time: 02:17)

Ethernet. Ethernet. Network Devices

Computer Network. Interconnected collection of autonomous computers that are able to exchange information

Networking Test 4 Study Guide

ELEC3030 Computer Networks

Access Control: Firewalls (1)

Note! The problem set consists of two parts: Part I: The problem specifications pages Part II: The answer pages

Internet Packets. Forwarding Datagrams

Chapter 2 - The TCP/IP and OSI Networking Models

Objectives of Lecture. Network Architecture. Protocols. Contents

Computer Networks. Chapter 5 Transport Protocols

IP Subnetting and Addressing

CS335 Sample Questions for Exam #2

OSI Model. Application Presentation Session Transport Network Data Link Physical. EE156 Computer Network Architecture

Internet Architecture and Philosophy

Protocols and Architecture. Protocol Architecture.

Vorlesung Kommunikationsnetze Research Topics: Protocol Family for Control Data Communication in Heterogeneous Network Environments

Written examination in Computer Networks

Overview of TCP/IP. TCP/IP and Internet

Based on Computer Networking, 4 th Edition by Kurose and Ross

Topics. Computer Networks. Let s Get Started! Computer Networks: Our Definition. How are Networks Used by Computers? Computer Network Components

Computer Networks Vs. Distributed Systems

The OSI and TCP/IP Models. Lesson 2

LLC: Frame Construction. Layer 2: Division into two Parts. Error-detecting and -correcting Codes. Error-correcting Codes

Lecture Computer Networks

Mobile IP Network Layer Lesson 02 TCP/IP Suite and IP Protocol

Stop And Wait. ACK received; transmit frame 2 CS 455 3

Operating System Concepts. Operating System 資 訊 工 程 學 系 袁 賢 銘 老 師

DATA COMMUNICATION AND NETWORKS

ICOM : Computer Networks Chapter 6: The Transport Layer. By Dr Yi Qian Department of Electronic and Computer Engineering Fall 2006 UPRM

How To Design A Layered Network In A Computer Network

IP Network Layer. Datagram ID FLAG Fragment Offset. IP Datagrams. IP Addresses. IP Addresses. CSCE 515: Computer Network Programming TCP/IP

Transport Layer Protocols

Communications and Computer Networks

Transport Layer. Chapter 3.4. Think about

Overview. Securing TCP/IP. Introduction to TCP/IP (cont d) Introduction to TCP/IP

2. What is the maximum value of each octet in an IP address? A. 128 B. 255 C. 256 D. None of the above

ELEC3030 (EL336) Computer Networks. How Networks Differ. Differences that can occur at network layer, which makes internetworking difficult:

Protocols. Packets. What's in an IP packet

RARP: Reverse Address Resolution Protocol

First Semester Examinations 2011/12 INTERNET PRINCIPLES

The OSI model has seven layers. The principles that were applied to arrive at the seven layers can be briefly summarized as follows:

Names & Addresses. Names & Addresses. Hop-by-Hop Packet Forwarding. Longest-Prefix-Match Forwarding. Longest-Prefix-Match Forwarding

EITF25 Internet Techniques and Applications L5: Wide Area Networks (WAN) Stefan Höst

IP Networking. Overview. Networks Impact Daily Life. IP Networking - Part 1. How Networks Impact Daily Life. How Networks Impact Daily Life

Architecture and Performance of the Internet

FIREWALLS & NETWORK SECURITY with Intrusion Detection and VPNs, 2 nd ed. Chapter 2 An Introduction to Networking

ESSENTIALS. Understanding Ethernet Switches and Routers. April 2011 VOLUME 3 ISSUE 1 A TECHNICAL SUPPLEMENT TO CONTROL NETWORK

VoIP Bandwidth Calculation

Transport and Network Layer

The OSI Model and the TCP/IP Protocol Suite

Computer Networks. Definition of LAN. Connection of Network. Key Points of LAN. Lecture 06 Connecting Networks

Zarządzanie sieciami telekomunikacyjnymi

NETWORK LAYER/INTERNET PROTOCOLS

Protocol Overhead in IP/ATM Networks

Notes Odom, Chapter 4 Flashcards Set:

Data Link Protocols. TCP/IP Suite and OSI Reference Model

Chapter 9. IP Secure

Guide to TCP/IP, Third Edition. Chapter 3: Data Link and Network Layer TCP/IP Protocols

Introduction to LAN/WAN. Network Layer

Process Control and Automation using Modbus Protocol

IP - The Internet Protocol

EINDHOVEN UNIVERSITY OF TECHNOLOGY Department of Mathematics and Computer Science

Subnetting,Supernetting, VLSM & CIDR

Overview of Computer Networks

The TCP/IP Reference Model

The finite field with 2 elements The simplest finite field is

How To Understand The Layered Architecture Of A Network

Module 7 Internet And Internet Protocol Suite

Clearing the Way for VoIP

CPS221 Lecture: Layered Network Architecture

Network Layer: Network Layer and IP Protocol

Lecture Objectives. Lecture 07 Mobile Networks: TCP in Wireless Networks. Agenda. TCP Flow Control. Flow Control Can Limit Throughput (1)

Layered Architectures and Applications

The internetworking solution of the Internet. Single networks. The Internet approach to internetworking. Protocol stacks in the Internet

Ring Local Area Network. Ring LANs

Internetworking. Problem: There is more than one network (heterogeneity & scale)

Security (II) ISO : Security Architecture of OSI Reference Model. Outline. Course Outline: Fundamental Topics. EE5723/EE4723 Spring 2012

DATA COMMUNICATION (Basics of data communication, OSI layers.)

SFWR 4C03: Computer Networks & Computer Security Jan 3-7, Lecturer: Kartik Krishnan Lecture 1-3

PART OF THE PICTURE: The TCP/IP Communications Architecture

First Workshop on Open Source and Internet Technology for Scientific Environment: with case studies from Environmental Monitoring

WAN Technology. Heng Sovannarith

Computer Networks CS321

Token-ring local area network management

Network Simulation Traffic, Paths and Impairment

Transcription:

Data Link Layer Overview Date link layer deals with two basic issues: Part I How data frames can be reliably transmitted, and Part II How a shared communication medium can be accessed In many networks, such as an LAN, communication medium is shared. So you first have to gain access (II). When you have access, it is equivalent to a point-to-point connection (I) Point to point MAC In 1st part, data link layer has a number of specific functions Provide well-defined service interface to network layer Handle transmission errors (error control) noisy links becomes error free as far as network layer is concerned Regulate data flow (flow control) slow receivers not swamped by fast senders We will exam how various data link layer protocols deal with these issues 38

Data Link Layer Overview (continue) To see where the part of data link protocol lies, let us recall our 5-layer reference model Physical: describes the transmission of raw bits in terms of mechanical and electrical issues Data link: describes how a shared communication channel can be accessed, and how a data frame can be reliably transmitted Network: describes how routing is to be done, mostly needed in subnets Transport: this layer provides the actual network interface to applications, does hardest jobs Application: contains the stuff users see, e-mail, remote login, Web s exchange protocol, etc Data link layer protocol is presented at each link section of point-to-point connection On one hand, physical link may be unreliable and introduce errors One the other hand, router usually does not want to be bothered too much with this, as it has some other more important things to worry Frames here Router Data link layer process Packets here Routing process 2 3 2 2 3 Transmission line to a router Data link protocol It is often up to the data link protocol to make unreliable communication links look perfect 2 39

Services Provided to Network Layer Data link layer is responsible for transmitting data from source network layer to destination network layer Source network layer passes a number of bits to data link layer, who then packs them into frames and relies on physical layer to do actual communication Receiving data link layer unpacks frames and passes bits to its network layer 4 3 2 1 Host 1 Host 2 Host 1 Host 2 Virtual data path 4 3 2 1 4 3 2 1 Actual data path 4 3 2 1 The basic services commonly provided are (a) (b) Unacknowledged connectionless: no attempt to recover erroneous or lost frame in layer 2, having least overhead, appropriate when error rate is very low (LANs) so recovery is left to higher layers Acknowledged connectionless: sender knows a frame has arrived safely or not, useful over unreliable channels (wireless systems) Acknowledged connection-oriented: highly reliable but overhead is very high, usually for WANs 40

Connection-Oriented / Connectionless There are two basic classes of data transfer: connectionless connection-oriented and In connection-oriented data transfer, three phases occur: Both sides engaging in communication number PDUs (protocol data units) and keep track of incoming/outgoing numbers. This sequencing enables ordered deliver, flow control and error control An example is the virtual circuit protocol entity connection request data and acknowledgments.. terminate-connection request protocol entity connection accept data and acknowledgments terminate-connection acknowledge connection establishment data transfer connection termination In connectionless data transfer, data are transferred from one entity to another without the prior mutual construction of a connection. An example is the datagram 41

Framing Data link layer is responsible for making physical link reliable and, to do so, it breaks up network layer data stream into small blocks, a process called segmentation, and adds header and frame flag to each block to form a frame, a process called Data NL encapsulation F H F F H F F H F DLL Header generally contains three parts or fields frame Address: address of sender and/or receiver Error detecting code: a checksum of the frame for error detection Control: additional information to implement protocol functions F: frame flag H: frame header The receiving data link layer must know the start and end of a frame use of frame flag Frame flag: a unique bit pattern that never appears any other place inside a frame Segmentation (at transmitting side)/reassembly (at receiving side), and encapsulation are general operations of a protocol, not just restricted to date link layer Note that some physical layer protocols may impose layer-1 framing, simply for physical link synchronisation, which is very different from layer-2 framing, which has higher purposes Overhead introduced by a full data link layer protocol can be very high, particularly, in view that data link layer protocol has to be presented at each link section of an end-to-end connection 42

Frame Flag Frame flag must be a special bit pattern that never appears any other place inside a frame, and three general ways of making frame flag are Bit stuffing: Use 01111110 as frame flag and this bit pattern must be made special So sender adds a 0 bit whenever it encounters five consecutive 1 bits in data, and receiver deletes the 0 bit that follows five consecutive 1 bits in the received data Examples include high-level data link control, link access procedure balanced for X.25, link access procedure for D-channel for ISDN, and logic link control for FDDI Coding: Use mb/nb encoding (n > m) data bit patterns 2 m but code bit patterns 2 n, by coding design some of the code bit patterns will never appear in (coded) data stream An example is FDDI 4b/5b encoding: two code bit patterns 11000-10001, which never appears in data stream, are used as frame starting flag Physical layer line coding violation: Recall line coding defines how 0 and 1 bits are transmitted in voltage pulses, and deliberately violating the rule can be used to signify something special An example is the ISDN basic rate interface (BRI) frame flag: The first bit of the frame, framing bit, is a positive-pulse zero bit (The normal coding rule would require a negative-pulse). The start of a new frame is signalled by this code violation 43

Error Correction and Detection Error control in computer networks is typically achieved by error detecting using cyclic redundancy check (CRC), which is the checksum inside a frame, combined with retransmission For this purpose, systematic cyclic or polynomial generated codes are often used, which are special linear block codes Some basic concepts in error control coding are first reviewed An n-bit frame, which consists of m-bit data and r check bits, is called a codeword. All codewords form the codebook Hamming distance between two codewords is number of bits in which two codewords differ For example, 10001001 and 10110001 have a Hamming distance of 3, where is bit-wise exclusive OR (modulo 2) 1 0 0 0 1 0 0 1 1 0 1 1 0 0 0 1 0 0 1 1 1 0 0 0 The minimum Hamming distance d min of a codebook is the smallest Hamming distance between any pair of codewords in the codebook A codebook with d min can detect up to d min 1 errors and correct up to (d min 1)/2 errors in each codeword 44

Cyclic Codes Cyclic: if < b n 1, b n 2,, b 1, b 0 > is a codeword in the code, < b n 2,, b 1, b 0, b n 1 > is also a codeword in the same code Represent m-bit message a =< a m 1,, a 1, a 0 > by the polynomial a(x), where a i are binary-valued (0 or 1) a(x) = a m 1 x m 1 + + a 1 x 1 + a 0 A cyclic code is defined by its generating polynomial g(x) = g r x r + + g 1 x 1 + g 0, g r = 1, g 0 = 1 That is, n-bit codeword b =< b n 1,, b 1, b 0 > of a is given by «b(x) = x r xr a(x) a(x) + Rem g(x) The remainder of x r a(x)/g(x) is a polynomial up to order x r 1, i.e. providing the r check bits. All the calculations use modulo 2 arithmetic Example: (7,4) cyclic code with g(x) = x 3 + x 2 +1 and message a = 1010 or a(x) = x 3 + x 1 x 3 a(x) = x 6 + x 4 and Rem(x 3 a(x)/g(x)) = 1 b(x) = x 6 + x 4 +1 or b = 1010 001 (message bits 1010 and check bits 001) 45

Cyclic Codes (continue) In decoding, let received b be ˆb(x) = b(x) + e(x), where nonzero terms in e(x) indicate errors Calculate the remainder of ˆb(x)/g(x) «b(x) + e(x) Rem g(x) «e(x) = Rem g(x) If zero remainder: no error occurs or errors are undetectable (e(x) is a polynomial containing factor g(x)) If nonzero remainder: errors are detected. For example, ˆb = 1011000 Rem(ˆb(x)/g(x)) = x 2 is nonzero Note that the hardware implementation of CRC is actually very simple: shift register circuit Carefully designed generators have become standards, and IEEE 802 uses g(x) = x 32 + x 26 + x 23 + x 22 + x 16 + x 12 + x 11 + x 10 + x 8 + x 7 + x 5 + x 4 + x 2 + x 1 + 1 This gives 32 bits of checksum It has many desired properties, including able to detect all burst errors of length 32 or less and all burst errors affecting an odd number of bits 46

Flow / Error Control Overview If sender transmits frames faster than receiver can accept them, communication will break down Flow control is used to prevent this situation happening by limiting the sender into sending no faster than the receiver can handle Basic flow control principle is using some well-defined rules about when sender can transmit next frame These rule often prohibit frames from being sent until receiver has granted permission Data link layer typically uses this type of feedback-based flow control Frames may be corrupted by noise or get lost, and error control is used to recover from such erroneous situations CRC provides receiver means of detecting errors and typically, protocol calls receiver to send back special control frames bearing positive or negative acknowledgements If sender receives ACK, it knows the frame has arrive safely and if sender receives NACK, it means something has gone wrong and calls a retransmission Error control will influence flow control, and in reality, both are closely working together We will discuss flow control and error control in more details next lecture 47

Summary Data link layer deals with making physical link reliable and how to access shared communication medium In dealing with point-to-point connection, specific functions include providing well-defined service to network layer, flow and error control Two basic classes of services: connection-oriented and connectionless Framing: frame flag bit stuffing (and similar byte stuffing), coding, line coding violation frame header frame check sequence or checksum, address and control Error control coding and systematic cyclic codes 48