More on the link layer Logical Link Control (LLC) Medium Access Control (MAC) - PowerPoint PPT Presentation

1 / 72
About This Presentation
Title:

More on the link layer Logical Link Control (LLC) Medium Access Control (MAC)

Description:

binary countdown protocol (log2n bits); dash indicates silence. (AND ... random backoff (countdown proceeds while channel is idle) 802.11 distribution services ... – PowerPoint PPT presentation

Number of Views:803
Avg rating:3.0/5.0
Slides: 73
Provided by: lyle1
Category:

less

Transcript and Presenter's Notes

Title: More on the link layer Logical Link Control (LLC) Medium Access Control (MAC)


1
More on the link layerLogical Link Control
(LLC)Medium Access Control (MAC)
2
link layer functions
  • services
  • un-ACKed connectionless
  • ACKed connectionless
  • ACKed connection oriented
  • framing
  • encoding
  • error control
  • flow control (vs. congestion control?)
  • MAC

3
point-to-point vs. broadcast media
  • point-to-point
  • PPP for dial-up access
  • point-to-point link between Ethernet switch and
    host
  • broadcast (shared wire or medium)
  • traditional Ethernet
  • 802.11 wireless LAN

4
data link protocols (logical)
  • unrestricted simplex
  • simplex stop-and-wait
  • simplex for noisy channel
  • discussion
  • sliding window protocols

5
sliding window protocols
  • piggybacked ACKs
  • less overhead (bandwidth, interrupts, buffering,
    ...)
  • how to deal with timeouts?
  • sequence numbers
  • sending window
  • receiving window

6
1-frame sliding window
7
1-bit sliding window
(seq, ACK, pkt) ACK last OK frame
8
pipelining
  • idea
  • do not block transmitter during the roundtrip
    time
  • increase the window size
  • what happens with errors
  • go back n
  • selective repeat

9
go back n
  • if error
  • receiver discards subsequent frames
  • no ACKs for the discarded frames
  • receiver window size 1
  • transmitter times-out, resends unACKed frames
  • inefficient if the error rate is high

10
selective repeat
  • if error
  • receiver still stores the subsequent good frames
  • transmitter retransmits the bad frame
  • receiver window size gt 1
  • efficient at higher error rate
  • trade-off between bandwidth and buffer space

11
sliding window schemes
go back n
  • go back n (frames received out of sequence
    discarded)
  • selective repeat (frames received out of
    sequence buffered)
  • (after error, receiver may NAK frame 2
    to short-circuit sender timeout)

(a
12
3-bit sequence numbers
13
line utilization
  • b channel capacity in bits per second
  • f frame size in bits
  • R round-trip propagation time
  • frame transmission time (f / b) seconds
  • line utilization f / (f bR)
  • if f lt bR, then efficiency lt 1/2

14
window size
  • sender needs n buffers for window size n
  • go back n
  • sender needs enough buffers for
  • timeout
  • RTT of frame NACK
  • selective repeat
  • window size floor((maxseq1)/2)
  • why?
  • optimal window size, sequences

15
(review this in detail)protocol specification by
FSM
  1. state diagram key to state ovals (SRC), S in
    0,1, R in 0,1, C in 0,1,A,-
  2. transition chart

(from Tanenbaum text)
16
(review this in detail)Petri net for simplex
wait for ACK
  • Tanenbaum 4/e, 233
  • places, tokens, transitions, input/output arcs
  • tokens not conserved
  • no composite states
  • sender, receiver, channel separated
  • transitions may be viewed as a grammar

17
multiple access protocols
  • single shared broadcast channel
  • multiple nodes can speak at once
  • collisions lead to garbled data
  • multiple access protocol (medium access control)
  • distributed algorithm for sharing the channel
  • algorithm determines which node can transmit

18
types of MAC
  • static bandwidth allocation channel partitioning
  • TDM
  • FDM
  • CDMA (see handout)
  • problems?
  • deterministic sharing
  • token-passing
  • polling
  • reservations, scheduling
  • contention
  • random access allow collisions, and then recover
  • ALOHA, CSMA, more

19
taking 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)

20
token rings
  • (a) transmit token after frame is sent
  • (b) transmit token while frame is being stripped

21
ring topology
  • self-healing ring (SHR)

22
random access protocols
  • when node has packet to send
  • transmit at full channel data rate
  • no a priori coordination among nodes
  • gt 2 nodes transmit concurrently ? collision
  • random access MAC protocol specification
  • collision detection
  • collision recovery
  • examples
  • ALOHA, slotted ALOHA
  • CSMA, CSMA/CD, CSMA/CA

23
key ideas of random access
  • station model
  • n independent stations (nodes, terminals)
  • single channel
  • all transmission/reception on shared channel
  • nodes have equivalent ability
  • node priority may vary dynamically
  • time
  • continuous
  • slotted (discrete, timed intervals, master
    clock)

24
key ideas of random access
  • carrier sense (or not)
  • listen before speaking, and dont interrupt
  • check if someone else is already sending data ...
  • wait till the other node is done
  • collision detection (or not)
  • if someone else starts talking at the same time,
    stop
  • if the data on the wire is garbled ...
  • ... another node is transmitting, too, so stop
  • randomness
  • dont start talking again right away
  • wait for a random time before trying again

25
pure ALOHA
  • in pure ALOHA, frames are transmitted at
    completely arbitrary times

temporal collisions destroy colliding frames
send when data arrives if collision, random
delay, resend
26
ALOHA
  • Vulnerable period for the shaded frame.

shaded frame vulnerability period modeled as two
frame times
intuition collisions of partially-overlapping
frames
slotted ALOHA during contention, frames
collide in some single slot/frame time
27
slotted ALOHA
  • assumptions
  • all frames same size
  • time divided into equal slots (time to transmit a
    frame)
  • nodes start to transmit frames only at start of
    slots
  • nodes are synchronized
  • if two or more nodes transmit, all nodes detect
    collision
  • operation
  • when node obtains fresh frame, transmits in next
    slot
  • no collision node can send new frame in next
    slot
  • collision node retransmits frame in each
    subsequent slot with probability p until success

28
pure vs. slotted ALOHA
  • Throughput versus offered traffic for ALOHA
    systems.

max throughput ALOHA 1/(2e) 18 slotted
ALOHA 1/e 37
29
CSMA carrier sensing multiple access
  • 1-persistent CSMA
  • if idle, send ... if collision, random delay,
    sense ...
  • propagation delay ? collision
  • two nodes waiting for idle ? collision
  • idea behind Ethernet LAN protocol
  • non-persistent CSMA
  • if idle, send else, random delay
  • p-persistent CSMA (slotted time)
  • if idle, send with probability p if collision,
    random delay
  • slotted transmission discipline

30
persistent and non-persistent CSMA
non-persistent CSMA very good throughput under
high load 0.01-persistent CSMA best throughput
tolerance for delay can enhance throughput in
chaotic environments
31
collision-free protocols
  • basic bit-map protocol

- contention slots are constant overhead -
overhead means less as frames get large
32
collision-free protocols
addresses
(AND of addresses)
  • binary countdown protocol (log2n bits) dash
    indicates silence.

33
limited-contention protocols
  • Acquisition probability for a symmetric
    contention channel.

throughput of contention protocols under high load
1/e
- motivation for hybrid deterministic/probabilisti
c protocols - idea allow contention at low load,
use taking-turns at high load
34
adaptive tree walk protocol
  • tree for eight stations depth first search, LR

nodes
- at idle, each station ready to send data
signals 1 or not, according to a clever
plan - example only station H ready to send
slot1 1 (candidate sender is under 1),
s2 0 (not under 2), s3 0 (not under 6),
s4 0 (not G), s5 1 (H). - for binary tree,
sender is chosen in O(log2(n)) time
35
WDM access protocol (one example out of 100s)
  • Wavelength division multiple access.

- fixed data output control input - tunable
data input control output - on control channel
control slots on data channel, status slot -
classes of traffic CBR, VBR, datagram
36
IEEE 802.3 Ethernet
  • Metcalfe, Boggs, 1976 first LAN, the
    Ethernet
  • TCP/IP/Ethernet a connectionless stack
  • simple to use, reliable, cheap, scalable
  • LAN collision domains (broadcast) (bus, hub)
  • store-and-forward switches, point-to-point links
  • 10 Mbps, 100 Mbps, gigabit, 10 gigabit
  • becoming very rare for network paths not to
    traverse any Ethernet links

37
original flavor 10 Mbps Ethernet
  • common kinds of Ethernet cabling

only twisted pair and fiber are still being
deployed (except in specialized environments)
38
10 Mbps (plain) Ethernet PHY
(a) and (b) (10base5, 10base2) seldom
deployed (c) 10baseT hub is a collision domain
39
10 Mbps Ethernet PHY topologies
- broadcast medium - same logical topologies - no
loops (rings) allowed
  • no path has gt 4 repeaters
  • - network diameter lt 2500 m

40
intermission
41
Ethernet MAC sublayer protocol
  • - no two nodes are farther apart than A and B
  • t is the diameter of the network,
  • the one-way propagation time between the
    farthest nodes

42
Ethernet CSMA/CD (Collision Detection)
contention slot time 2t max(signal round-trip
time)
(10 Mbps Ethernet slot 51.2 microsec 512
100-nanosec-wide bits)
contention period series of slot-length
collisions/jamming frames half-duplex cannot
receive while listening for own transmission
collision
  • sense if idle, send if collision, abort,
    random delay

43
performance of Ethernet
efficiency of 10 Mbps Ethernet, 512-bit slot times
44
switched Ethernet vs. hub
half-duplex
collision domain
full-duplex point-to-point links
45
100 Mbps (fast) Ethernet cabling
T4 4 each, cat 3 unshielded twisted pairs,
3 pairs simplex forward, 1 pair simplex
reverse (dynamic) ternary encoding
(trits, not bits) TX 2 each cat 5 unshielded
twisted pairs (opposing simplex) FX 2 multimode
fiber (opposing simplex), point-to-point links
only
46
gigabit Ethernet cabling
100 m and 25 m copper segments used, e.g., in
data center or POP of ISP
47
Ethernet MAC sublayer framing
(a) DIX (Digital, Intel, Xerox) (b) IEEE 802.3
preamble for receiver clock sync dest addr 0
unicast, 1 multicast, all 1s broadcast type
network protocol to call at dest, OR length
data bytes (type embedded in data) pad frame
length (without preamble) gt 64 bytes 512 bits
48
Why MAC is a sublayer
  • Ethernet (one of the MAC protocols) interfaces
    directly to network layer (IP)
  • the Ethernet MAC offers best-effort,
    no-guarantee, datagram service
  • this is great for TCP/IP, nothing else is needed
  • but, other network layer protocols expect link
    layer error control and flow control services
  • IEEE 802.2 (LLC) supports these services, built
    on various MAC sublayers (e.g., Ethernet)

49
IEEE 802.2 logical link control
- Ethernet MAC sends best effort datagrams - LLC
supports flow-control error-control
PHY
PHY
  • (a) network layer sees the same LLC, regardless
    of type of MAC
  • (b) LLC encapsulates network layer packet,
  • MAC encapsulates LLC frame before passing
    to PHY

50
wireless LANs
  • IEEE 802.11 (WiFi)
  • Distributed Coordination Function (DCF )
  • CSMA-CA
  • Point Control Function (PCF)
  • centrally controlled by basestation (access
    point)
  • short-range RF (rooms, battlefields)
  • ad hoc and basestation flavors
  • many PHY layer options
  • 802.11, 802.11a, 802.11b, 802.11g, 802.11n
    (pre-std)

51
The 802.11 Protocol Stack
11 Mbps
54 Mbps
54 Mbps
1-2 Mbps
1997
1999
2001
52
CSMA fails off the wire
why CSMA falls short in packet radio networks
and mobile ad hoc networks
  • C wants to send to B
  • channel sounds clear to C
  • C cannot hear A
  • the hidden station problem

C wants to send to D channel sounds busy to C D
cannot hear B the exposed station problem
(not unhidden station problem)
53
wireless LAN protocols (CSMA-CA)
  • MACA(W), multiple access collision avoidance
  • A sends RTS to B, B sends CTS to A
  • all potential interrupters hear
    B's CTS, wait for frame
  • (Wireless sense first, ACK every frame,
    sophisticated backoff)

54
802.11 MAC sublayer protocol
  • The use of virtual channel sensing using CSMA/CA.

- C hears As RTS D hears Bs CTS (NAV
transmitter quiet time) - notice how politely C
and D each set aside time for A and B
55
802.11 MAC sublayer protocol
  • A fragment burst.
  • A sends a burst to B C and D wait for it
  • after each data or control frame, a system of
    delay intervals

56
802.11 delay timing
  • how can PCF and DCF protocols coexist?
  • end of frame or ACK starts series of timers
  • Short, PCF, DCF, Expanded InterFrame Spacing
  • Short for burst fragment, receiver ACK, or CTS
  • PCF for central control (beacons, polling)
  • DCF for contention (RTS)
  • Extended for bad frame reporting (NAK)

57
802.11 MAC sublayer protocol
PCF and DCF coexist in a single collision domain
  • Interframe spacing in 802.11.

fragment
CTS
FRAME
dead
ACK
central ctl
RTS
NAK
ACK
the starting guns go off at different times for
different frame types
58
RF signaling
  • RF signal strength at node's own antenna
  • 2-antenna implementation?
  • shared channel
  • RF signal strength from distant antennae
  • how to detect?
  • interference
  • fading
  • multipath

59
IEEE 802.11
  • access point infrastructure largely 802.11
  • 100 Million 802.11 chipsets per annum (out of
    date statistic)
  • strong application development efforts
  • IEEE 802.11 spec CSMA-CA
  • RTS/CTS channel reservation, ACK
  • explicit ACK
  • CSMA sender will not hear interference, fading,
    multipath
  • contention short RTS frames, collisions waste
    less
  • if senders CTS times out, it knows the RTS
    failed
  • random backoff (countdown proceeds while channel
    is idle)

60
802.11 distribution services
  • association (connect to access point cell)
  • beacons in the jungle there can only be one
  • next, DHCP discovery
  • disassociation
  • reassociation (cell-to-cell handover)
  • distribution (how to route frames)
  • integration (802.11 ? external network format)

61
802.11 intracell services
  • authentication (challenge frame, key, encryption)
  • if invoked, a pre-condition for association
  • deauthentication
  • privacy (data encryption)
  • data delivery (best effort)

62
802.11 data frame
  • type data, ctl, mgt subtype RTS, CTS, probe
    (scanning for new AP)
  • to DS/from DS activation of address 3, 4 for
    distribution system APs
  • MF more frags retry more (frames)
  • duration, sequence

63
broadband wireless comparison ...
  • 802.11 (WiFi)
  • mobile Ethernet LAN
  • centralized infrastructure (APs and cell
    architecture)
  • or, distributed architecture
  • ad hoc
  • mobile ad hoc (MANET)
  • best effort delivery
  • short range, half-duplex
  • power concerns
  • limited budget (commodotized)

64
... broadband wireless comparison
  • 802.16 (WiMax)
  • wireless local loop for buildings
  • metro area coverage, full duplex
  • many users aggregated per endpoint
  • connection oriented
  • FEC (Hamming codes), security
  • base station control (centralized control)
  • fixed, directional antennas

65
802.16 Protocol Stack
modulation schemes vary with range to end-points
(what is wrong with this picture?)
66
The 802.16 Physical Layer
  • The 802.16 transmission environment.

67
The 802.16 Physical Layer
  • shown TDD (time division duplexing) PHY frames
  • not shown FDD (frequency division duplexing)
  • millimeter RF waves are not omnidirectional

68
The 802.16 Frame Structure
  • (a) A generic frame. (b) A bandwidth request
    frame.

69
802.16 MAC sublayer protocol
  • service classes
  • constant bit rate service (regular slots)
  • real-time variable bit rate service (regular
    polling)
  • non-real-time variable bit rate service (frequent
    polling)
  • best effort service (contend for request slots)
  • aggregator switch at subscriber building may
    negotiate with base station for all users, and
    arbitrate received bandwidth between users

70
personal area networks (PANs)
  • Bluetooth (Ericsson, IBM, Intel, Nokia, Toshiba)
  • cable replacement
  • specifies complete networking stack
  • TDM 10 m 2.4 Ghz FHSS 79 1-MHz channels
  • IEEE 802.15
  • only PHY LL
  • interferes with 802.11 (2.4 GHz)
  • master/slave piconets
  • slaves can bridge piconets to form scatternets

71
remarks
  • networks run on various link layer technologies
  • point-to-point links vs. shared media
  • wide varieties within each class
  • link layer performs key services
  • encoding, framing, and error detection
  • optionally error correction and flow control
  • shared media introduce interesting challenges
  • decentralized control over resource sharing
  • partitioned channel, taking turns, and random
    access
  • Ethernet as a wildly popular example
  • next switches and bridges

72
summary/glossary
Write a Comment
User Comments (0)
About PowerShow.com