Physical Link Layer.

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.
Transmission Errors Error Detection and Correction
EEC-484/584 Computer Networks Lecture 7 Wenbing Zhao
EEC-484/584 Computer Networks Lecture 6 Wenbing Zhao
CSCI 4550/8556 Computer Networks Comer, Chapter 7: Packets, Frames, And Error Detection.
PART III DATA LINK LAYER. Position of the Data-Link Layer.
EEC-484/584 Computer Networks Lecture 8 Wenbing Zhao (Part of the slides are based on materials supplied by Dr. Louise Moser at UCSB and.
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 12 Introduction to Computer Networks.
The Data Link Layer Chapter 3. Position of the data-link layer.
EE 122: Error detection and reliable transmission Ion Stoica September 16, 2002.
The OSI Reference Model
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.
EEC-484/584 Computer Networks Lecture 13 Wenbing Zhao
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.
Adapted from Tanenbaum's Slides for Computer Networking, 4e The Data Link Layer Chapter 3.
EEC-484/584 Computer Networks Lecture 7 Wenbing Zhao
Transmission Errors Error Detection and Correction
1 Data Link Layer Lecture 20 Imran Ahmed University of Management & Technology.
PART III DATA LINK LAYER. Position of the Data-Link Layer.
Part 2: Packet Transmission Packets, frames Local area networks (LANs) Wide area networks (LANs) Hardware addresses Bridges and switches Routing and protocols.
ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 14.
جلسه هشتم شبکه های کامپیوتری به نــــــــــــام خدا.
Chapt 3 Data Link Layer1 Data Link Layer Functions –Provides services to network layer Well-defined interface –Framing –Flow control – between adjacent.
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.
ECE453 – Introduction to Computer Networks Lecture 4 – Data Link Layer (I)
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.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Data Link Layer PART III.
Computer Networks Lecture 2: Data Link Based on slides from D. Choffnes Northeastern U. and P. Gill from StonyBrook University Revised Autumn 2015 by S.
Computer Communication & Networks Lecture 9 Datalink Layer: Error Detection Waleed Ejaz
Transmission Errors Error Detection and Correction.
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.
Data Link Layer. Link Layer The data unit to be transmited at the link layer is called a frame. Why link layer? How can it know where a frame begins and.
1 The Data Link Layer A. S. Tanenbaum Computer Networks W. Stallings Data and Computer Communications Chapter 3.
The Data Link Layer RIS 251 Dr. ir. S.S. Msanjila.
Coding and Error Control
Lecture 4 Error Detecting and Correcting Techniques Dr. Ghalib A. Shah
Simple Parity Check The simplest form of error detection is the parity check used with ASCII codes, originally on asynchronous modem links Each 7 bit ASCII.
Chapter 3 The Data Link Layer.
The Data Link Layer.
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
Subject Name: COMPUTER NETWORKS-1
Cyclic Redundancy Check (CRC)
Communication Networks: Technology & Protocols
: An Introduction to Computer Networks
Data link layer (LLC).
Advanced Computer Networks
Data Link Layer What does it do?
Part III Datalink Layer 10.
Packetizing Error Detection
Data Link Issues Relates to Lab 2.
Packetizing Error Detection
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.
Business Data Communications
Reliable transmission
EEC-484/584 Computer Networks
Computer Networks Bhushan Trivedi, Director, MCA Programme, at the GLS Institute of Computer Technology, Ahmadabad.
Data Link Layer Objective: to achieve reliable and efficient communication between 2 adjacent machines Data link layer design issues services provided.
Transmission Errors Error Detection and Correction
Packetizing Error Detection
Data Link Layer Objective: to achieve reliable and efficient communication between 2 adjacent machines Data link layer design issues services provided.
EEC-484/584 Computer Networks
UNIT-II The Data Link Layer.
Error detection: Outline
EECS 122: EE122: Error Detection and Reliable Transmission
Data Link Layer. Position of the data-link layer.
Presentation transcript:

Physical Link Layer

Multiplexing Techniques

Multiplexing: A Way for Multiple Channels of Data to Share a Media Frequency Division Multiplexing (FDM) E.g., AM/FM radio, Wireless channels Time Division Multiplexing (TDM) E.g., T1/T3 Wavelength Division Multiplexing (WDM) E.g. OC-3/OC-12

Frequency Division Multiplexing

Time Division Multiplexing T1 BW = 193 bits / 125 us = 1.544 Mbps

T1 Line Was Originally Developed to Carry 24 Voice Signals There was no Internet (Data services) at that time! Voice signal’s effective frequency range is between 0 ~ 4 kHZ. According to the “Sampling theorem”, 8 kHZ sampling rate is needed. (thus one sample every 125 us) Using Pulse Code Modulation (PCM), each sample can be 7/8 bits.

Multiple T1 Lines Can be Multiplexed to Form T2/T3/T4 Lines 7 6 T3 BW = 44.736 Mbps = T1 * 4 * 7.

(Dense) Wavelength Division Multiplexing On Optical Fibers The Internet backbone network’s hope!

SONET Links Build The Backbones of Internet BW of OC-1 is 810 bits / 125 us = 51.84 Mbps

SONET Hierarchy OC-192 (10 Gbps) links are common in the Internet.

02/24/2009 Traffic between TANET and Internet

Ethernet Hub Instead of using a ring topology for connecting all Ethernet devices, a star topology is used for better fault isolation. An Ethernet hub is the center point of a star topology. It propagates the signal received from one link to all other links. Hub

Ethernet Hub (Cont’d) A Tx+ Rx+ Rx- B Tx+ Rx+ Rx- A C B Tx- Tx- When using an Ethernet hub, full-duplex cannot be used, only half-duplex can be used. Only one transfer at one time.

Ethernet Switch C A B D When using an Ethernet switch, full-duplex can be used. Many transfers (e.g., A->D and B->C) can happen at the same time.

Data Link Layer

Data Link Layer (L2) Provides A Virtual Data Path for Network Layer (L3)

A Layer-3 Link May Be Composed of Many Layer-2 Links (Switches). Taipei Hsinchu A single link at the data link layer A single link at the network layer

Common Services Provided by Layer 2 Unacknowledged connectionless service E.g., IP network. Simple and robust, but hard to provide QoS. Acknowledged connectionless service L2 acknowledgement is not a requirement. Transport layer can do the same job. When BER is high, L2 ACK can significantly improve performance. Acknowledged connection-oriented service Need to set up a connection first, then transfer data, then tear down the connection. No packet reordering, duplicate packets Long connection set up delay, not suitable for short-lived data transfers

Logical Link Control (LLC) layer

IEEE 802.2 Standard

Multiplexing Using LLC

LLC PDU Format

Control Field Definition of LLC

Four Framing Methods Character count Only useful on top of a reliable data stream Starting and ending characters, with character stuffing Good for text files, may have problem with binary files Starting and ending flags, with bit stuffing Physical layer violations In a particular data encoding scheme, use the signal pattern that is impossible to appear to represent the flag.

The Character Count Method’s Problem

The Flag (Preamble/Postamble) Method If errors corrupt one flag, we can simply wait until the next flag to show up, which indicate the beginning of another frame.

Bit Stuffing To Avoid the Flag to Appear in the Data Stream By putting a 0 after 5 consecutive 1s, we can avoid the flag (01111110) to appear in the data stream.

SLIP and PPP Are Two Popular Framing Protocols

SLIP’s Framing Format Problems with SLIP: There is no type field. Only IP is supported. Each end must know the other’s IP address There is no checksum to detect errors.

PPP’s Framing Format Support multiple protocols (IP is just one of them) Has CRC to detect errors Has link and network control protocols (LCP and NCP) to set up a link, negotiate IP addresses, exchange gateway and DNS information.

Error Detection and Correction

Error Detection and Correction Codes General idea: add some redundant bits to a frame to detect or correct errors. Suppose that each frame has m data bits, we add r redundant bits, so that the total length is n bits. (n = m + r) Depending on how we generate these r bits, the resulting 2m n-bit strings form a particular set of codewords. The hamming distance (HD) between two codeword A and B is the number of 1 bits of A xor B. The HD of a set of codewords is the minimum of the HD of any pair of two codewords.

HD = D+1 Can Detect D Errors E.g., Parity bit Even or odd The even parity bit is set to 1 if the number of 1 in the data frame plus the resulting parity bit is even. The Hamming distance of parity codewords is 2. E.g., (1111111+ 1 ) xor (1111110 + 0) = 00000011 The HD distance is 2. Therefore, using parity bit scheme, we can detect one bit error.

Cyclic Redundancy Code For Error Detection Also called polynomial codes because we treat a bit string as the representation of a polynomial with coefficients of 0 and 1 only. E.g., 110001 represents x^5 + x^4 + 1 Polynomial arithmetic is done module 2. (xor) E.g., 10011011 + 11001010 = 01010001, 11110000 – 10100110 = 01010110 The sender and receiver agree upon a generator polynomial G(x)

The Idea Behind CRC The idea is to compute a r-bit CRC and append it to the end of the m-bit data frame so that the resulting polynomial x^r * M(x) is divisible by G(x). When the receiver receives the (m+r)-bit frame, it also divide it by G(x). If it is divisible, then there is no error. Otherwise, the frame is in error.

CRC Computation Let r be the degree of G(x), append r 0 bits to the end of the frame to generate x^r * M(x). Divide x^r* M(x) by G(x) using module 2 division. Subtract the remainder from the bit string of x^r * M(x) using module 2 subtraction. The resulting string T(x) now is divisible by G(x). T(x) then is transmitted to the receiver.

A CRC computation example.

A Good G(x) Can Detect Many Different Types of Errors A polynomial code with r CRC check bits will detect all burst errors of length <= r. If the burst length is r+1, the probability of detecting the error is 1/ (2^(r-1)) If the burst length > r+1, the probability is 1/(2 ^ r). E.g., CRC-16 = x^16 + x^15 + x^2 + 1 All burst errors < = 16 bits can be detected. 99.996% to detect burst errors of 17 bits 99.998% to detect all burst errors > 17 bits.

HD = 2D+1 Can Correct D Errors The Hamming code: HD = 3, thus can correct one bit of error The bits of 1, 2, 4, 8, 16, 2^k are parity bits. The rest bits are filled with m data bit. If a data bit’s position is expressed as 2^k1 + 2 ^k2 + 2^k3 …, it contributes to the parity bit computations at positions 2^k1, 2^k2, 2^k3, … E.g., 11 = 1 + 2 + 8 When the n1’th, n2’th, .., nk’th parity bits are wrong, the (n1+n2+ … +nk)’th data bit is in error.

Transmitting HC Codewords Vertically Can Make HC Correct a Burst of Errors Although HC can correct only one bit error …

Error Control (Retransmission)

Retransmission is unavoidable Error correcting codes cannot correct all errors. Also, sometimes a whole frame may be lost due to congestion. Data retransmission of corrupted or lost data thus is unavoidable for a reliable transfer. Fortunately, using sequence numbers enables packet losses to be easily detected. Also error detecting codes such as CRC can detect transmission errors with high probabilities. However, do not forget that some errors still happen undetected! (Did you ever receive a broken FTPed file?)

Error and Flow Control Schemes Stop-and-wait Only 1 outstanding frame, simple, but low throughput Also called ARQ (Automatic Repeat reQuest) Sliding window protocols N outstanding frames, complicated, but high throughput Go-back-N Selective repeat

Stop-And-Wait’s Throughput Analysis

Sliding Window Scheme Example

Sliding Window Scheme Example

Ethernet’s Frame Format The source and destination addresses are each 6-byte long. Each Ethernet card has a globally unique 6-byte MAC (medium access control) address.