Title: Quiz
1Quiz 2 DiscussionsIntroduction to The Link
LayerError detection and correction
EECS 325/425, Fall 2005 November 11
2Chapter 5 The Data Link Layer
- Our goals
- understand principles behind data link layer
services - error detection, correction
- sharing a broadcast channel multiple access
protocols - link layer addressing
- reliable data transfer, flow control also
supported by link layer. - instantiation and implementation of various link
layer technologies
3Chapter 5 outline
- 5.1 Introduction and services
- 5.2 Error detection and correction
- 5.3Multiple access protocols
- 5.4 LAN addresses and ARP
- 5.5 Ethernet
- 5.6 Hubs and switches
- 5.7 PPP
- 5.8 Link Virtualization
- 5.9 Summary
- Also wireless links
4Link Layer Introduction
- Some terminology
- hosts and routers are nodes
- (bridges and switches too)
- communication channels that connect adjacent
nodes along communication path are links - wired links
- wireless links
- LANs
- 2-PDU is a frame, encapsulates datagram
data-link layer has responsibility of
transferring datagram from one node to adjacent
node over a link
5Link layer context
- transportation analogy
- trip from Princeton to Lausanne
- limo Princeton to JFK
- plane JFK to Geneva
- train Geneva to Lausanne
- tourist datagram
- transport segment communication link
- transportation mode link layer protocol
- travel agent routing algorithm
- Datagram transferred by different link protocols
over different links - e.g., Ethernet on first link, frame relay on
intermediate links, 802.11 on last link - Each link protocol provides different services
- e.g., may or may not provide reliable data
transfer over link
6Link Layer Services
- Framing
- encapsulate datagram into frame, adding header,
trailer - Link access
- channel access if shared medium
- physical addresses used in frame headers to
identify source, dest - different from IP address!
- Reliable delivery
- we learned how to do this already (chapter 3,
between two end-hosts)! - seldom used on low bit error link (fiber, some
twisted pair) - wireless links high error rates
- Q why both link-level and end-end reliability?
7Link Layer Services (more)
- Flow Control
- pacing between adjacent sending and receiving
nodes. Similar to transport-layer flow control?
when do we need it? - Error Detection
- errors caused by signal attenuation, noise.
- receiver detects presence of errors
- signals sender for retransmission or drops frame
- Error Correction
- receiver identifies and corrects bit error(s)
without resorting to retransmission - Half-duplex and full-duplex
- with half duplex, both ends of link can transmit,
but not at same time
8Adaptors Communicating
datagram
receiving node
link layer protocol
sending node
bus
physical link
adapter
adapter
- receiving side
- looks for errors, reliable transfer, flow
control, etc - extracts datagram, passes to receiving node
- adapter is semi-autonomous
- link physical layers
- link layer implemented in adaptor (a.k.a. NIC)
- Ethernet card, PCMCI card, 802.11 card
- sending side
- encapsulates datagram in a frame
- adds error checking bits, reliable data transfer,
flow control, etc.
9Chapter 5 outline
- 5.1 Introduction and services
- 5.2 Error detection and correction
- 5.3Multiple access protocols
- 5.4 LAN addresses and ARP
- 5.5 Ethernet
- 5.6 Hubs, bridges, and switches
- 5.7 Wireless links and LANs
- 5.8 PPP
- 5.9 ATM
- 5.10 Frame Relay
10Error Detection
- 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
11Parity Checking
Two Dimensional Bit Parity Detect and correct
single bit errors
Single Bit Parity Detect single bit errors
0
0
FEC (Forward Error Correction) commonly
used multimedia transmission. Advantages?
12Recall Internet checksum
- Goal detect errors (e.g., flipped bits) in
transmitted segment (note used at transport
layer only)
- Receiver
- compute checksum of received segment
- check if computed checksum equals checksum field
value - NO - error detected
- YES - no error detected. But maybe errors
nonetheless?
- Sender
- treat segment contents as sequence of 16-bit
integers - checksum addition (1s complement sum) of
segment contents - sender puts checksum value into UDP checksum
field
13Checksumming Cyclic Redundancy Check
- sender/receiver choose a well-known r1 bit
pattern (generator), G. It makes sense to have a
highest bit 1. - view data bits, D, as a binary number
- goal choose r CRC bits, R, such that
- ltD,Rgt exactly divisible by G (modulo 2)
- receiver knows G, divides ltD,Rgt by G. If
non-zero remainder error detected! - can detect all burst errors less than r1 bits
- widely used in practice
14CRC Example
- Want
- D.2r XOR R nG
- equivalently
- D.2r nG XOR R
- equivalently
- if we divide D.2r by G, want remainder R
D.2r G
R remainder
15Food for thought CRC claims
- Last paragraph in the section
- Each of the CRC standards can detect burst
errors of fewer than r1 bits - Under appropriate assumption, a burst of length
greater than r1 bits is detected with
probability 1-0.5r - Each of the CRC standards can detect any odd
number of errors.
16Next week
- Multiple access protocols
- Ethernet