Title: Robert DengDing Xuhua
1Data Link Layer
2Outline
- Introduction link layer services
- Multiple access protocols
- LAN protocol architecture IEEE 802 Reference
Model - Link Layer Addressing
3Link 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
- data-link layer has responsibility of
transferring data frames from one node to
adjacent node over a link
Links
4Link Layer Services
- Framing, link access
- Encapsulate datagram into frame, adding header,
trailer - Channel access if shared medium
- MAC addresses used in frame headers to identify
source, dest
- Flow control
- Pacing between adjacent sending and receiving
nodes - Using Window/Ready/Not Ready to adjust traffic
- Reliable delivery between adjacent nodes
- Error detection and request retransmission if
data is lost or in received in error using
Automatic Repeat Request (ARQ)
5ARQ Stop-and-Wait
6Outline
- Introduction link layer services
- Multiple access protocols
- LAN protocol architecture IEEE 802 Reference
Model - Link Layer Addressing
7Multiple Access or Medium Access Control (MAC)
protocols
- Single shared broadcast channel collision
- Multiple access protocol
- Distributed algorithm that determines how nodes
share channel, i.e., determine when a node can
transmit - Three types
- Channel partitioning Random access Taking turns
8Channel Partitioning MAC protocols TDMA
- TDMA time division multiple access
- each station gets fixed length slot in each round
- unused slots go idle
Frequency
time
9Channel Partitioning MAC protocols FDMA
- FDMA frequency division multiple access
- channel spectrum divided into frequency bands
- each station assigned fixed frequency band
- unused transmission time in frequency bands go
idle
10Random Access Protocols
- When node has packet to send
- transmit at full channel data rate.
- no a priori coordination among nodes
- two or more transmitting nodes ? collision,
- random access MAC protocol specifies
- how to detect collisions
- how to recover from collisions (e.g., via delayed
retransmissions) - Examples of random access MAC protocols
- CSMA, CSMA/CD
11CSMA (Carrier Sense Multiple Access)
- CSMA listen before transmit
- If channel sensed idle transmit entire frame
- If channel sensed busy, defer transmission
- Human analogy dont interrupt others!
12CSMA collisions
spatial layout of nodes
Collisions can still occur propagation delay
means two nodes may not hear each others
transmission
Collision both B D continue to transmit though
a collision has occurred entire packet
transmission time wasted
Note the longer the propagation delay, the
larger the chance that a node is not yet able to
sense a transmission that has begun at another
node
13CSMA/CD (Collision Detection)
- CSMA/CD Algorithm
- If channel is sensed idle, transmit otherwise go
to step 2 - If channel is busy, continue to listen until it
is idle, then transmit immediately - If a collision is detected during transmission,
cease transmission, and wait a random amount of
time, then attempt to transmit again (repeat from
step 1) - Advantage
- Collisions detected within short time colliding
transmissions aborted, reducing channel wastage - Human analogy the polite conversationalist
- Used in Ethernet
14CSMA/CD collision detection
15Taking Turns MAC protocols
- Channel partitioning MAC protocols
- share channel efficiently and fairly at high load
- inefficient at low load delay in channel access,
1/N bandwidth allocated even if only 1 active
node - Random access MAC protocols
- efficient at low load single node can fully
utilize channel - high load collision overhead
- Taking turns protocols
- look for best of both worlds
16Taking Turns MAC protocols
- Token passing
- control token passed from one node to next
sequentially. - token message
- concerns
- token overhead
- latency
- single point of failure (token)
-
- Polling
- master node invites slave nodes to transmit in
turn - concerns
- polling overhead
- latency
- single point of failure (master)
17Outline
- Introduction link layer services
- Multiple access protocols
- LAN protocol architecture IEEE 802 Reference
Model - Link Layer Addressing
18IEEE 802 Reference Model
- IEEE 802 committees develop, revise, and extend
standards - Use a three-layer protocol hierarchy physical,
medium access control (MAC), and logical link
control (LLC)
19IEEE 802 Protocol Models Compared to OSI Model
IEEE Institute of Electrical and Electronics
Engineers
Internet Protocol Stack
IEEE 802 Reference Model
Application Transport Network Data
Link Physical
Logical Link Control Medium Access
Control Physical
20Outline
- Introduction link layer services
- Multiple access protocols
- LAN protocol architecture IEEE 802 Reference
Model - Link Layer Addressing
21IP Addresses and MAC Addresses
- 32-bit IP address
- network-layer address
- used to get datagram to destination IP host
- MAC address
- also called LAN or physical or Ethernet address
- used to get link frame from one interface to
another physically-connected interface (same
network) - 48 bit MAC address (for most LANs) burned in the
adapter ROM
22MAC Addresses
Each adapter on LAN has an unique MAC address
Broadcast address FF-FF-FF-FF-FF-FF
adapter
23ARP Address Resolution Protocol
- Each IP node (Host, Router) on LAN has an ARP
table - ARP Table IP/MAC address mappings for some LAN
nodes - lt IP address MAC address TTLgt
- TTL (Time To Live) time after which address
mapping will be forgotten (typically 20 min)
237.196.7.78
1A-2F-BB-76-09-AD
237.196.7.23
237.196.7.14
LAN
71-65-F7-2B-08-53
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
237.196.7.88
24ARP protocol
- A wants to send datagram to B, and Bs MAC
address not in As ARP table. - A broadcasts ARP query packet, containing B's IP
address - Dest MAC address FF-FF-FF-FF-FF-FF
- all machines on LAN receive ARP query
- B receives ARP packet, replies to A with its
(B's) MAC address - frame sent to As MAC address using unicast
- A caches (saves) IP-to-MAC address pair in its
ARP table until information becomes old (times
out) - ARP is plug-and-play
- nodes create their ARP tables without
intervention from net administrator
25Summary
- Introduction link layer services
- link layer frames
- responsible for transferring data frames to
adjacent node - error detection, ARQ, flow control
- Multiple access protocols
- channel partitioning TDMA, FDMA, CDMA
- random access CSMA, CSMA/CD
- Taking turns Polling and token passing
- LAN protocol architecture IEEE 802 Reference
Model - Link layer addressing
- MAC addresses and ARP
26Reading Assignments