CS 457 - Lecture 3 Link Layer Protocols: Fall 2011
CS 457 - Lecture 3 Link Layer Protocols: Fall 2011
Topics
Link-layer services
Encoding, framing, and error detection
Error correction and flow control
Forms necessary background
Reliable Transmission
First look at an essential part of networking
HTTP message
HTTP
router
Ethernet
interface
HTTP
TCP segment
TCP
IP
host
IP packet
IP
Ethernet
interface
Ethernet frame
TCP
router
IP packet
SONET
interface
SONET
interface
IP packet
IP
Ethernet
interface
SONET frame
WE ARE HERE IN THE LAYERS
IP
Ethernet
interface
Ethernet frame
Adaptors Communicating
datagram
sending
frame
frame
adapter
adapter receiving
node
node
Sending side:
Encapsulates datagram in a frame
Adds error checking bits, flow control, etc.
Receiving side
Looks for errors, flow control, etc.
Extracts datagram and passes to receiving node
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!
Preamble: synchronization
Seven bytes with pattern 10101010, followed by
one byte with pattern 10101011
Used to synchronize receiver, sender clock rates
Encoding Bits
Simple idea of high for 1 and low for 0
Say 1 usec per bit. Sender sends 4 bits with 4 usec high
Receiver sees 4.6 usec of high. Was that 4 or 5 bits?
Error Detection
EDC= Error Detection and Correction bits (redundancy)
D
Parity Checking
Single Bit Parity:
Detect single bit errors
Internet Checksum
Goal: detect errors (e.g., flipped bits) in transmitted
segment
Receiver:
Sender:
Checksumming:
Cyclic Redundancy Check
view data bits D as a polynomial
choose r+1 polynomial C
goal: choose r CRC bits, R, such that
<D,R> exactly divisible by C (modulo 2)
receiver knows C, divides <D,R> by C. If non-zero
remainder: error detected!
can detect all burst errors less than r+1 bits
Reliable Transfer
Fundamental Networking Topic
Most important topic thus far in this course
Frames may be lost or corrupted
Encoding failures where clocks get out of sync
Error detection reports packet is corrupted
And a vast number of other reasons.
ACK
Packet lost
ACK
Pack
et
ACK
Timeout
Pack
et
Timeout
Pack
et
Timeout
Pack
et
Timeout
Timeout
Timeout
ACK lost
Early timeout
DUPLICATE
PACKET
DUPLICATE
PACKETS