Topic2c.ppt
-
Upload
johnsondon -
Category
Documents
-
view
1.465 -
download
1
description
Transcript of Topic2c.ppt
DataLink Layer 1
Topic 2Data Link LayerPart C
The majority of the slides in this course are adapted from the accompanying slides to the books by Larry Peterson and Bruce Davie and by Jim Kurose and Keith Ross Additional slides andor figures from other sources and from Vasos Vassiliou are also included in this presentation
DataLink Layer 2
Media Access Control Where
Centralbull Greater controlbull Simple access logic at stationbull Avoids problems of co-ordinationbull Single point of failurebull Potential bottleneck
Distributed How
Synchronousbull Specific capacity dedicated to connection
Asynchronousbull In response to demand
DataLink Layer 3
Asynchronous Systems Round robin
Good if many stations have data to transmit over extended period
Reservation Good for stream traffic
Contention Good for bursty traffic All stations contend for time Distributed Simple to implement Efficient under moderate load Tend to collapse under heavy load
DataLink Layer 4
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo point-to-point
PPP for dial-up access point-to-point link between Ethernet switch and host
broadcast (shared wire or medium) traditional Ethernet upstream HFC 80211 wireless LAN
DataLink Layer 5
Multiple Access protocols single shared broadcast channel two or more simultaneous transmissions by nodes
interference collision if node receives two or more signals at the same
timemultiple access protocol distributed algorithm that determines how nodes
share channel ie determine when node can transmit
communication about channel sharing must use channel itself no out-of-band channel for coordination
DataLink Layer 6
Ideal Mulitple Access ProtocolBroadcast channel of rate R bps1 When one node wants to transmit it can send
at rate R2 When M nodes want to transmit each can
send at average rate RM3 Fully decentralized
no special node to coordinate transmissions no synchronization of clocks slots
4 Simple
DataLink Layer 7
MAC Protocols a taxonomyThree broad classes Channel Partitioning
divide channel into smaller ldquopiecesrdquo (time slots frequency code)
allocate piece to node for exclusive use Random Access
channel not divided allow collisions ldquorecoverrdquo from collisions
ldquoTaking turnsrdquo Nodes take turns but nodes with more to send can
take longer turns
DataLink Layer 8
Channel Partitioning MAC protocols TDMA
TDMA time division multiple access access to channel in rounds each station gets fixed length slot (length = pkt trans time) in each round unused slots go idle example 6-station LAN 134 have pkt slots 256 idle
TDM (Time Division Multiplexing) channel divided into N time slots one per user inefficient with low duty cycle users and at light load
FDM (Frequency Division Multiplexing) frequency subdivided
DataLink Layer 9
Channel 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 example 6-station LAN 134 have pkt frequency bands 256 idle
TDM (Time Division Multiplexing) channel divided into N time slots one per user inefficient with low duty cycle users and at light load
FDM (Frequency Division Multiplexing) frequency subdivided
frequ
ency
ban
ds
time
DataLink Layer 10
Random Access Protocols When node has packet to send
transmit at full channel data rate R no a priori coordination among nodes
two or more transmitting nodes ldquocollisionrdquo random access MAC protocol specifies
how to detect collisions how to recover from collisions (eg via delayed
retransmissions) Examples of random access MAC protocols
slotted ALOHA ALOHA CSMA CSMACD CSMACA
DataLink Layer 11
Slotted ALOHAAssumptions all frames same size time is divided into
equal size slots time to transmit 1 frame
nodes start to transmit frames only at beginning of slots
nodes are synchronized if 2 or more nodes
transmit in slot all nodes detect collision
Operation when node obtains fresh
frame it transmits in next slot
no collision node can send new frame in next slot
if collision node retransmits frame in each subsequent slot with prob p until success
DataLink Layer 12
Slotted ALOHA
Pros single active node can
continuously transmit at full rate of channel
highly decentralized only slots in nodes need to be in sync
simple
Cons collisions wasting
slots idle slots nodes may be able to
detect collision in less than time to transmit packet
clock synchronization
DataLink Layer 13
Slotted Aloha efficiency
Suppose N nodes with many frames to send each transmits in slot with probability p
probability that node 1 has success in a slot = p(1-p)N-1
probability that any node has a success = Np(1-p)N-1
For max efficiency with N nodes find p that maximizes Np(1-p)N-1
For many nodes take limit of Np(1-p)N-1
as N goes to infinity gives 1e = 37
Efficiency is the long-run fraction of successful slots when there are many nodes each with many frames to send
At best channelused for useful transmissions 37of time
DataLink Layer 15
Pure ALOHA (2)Vulnerable period for the shaded frame
DataLink Layer 16
Pure Aloha efficiencyP(success by given node) = P(node transmits) P(no other node transmits in [p0-1p0]
P(no other node transmits in [p0-1p0] = p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n -gt infty
= 1(2e) = 18 Even worse
DataLink Layer 17
ALOHA EfficiencyThroughput versus offered traffic for
ALOHA systems
DataLink Layer 18
CSMA (Carrier Sense Multiple Access) Propagation time is much less than transmission time All stations know that a transmission has started almost immediately First listen for clear medium (carrier sense) If channel sensed busy defer transmission If channel sensed idle transmit entire frame
Wait reasonable time (round trip plus ACK contention) No ACK then retransmit
If two stations start at the same instant collision Max utilization depends on propagation time (medium length) and frame
length Longer frame and shorter propagation gives better utilization
DataLink Layer 19
CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted
spatial layout of nodes
noterole of distance amp propagation delay in determining collision probability
DataLink Layer 20
Nonpersistent CSMA1 If medium is idle transmit otherwise go to 22 If medium is busy wait amount of time drawn
from probability distribution (retransmission delay) and repeat 1
Random delays reduces probability of collisions Consider two stations become ready to transmit at
same time bull While another transmission is in progress
If both stations delay same time before retrying both will attempt to transmit at same time
Capacity is wasted because medium will remain idle following end of transmission Even if one or more stations waiting
Nonpersistent stations deferential
DataLink Layer 21
1-persistent CSMA To avoid idle channel time 1-persistent protocol
used Station wishing to transmit listens and obeys
following 1 If medium idle transmit otherwise go to step 22 If medium busy listen until idle then transmit
immediately 1-persistent stations selfish If two or more stations waiting collision
guaranteed Gets sorted out after collision
DataLink Layer 22
P-persistent CSMA Compromise that attempts to reduce collisions
Like nonpersistent And reduce idle time
Like1-persistent Rules1 If medium idle transmit with probability p and
delay one time unit with probability (1 ndash p) Time unit typically maximum propagation delay
2 If medium busy listen until idle and repeat step 13 If transmission is delayed one time unit repeat
step 1 What is an effective value of p
DataLink Layer 23
Value of p Avoid instability under heavy load n stations waiting to send End of transmission expected number of stations attempting
to transmit is number of stations ready times probability of transmitting n x p
If n x p gt 1 on average there will be a collision Repeated attempts to transmit almost guaranteeing more
collisions Retries compete with new transmissions Eventually all stations trying to send
Continuous collisions zero throughput So nxp lt 1 for expected peaks of n If heavy load expected p small However as p made smaller stations wait longer At low loads this gives very long delays
DataLink Layer 24
Persistent and Nonpersistent CSMA
Comparison of the channel utilization versus load for various
random access protocols
DataLink Layer 25
Which Persistence Algorithm IEEE 8023 uses 1-persistent Both nonpersistent and p-persistent have
performance problems 1-persistent (p = 1) seems more unstable
than p-persistent Greed of the stations But wasted time due to collisions is short (if
frames long relative to propagation delay With random backoff unlikely to collide on next
tries To ensure backoff maintains stability IEEE 8023
and Ethernet use binary exponential backoff
DataLink Layer 26
CSMACD (Collision Detection) With CSMA collision occupies medium
for duration of transmission Stations listen whilst transmitting
1 If medium idle transmit otherwise step 2
2 If busy listen for idle then transmit3 If collision detected jam then cease
transmission4 After jam wait random time then start
from step 1
DataLink Layer 27
CSMACDCSMACD carrier sensing deferral as in CSMA
collisions detected within short time colliding transmissions aborted reducing channel
wastage collision detection
easy in wired LANs measure signal strengths compare transmitted received signals
difficult in wireless LANs receiver shut off while transmitting
human analogy the polite conversationalist
DataLink Layer 28
CSMACD collision detection
DataLink Layer 29
CSMACD
DataLink Layer 30
CSMACDOperation
DataLink Layer 31
ldquoTaking Turnsrdquo MAC protocolsPolling master node
ldquoinvitesrdquo slave nodes to transmit in turn
concerns polling overhead latency single point of
failure (master)
Token passing control token passed
from one node to next sequentially
token message concerns
token overhead latency single point of failure
(token)
DataLink Layer 32
Summary of MAC protocols What do you do with a shared media
Channel Partitioning by time frequency or code
bull Time Division Frequency Division Random partitioning (dynamic)
bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire)
hard in others (wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
Taking Turnsbull polling from a central site token passing
DataLink Layer 33
Summary of MAC protocolsChannel partitioning MAC protocols
share channel efficiently and fairly at high load inefficient at low load delay in channel access
1N 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
ldquotaking turnsrdquo protocolslook for best of both worlds
DataLink Layer 34
Ethernet Overview History
developed by Xerox PARC in mid-1970s roots in Aloha packet-radio network standardized by Xerox DEC and Intel in
1978 similar to IEEE 8023 standard
Metcalfersquos Ethernetsketch
DataLink Layer 35
Ethernetldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps
DataLink Layer 36
Star topology Bus topology popular through mid 90s Now star topology prevails Connection choices hub or switch (more later)
hub orswitch
DataLink Layer 37
Ethernet Frame StructureSending adapter encapsulates IP datagram (or
other network layer protocol packet) in Ethernet frame
Preamble 7 bytes with pattern 10101010 followed by one
byte with pattern 10101011 used to synchronize receiver sender clock rates
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 38
Ethernet Frame Structure (more) Addresses 6 bytes
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol
otherwise adapter discards frame Type indicates the higher layer protocol
(mostly IP but others may be supported such as Novell IPX and AppleTalk)
CRC checked at receiver if error is detected the frame is simply dropped
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 39
Unreliable connectionless service Connectionless No handshaking between
sending and receiving adapter Unreliable receiving adapter doesnrsquot send
acks or nacks to sending adapter stream of datagrams passed to network layer can
have gaps gaps will be filled if app is using TCP otherwise app will see the gaps
DataLink Layer 40
Ethernet uses CSMACD No slots adapter doesnrsquot
transmit if it senses that some other adapter is transmitting that is carrier sense
transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection
Before attempting a retransmission adapter waits a random time that is random access
DataLink Layer 41
Ethernet CSMACD algorithm1 Adaptor receives datagram
from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
DataLink Layer 42
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential Backoff Goal adapt retransmission
attempts to estimated current load heavy load random wait
will be longer first collision choose K
from 01 delay is K 512 bit transmission times
after second collision choose K from 0123hellip
after ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
DataLink Layer 43
Collision Detection On baseband bus collision produces much
higher signal voltage than signal Collision detected if cable signal greater than
single station signal Signal attenuated over distance Limit distance to 500m (10Base5) or 200m
(10Base2) For twisted pair (star-topology) activity on
more than one port is collision Special collision presence signal
DataLink Layer 44
Algorithm (cont)
If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes
of data) delay and try again
bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected
k=02n - 1bull give up after several tries (usually 16)bull exponential backoff
DataLink Layer 45
Binary Exponential Backoff Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and
reports error As congestion increases stations back off by larger
amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff
efficient over wide range of loads Low loads 1-persistence guarantees station can
seize channel once idle High loads at least as stable as other techniques
Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first
DataLink Layer 46
Ethernet MAC Sublayer Protocol (2)
Collision detection can take as long as 2
DataLink Layer 47
Ethernet PerformanceEfficiency of Ethernet at 10 Mbps with
512-bit slot times
DataLink Layer 48
CSMACD efficiency Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame
Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap
transprop tt 511efficiency
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 2
Media Access Control Where
Centralbull Greater controlbull Simple access logic at stationbull Avoids problems of co-ordinationbull Single point of failurebull Potential bottleneck
Distributed How
Synchronousbull Specific capacity dedicated to connection
Asynchronousbull In response to demand
DataLink Layer 3
Asynchronous Systems Round robin
Good if many stations have data to transmit over extended period
Reservation Good for stream traffic
Contention Good for bursty traffic All stations contend for time Distributed Simple to implement Efficient under moderate load Tend to collapse under heavy load
DataLink Layer 4
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo point-to-point
PPP for dial-up access point-to-point link between Ethernet switch and host
broadcast (shared wire or medium) traditional Ethernet upstream HFC 80211 wireless LAN
DataLink Layer 5
Multiple Access protocols single shared broadcast channel two or more simultaneous transmissions by nodes
interference collision if node receives two or more signals at the same
timemultiple access protocol distributed algorithm that determines how nodes
share channel ie determine when node can transmit
communication about channel sharing must use channel itself no out-of-band channel for coordination
DataLink Layer 6
Ideal Mulitple Access ProtocolBroadcast channel of rate R bps1 When one node wants to transmit it can send
at rate R2 When M nodes want to transmit each can
send at average rate RM3 Fully decentralized
no special node to coordinate transmissions no synchronization of clocks slots
4 Simple
DataLink Layer 7
MAC Protocols a taxonomyThree broad classes Channel Partitioning
divide channel into smaller ldquopiecesrdquo (time slots frequency code)
allocate piece to node for exclusive use Random Access
channel not divided allow collisions ldquorecoverrdquo from collisions
ldquoTaking turnsrdquo Nodes take turns but nodes with more to send can
take longer turns
DataLink Layer 8
Channel Partitioning MAC protocols TDMA
TDMA time division multiple access access to channel in rounds each station gets fixed length slot (length = pkt trans time) in each round unused slots go idle example 6-station LAN 134 have pkt slots 256 idle
TDM (Time Division Multiplexing) channel divided into N time slots one per user inefficient with low duty cycle users and at light load
FDM (Frequency Division Multiplexing) frequency subdivided
DataLink Layer 9
Channel 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 example 6-station LAN 134 have pkt frequency bands 256 idle
TDM (Time Division Multiplexing) channel divided into N time slots one per user inefficient with low duty cycle users and at light load
FDM (Frequency Division Multiplexing) frequency subdivided
frequ
ency
ban
ds
time
DataLink Layer 10
Random Access Protocols When node has packet to send
transmit at full channel data rate R no a priori coordination among nodes
two or more transmitting nodes ldquocollisionrdquo random access MAC protocol specifies
how to detect collisions how to recover from collisions (eg via delayed
retransmissions) Examples of random access MAC protocols
slotted ALOHA ALOHA CSMA CSMACD CSMACA
DataLink Layer 11
Slotted ALOHAAssumptions all frames same size time is divided into
equal size slots time to transmit 1 frame
nodes start to transmit frames only at beginning of slots
nodes are synchronized if 2 or more nodes
transmit in slot all nodes detect collision
Operation when node obtains fresh
frame it transmits in next slot
no collision node can send new frame in next slot
if collision node retransmits frame in each subsequent slot with prob p until success
DataLink Layer 12
Slotted ALOHA
Pros single active node can
continuously transmit at full rate of channel
highly decentralized only slots in nodes need to be in sync
simple
Cons collisions wasting
slots idle slots nodes may be able to
detect collision in less than time to transmit packet
clock synchronization
DataLink Layer 13
Slotted Aloha efficiency
Suppose N nodes with many frames to send each transmits in slot with probability p
probability that node 1 has success in a slot = p(1-p)N-1
probability that any node has a success = Np(1-p)N-1
For max efficiency with N nodes find p that maximizes Np(1-p)N-1
For many nodes take limit of Np(1-p)N-1
as N goes to infinity gives 1e = 37
Efficiency is the long-run fraction of successful slots when there are many nodes each with many frames to send
At best channelused for useful transmissions 37of time
DataLink Layer 15
Pure ALOHA (2)Vulnerable period for the shaded frame
DataLink Layer 16
Pure Aloha efficiencyP(success by given node) = P(node transmits) P(no other node transmits in [p0-1p0]
P(no other node transmits in [p0-1p0] = p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n -gt infty
= 1(2e) = 18 Even worse
DataLink Layer 17
ALOHA EfficiencyThroughput versus offered traffic for
ALOHA systems
DataLink Layer 18
CSMA (Carrier Sense Multiple Access) Propagation time is much less than transmission time All stations know that a transmission has started almost immediately First listen for clear medium (carrier sense) If channel sensed busy defer transmission If channel sensed idle transmit entire frame
Wait reasonable time (round trip plus ACK contention) No ACK then retransmit
If two stations start at the same instant collision Max utilization depends on propagation time (medium length) and frame
length Longer frame and shorter propagation gives better utilization
DataLink Layer 19
CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted
spatial layout of nodes
noterole of distance amp propagation delay in determining collision probability
DataLink Layer 20
Nonpersistent CSMA1 If medium is idle transmit otherwise go to 22 If medium is busy wait amount of time drawn
from probability distribution (retransmission delay) and repeat 1
Random delays reduces probability of collisions Consider two stations become ready to transmit at
same time bull While another transmission is in progress
If both stations delay same time before retrying both will attempt to transmit at same time
Capacity is wasted because medium will remain idle following end of transmission Even if one or more stations waiting
Nonpersistent stations deferential
DataLink Layer 21
1-persistent CSMA To avoid idle channel time 1-persistent protocol
used Station wishing to transmit listens and obeys
following 1 If medium idle transmit otherwise go to step 22 If medium busy listen until idle then transmit
immediately 1-persistent stations selfish If two or more stations waiting collision
guaranteed Gets sorted out after collision
DataLink Layer 22
P-persistent CSMA Compromise that attempts to reduce collisions
Like nonpersistent And reduce idle time
Like1-persistent Rules1 If medium idle transmit with probability p and
delay one time unit with probability (1 ndash p) Time unit typically maximum propagation delay
2 If medium busy listen until idle and repeat step 13 If transmission is delayed one time unit repeat
step 1 What is an effective value of p
DataLink Layer 23
Value of p Avoid instability under heavy load n stations waiting to send End of transmission expected number of stations attempting
to transmit is number of stations ready times probability of transmitting n x p
If n x p gt 1 on average there will be a collision Repeated attempts to transmit almost guaranteeing more
collisions Retries compete with new transmissions Eventually all stations trying to send
Continuous collisions zero throughput So nxp lt 1 for expected peaks of n If heavy load expected p small However as p made smaller stations wait longer At low loads this gives very long delays
DataLink Layer 24
Persistent and Nonpersistent CSMA
Comparison of the channel utilization versus load for various
random access protocols
DataLink Layer 25
Which Persistence Algorithm IEEE 8023 uses 1-persistent Both nonpersistent and p-persistent have
performance problems 1-persistent (p = 1) seems more unstable
than p-persistent Greed of the stations But wasted time due to collisions is short (if
frames long relative to propagation delay With random backoff unlikely to collide on next
tries To ensure backoff maintains stability IEEE 8023
and Ethernet use binary exponential backoff
DataLink Layer 26
CSMACD (Collision Detection) With CSMA collision occupies medium
for duration of transmission Stations listen whilst transmitting
1 If medium idle transmit otherwise step 2
2 If busy listen for idle then transmit3 If collision detected jam then cease
transmission4 After jam wait random time then start
from step 1
DataLink Layer 27
CSMACDCSMACD carrier sensing deferral as in CSMA
collisions detected within short time colliding transmissions aborted reducing channel
wastage collision detection
easy in wired LANs measure signal strengths compare transmitted received signals
difficult in wireless LANs receiver shut off while transmitting
human analogy the polite conversationalist
DataLink Layer 28
CSMACD collision detection
DataLink Layer 29
CSMACD
DataLink Layer 30
CSMACDOperation
DataLink Layer 31
ldquoTaking Turnsrdquo MAC protocolsPolling master node
ldquoinvitesrdquo slave nodes to transmit in turn
concerns polling overhead latency single point of
failure (master)
Token passing control token passed
from one node to next sequentially
token message concerns
token overhead latency single point of failure
(token)
DataLink Layer 32
Summary of MAC protocols What do you do with a shared media
Channel Partitioning by time frequency or code
bull Time Division Frequency Division Random partitioning (dynamic)
bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire)
hard in others (wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
Taking Turnsbull polling from a central site token passing
DataLink Layer 33
Summary of MAC protocolsChannel partitioning MAC protocols
share channel efficiently and fairly at high load inefficient at low load delay in channel access
1N 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
ldquotaking turnsrdquo protocolslook for best of both worlds
DataLink Layer 34
Ethernet Overview History
developed by Xerox PARC in mid-1970s roots in Aloha packet-radio network standardized by Xerox DEC and Intel in
1978 similar to IEEE 8023 standard
Metcalfersquos Ethernetsketch
DataLink Layer 35
Ethernetldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps
DataLink Layer 36
Star topology Bus topology popular through mid 90s Now star topology prevails Connection choices hub or switch (more later)
hub orswitch
DataLink Layer 37
Ethernet Frame StructureSending adapter encapsulates IP datagram (or
other network layer protocol packet) in Ethernet frame
Preamble 7 bytes with pattern 10101010 followed by one
byte with pattern 10101011 used to synchronize receiver sender clock rates
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 38
Ethernet Frame Structure (more) Addresses 6 bytes
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol
otherwise adapter discards frame Type indicates the higher layer protocol
(mostly IP but others may be supported such as Novell IPX and AppleTalk)
CRC checked at receiver if error is detected the frame is simply dropped
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 39
Unreliable connectionless service Connectionless No handshaking between
sending and receiving adapter Unreliable receiving adapter doesnrsquot send
acks or nacks to sending adapter stream of datagrams passed to network layer can
have gaps gaps will be filled if app is using TCP otherwise app will see the gaps
DataLink Layer 40
Ethernet uses CSMACD No slots adapter doesnrsquot
transmit if it senses that some other adapter is transmitting that is carrier sense
transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection
Before attempting a retransmission adapter waits a random time that is random access
DataLink Layer 41
Ethernet CSMACD algorithm1 Adaptor receives datagram
from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
DataLink Layer 42
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential Backoff Goal adapt retransmission
attempts to estimated current load heavy load random wait
will be longer first collision choose K
from 01 delay is K 512 bit transmission times
after second collision choose K from 0123hellip
after ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
DataLink Layer 43
Collision Detection On baseband bus collision produces much
higher signal voltage than signal Collision detected if cable signal greater than
single station signal Signal attenuated over distance Limit distance to 500m (10Base5) or 200m
(10Base2) For twisted pair (star-topology) activity on
more than one port is collision Special collision presence signal
DataLink Layer 44
Algorithm (cont)
If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes
of data) delay and try again
bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected
k=02n - 1bull give up after several tries (usually 16)bull exponential backoff
DataLink Layer 45
Binary Exponential Backoff Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and
reports error As congestion increases stations back off by larger
amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff
efficient over wide range of loads Low loads 1-persistence guarantees station can
seize channel once idle High loads at least as stable as other techniques
Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first
DataLink Layer 46
Ethernet MAC Sublayer Protocol (2)
Collision detection can take as long as 2
DataLink Layer 47
Ethernet PerformanceEfficiency of Ethernet at 10 Mbps with
512-bit slot times
DataLink Layer 48
CSMACD efficiency Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame
Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap
transprop tt 511efficiency
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 3
Asynchronous Systems Round robin
Good if many stations have data to transmit over extended period
Reservation Good for stream traffic
Contention Good for bursty traffic All stations contend for time Distributed Simple to implement Efficient under moderate load Tend to collapse under heavy load
DataLink Layer 4
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo point-to-point
PPP for dial-up access point-to-point link between Ethernet switch and host
broadcast (shared wire or medium) traditional Ethernet upstream HFC 80211 wireless LAN
DataLink Layer 5
Multiple Access protocols single shared broadcast channel two or more simultaneous transmissions by nodes
interference collision if node receives two or more signals at the same
timemultiple access protocol distributed algorithm that determines how nodes
share channel ie determine when node can transmit
communication about channel sharing must use channel itself no out-of-band channel for coordination
DataLink Layer 6
Ideal Mulitple Access ProtocolBroadcast channel of rate R bps1 When one node wants to transmit it can send
at rate R2 When M nodes want to transmit each can
send at average rate RM3 Fully decentralized
no special node to coordinate transmissions no synchronization of clocks slots
4 Simple
DataLink Layer 7
MAC Protocols a taxonomyThree broad classes Channel Partitioning
divide channel into smaller ldquopiecesrdquo (time slots frequency code)
allocate piece to node for exclusive use Random Access
channel not divided allow collisions ldquorecoverrdquo from collisions
ldquoTaking turnsrdquo Nodes take turns but nodes with more to send can
take longer turns
DataLink Layer 8
Channel Partitioning MAC protocols TDMA
TDMA time division multiple access access to channel in rounds each station gets fixed length slot (length = pkt trans time) in each round unused slots go idle example 6-station LAN 134 have pkt slots 256 idle
TDM (Time Division Multiplexing) channel divided into N time slots one per user inefficient with low duty cycle users and at light load
FDM (Frequency Division Multiplexing) frequency subdivided
DataLink Layer 9
Channel 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 example 6-station LAN 134 have pkt frequency bands 256 idle
TDM (Time Division Multiplexing) channel divided into N time slots one per user inefficient with low duty cycle users and at light load
FDM (Frequency Division Multiplexing) frequency subdivided
frequ
ency
ban
ds
time
DataLink Layer 10
Random Access Protocols When node has packet to send
transmit at full channel data rate R no a priori coordination among nodes
two or more transmitting nodes ldquocollisionrdquo random access MAC protocol specifies
how to detect collisions how to recover from collisions (eg via delayed
retransmissions) Examples of random access MAC protocols
slotted ALOHA ALOHA CSMA CSMACD CSMACA
DataLink Layer 11
Slotted ALOHAAssumptions all frames same size time is divided into
equal size slots time to transmit 1 frame
nodes start to transmit frames only at beginning of slots
nodes are synchronized if 2 or more nodes
transmit in slot all nodes detect collision
Operation when node obtains fresh
frame it transmits in next slot
no collision node can send new frame in next slot
if collision node retransmits frame in each subsequent slot with prob p until success
DataLink Layer 12
Slotted ALOHA
Pros single active node can
continuously transmit at full rate of channel
highly decentralized only slots in nodes need to be in sync
simple
Cons collisions wasting
slots idle slots nodes may be able to
detect collision in less than time to transmit packet
clock synchronization
DataLink Layer 13
Slotted Aloha efficiency
Suppose N nodes with many frames to send each transmits in slot with probability p
probability that node 1 has success in a slot = p(1-p)N-1
probability that any node has a success = Np(1-p)N-1
For max efficiency with N nodes find p that maximizes Np(1-p)N-1
For many nodes take limit of Np(1-p)N-1
as N goes to infinity gives 1e = 37
Efficiency is the long-run fraction of successful slots when there are many nodes each with many frames to send
At best channelused for useful transmissions 37of time
DataLink Layer 15
Pure ALOHA (2)Vulnerable period for the shaded frame
DataLink Layer 16
Pure Aloha efficiencyP(success by given node) = P(node transmits) P(no other node transmits in [p0-1p0]
P(no other node transmits in [p0-1p0] = p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n -gt infty
= 1(2e) = 18 Even worse
DataLink Layer 17
ALOHA EfficiencyThroughput versus offered traffic for
ALOHA systems
DataLink Layer 18
CSMA (Carrier Sense Multiple Access) Propagation time is much less than transmission time All stations know that a transmission has started almost immediately First listen for clear medium (carrier sense) If channel sensed busy defer transmission If channel sensed idle transmit entire frame
Wait reasonable time (round trip plus ACK contention) No ACK then retransmit
If two stations start at the same instant collision Max utilization depends on propagation time (medium length) and frame
length Longer frame and shorter propagation gives better utilization
DataLink Layer 19
CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted
spatial layout of nodes
noterole of distance amp propagation delay in determining collision probability
DataLink Layer 20
Nonpersistent CSMA1 If medium is idle transmit otherwise go to 22 If medium is busy wait amount of time drawn
from probability distribution (retransmission delay) and repeat 1
Random delays reduces probability of collisions Consider two stations become ready to transmit at
same time bull While another transmission is in progress
If both stations delay same time before retrying both will attempt to transmit at same time
Capacity is wasted because medium will remain idle following end of transmission Even if one or more stations waiting
Nonpersistent stations deferential
DataLink Layer 21
1-persistent CSMA To avoid idle channel time 1-persistent protocol
used Station wishing to transmit listens and obeys
following 1 If medium idle transmit otherwise go to step 22 If medium busy listen until idle then transmit
immediately 1-persistent stations selfish If two or more stations waiting collision
guaranteed Gets sorted out after collision
DataLink Layer 22
P-persistent CSMA Compromise that attempts to reduce collisions
Like nonpersistent And reduce idle time
Like1-persistent Rules1 If medium idle transmit with probability p and
delay one time unit with probability (1 ndash p) Time unit typically maximum propagation delay
2 If medium busy listen until idle and repeat step 13 If transmission is delayed one time unit repeat
step 1 What is an effective value of p
DataLink Layer 23
Value of p Avoid instability under heavy load n stations waiting to send End of transmission expected number of stations attempting
to transmit is number of stations ready times probability of transmitting n x p
If n x p gt 1 on average there will be a collision Repeated attempts to transmit almost guaranteeing more
collisions Retries compete with new transmissions Eventually all stations trying to send
Continuous collisions zero throughput So nxp lt 1 for expected peaks of n If heavy load expected p small However as p made smaller stations wait longer At low loads this gives very long delays
DataLink Layer 24
Persistent and Nonpersistent CSMA
Comparison of the channel utilization versus load for various
random access protocols
DataLink Layer 25
Which Persistence Algorithm IEEE 8023 uses 1-persistent Both nonpersistent and p-persistent have
performance problems 1-persistent (p = 1) seems more unstable
than p-persistent Greed of the stations But wasted time due to collisions is short (if
frames long relative to propagation delay With random backoff unlikely to collide on next
tries To ensure backoff maintains stability IEEE 8023
and Ethernet use binary exponential backoff
DataLink Layer 26
CSMACD (Collision Detection) With CSMA collision occupies medium
for duration of transmission Stations listen whilst transmitting
1 If medium idle transmit otherwise step 2
2 If busy listen for idle then transmit3 If collision detected jam then cease
transmission4 After jam wait random time then start
from step 1
DataLink Layer 27
CSMACDCSMACD carrier sensing deferral as in CSMA
collisions detected within short time colliding transmissions aborted reducing channel
wastage collision detection
easy in wired LANs measure signal strengths compare transmitted received signals
difficult in wireless LANs receiver shut off while transmitting
human analogy the polite conversationalist
DataLink Layer 28
CSMACD collision detection
DataLink Layer 29
CSMACD
DataLink Layer 30
CSMACDOperation
DataLink Layer 31
ldquoTaking Turnsrdquo MAC protocolsPolling master node
ldquoinvitesrdquo slave nodes to transmit in turn
concerns polling overhead latency single point of
failure (master)
Token passing control token passed
from one node to next sequentially
token message concerns
token overhead latency single point of failure
(token)
DataLink Layer 32
Summary of MAC protocols What do you do with a shared media
Channel Partitioning by time frequency or code
bull Time Division Frequency Division Random partitioning (dynamic)
bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire)
hard in others (wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
Taking Turnsbull polling from a central site token passing
DataLink Layer 33
Summary of MAC protocolsChannel partitioning MAC protocols
share channel efficiently and fairly at high load inefficient at low load delay in channel access
1N 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
ldquotaking turnsrdquo protocolslook for best of both worlds
DataLink Layer 34
Ethernet Overview History
developed by Xerox PARC in mid-1970s roots in Aloha packet-radio network standardized by Xerox DEC and Intel in
1978 similar to IEEE 8023 standard
Metcalfersquos Ethernetsketch
DataLink Layer 35
Ethernetldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps
DataLink Layer 36
Star topology Bus topology popular through mid 90s Now star topology prevails Connection choices hub or switch (more later)
hub orswitch
DataLink Layer 37
Ethernet Frame StructureSending adapter encapsulates IP datagram (or
other network layer protocol packet) in Ethernet frame
Preamble 7 bytes with pattern 10101010 followed by one
byte with pattern 10101011 used to synchronize receiver sender clock rates
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 38
Ethernet Frame Structure (more) Addresses 6 bytes
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol
otherwise adapter discards frame Type indicates the higher layer protocol
(mostly IP but others may be supported such as Novell IPX and AppleTalk)
CRC checked at receiver if error is detected the frame is simply dropped
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 39
Unreliable connectionless service Connectionless No handshaking between
sending and receiving adapter Unreliable receiving adapter doesnrsquot send
acks or nacks to sending adapter stream of datagrams passed to network layer can
have gaps gaps will be filled if app is using TCP otherwise app will see the gaps
DataLink Layer 40
Ethernet uses CSMACD No slots adapter doesnrsquot
transmit if it senses that some other adapter is transmitting that is carrier sense
transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection
Before attempting a retransmission adapter waits a random time that is random access
DataLink Layer 41
Ethernet CSMACD algorithm1 Adaptor receives datagram
from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
DataLink Layer 42
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential Backoff Goal adapt retransmission
attempts to estimated current load heavy load random wait
will be longer first collision choose K
from 01 delay is K 512 bit transmission times
after second collision choose K from 0123hellip
after ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
DataLink Layer 43
Collision Detection On baseband bus collision produces much
higher signal voltage than signal Collision detected if cable signal greater than
single station signal Signal attenuated over distance Limit distance to 500m (10Base5) or 200m
(10Base2) For twisted pair (star-topology) activity on
more than one port is collision Special collision presence signal
DataLink Layer 44
Algorithm (cont)
If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes
of data) delay and try again
bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected
k=02n - 1bull give up after several tries (usually 16)bull exponential backoff
DataLink Layer 45
Binary Exponential Backoff Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and
reports error As congestion increases stations back off by larger
amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff
efficient over wide range of loads Low loads 1-persistence guarantees station can
seize channel once idle High loads at least as stable as other techniques
Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first
DataLink Layer 46
Ethernet MAC Sublayer Protocol (2)
Collision detection can take as long as 2
DataLink Layer 47
Ethernet PerformanceEfficiency of Ethernet at 10 Mbps with
512-bit slot times
DataLink Layer 48
CSMACD efficiency Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame
Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap
transprop tt 511efficiency
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 4
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo point-to-point
PPP for dial-up access point-to-point link between Ethernet switch and host
broadcast (shared wire or medium) traditional Ethernet upstream HFC 80211 wireless LAN
DataLink Layer 5
Multiple Access protocols single shared broadcast channel two or more simultaneous transmissions by nodes
interference collision if node receives two or more signals at the same
timemultiple access protocol distributed algorithm that determines how nodes
share channel ie determine when node can transmit
communication about channel sharing must use channel itself no out-of-band channel for coordination
DataLink Layer 6
Ideal Mulitple Access ProtocolBroadcast channel of rate R bps1 When one node wants to transmit it can send
at rate R2 When M nodes want to transmit each can
send at average rate RM3 Fully decentralized
no special node to coordinate transmissions no synchronization of clocks slots
4 Simple
DataLink Layer 7
MAC Protocols a taxonomyThree broad classes Channel Partitioning
divide channel into smaller ldquopiecesrdquo (time slots frequency code)
allocate piece to node for exclusive use Random Access
channel not divided allow collisions ldquorecoverrdquo from collisions
ldquoTaking turnsrdquo Nodes take turns but nodes with more to send can
take longer turns
DataLink Layer 8
Channel Partitioning MAC protocols TDMA
TDMA time division multiple access access to channel in rounds each station gets fixed length slot (length = pkt trans time) in each round unused slots go idle example 6-station LAN 134 have pkt slots 256 idle
TDM (Time Division Multiplexing) channel divided into N time slots one per user inefficient with low duty cycle users and at light load
FDM (Frequency Division Multiplexing) frequency subdivided
DataLink Layer 9
Channel 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 example 6-station LAN 134 have pkt frequency bands 256 idle
TDM (Time Division Multiplexing) channel divided into N time slots one per user inefficient with low duty cycle users and at light load
FDM (Frequency Division Multiplexing) frequency subdivided
frequ
ency
ban
ds
time
DataLink Layer 10
Random Access Protocols When node has packet to send
transmit at full channel data rate R no a priori coordination among nodes
two or more transmitting nodes ldquocollisionrdquo random access MAC protocol specifies
how to detect collisions how to recover from collisions (eg via delayed
retransmissions) Examples of random access MAC protocols
slotted ALOHA ALOHA CSMA CSMACD CSMACA
DataLink Layer 11
Slotted ALOHAAssumptions all frames same size time is divided into
equal size slots time to transmit 1 frame
nodes start to transmit frames only at beginning of slots
nodes are synchronized if 2 or more nodes
transmit in slot all nodes detect collision
Operation when node obtains fresh
frame it transmits in next slot
no collision node can send new frame in next slot
if collision node retransmits frame in each subsequent slot with prob p until success
DataLink Layer 12
Slotted ALOHA
Pros single active node can
continuously transmit at full rate of channel
highly decentralized only slots in nodes need to be in sync
simple
Cons collisions wasting
slots idle slots nodes may be able to
detect collision in less than time to transmit packet
clock synchronization
DataLink Layer 13
Slotted Aloha efficiency
Suppose N nodes with many frames to send each transmits in slot with probability p
probability that node 1 has success in a slot = p(1-p)N-1
probability that any node has a success = Np(1-p)N-1
For max efficiency with N nodes find p that maximizes Np(1-p)N-1
For many nodes take limit of Np(1-p)N-1
as N goes to infinity gives 1e = 37
Efficiency is the long-run fraction of successful slots when there are many nodes each with many frames to send
At best channelused for useful transmissions 37of time
DataLink Layer 15
Pure ALOHA (2)Vulnerable period for the shaded frame
DataLink Layer 16
Pure Aloha efficiencyP(success by given node) = P(node transmits) P(no other node transmits in [p0-1p0]
P(no other node transmits in [p0-1p0] = p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n -gt infty
= 1(2e) = 18 Even worse
DataLink Layer 17
ALOHA EfficiencyThroughput versus offered traffic for
ALOHA systems
DataLink Layer 18
CSMA (Carrier Sense Multiple Access) Propagation time is much less than transmission time All stations know that a transmission has started almost immediately First listen for clear medium (carrier sense) If channel sensed busy defer transmission If channel sensed idle transmit entire frame
Wait reasonable time (round trip plus ACK contention) No ACK then retransmit
If two stations start at the same instant collision Max utilization depends on propagation time (medium length) and frame
length Longer frame and shorter propagation gives better utilization
DataLink Layer 19
CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted
spatial layout of nodes
noterole of distance amp propagation delay in determining collision probability
DataLink Layer 20
Nonpersistent CSMA1 If medium is idle transmit otherwise go to 22 If medium is busy wait amount of time drawn
from probability distribution (retransmission delay) and repeat 1
Random delays reduces probability of collisions Consider two stations become ready to transmit at
same time bull While another transmission is in progress
If both stations delay same time before retrying both will attempt to transmit at same time
Capacity is wasted because medium will remain idle following end of transmission Even if one or more stations waiting
Nonpersistent stations deferential
DataLink Layer 21
1-persistent CSMA To avoid idle channel time 1-persistent protocol
used Station wishing to transmit listens and obeys
following 1 If medium idle transmit otherwise go to step 22 If medium busy listen until idle then transmit
immediately 1-persistent stations selfish If two or more stations waiting collision
guaranteed Gets sorted out after collision
DataLink Layer 22
P-persistent CSMA Compromise that attempts to reduce collisions
Like nonpersistent And reduce idle time
Like1-persistent Rules1 If medium idle transmit with probability p and
delay one time unit with probability (1 ndash p) Time unit typically maximum propagation delay
2 If medium busy listen until idle and repeat step 13 If transmission is delayed one time unit repeat
step 1 What is an effective value of p
DataLink Layer 23
Value of p Avoid instability under heavy load n stations waiting to send End of transmission expected number of stations attempting
to transmit is number of stations ready times probability of transmitting n x p
If n x p gt 1 on average there will be a collision Repeated attempts to transmit almost guaranteeing more
collisions Retries compete with new transmissions Eventually all stations trying to send
Continuous collisions zero throughput So nxp lt 1 for expected peaks of n If heavy load expected p small However as p made smaller stations wait longer At low loads this gives very long delays
DataLink Layer 24
Persistent and Nonpersistent CSMA
Comparison of the channel utilization versus load for various
random access protocols
DataLink Layer 25
Which Persistence Algorithm IEEE 8023 uses 1-persistent Both nonpersistent and p-persistent have
performance problems 1-persistent (p = 1) seems more unstable
than p-persistent Greed of the stations But wasted time due to collisions is short (if
frames long relative to propagation delay With random backoff unlikely to collide on next
tries To ensure backoff maintains stability IEEE 8023
and Ethernet use binary exponential backoff
DataLink Layer 26
CSMACD (Collision Detection) With CSMA collision occupies medium
for duration of transmission Stations listen whilst transmitting
1 If medium idle transmit otherwise step 2
2 If busy listen for idle then transmit3 If collision detected jam then cease
transmission4 After jam wait random time then start
from step 1
DataLink Layer 27
CSMACDCSMACD carrier sensing deferral as in CSMA
collisions detected within short time colliding transmissions aborted reducing channel
wastage collision detection
easy in wired LANs measure signal strengths compare transmitted received signals
difficult in wireless LANs receiver shut off while transmitting
human analogy the polite conversationalist
DataLink Layer 28
CSMACD collision detection
DataLink Layer 29
CSMACD
DataLink Layer 30
CSMACDOperation
DataLink Layer 31
ldquoTaking Turnsrdquo MAC protocolsPolling master node
ldquoinvitesrdquo slave nodes to transmit in turn
concerns polling overhead latency single point of
failure (master)
Token passing control token passed
from one node to next sequentially
token message concerns
token overhead latency single point of failure
(token)
DataLink Layer 32
Summary of MAC protocols What do you do with a shared media
Channel Partitioning by time frequency or code
bull Time Division Frequency Division Random partitioning (dynamic)
bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire)
hard in others (wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
Taking Turnsbull polling from a central site token passing
DataLink Layer 33
Summary of MAC protocolsChannel partitioning MAC protocols
share channel efficiently and fairly at high load inefficient at low load delay in channel access
1N 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
ldquotaking turnsrdquo protocolslook for best of both worlds
DataLink Layer 34
Ethernet Overview History
developed by Xerox PARC in mid-1970s roots in Aloha packet-radio network standardized by Xerox DEC and Intel in
1978 similar to IEEE 8023 standard
Metcalfersquos Ethernetsketch
DataLink Layer 35
Ethernetldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps
DataLink Layer 36
Star topology Bus topology popular through mid 90s Now star topology prevails Connection choices hub or switch (more later)
hub orswitch
DataLink Layer 37
Ethernet Frame StructureSending adapter encapsulates IP datagram (or
other network layer protocol packet) in Ethernet frame
Preamble 7 bytes with pattern 10101010 followed by one
byte with pattern 10101011 used to synchronize receiver sender clock rates
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 38
Ethernet Frame Structure (more) Addresses 6 bytes
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol
otherwise adapter discards frame Type indicates the higher layer protocol
(mostly IP but others may be supported such as Novell IPX and AppleTalk)
CRC checked at receiver if error is detected the frame is simply dropped
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 39
Unreliable connectionless service Connectionless No handshaking between
sending and receiving adapter Unreliable receiving adapter doesnrsquot send
acks or nacks to sending adapter stream of datagrams passed to network layer can
have gaps gaps will be filled if app is using TCP otherwise app will see the gaps
DataLink Layer 40
Ethernet uses CSMACD No slots adapter doesnrsquot
transmit if it senses that some other adapter is transmitting that is carrier sense
transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection
Before attempting a retransmission adapter waits a random time that is random access
DataLink Layer 41
Ethernet CSMACD algorithm1 Adaptor receives datagram
from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
DataLink Layer 42
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential Backoff Goal adapt retransmission
attempts to estimated current load heavy load random wait
will be longer first collision choose K
from 01 delay is K 512 bit transmission times
after second collision choose K from 0123hellip
after ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
DataLink Layer 43
Collision Detection On baseband bus collision produces much
higher signal voltage than signal Collision detected if cable signal greater than
single station signal Signal attenuated over distance Limit distance to 500m (10Base5) or 200m
(10Base2) For twisted pair (star-topology) activity on
more than one port is collision Special collision presence signal
DataLink Layer 44
Algorithm (cont)
If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes
of data) delay and try again
bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected
k=02n - 1bull give up after several tries (usually 16)bull exponential backoff
DataLink Layer 45
Binary Exponential Backoff Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and
reports error As congestion increases stations back off by larger
amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff
efficient over wide range of loads Low loads 1-persistence guarantees station can
seize channel once idle High loads at least as stable as other techniques
Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first
DataLink Layer 46
Ethernet MAC Sublayer Protocol (2)
Collision detection can take as long as 2
DataLink Layer 47
Ethernet PerformanceEfficiency of Ethernet at 10 Mbps with
512-bit slot times
DataLink Layer 48
CSMACD efficiency Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame
Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap
transprop tt 511efficiency
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 5
Multiple Access protocols single shared broadcast channel two or more simultaneous transmissions by nodes
interference collision if node receives two or more signals at the same
timemultiple access protocol distributed algorithm that determines how nodes
share channel ie determine when node can transmit
communication about channel sharing must use channel itself no out-of-band channel for coordination
DataLink Layer 6
Ideal Mulitple Access ProtocolBroadcast channel of rate R bps1 When one node wants to transmit it can send
at rate R2 When M nodes want to transmit each can
send at average rate RM3 Fully decentralized
no special node to coordinate transmissions no synchronization of clocks slots
4 Simple
DataLink Layer 7
MAC Protocols a taxonomyThree broad classes Channel Partitioning
divide channel into smaller ldquopiecesrdquo (time slots frequency code)
allocate piece to node for exclusive use Random Access
channel not divided allow collisions ldquorecoverrdquo from collisions
ldquoTaking turnsrdquo Nodes take turns but nodes with more to send can
take longer turns
DataLink Layer 8
Channel Partitioning MAC protocols TDMA
TDMA time division multiple access access to channel in rounds each station gets fixed length slot (length = pkt trans time) in each round unused slots go idle example 6-station LAN 134 have pkt slots 256 idle
TDM (Time Division Multiplexing) channel divided into N time slots one per user inefficient with low duty cycle users and at light load
FDM (Frequency Division Multiplexing) frequency subdivided
DataLink Layer 9
Channel 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 example 6-station LAN 134 have pkt frequency bands 256 idle
TDM (Time Division Multiplexing) channel divided into N time slots one per user inefficient with low duty cycle users and at light load
FDM (Frequency Division Multiplexing) frequency subdivided
frequ
ency
ban
ds
time
DataLink Layer 10
Random Access Protocols When node has packet to send
transmit at full channel data rate R no a priori coordination among nodes
two or more transmitting nodes ldquocollisionrdquo random access MAC protocol specifies
how to detect collisions how to recover from collisions (eg via delayed
retransmissions) Examples of random access MAC protocols
slotted ALOHA ALOHA CSMA CSMACD CSMACA
DataLink Layer 11
Slotted ALOHAAssumptions all frames same size time is divided into
equal size slots time to transmit 1 frame
nodes start to transmit frames only at beginning of slots
nodes are synchronized if 2 or more nodes
transmit in slot all nodes detect collision
Operation when node obtains fresh
frame it transmits in next slot
no collision node can send new frame in next slot
if collision node retransmits frame in each subsequent slot with prob p until success
DataLink Layer 12
Slotted ALOHA
Pros single active node can
continuously transmit at full rate of channel
highly decentralized only slots in nodes need to be in sync
simple
Cons collisions wasting
slots idle slots nodes may be able to
detect collision in less than time to transmit packet
clock synchronization
DataLink Layer 13
Slotted Aloha efficiency
Suppose N nodes with many frames to send each transmits in slot with probability p
probability that node 1 has success in a slot = p(1-p)N-1
probability that any node has a success = Np(1-p)N-1
For max efficiency with N nodes find p that maximizes Np(1-p)N-1
For many nodes take limit of Np(1-p)N-1
as N goes to infinity gives 1e = 37
Efficiency is the long-run fraction of successful slots when there are many nodes each with many frames to send
At best channelused for useful transmissions 37of time
DataLink Layer 15
Pure ALOHA (2)Vulnerable period for the shaded frame
DataLink Layer 16
Pure Aloha efficiencyP(success by given node) = P(node transmits) P(no other node transmits in [p0-1p0]
P(no other node transmits in [p0-1p0] = p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n -gt infty
= 1(2e) = 18 Even worse
DataLink Layer 17
ALOHA EfficiencyThroughput versus offered traffic for
ALOHA systems
DataLink Layer 18
CSMA (Carrier Sense Multiple Access) Propagation time is much less than transmission time All stations know that a transmission has started almost immediately First listen for clear medium (carrier sense) If channel sensed busy defer transmission If channel sensed idle transmit entire frame
Wait reasonable time (round trip plus ACK contention) No ACK then retransmit
If two stations start at the same instant collision Max utilization depends on propagation time (medium length) and frame
length Longer frame and shorter propagation gives better utilization
DataLink Layer 19
CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted
spatial layout of nodes
noterole of distance amp propagation delay in determining collision probability
DataLink Layer 20
Nonpersistent CSMA1 If medium is idle transmit otherwise go to 22 If medium is busy wait amount of time drawn
from probability distribution (retransmission delay) and repeat 1
Random delays reduces probability of collisions Consider two stations become ready to transmit at
same time bull While another transmission is in progress
If both stations delay same time before retrying both will attempt to transmit at same time
Capacity is wasted because medium will remain idle following end of transmission Even if one or more stations waiting
Nonpersistent stations deferential
DataLink Layer 21
1-persistent CSMA To avoid idle channel time 1-persistent protocol
used Station wishing to transmit listens and obeys
following 1 If medium idle transmit otherwise go to step 22 If medium busy listen until idle then transmit
immediately 1-persistent stations selfish If two or more stations waiting collision
guaranteed Gets sorted out after collision
DataLink Layer 22
P-persistent CSMA Compromise that attempts to reduce collisions
Like nonpersistent And reduce idle time
Like1-persistent Rules1 If medium idle transmit with probability p and
delay one time unit with probability (1 ndash p) Time unit typically maximum propagation delay
2 If medium busy listen until idle and repeat step 13 If transmission is delayed one time unit repeat
step 1 What is an effective value of p
DataLink Layer 23
Value of p Avoid instability under heavy load n stations waiting to send End of transmission expected number of stations attempting
to transmit is number of stations ready times probability of transmitting n x p
If n x p gt 1 on average there will be a collision Repeated attempts to transmit almost guaranteeing more
collisions Retries compete with new transmissions Eventually all stations trying to send
Continuous collisions zero throughput So nxp lt 1 for expected peaks of n If heavy load expected p small However as p made smaller stations wait longer At low loads this gives very long delays
DataLink Layer 24
Persistent and Nonpersistent CSMA
Comparison of the channel utilization versus load for various
random access protocols
DataLink Layer 25
Which Persistence Algorithm IEEE 8023 uses 1-persistent Both nonpersistent and p-persistent have
performance problems 1-persistent (p = 1) seems more unstable
than p-persistent Greed of the stations But wasted time due to collisions is short (if
frames long relative to propagation delay With random backoff unlikely to collide on next
tries To ensure backoff maintains stability IEEE 8023
and Ethernet use binary exponential backoff
DataLink Layer 26
CSMACD (Collision Detection) With CSMA collision occupies medium
for duration of transmission Stations listen whilst transmitting
1 If medium idle transmit otherwise step 2
2 If busy listen for idle then transmit3 If collision detected jam then cease
transmission4 After jam wait random time then start
from step 1
DataLink Layer 27
CSMACDCSMACD carrier sensing deferral as in CSMA
collisions detected within short time colliding transmissions aborted reducing channel
wastage collision detection
easy in wired LANs measure signal strengths compare transmitted received signals
difficult in wireless LANs receiver shut off while transmitting
human analogy the polite conversationalist
DataLink Layer 28
CSMACD collision detection
DataLink Layer 29
CSMACD
DataLink Layer 30
CSMACDOperation
DataLink Layer 31
ldquoTaking Turnsrdquo MAC protocolsPolling master node
ldquoinvitesrdquo slave nodes to transmit in turn
concerns polling overhead latency single point of
failure (master)
Token passing control token passed
from one node to next sequentially
token message concerns
token overhead latency single point of failure
(token)
DataLink Layer 32
Summary of MAC protocols What do you do with a shared media
Channel Partitioning by time frequency or code
bull Time Division Frequency Division Random partitioning (dynamic)
bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire)
hard in others (wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
Taking Turnsbull polling from a central site token passing
DataLink Layer 33
Summary of MAC protocolsChannel partitioning MAC protocols
share channel efficiently and fairly at high load inefficient at low load delay in channel access
1N 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
ldquotaking turnsrdquo protocolslook for best of both worlds
DataLink Layer 34
Ethernet Overview History
developed by Xerox PARC in mid-1970s roots in Aloha packet-radio network standardized by Xerox DEC and Intel in
1978 similar to IEEE 8023 standard
Metcalfersquos Ethernetsketch
DataLink Layer 35
Ethernetldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps
DataLink Layer 36
Star topology Bus topology popular through mid 90s Now star topology prevails Connection choices hub or switch (more later)
hub orswitch
DataLink Layer 37
Ethernet Frame StructureSending adapter encapsulates IP datagram (or
other network layer protocol packet) in Ethernet frame
Preamble 7 bytes with pattern 10101010 followed by one
byte with pattern 10101011 used to synchronize receiver sender clock rates
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 38
Ethernet Frame Structure (more) Addresses 6 bytes
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol
otherwise adapter discards frame Type indicates the higher layer protocol
(mostly IP but others may be supported such as Novell IPX and AppleTalk)
CRC checked at receiver if error is detected the frame is simply dropped
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 39
Unreliable connectionless service Connectionless No handshaking between
sending and receiving adapter Unreliable receiving adapter doesnrsquot send
acks or nacks to sending adapter stream of datagrams passed to network layer can
have gaps gaps will be filled if app is using TCP otherwise app will see the gaps
DataLink Layer 40
Ethernet uses CSMACD No slots adapter doesnrsquot
transmit if it senses that some other adapter is transmitting that is carrier sense
transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection
Before attempting a retransmission adapter waits a random time that is random access
DataLink Layer 41
Ethernet CSMACD algorithm1 Adaptor receives datagram
from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
DataLink Layer 42
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential Backoff Goal adapt retransmission
attempts to estimated current load heavy load random wait
will be longer first collision choose K
from 01 delay is K 512 bit transmission times
after second collision choose K from 0123hellip
after ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
DataLink Layer 43
Collision Detection On baseband bus collision produces much
higher signal voltage than signal Collision detected if cable signal greater than
single station signal Signal attenuated over distance Limit distance to 500m (10Base5) or 200m
(10Base2) For twisted pair (star-topology) activity on
more than one port is collision Special collision presence signal
DataLink Layer 44
Algorithm (cont)
If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes
of data) delay and try again
bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected
k=02n - 1bull give up after several tries (usually 16)bull exponential backoff
DataLink Layer 45
Binary Exponential Backoff Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and
reports error As congestion increases stations back off by larger
amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff
efficient over wide range of loads Low loads 1-persistence guarantees station can
seize channel once idle High loads at least as stable as other techniques
Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first
DataLink Layer 46
Ethernet MAC Sublayer Protocol (2)
Collision detection can take as long as 2
DataLink Layer 47
Ethernet PerformanceEfficiency of Ethernet at 10 Mbps with
512-bit slot times
DataLink Layer 48
CSMACD efficiency Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame
Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap
transprop tt 511efficiency
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 6
Ideal Mulitple Access ProtocolBroadcast channel of rate R bps1 When one node wants to transmit it can send
at rate R2 When M nodes want to transmit each can
send at average rate RM3 Fully decentralized
no special node to coordinate transmissions no synchronization of clocks slots
4 Simple
DataLink Layer 7
MAC Protocols a taxonomyThree broad classes Channel Partitioning
divide channel into smaller ldquopiecesrdquo (time slots frequency code)
allocate piece to node for exclusive use Random Access
channel not divided allow collisions ldquorecoverrdquo from collisions
ldquoTaking turnsrdquo Nodes take turns but nodes with more to send can
take longer turns
DataLink Layer 8
Channel Partitioning MAC protocols TDMA
TDMA time division multiple access access to channel in rounds each station gets fixed length slot (length = pkt trans time) in each round unused slots go idle example 6-station LAN 134 have pkt slots 256 idle
TDM (Time Division Multiplexing) channel divided into N time slots one per user inefficient with low duty cycle users and at light load
FDM (Frequency Division Multiplexing) frequency subdivided
DataLink Layer 9
Channel 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 example 6-station LAN 134 have pkt frequency bands 256 idle
TDM (Time Division Multiplexing) channel divided into N time slots one per user inefficient with low duty cycle users and at light load
FDM (Frequency Division Multiplexing) frequency subdivided
frequ
ency
ban
ds
time
DataLink Layer 10
Random Access Protocols When node has packet to send
transmit at full channel data rate R no a priori coordination among nodes
two or more transmitting nodes ldquocollisionrdquo random access MAC protocol specifies
how to detect collisions how to recover from collisions (eg via delayed
retransmissions) Examples of random access MAC protocols
slotted ALOHA ALOHA CSMA CSMACD CSMACA
DataLink Layer 11
Slotted ALOHAAssumptions all frames same size time is divided into
equal size slots time to transmit 1 frame
nodes start to transmit frames only at beginning of slots
nodes are synchronized if 2 or more nodes
transmit in slot all nodes detect collision
Operation when node obtains fresh
frame it transmits in next slot
no collision node can send new frame in next slot
if collision node retransmits frame in each subsequent slot with prob p until success
DataLink Layer 12
Slotted ALOHA
Pros single active node can
continuously transmit at full rate of channel
highly decentralized only slots in nodes need to be in sync
simple
Cons collisions wasting
slots idle slots nodes may be able to
detect collision in less than time to transmit packet
clock synchronization
DataLink Layer 13
Slotted Aloha efficiency
Suppose N nodes with many frames to send each transmits in slot with probability p
probability that node 1 has success in a slot = p(1-p)N-1
probability that any node has a success = Np(1-p)N-1
For max efficiency with N nodes find p that maximizes Np(1-p)N-1
For many nodes take limit of Np(1-p)N-1
as N goes to infinity gives 1e = 37
Efficiency is the long-run fraction of successful slots when there are many nodes each with many frames to send
At best channelused for useful transmissions 37of time
DataLink Layer 15
Pure ALOHA (2)Vulnerable period for the shaded frame
DataLink Layer 16
Pure Aloha efficiencyP(success by given node) = P(node transmits) P(no other node transmits in [p0-1p0]
P(no other node transmits in [p0-1p0] = p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n -gt infty
= 1(2e) = 18 Even worse
DataLink Layer 17
ALOHA EfficiencyThroughput versus offered traffic for
ALOHA systems
DataLink Layer 18
CSMA (Carrier Sense Multiple Access) Propagation time is much less than transmission time All stations know that a transmission has started almost immediately First listen for clear medium (carrier sense) If channel sensed busy defer transmission If channel sensed idle transmit entire frame
Wait reasonable time (round trip plus ACK contention) No ACK then retransmit
If two stations start at the same instant collision Max utilization depends on propagation time (medium length) and frame
length Longer frame and shorter propagation gives better utilization
DataLink Layer 19
CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted
spatial layout of nodes
noterole of distance amp propagation delay in determining collision probability
DataLink Layer 20
Nonpersistent CSMA1 If medium is idle transmit otherwise go to 22 If medium is busy wait amount of time drawn
from probability distribution (retransmission delay) and repeat 1
Random delays reduces probability of collisions Consider two stations become ready to transmit at
same time bull While another transmission is in progress
If both stations delay same time before retrying both will attempt to transmit at same time
Capacity is wasted because medium will remain idle following end of transmission Even if one or more stations waiting
Nonpersistent stations deferential
DataLink Layer 21
1-persistent CSMA To avoid idle channel time 1-persistent protocol
used Station wishing to transmit listens and obeys
following 1 If medium idle transmit otherwise go to step 22 If medium busy listen until idle then transmit
immediately 1-persistent stations selfish If two or more stations waiting collision
guaranteed Gets sorted out after collision
DataLink Layer 22
P-persistent CSMA Compromise that attempts to reduce collisions
Like nonpersistent And reduce idle time
Like1-persistent Rules1 If medium idle transmit with probability p and
delay one time unit with probability (1 ndash p) Time unit typically maximum propagation delay
2 If medium busy listen until idle and repeat step 13 If transmission is delayed one time unit repeat
step 1 What is an effective value of p
DataLink Layer 23
Value of p Avoid instability under heavy load n stations waiting to send End of transmission expected number of stations attempting
to transmit is number of stations ready times probability of transmitting n x p
If n x p gt 1 on average there will be a collision Repeated attempts to transmit almost guaranteeing more
collisions Retries compete with new transmissions Eventually all stations trying to send
Continuous collisions zero throughput So nxp lt 1 for expected peaks of n If heavy load expected p small However as p made smaller stations wait longer At low loads this gives very long delays
DataLink Layer 24
Persistent and Nonpersistent CSMA
Comparison of the channel utilization versus load for various
random access protocols
DataLink Layer 25
Which Persistence Algorithm IEEE 8023 uses 1-persistent Both nonpersistent and p-persistent have
performance problems 1-persistent (p = 1) seems more unstable
than p-persistent Greed of the stations But wasted time due to collisions is short (if
frames long relative to propagation delay With random backoff unlikely to collide on next
tries To ensure backoff maintains stability IEEE 8023
and Ethernet use binary exponential backoff
DataLink Layer 26
CSMACD (Collision Detection) With CSMA collision occupies medium
for duration of transmission Stations listen whilst transmitting
1 If medium idle transmit otherwise step 2
2 If busy listen for idle then transmit3 If collision detected jam then cease
transmission4 After jam wait random time then start
from step 1
DataLink Layer 27
CSMACDCSMACD carrier sensing deferral as in CSMA
collisions detected within short time colliding transmissions aborted reducing channel
wastage collision detection
easy in wired LANs measure signal strengths compare transmitted received signals
difficult in wireless LANs receiver shut off while transmitting
human analogy the polite conversationalist
DataLink Layer 28
CSMACD collision detection
DataLink Layer 29
CSMACD
DataLink Layer 30
CSMACDOperation
DataLink Layer 31
ldquoTaking Turnsrdquo MAC protocolsPolling master node
ldquoinvitesrdquo slave nodes to transmit in turn
concerns polling overhead latency single point of
failure (master)
Token passing control token passed
from one node to next sequentially
token message concerns
token overhead latency single point of failure
(token)
DataLink Layer 32
Summary of MAC protocols What do you do with a shared media
Channel Partitioning by time frequency or code
bull Time Division Frequency Division Random partitioning (dynamic)
bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire)
hard in others (wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
Taking Turnsbull polling from a central site token passing
DataLink Layer 33
Summary of MAC protocolsChannel partitioning MAC protocols
share channel efficiently and fairly at high load inefficient at low load delay in channel access
1N 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
ldquotaking turnsrdquo protocolslook for best of both worlds
DataLink Layer 34
Ethernet Overview History
developed by Xerox PARC in mid-1970s roots in Aloha packet-radio network standardized by Xerox DEC and Intel in
1978 similar to IEEE 8023 standard
Metcalfersquos Ethernetsketch
DataLink Layer 35
Ethernetldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps
DataLink Layer 36
Star topology Bus topology popular through mid 90s Now star topology prevails Connection choices hub or switch (more later)
hub orswitch
DataLink Layer 37
Ethernet Frame StructureSending adapter encapsulates IP datagram (or
other network layer protocol packet) in Ethernet frame
Preamble 7 bytes with pattern 10101010 followed by one
byte with pattern 10101011 used to synchronize receiver sender clock rates
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 38
Ethernet Frame Structure (more) Addresses 6 bytes
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol
otherwise adapter discards frame Type indicates the higher layer protocol
(mostly IP but others may be supported such as Novell IPX and AppleTalk)
CRC checked at receiver if error is detected the frame is simply dropped
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 39
Unreliable connectionless service Connectionless No handshaking between
sending and receiving adapter Unreliable receiving adapter doesnrsquot send
acks or nacks to sending adapter stream of datagrams passed to network layer can
have gaps gaps will be filled if app is using TCP otherwise app will see the gaps
DataLink Layer 40
Ethernet uses CSMACD No slots adapter doesnrsquot
transmit if it senses that some other adapter is transmitting that is carrier sense
transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection
Before attempting a retransmission adapter waits a random time that is random access
DataLink Layer 41
Ethernet CSMACD algorithm1 Adaptor receives datagram
from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
DataLink Layer 42
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential Backoff Goal adapt retransmission
attempts to estimated current load heavy load random wait
will be longer first collision choose K
from 01 delay is K 512 bit transmission times
after second collision choose K from 0123hellip
after ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
DataLink Layer 43
Collision Detection On baseband bus collision produces much
higher signal voltage than signal Collision detected if cable signal greater than
single station signal Signal attenuated over distance Limit distance to 500m (10Base5) or 200m
(10Base2) For twisted pair (star-topology) activity on
more than one port is collision Special collision presence signal
DataLink Layer 44
Algorithm (cont)
If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes
of data) delay and try again
bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected
k=02n - 1bull give up after several tries (usually 16)bull exponential backoff
DataLink Layer 45
Binary Exponential Backoff Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and
reports error As congestion increases stations back off by larger
amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff
efficient over wide range of loads Low loads 1-persistence guarantees station can
seize channel once idle High loads at least as stable as other techniques
Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first
DataLink Layer 46
Ethernet MAC Sublayer Protocol (2)
Collision detection can take as long as 2
DataLink Layer 47
Ethernet PerformanceEfficiency of Ethernet at 10 Mbps with
512-bit slot times
DataLink Layer 48
CSMACD efficiency Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame
Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap
transprop tt 511efficiency
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 7
MAC Protocols a taxonomyThree broad classes Channel Partitioning
divide channel into smaller ldquopiecesrdquo (time slots frequency code)
allocate piece to node for exclusive use Random Access
channel not divided allow collisions ldquorecoverrdquo from collisions
ldquoTaking turnsrdquo Nodes take turns but nodes with more to send can
take longer turns
DataLink Layer 8
Channel Partitioning MAC protocols TDMA
TDMA time division multiple access access to channel in rounds each station gets fixed length slot (length = pkt trans time) in each round unused slots go idle example 6-station LAN 134 have pkt slots 256 idle
TDM (Time Division Multiplexing) channel divided into N time slots one per user inefficient with low duty cycle users and at light load
FDM (Frequency Division Multiplexing) frequency subdivided
DataLink Layer 9
Channel 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 example 6-station LAN 134 have pkt frequency bands 256 idle
TDM (Time Division Multiplexing) channel divided into N time slots one per user inefficient with low duty cycle users and at light load
FDM (Frequency Division Multiplexing) frequency subdivided
frequ
ency
ban
ds
time
DataLink Layer 10
Random Access Protocols When node has packet to send
transmit at full channel data rate R no a priori coordination among nodes
two or more transmitting nodes ldquocollisionrdquo random access MAC protocol specifies
how to detect collisions how to recover from collisions (eg via delayed
retransmissions) Examples of random access MAC protocols
slotted ALOHA ALOHA CSMA CSMACD CSMACA
DataLink Layer 11
Slotted ALOHAAssumptions all frames same size time is divided into
equal size slots time to transmit 1 frame
nodes start to transmit frames only at beginning of slots
nodes are synchronized if 2 or more nodes
transmit in slot all nodes detect collision
Operation when node obtains fresh
frame it transmits in next slot
no collision node can send new frame in next slot
if collision node retransmits frame in each subsequent slot with prob p until success
DataLink Layer 12
Slotted ALOHA
Pros single active node can
continuously transmit at full rate of channel
highly decentralized only slots in nodes need to be in sync
simple
Cons collisions wasting
slots idle slots nodes may be able to
detect collision in less than time to transmit packet
clock synchronization
DataLink Layer 13
Slotted Aloha efficiency
Suppose N nodes with many frames to send each transmits in slot with probability p
probability that node 1 has success in a slot = p(1-p)N-1
probability that any node has a success = Np(1-p)N-1
For max efficiency with N nodes find p that maximizes Np(1-p)N-1
For many nodes take limit of Np(1-p)N-1
as N goes to infinity gives 1e = 37
Efficiency is the long-run fraction of successful slots when there are many nodes each with many frames to send
At best channelused for useful transmissions 37of time
DataLink Layer 15
Pure ALOHA (2)Vulnerable period for the shaded frame
DataLink Layer 16
Pure Aloha efficiencyP(success by given node) = P(node transmits) P(no other node transmits in [p0-1p0]
P(no other node transmits in [p0-1p0] = p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n -gt infty
= 1(2e) = 18 Even worse
DataLink Layer 17
ALOHA EfficiencyThroughput versus offered traffic for
ALOHA systems
DataLink Layer 18
CSMA (Carrier Sense Multiple Access) Propagation time is much less than transmission time All stations know that a transmission has started almost immediately First listen for clear medium (carrier sense) If channel sensed busy defer transmission If channel sensed idle transmit entire frame
Wait reasonable time (round trip plus ACK contention) No ACK then retransmit
If two stations start at the same instant collision Max utilization depends on propagation time (medium length) and frame
length Longer frame and shorter propagation gives better utilization
DataLink Layer 19
CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted
spatial layout of nodes
noterole of distance amp propagation delay in determining collision probability
DataLink Layer 20
Nonpersistent CSMA1 If medium is idle transmit otherwise go to 22 If medium is busy wait amount of time drawn
from probability distribution (retransmission delay) and repeat 1
Random delays reduces probability of collisions Consider two stations become ready to transmit at
same time bull While another transmission is in progress
If both stations delay same time before retrying both will attempt to transmit at same time
Capacity is wasted because medium will remain idle following end of transmission Even if one or more stations waiting
Nonpersistent stations deferential
DataLink Layer 21
1-persistent CSMA To avoid idle channel time 1-persistent protocol
used Station wishing to transmit listens and obeys
following 1 If medium idle transmit otherwise go to step 22 If medium busy listen until idle then transmit
immediately 1-persistent stations selfish If two or more stations waiting collision
guaranteed Gets sorted out after collision
DataLink Layer 22
P-persistent CSMA Compromise that attempts to reduce collisions
Like nonpersistent And reduce idle time
Like1-persistent Rules1 If medium idle transmit with probability p and
delay one time unit with probability (1 ndash p) Time unit typically maximum propagation delay
2 If medium busy listen until idle and repeat step 13 If transmission is delayed one time unit repeat
step 1 What is an effective value of p
DataLink Layer 23
Value of p Avoid instability under heavy load n stations waiting to send End of transmission expected number of stations attempting
to transmit is number of stations ready times probability of transmitting n x p
If n x p gt 1 on average there will be a collision Repeated attempts to transmit almost guaranteeing more
collisions Retries compete with new transmissions Eventually all stations trying to send
Continuous collisions zero throughput So nxp lt 1 for expected peaks of n If heavy load expected p small However as p made smaller stations wait longer At low loads this gives very long delays
DataLink Layer 24
Persistent and Nonpersistent CSMA
Comparison of the channel utilization versus load for various
random access protocols
DataLink Layer 25
Which Persistence Algorithm IEEE 8023 uses 1-persistent Both nonpersistent and p-persistent have
performance problems 1-persistent (p = 1) seems more unstable
than p-persistent Greed of the stations But wasted time due to collisions is short (if
frames long relative to propagation delay With random backoff unlikely to collide on next
tries To ensure backoff maintains stability IEEE 8023
and Ethernet use binary exponential backoff
DataLink Layer 26
CSMACD (Collision Detection) With CSMA collision occupies medium
for duration of transmission Stations listen whilst transmitting
1 If medium idle transmit otherwise step 2
2 If busy listen for idle then transmit3 If collision detected jam then cease
transmission4 After jam wait random time then start
from step 1
DataLink Layer 27
CSMACDCSMACD carrier sensing deferral as in CSMA
collisions detected within short time colliding transmissions aborted reducing channel
wastage collision detection
easy in wired LANs measure signal strengths compare transmitted received signals
difficult in wireless LANs receiver shut off while transmitting
human analogy the polite conversationalist
DataLink Layer 28
CSMACD collision detection
DataLink Layer 29
CSMACD
DataLink Layer 30
CSMACDOperation
DataLink Layer 31
ldquoTaking Turnsrdquo MAC protocolsPolling master node
ldquoinvitesrdquo slave nodes to transmit in turn
concerns polling overhead latency single point of
failure (master)
Token passing control token passed
from one node to next sequentially
token message concerns
token overhead latency single point of failure
(token)
DataLink Layer 32
Summary of MAC protocols What do you do with a shared media
Channel Partitioning by time frequency or code
bull Time Division Frequency Division Random partitioning (dynamic)
bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire)
hard in others (wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
Taking Turnsbull polling from a central site token passing
DataLink Layer 33
Summary of MAC protocolsChannel partitioning MAC protocols
share channel efficiently and fairly at high load inefficient at low load delay in channel access
1N 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
ldquotaking turnsrdquo protocolslook for best of both worlds
DataLink Layer 34
Ethernet Overview History
developed by Xerox PARC in mid-1970s roots in Aloha packet-radio network standardized by Xerox DEC and Intel in
1978 similar to IEEE 8023 standard
Metcalfersquos Ethernetsketch
DataLink Layer 35
Ethernetldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps
DataLink Layer 36
Star topology Bus topology popular through mid 90s Now star topology prevails Connection choices hub or switch (more later)
hub orswitch
DataLink Layer 37
Ethernet Frame StructureSending adapter encapsulates IP datagram (or
other network layer protocol packet) in Ethernet frame
Preamble 7 bytes with pattern 10101010 followed by one
byte with pattern 10101011 used to synchronize receiver sender clock rates
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 38
Ethernet Frame Structure (more) Addresses 6 bytes
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol
otherwise adapter discards frame Type indicates the higher layer protocol
(mostly IP but others may be supported such as Novell IPX and AppleTalk)
CRC checked at receiver if error is detected the frame is simply dropped
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 39
Unreliable connectionless service Connectionless No handshaking between
sending and receiving adapter Unreliable receiving adapter doesnrsquot send
acks or nacks to sending adapter stream of datagrams passed to network layer can
have gaps gaps will be filled if app is using TCP otherwise app will see the gaps
DataLink Layer 40
Ethernet uses CSMACD No slots adapter doesnrsquot
transmit if it senses that some other adapter is transmitting that is carrier sense
transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection
Before attempting a retransmission adapter waits a random time that is random access
DataLink Layer 41
Ethernet CSMACD algorithm1 Adaptor receives datagram
from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
DataLink Layer 42
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential Backoff Goal adapt retransmission
attempts to estimated current load heavy load random wait
will be longer first collision choose K
from 01 delay is K 512 bit transmission times
after second collision choose K from 0123hellip
after ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
DataLink Layer 43
Collision Detection On baseband bus collision produces much
higher signal voltage than signal Collision detected if cable signal greater than
single station signal Signal attenuated over distance Limit distance to 500m (10Base5) or 200m
(10Base2) For twisted pair (star-topology) activity on
more than one port is collision Special collision presence signal
DataLink Layer 44
Algorithm (cont)
If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes
of data) delay and try again
bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected
k=02n - 1bull give up after several tries (usually 16)bull exponential backoff
DataLink Layer 45
Binary Exponential Backoff Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and
reports error As congestion increases stations back off by larger
amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff
efficient over wide range of loads Low loads 1-persistence guarantees station can
seize channel once idle High loads at least as stable as other techniques
Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first
DataLink Layer 46
Ethernet MAC Sublayer Protocol (2)
Collision detection can take as long as 2
DataLink Layer 47
Ethernet PerformanceEfficiency of Ethernet at 10 Mbps with
512-bit slot times
DataLink Layer 48
CSMACD efficiency Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame
Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap
transprop tt 511efficiency
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 8
Channel Partitioning MAC protocols TDMA
TDMA time division multiple access access to channel in rounds each station gets fixed length slot (length = pkt trans time) in each round unused slots go idle example 6-station LAN 134 have pkt slots 256 idle
TDM (Time Division Multiplexing) channel divided into N time slots one per user inefficient with low duty cycle users and at light load
FDM (Frequency Division Multiplexing) frequency subdivided
DataLink Layer 9
Channel 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 example 6-station LAN 134 have pkt frequency bands 256 idle
TDM (Time Division Multiplexing) channel divided into N time slots one per user inefficient with low duty cycle users and at light load
FDM (Frequency Division Multiplexing) frequency subdivided
frequ
ency
ban
ds
time
DataLink Layer 10
Random Access Protocols When node has packet to send
transmit at full channel data rate R no a priori coordination among nodes
two or more transmitting nodes ldquocollisionrdquo random access MAC protocol specifies
how to detect collisions how to recover from collisions (eg via delayed
retransmissions) Examples of random access MAC protocols
slotted ALOHA ALOHA CSMA CSMACD CSMACA
DataLink Layer 11
Slotted ALOHAAssumptions all frames same size time is divided into
equal size slots time to transmit 1 frame
nodes start to transmit frames only at beginning of slots
nodes are synchronized if 2 or more nodes
transmit in slot all nodes detect collision
Operation when node obtains fresh
frame it transmits in next slot
no collision node can send new frame in next slot
if collision node retransmits frame in each subsequent slot with prob p until success
DataLink Layer 12
Slotted ALOHA
Pros single active node can
continuously transmit at full rate of channel
highly decentralized only slots in nodes need to be in sync
simple
Cons collisions wasting
slots idle slots nodes may be able to
detect collision in less than time to transmit packet
clock synchronization
DataLink Layer 13
Slotted Aloha efficiency
Suppose N nodes with many frames to send each transmits in slot with probability p
probability that node 1 has success in a slot = p(1-p)N-1
probability that any node has a success = Np(1-p)N-1
For max efficiency with N nodes find p that maximizes Np(1-p)N-1
For many nodes take limit of Np(1-p)N-1
as N goes to infinity gives 1e = 37
Efficiency is the long-run fraction of successful slots when there are many nodes each with many frames to send
At best channelused for useful transmissions 37of time
DataLink Layer 15
Pure ALOHA (2)Vulnerable period for the shaded frame
DataLink Layer 16
Pure Aloha efficiencyP(success by given node) = P(node transmits) P(no other node transmits in [p0-1p0]
P(no other node transmits in [p0-1p0] = p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n -gt infty
= 1(2e) = 18 Even worse
DataLink Layer 17
ALOHA EfficiencyThroughput versus offered traffic for
ALOHA systems
DataLink Layer 18
CSMA (Carrier Sense Multiple Access) Propagation time is much less than transmission time All stations know that a transmission has started almost immediately First listen for clear medium (carrier sense) If channel sensed busy defer transmission If channel sensed idle transmit entire frame
Wait reasonable time (round trip plus ACK contention) No ACK then retransmit
If two stations start at the same instant collision Max utilization depends on propagation time (medium length) and frame
length Longer frame and shorter propagation gives better utilization
DataLink Layer 19
CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted
spatial layout of nodes
noterole of distance amp propagation delay in determining collision probability
DataLink Layer 20
Nonpersistent CSMA1 If medium is idle transmit otherwise go to 22 If medium is busy wait amount of time drawn
from probability distribution (retransmission delay) and repeat 1
Random delays reduces probability of collisions Consider two stations become ready to transmit at
same time bull While another transmission is in progress
If both stations delay same time before retrying both will attempt to transmit at same time
Capacity is wasted because medium will remain idle following end of transmission Even if one or more stations waiting
Nonpersistent stations deferential
DataLink Layer 21
1-persistent CSMA To avoid idle channel time 1-persistent protocol
used Station wishing to transmit listens and obeys
following 1 If medium idle transmit otherwise go to step 22 If medium busy listen until idle then transmit
immediately 1-persistent stations selfish If two or more stations waiting collision
guaranteed Gets sorted out after collision
DataLink Layer 22
P-persistent CSMA Compromise that attempts to reduce collisions
Like nonpersistent And reduce idle time
Like1-persistent Rules1 If medium idle transmit with probability p and
delay one time unit with probability (1 ndash p) Time unit typically maximum propagation delay
2 If medium busy listen until idle and repeat step 13 If transmission is delayed one time unit repeat
step 1 What is an effective value of p
DataLink Layer 23
Value of p Avoid instability under heavy load n stations waiting to send End of transmission expected number of stations attempting
to transmit is number of stations ready times probability of transmitting n x p
If n x p gt 1 on average there will be a collision Repeated attempts to transmit almost guaranteeing more
collisions Retries compete with new transmissions Eventually all stations trying to send
Continuous collisions zero throughput So nxp lt 1 for expected peaks of n If heavy load expected p small However as p made smaller stations wait longer At low loads this gives very long delays
DataLink Layer 24
Persistent and Nonpersistent CSMA
Comparison of the channel utilization versus load for various
random access protocols
DataLink Layer 25
Which Persistence Algorithm IEEE 8023 uses 1-persistent Both nonpersistent and p-persistent have
performance problems 1-persistent (p = 1) seems more unstable
than p-persistent Greed of the stations But wasted time due to collisions is short (if
frames long relative to propagation delay With random backoff unlikely to collide on next
tries To ensure backoff maintains stability IEEE 8023
and Ethernet use binary exponential backoff
DataLink Layer 26
CSMACD (Collision Detection) With CSMA collision occupies medium
for duration of transmission Stations listen whilst transmitting
1 If medium idle transmit otherwise step 2
2 If busy listen for idle then transmit3 If collision detected jam then cease
transmission4 After jam wait random time then start
from step 1
DataLink Layer 27
CSMACDCSMACD carrier sensing deferral as in CSMA
collisions detected within short time colliding transmissions aborted reducing channel
wastage collision detection
easy in wired LANs measure signal strengths compare transmitted received signals
difficult in wireless LANs receiver shut off while transmitting
human analogy the polite conversationalist
DataLink Layer 28
CSMACD collision detection
DataLink Layer 29
CSMACD
DataLink Layer 30
CSMACDOperation
DataLink Layer 31
ldquoTaking Turnsrdquo MAC protocolsPolling master node
ldquoinvitesrdquo slave nodes to transmit in turn
concerns polling overhead latency single point of
failure (master)
Token passing control token passed
from one node to next sequentially
token message concerns
token overhead latency single point of failure
(token)
DataLink Layer 32
Summary of MAC protocols What do you do with a shared media
Channel Partitioning by time frequency or code
bull Time Division Frequency Division Random partitioning (dynamic)
bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire)
hard in others (wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
Taking Turnsbull polling from a central site token passing
DataLink Layer 33
Summary of MAC protocolsChannel partitioning MAC protocols
share channel efficiently and fairly at high load inefficient at low load delay in channel access
1N 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
ldquotaking turnsrdquo protocolslook for best of both worlds
DataLink Layer 34
Ethernet Overview History
developed by Xerox PARC in mid-1970s roots in Aloha packet-radio network standardized by Xerox DEC and Intel in
1978 similar to IEEE 8023 standard
Metcalfersquos Ethernetsketch
DataLink Layer 35
Ethernetldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps
DataLink Layer 36
Star topology Bus topology popular through mid 90s Now star topology prevails Connection choices hub or switch (more later)
hub orswitch
DataLink Layer 37
Ethernet Frame StructureSending adapter encapsulates IP datagram (or
other network layer protocol packet) in Ethernet frame
Preamble 7 bytes with pattern 10101010 followed by one
byte with pattern 10101011 used to synchronize receiver sender clock rates
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 38
Ethernet Frame Structure (more) Addresses 6 bytes
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol
otherwise adapter discards frame Type indicates the higher layer protocol
(mostly IP but others may be supported such as Novell IPX and AppleTalk)
CRC checked at receiver if error is detected the frame is simply dropped
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 39
Unreliable connectionless service Connectionless No handshaking between
sending and receiving adapter Unreliable receiving adapter doesnrsquot send
acks or nacks to sending adapter stream of datagrams passed to network layer can
have gaps gaps will be filled if app is using TCP otherwise app will see the gaps
DataLink Layer 40
Ethernet uses CSMACD No slots adapter doesnrsquot
transmit if it senses that some other adapter is transmitting that is carrier sense
transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection
Before attempting a retransmission adapter waits a random time that is random access
DataLink Layer 41
Ethernet CSMACD algorithm1 Adaptor receives datagram
from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
DataLink Layer 42
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential Backoff Goal adapt retransmission
attempts to estimated current load heavy load random wait
will be longer first collision choose K
from 01 delay is K 512 bit transmission times
after second collision choose K from 0123hellip
after ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
DataLink Layer 43
Collision Detection On baseband bus collision produces much
higher signal voltage than signal Collision detected if cable signal greater than
single station signal Signal attenuated over distance Limit distance to 500m (10Base5) or 200m
(10Base2) For twisted pair (star-topology) activity on
more than one port is collision Special collision presence signal
DataLink Layer 44
Algorithm (cont)
If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes
of data) delay and try again
bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected
k=02n - 1bull give up after several tries (usually 16)bull exponential backoff
DataLink Layer 45
Binary Exponential Backoff Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and
reports error As congestion increases stations back off by larger
amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff
efficient over wide range of loads Low loads 1-persistence guarantees station can
seize channel once idle High loads at least as stable as other techniques
Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first
DataLink Layer 46
Ethernet MAC Sublayer Protocol (2)
Collision detection can take as long as 2
DataLink Layer 47
Ethernet PerformanceEfficiency of Ethernet at 10 Mbps with
512-bit slot times
DataLink Layer 48
CSMACD efficiency Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame
Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap
transprop tt 511efficiency
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 9
Channel 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 example 6-station LAN 134 have pkt frequency bands 256 idle
TDM (Time Division Multiplexing) channel divided into N time slots one per user inefficient with low duty cycle users and at light load
FDM (Frequency Division Multiplexing) frequency subdivided
frequ
ency
ban
ds
time
DataLink Layer 10
Random Access Protocols When node has packet to send
transmit at full channel data rate R no a priori coordination among nodes
two or more transmitting nodes ldquocollisionrdquo random access MAC protocol specifies
how to detect collisions how to recover from collisions (eg via delayed
retransmissions) Examples of random access MAC protocols
slotted ALOHA ALOHA CSMA CSMACD CSMACA
DataLink Layer 11
Slotted ALOHAAssumptions all frames same size time is divided into
equal size slots time to transmit 1 frame
nodes start to transmit frames only at beginning of slots
nodes are synchronized if 2 or more nodes
transmit in slot all nodes detect collision
Operation when node obtains fresh
frame it transmits in next slot
no collision node can send new frame in next slot
if collision node retransmits frame in each subsequent slot with prob p until success
DataLink Layer 12
Slotted ALOHA
Pros single active node can
continuously transmit at full rate of channel
highly decentralized only slots in nodes need to be in sync
simple
Cons collisions wasting
slots idle slots nodes may be able to
detect collision in less than time to transmit packet
clock synchronization
DataLink Layer 13
Slotted Aloha efficiency
Suppose N nodes with many frames to send each transmits in slot with probability p
probability that node 1 has success in a slot = p(1-p)N-1
probability that any node has a success = Np(1-p)N-1
For max efficiency with N nodes find p that maximizes Np(1-p)N-1
For many nodes take limit of Np(1-p)N-1
as N goes to infinity gives 1e = 37
Efficiency is the long-run fraction of successful slots when there are many nodes each with many frames to send
At best channelused for useful transmissions 37of time
DataLink Layer 15
Pure ALOHA (2)Vulnerable period for the shaded frame
DataLink Layer 16
Pure Aloha efficiencyP(success by given node) = P(node transmits) P(no other node transmits in [p0-1p0]
P(no other node transmits in [p0-1p0] = p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n -gt infty
= 1(2e) = 18 Even worse
DataLink Layer 17
ALOHA EfficiencyThroughput versus offered traffic for
ALOHA systems
DataLink Layer 18
CSMA (Carrier Sense Multiple Access) Propagation time is much less than transmission time All stations know that a transmission has started almost immediately First listen for clear medium (carrier sense) If channel sensed busy defer transmission If channel sensed idle transmit entire frame
Wait reasonable time (round trip plus ACK contention) No ACK then retransmit
If two stations start at the same instant collision Max utilization depends on propagation time (medium length) and frame
length Longer frame and shorter propagation gives better utilization
DataLink Layer 19
CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted
spatial layout of nodes
noterole of distance amp propagation delay in determining collision probability
DataLink Layer 20
Nonpersistent CSMA1 If medium is idle transmit otherwise go to 22 If medium is busy wait amount of time drawn
from probability distribution (retransmission delay) and repeat 1
Random delays reduces probability of collisions Consider two stations become ready to transmit at
same time bull While another transmission is in progress
If both stations delay same time before retrying both will attempt to transmit at same time
Capacity is wasted because medium will remain idle following end of transmission Even if one or more stations waiting
Nonpersistent stations deferential
DataLink Layer 21
1-persistent CSMA To avoid idle channel time 1-persistent protocol
used Station wishing to transmit listens and obeys
following 1 If medium idle transmit otherwise go to step 22 If medium busy listen until idle then transmit
immediately 1-persistent stations selfish If two or more stations waiting collision
guaranteed Gets sorted out after collision
DataLink Layer 22
P-persistent CSMA Compromise that attempts to reduce collisions
Like nonpersistent And reduce idle time
Like1-persistent Rules1 If medium idle transmit with probability p and
delay one time unit with probability (1 ndash p) Time unit typically maximum propagation delay
2 If medium busy listen until idle and repeat step 13 If transmission is delayed one time unit repeat
step 1 What is an effective value of p
DataLink Layer 23
Value of p Avoid instability under heavy load n stations waiting to send End of transmission expected number of stations attempting
to transmit is number of stations ready times probability of transmitting n x p
If n x p gt 1 on average there will be a collision Repeated attempts to transmit almost guaranteeing more
collisions Retries compete with new transmissions Eventually all stations trying to send
Continuous collisions zero throughput So nxp lt 1 for expected peaks of n If heavy load expected p small However as p made smaller stations wait longer At low loads this gives very long delays
DataLink Layer 24
Persistent and Nonpersistent CSMA
Comparison of the channel utilization versus load for various
random access protocols
DataLink Layer 25
Which Persistence Algorithm IEEE 8023 uses 1-persistent Both nonpersistent and p-persistent have
performance problems 1-persistent (p = 1) seems more unstable
than p-persistent Greed of the stations But wasted time due to collisions is short (if
frames long relative to propagation delay With random backoff unlikely to collide on next
tries To ensure backoff maintains stability IEEE 8023
and Ethernet use binary exponential backoff
DataLink Layer 26
CSMACD (Collision Detection) With CSMA collision occupies medium
for duration of transmission Stations listen whilst transmitting
1 If medium idle transmit otherwise step 2
2 If busy listen for idle then transmit3 If collision detected jam then cease
transmission4 After jam wait random time then start
from step 1
DataLink Layer 27
CSMACDCSMACD carrier sensing deferral as in CSMA
collisions detected within short time colliding transmissions aborted reducing channel
wastage collision detection
easy in wired LANs measure signal strengths compare transmitted received signals
difficult in wireless LANs receiver shut off while transmitting
human analogy the polite conversationalist
DataLink Layer 28
CSMACD collision detection
DataLink Layer 29
CSMACD
DataLink Layer 30
CSMACDOperation
DataLink Layer 31
ldquoTaking Turnsrdquo MAC protocolsPolling master node
ldquoinvitesrdquo slave nodes to transmit in turn
concerns polling overhead latency single point of
failure (master)
Token passing control token passed
from one node to next sequentially
token message concerns
token overhead latency single point of failure
(token)
DataLink Layer 32
Summary of MAC protocols What do you do with a shared media
Channel Partitioning by time frequency or code
bull Time Division Frequency Division Random partitioning (dynamic)
bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire)
hard in others (wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
Taking Turnsbull polling from a central site token passing
DataLink Layer 33
Summary of MAC protocolsChannel partitioning MAC protocols
share channel efficiently and fairly at high load inefficient at low load delay in channel access
1N 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
ldquotaking turnsrdquo protocolslook for best of both worlds
DataLink Layer 34
Ethernet Overview History
developed by Xerox PARC in mid-1970s roots in Aloha packet-radio network standardized by Xerox DEC and Intel in
1978 similar to IEEE 8023 standard
Metcalfersquos Ethernetsketch
DataLink Layer 35
Ethernetldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps
DataLink Layer 36
Star topology Bus topology popular through mid 90s Now star topology prevails Connection choices hub or switch (more later)
hub orswitch
DataLink Layer 37
Ethernet Frame StructureSending adapter encapsulates IP datagram (or
other network layer protocol packet) in Ethernet frame
Preamble 7 bytes with pattern 10101010 followed by one
byte with pattern 10101011 used to synchronize receiver sender clock rates
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 38
Ethernet Frame Structure (more) Addresses 6 bytes
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol
otherwise adapter discards frame Type indicates the higher layer protocol
(mostly IP but others may be supported such as Novell IPX and AppleTalk)
CRC checked at receiver if error is detected the frame is simply dropped
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 39
Unreliable connectionless service Connectionless No handshaking between
sending and receiving adapter Unreliable receiving adapter doesnrsquot send
acks or nacks to sending adapter stream of datagrams passed to network layer can
have gaps gaps will be filled if app is using TCP otherwise app will see the gaps
DataLink Layer 40
Ethernet uses CSMACD No slots adapter doesnrsquot
transmit if it senses that some other adapter is transmitting that is carrier sense
transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection
Before attempting a retransmission adapter waits a random time that is random access
DataLink Layer 41
Ethernet CSMACD algorithm1 Adaptor receives datagram
from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
DataLink Layer 42
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential Backoff Goal adapt retransmission
attempts to estimated current load heavy load random wait
will be longer first collision choose K
from 01 delay is K 512 bit transmission times
after second collision choose K from 0123hellip
after ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
DataLink Layer 43
Collision Detection On baseband bus collision produces much
higher signal voltage than signal Collision detected if cable signal greater than
single station signal Signal attenuated over distance Limit distance to 500m (10Base5) or 200m
(10Base2) For twisted pair (star-topology) activity on
more than one port is collision Special collision presence signal
DataLink Layer 44
Algorithm (cont)
If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes
of data) delay and try again
bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected
k=02n - 1bull give up after several tries (usually 16)bull exponential backoff
DataLink Layer 45
Binary Exponential Backoff Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and
reports error As congestion increases stations back off by larger
amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff
efficient over wide range of loads Low loads 1-persistence guarantees station can
seize channel once idle High loads at least as stable as other techniques
Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first
DataLink Layer 46
Ethernet MAC Sublayer Protocol (2)
Collision detection can take as long as 2
DataLink Layer 47
Ethernet PerformanceEfficiency of Ethernet at 10 Mbps with
512-bit slot times
DataLink Layer 48
CSMACD efficiency Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame
Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap
transprop tt 511efficiency
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 10
Random Access Protocols When node has packet to send
transmit at full channel data rate R no a priori coordination among nodes
two or more transmitting nodes ldquocollisionrdquo random access MAC protocol specifies
how to detect collisions how to recover from collisions (eg via delayed
retransmissions) Examples of random access MAC protocols
slotted ALOHA ALOHA CSMA CSMACD CSMACA
DataLink Layer 11
Slotted ALOHAAssumptions all frames same size time is divided into
equal size slots time to transmit 1 frame
nodes start to transmit frames only at beginning of slots
nodes are synchronized if 2 or more nodes
transmit in slot all nodes detect collision
Operation when node obtains fresh
frame it transmits in next slot
no collision node can send new frame in next slot
if collision node retransmits frame in each subsequent slot with prob p until success
DataLink Layer 12
Slotted ALOHA
Pros single active node can
continuously transmit at full rate of channel
highly decentralized only slots in nodes need to be in sync
simple
Cons collisions wasting
slots idle slots nodes may be able to
detect collision in less than time to transmit packet
clock synchronization
DataLink Layer 13
Slotted Aloha efficiency
Suppose N nodes with many frames to send each transmits in slot with probability p
probability that node 1 has success in a slot = p(1-p)N-1
probability that any node has a success = Np(1-p)N-1
For max efficiency with N nodes find p that maximizes Np(1-p)N-1
For many nodes take limit of Np(1-p)N-1
as N goes to infinity gives 1e = 37
Efficiency is the long-run fraction of successful slots when there are many nodes each with many frames to send
At best channelused for useful transmissions 37of time
DataLink Layer 15
Pure ALOHA (2)Vulnerable period for the shaded frame
DataLink Layer 16
Pure Aloha efficiencyP(success by given node) = P(node transmits) P(no other node transmits in [p0-1p0]
P(no other node transmits in [p0-1p0] = p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n -gt infty
= 1(2e) = 18 Even worse
DataLink Layer 17
ALOHA EfficiencyThroughput versus offered traffic for
ALOHA systems
DataLink Layer 18
CSMA (Carrier Sense Multiple Access) Propagation time is much less than transmission time All stations know that a transmission has started almost immediately First listen for clear medium (carrier sense) If channel sensed busy defer transmission If channel sensed idle transmit entire frame
Wait reasonable time (round trip plus ACK contention) No ACK then retransmit
If two stations start at the same instant collision Max utilization depends on propagation time (medium length) and frame
length Longer frame and shorter propagation gives better utilization
DataLink Layer 19
CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted
spatial layout of nodes
noterole of distance amp propagation delay in determining collision probability
DataLink Layer 20
Nonpersistent CSMA1 If medium is idle transmit otherwise go to 22 If medium is busy wait amount of time drawn
from probability distribution (retransmission delay) and repeat 1
Random delays reduces probability of collisions Consider two stations become ready to transmit at
same time bull While another transmission is in progress
If both stations delay same time before retrying both will attempt to transmit at same time
Capacity is wasted because medium will remain idle following end of transmission Even if one or more stations waiting
Nonpersistent stations deferential
DataLink Layer 21
1-persistent CSMA To avoid idle channel time 1-persistent protocol
used Station wishing to transmit listens and obeys
following 1 If medium idle transmit otherwise go to step 22 If medium busy listen until idle then transmit
immediately 1-persistent stations selfish If two or more stations waiting collision
guaranteed Gets sorted out after collision
DataLink Layer 22
P-persistent CSMA Compromise that attempts to reduce collisions
Like nonpersistent And reduce idle time
Like1-persistent Rules1 If medium idle transmit with probability p and
delay one time unit with probability (1 ndash p) Time unit typically maximum propagation delay
2 If medium busy listen until idle and repeat step 13 If transmission is delayed one time unit repeat
step 1 What is an effective value of p
DataLink Layer 23
Value of p Avoid instability under heavy load n stations waiting to send End of transmission expected number of stations attempting
to transmit is number of stations ready times probability of transmitting n x p
If n x p gt 1 on average there will be a collision Repeated attempts to transmit almost guaranteeing more
collisions Retries compete with new transmissions Eventually all stations trying to send
Continuous collisions zero throughput So nxp lt 1 for expected peaks of n If heavy load expected p small However as p made smaller stations wait longer At low loads this gives very long delays
DataLink Layer 24
Persistent and Nonpersistent CSMA
Comparison of the channel utilization versus load for various
random access protocols
DataLink Layer 25
Which Persistence Algorithm IEEE 8023 uses 1-persistent Both nonpersistent and p-persistent have
performance problems 1-persistent (p = 1) seems more unstable
than p-persistent Greed of the stations But wasted time due to collisions is short (if
frames long relative to propagation delay With random backoff unlikely to collide on next
tries To ensure backoff maintains stability IEEE 8023
and Ethernet use binary exponential backoff
DataLink Layer 26
CSMACD (Collision Detection) With CSMA collision occupies medium
for duration of transmission Stations listen whilst transmitting
1 If medium idle transmit otherwise step 2
2 If busy listen for idle then transmit3 If collision detected jam then cease
transmission4 After jam wait random time then start
from step 1
DataLink Layer 27
CSMACDCSMACD carrier sensing deferral as in CSMA
collisions detected within short time colliding transmissions aborted reducing channel
wastage collision detection
easy in wired LANs measure signal strengths compare transmitted received signals
difficult in wireless LANs receiver shut off while transmitting
human analogy the polite conversationalist
DataLink Layer 28
CSMACD collision detection
DataLink Layer 29
CSMACD
DataLink Layer 30
CSMACDOperation
DataLink Layer 31
ldquoTaking Turnsrdquo MAC protocolsPolling master node
ldquoinvitesrdquo slave nodes to transmit in turn
concerns polling overhead latency single point of
failure (master)
Token passing control token passed
from one node to next sequentially
token message concerns
token overhead latency single point of failure
(token)
DataLink Layer 32
Summary of MAC protocols What do you do with a shared media
Channel Partitioning by time frequency or code
bull Time Division Frequency Division Random partitioning (dynamic)
bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire)
hard in others (wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
Taking Turnsbull polling from a central site token passing
DataLink Layer 33
Summary of MAC protocolsChannel partitioning MAC protocols
share channel efficiently and fairly at high load inefficient at low load delay in channel access
1N 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
ldquotaking turnsrdquo protocolslook for best of both worlds
DataLink Layer 34
Ethernet Overview History
developed by Xerox PARC in mid-1970s roots in Aloha packet-radio network standardized by Xerox DEC and Intel in
1978 similar to IEEE 8023 standard
Metcalfersquos Ethernetsketch
DataLink Layer 35
Ethernetldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps
DataLink Layer 36
Star topology Bus topology popular through mid 90s Now star topology prevails Connection choices hub or switch (more later)
hub orswitch
DataLink Layer 37
Ethernet Frame StructureSending adapter encapsulates IP datagram (or
other network layer protocol packet) in Ethernet frame
Preamble 7 bytes with pattern 10101010 followed by one
byte with pattern 10101011 used to synchronize receiver sender clock rates
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 38
Ethernet Frame Structure (more) Addresses 6 bytes
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol
otherwise adapter discards frame Type indicates the higher layer protocol
(mostly IP but others may be supported such as Novell IPX and AppleTalk)
CRC checked at receiver if error is detected the frame is simply dropped
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 39
Unreliable connectionless service Connectionless No handshaking between
sending and receiving adapter Unreliable receiving adapter doesnrsquot send
acks or nacks to sending adapter stream of datagrams passed to network layer can
have gaps gaps will be filled if app is using TCP otherwise app will see the gaps
DataLink Layer 40
Ethernet uses CSMACD No slots adapter doesnrsquot
transmit if it senses that some other adapter is transmitting that is carrier sense
transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection
Before attempting a retransmission adapter waits a random time that is random access
DataLink Layer 41
Ethernet CSMACD algorithm1 Adaptor receives datagram
from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
DataLink Layer 42
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential Backoff Goal adapt retransmission
attempts to estimated current load heavy load random wait
will be longer first collision choose K
from 01 delay is K 512 bit transmission times
after second collision choose K from 0123hellip
after ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
DataLink Layer 43
Collision Detection On baseband bus collision produces much
higher signal voltage than signal Collision detected if cable signal greater than
single station signal Signal attenuated over distance Limit distance to 500m (10Base5) or 200m
(10Base2) For twisted pair (star-topology) activity on
more than one port is collision Special collision presence signal
DataLink Layer 44
Algorithm (cont)
If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes
of data) delay and try again
bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected
k=02n - 1bull give up after several tries (usually 16)bull exponential backoff
DataLink Layer 45
Binary Exponential Backoff Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and
reports error As congestion increases stations back off by larger
amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff
efficient over wide range of loads Low loads 1-persistence guarantees station can
seize channel once idle High loads at least as stable as other techniques
Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first
DataLink Layer 46
Ethernet MAC Sublayer Protocol (2)
Collision detection can take as long as 2
DataLink Layer 47
Ethernet PerformanceEfficiency of Ethernet at 10 Mbps with
512-bit slot times
DataLink Layer 48
CSMACD efficiency Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame
Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap
transprop tt 511efficiency
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 11
Slotted ALOHAAssumptions all frames same size time is divided into
equal size slots time to transmit 1 frame
nodes start to transmit frames only at beginning of slots
nodes are synchronized if 2 or more nodes
transmit in slot all nodes detect collision
Operation when node obtains fresh
frame it transmits in next slot
no collision node can send new frame in next slot
if collision node retransmits frame in each subsequent slot with prob p until success
DataLink Layer 12
Slotted ALOHA
Pros single active node can
continuously transmit at full rate of channel
highly decentralized only slots in nodes need to be in sync
simple
Cons collisions wasting
slots idle slots nodes may be able to
detect collision in less than time to transmit packet
clock synchronization
DataLink Layer 13
Slotted Aloha efficiency
Suppose N nodes with many frames to send each transmits in slot with probability p
probability that node 1 has success in a slot = p(1-p)N-1
probability that any node has a success = Np(1-p)N-1
For max efficiency with N nodes find p that maximizes Np(1-p)N-1
For many nodes take limit of Np(1-p)N-1
as N goes to infinity gives 1e = 37
Efficiency is the long-run fraction of successful slots when there are many nodes each with many frames to send
At best channelused for useful transmissions 37of time
DataLink Layer 15
Pure ALOHA (2)Vulnerable period for the shaded frame
DataLink Layer 16
Pure Aloha efficiencyP(success by given node) = P(node transmits) P(no other node transmits in [p0-1p0]
P(no other node transmits in [p0-1p0] = p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n -gt infty
= 1(2e) = 18 Even worse
DataLink Layer 17
ALOHA EfficiencyThroughput versus offered traffic for
ALOHA systems
DataLink Layer 18
CSMA (Carrier Sense Multiple Access) Propagation time is much less than transmission time All stations know that a transmission has started almost immediately First listen for clear medium (carrier sense) If channel sensed busy defer transmission If channel sensed idle transmit entire frame
Wait reasonable time (round trip plus ACK contention) No ACK then retransmit
If two stations start at the same instant collision Max utilization depends on propagation time (medium length) and frame
length Longer frame and shorter propagation gives better utilization
DataLink Layer 19
CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted
spatial layout of nodes
noterole of distance amp propagation delay in determining collision probability
DataLink Layer 20
Nonpersistent CSMA1 If medium is idle transmit otherwise go to 22 If medium is busy wait amount of time drawn
from probability distribution (retransmission delay) and repeat 1
Random delays reduces probability of collisions Consider two stations become ready to transmit at
same time bull While another transmission is in progress
If both stations delay same time before retrying both will attempt to transmit at same time
Capacity is wasted because medium will remain idle following end of transmission Even if one or more stations waiting
Nonpersistent stations deferential
DataLink Layer 21
1-persistent CSMA To avoid idle channel time 1-persistent protocol
used Station wishing to transmit listens and obeys
following 1 If medium idle transmit otherwise go to step 22 If medium busy listen until idle then transmit
immediately 1-persistent stations selfish If two or more stations waiting collision
guaranteed Gets sorted out after collision
DataLink Layer 22
P-persistent CSMA Compromise that attempts to reduce collisions
Like nonpersistent And reduce idle time
Like1-persistent Rules1 If medium idle transmit with probability p and
delay one time unit with probability (1 ndash p) Time unit typically maximum propagation delay
2 If medium busy listen until idle and repeat step 13 If transmission is delayed one time unit repeat
step 1 What is an effective value of p
DataLink Layer 23
Value of p Avoid instability under heavy load n stations waiting to send End of transmission expected number of stations attempting
to transmit is number of stations ready times probability of transmitting n x p
If n x p gt 1 on average there will be a collision Repeated attempts to transmit almost guaranteeing more
collisions Retries compete with new transmissions Eventually all stations trying to send
Continuous collisions zero throughput So nxp lt 1 for expected peaks of n If heavy load expected p small However as p made smaller stations wait longer At low loads this gives very long delays
DataLink Layer 24
Persistent and Nonpersistent CSMA
Comparison of the channel utilization versus load for various
random access protocols
DataLink Layer 25
Which Persistence Algorithm IEEE 8023 uses 1-persistent Both nonpersistent and p-persistent have
performance problems 1-persistent (p = 1) seems more unstable
than p-persistent Greed of the stations But wasted time due to collisions is short (if
frames long relative to propagation delay With random backoff unlikely to collide on next
tries To ensure backoff maintains stability IEEE 8023
and Ethernet use binary exponential backoff
DataLink Layer 26
CSMACD (Collision Detection) With CSMA collision occupies medium
for duration of transmission Stations listen whilst transmitting
1 If medium idle transmit otherwise step 2
2 If busy listen for idle then transmit3 If collision detected jam then cease
transmission4 After jam wait random time then start
from step 1
DataLink Layer 27
CSMACDCSMACD carrier sensing deferral as in CSMA
collisions detected within short time colliding transmissions aborted reducing channel
wastage collision detection
easy in wired LANs measure signal strengths compare transmitted received signals
difficult in wireless LANs receiver shut off while transmitting
human analogy the polite conversationalist
DataLink Layer 28
CSMACD collision detection
DataLink Layer 29
CSMACD
DataLink Layer 30
CSMACDOperation
DataLink Layer 31
ldquoTaking Turnsrdquo MAC protocolsPolling master node
ldquoinvitesrdquo slave nodes to transmit in turn
concerns polling overhead latency single point of
failure (master)
Token passing control token passed
from one node to next sequentially
token message concerns
token overhead latency single point of failure
(token)
DataLink Layer 32
Summary of MAC protocols What do you do with a shared media
Channel Partitioning by time frequency or code
bull Time Division Frequency Division Random partitioning (dynamic)
bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire)
hard in others (wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
Taking Turnsbull polling from a central site token passing
DataLink Layer 33
Summary of MAC protocolsChannel partitioning MAC protocols
share channel efficiently and fairly at high load inefficient at low load delay in channel access
1N 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
ldquotaking turnsrdquo protocolslook for best of both worlds
DataLink Layer 34
Ethernet Overview History
developed by Xerox PARC in mid-1970s roots in Aloha packet-radio network standardized by Xerox DEC and Intel in
1978 similar to IEEE 8023 standard
Metcalfersquos Ethernetsketch
DataLink Layer 35
Ethernetldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps
DataLink Layer 36
Star topology Bus topology popular through mid 90s Now star topology prevails Connection choices hub or switch (more later)
hub orswitch
DataLink Layer 37
Ethernet Frame StructureSending adapter encapsulates IP datagram (or
other network layer protocol packet) in Ethernet frame
Preamble 7 bytes with pattern 10101010 followed by one
byte with pattern 10101011 used to synchronize receiver sender clock rates
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 38
Ethernet Frame Structure (more) Addresses 6 bytes
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol
otherwise adapter discards frame Type indicates the higher layer protocol
(mostly IP but others may be supported such as Novell IPX and AppleTalk)
CRC checked at receiver if error is detected the frame is simply dropped
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 39
Unreliable connectionless service Connectionless No handshaking between
sending and receiving adapter Unreliable receiving adapter doesnrsquot send
acks or nacks to sending adapter stream of datagrams passed to network layer can
have gaps gaps will be filled if app is using TCP otherwise app will see the gaps
DataLink Layer 40
Ethernet uses CSMACD No slots adapter doesnrsquot
transmit if it senses that some other adapter is transmitting that is carrier sense
transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection
Before attempting a retransmission adapter waits a random time that is random access
DataLink Layer 41
Ethernet CSMACD algorithm1 Adaptor receives datagram
from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
DataLink Layer 42
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential Backoff Goal adapt retransmission
attempts to estimated current load heavy load random wait
will be longer first collision choose K
from 01 delay is K 512 bit transmission times
after second collision choose K from 0123hellip
after ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
DataLink Layer 43
Collision Detection On baseband bus collision produces much
higher signal voltage than signal Collision detected if cable signal greater than
single station signal Signal attenuated over distance Limit distance to 500m (10Base5) or 200m
(10Base2) For twisted pair (star-topology) activity on
more than one port is collision Special collision presence signal
DataLink Layer 44
Algorithm (cont)
If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes
of data) delay and try again
bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected
k=02n - 1bull give up after several tries (usually 16)bull exponential backoff
DataLink Layer 45
Binary Exponential Backoff Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and
reports error As congestion increases stations back off by larger
amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff
efficient over wide range of loads Low loads 1-persistence guarantees station can
seize channel once idle High loads at least as stable as other techniques
Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first
DataLink Layer 46
Ethernet MAC Sublayer Protocol (2)
Collision detection can take as long as 2
DataLink Layer 47
Ethernet PerformanceEfficiency of Ethernet at 10 Mbps with
512-bit slot times
DataLink Layer 48
CSMACD efficiency Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame
Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap
transprop tt 511efficiency
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 12
Slotted ALOHA
Pros single active node can
continuously transmit at full rate of channel
highly decentralized only slots in nodes need to be in sync
simple
Cons collisions wasting
slots idle slots nodes may be able to
detect collision in less than time to transmit packet
clock synchronization
DataLink Layer 13
Slotted Aloha efficiency
Suppose N nodes with many frames to send each transmits in slot with probability p
probability that node 1 has success in a slot = p(1-p)N-1
probability that any node has a success = Np(1-p)N-1
For max efficiency with N nodes find p that maximizes Np(1-p)N-1
For many nodes take limit of Np(1-p)N-1
as N goes to infinity gives 1e = 37
Efficiency is the long-run fraction of successful slots when there are many nodes each with many frames to send
At best channelused for useful transmissions 37of time
DataLink Layer 15
Pure ALOHA (2)Vulnerable period for the shaded frame
DataLink Layer 16
Pure Aloha efficiencyP(success by given node) = P(node transmits) P(no other node transmits in [p0-1p0]
P(no other node transmits in [p0-1p0] = p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n -gt infty
= 1(2e) = 18 Even worse
DataLink Layer 17
ALOHA EfficiencyThroughput versus offered traffic for
ALOHA systems
DataLink Layer 18
CSMA (Carrier Sense Multiple Access) Propagation time is much less than transmission time All stations know that a transmission has started almost immediately First listen for clear medium (carrier sense) If channel sensed busy defer transmission If channel sensed idle transmit entire frame
Wait reasonable time (round trip plus ACK contention) No ACK then retransmit
If two stations start at the same instant collision Max utilization depends on propagation time (medium length) and frame
length Longer frame and shorter propagation gives better utilization
DataLink Layer 19
CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted
spatial layout of nodes
noterole of distance amp propagation delay in determining collision probability
DataLink Layer 20
Nonpersistent CSMA1 If medium is idle transmit otherwise go to 22 If medium is busy wait amount of time drawn
from probability distribution (retransmission delay) and repeat 1
Random delays reduces probability of collisions Consider two stations become ready to transmit at
same time bull While another transmission is in progress
If both stations delay same time before retrying both will attempt to transmit at same time
Capacity is wasted because medium will remain idle following end of transmission Even if one or more stations waiting
Nonpersistent stations deferential
DataLink Layer 21
1-persistent CSMA To avoid idle channel time 1-persistent protocol
used Station wishing to transmit listens and obeys
following 1 If medium idle transmit otherwise go to step 22 If medium busy listen until idle then transmit
immediately 1-persistent stations selfish If two or more stations waiting collision
guaranteed Gets sorted out after collision
DataLink Layer 22
P-persistent CSMA Compromise that attempts to reduce collisions
Like nonpersistent And reduce idle time
Like1-persistent Rules1 If medium idle transmit with probability p and
delay one time unit with probability (1 ndash p) Time unit typically maximum propagation delay
2 If medium busy listen until idle and repeat step 13 If transmission is delayed one time unit repeat
step 1 What is an effective value of p
DataLink Layer 23
Value of p Avoid instability under heavy load n stations waiting to send End of transmission expected number of stations attempting
to transmit is number of stations ready times probability of transmitting n x p
If n x p gt 1 on average there will be a collision Repeated attempts to transmit almost guaranteeing more
collisions Retries compete with new transmissions Eventually all stations trying to send
Continuous collisions zero throughput So nxp lt 1 for expected peaks of n If heavy load expected p small However as p made smaller stations wait longer At low loads this gives very long delays
DataLink Layer 24
Persistent and Nonpersistent CSMA
Comparison of the channel utilization versus load for various
random access protocols
DataLink Layer 25
Which Persistence Algorithm IEEE 8023 uses 1-persistent Both nonpersistent and p-persistent have
performance problems 1-persistent (p = 1) seems more unstable
than p-persistent Greed of the stations But wasted time due to collisions is short (if
frames long relative to propagation delay With random backoff unlikely to collide on next
tries To ensure backoff maintains stability IEEE 8023
and Ethernet use binary exponential backoff
DataLink Layer 26
CSMACD (Collision Detection) With CSMA collision occupies medium
for duration of transmission Stations listen whilst transmitting
1 If medium idle transmit otherwise step 2
2 If busy listen for idle then transmit3 If collision detected jam then cease
transmission4 After jam wait random time then start
from step 1
DataLink Layer 27
CSMACDCSMACD carrier sensing deferral as in CSMA
collisions detected within short time colliding transmissions aborted reducing channel
wastage collision detection
easy in wired LANs measure signal strengths compare transmitted received signals
difficult in wireless LANs receiver shut off while transmitting
human analogy the polite conversationalist
DataLink Layer 28
CSMACD collision detection
DataLink Layer 29
CSMACD
DataLink Layer 30
CSMACDOperation
DataLink Layer 31
ldquoTaking Turnsrdquo MAC protocolsPolling master node
ldquoinvitesrdquo slave nodes to transmit in turn
concerns polling overhead latency single point of
failure (master)
Token passing control token passed
from one node to next sequentially
token message concerns
token overhead latency single point of failure
(token)
DataLink Layer 32
Summary of MAC protocols What do you do with a shared media
Channel Partitioning by time frequency or code
bull Time Division Frequency Division Random partitioning (dynamic)
bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire)
hard in others (wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
Taking Turnsbull polling from a central site token passing
DataLink Layer 33
Summary of MAC protocolsChannel partitioning MAC protocols
share channel efficiently and fairly at high load inefficient at low load delay in channel access
1N 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
ldquotaking turnsrdquo protocolslook for best of both worlds
DataLink Layer 34
Ethernet Overview History
developed by Xerox PARC in mid-1970s roots in Aloha packet-radio network standardized by Xerox DEC and Intel in
1978 similar to IEEE 8023 standard
Metcalfersquos Ethernetsketch
DataLink Layer 35
Ethernetldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps
DataLink Layer 36
Star topology Bus topology popular through mid 90s Now star topology prevails Connection choices hub or switch (more later)
hub orswitch
DataLink Layer 37
Ethernet Frame StructureSending adapter encapsulates IP datagram (or
other network layer protocol packet) in Ethernet frame
Preamble 7 bytes with pattern 10101010 followed by one
byte with pattern 10101011 used to synchronize receiver sender clock rates
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 38
Ethernet Frame Structure (more) Addresses 6 bytes
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol
otherwise adapter discards frame Type indicates the higher layer protocol
(mostly IP but others may be supported such as Novell IPX and AppleTalk)
CRC checked at receiver if error is detected the frame is simply dropped
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 39
Unreliable connectionless service Connectionless No handshaking between
sending and receiving adapter Unreliable receiving adapter doesnrsquot send
acks or nacks to sending adapter stream of datagrams passed to network layer can
have gaps gaps will be filled if app is using TCP otherwise app will see the gaps
DataLink Layer 40
Ethernet uses CSMACD No slots adapter doesnrsquot
transmit if it senses that some other adapter is transmitting that is carrier sense
transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection
Before attempting a retransmission adapter waits a random time that is random access
DataLink Layer 41
Ethernet CSMACD algorithm1 Adaptor receives datagram
from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
DataLink Layer 42
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential Backoff Goal adapt retransmission
attempts to estimated current load heavy load random wait
will be longer first collision choose K
from 01 delay is K 512 bit transmission times
after second collision choose K from 0123hellip
after ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
DataLink Layer 43
Collision Detection On baseband bus collision produces much
higher signal voltage than signal Collision detected if cable signal greater than
single station signal Signal attenuated over distance Limit distance to 500m (10Base5) or 200m
(10Base2) For twisted pair (star-topology) activity on
more than one port is collision Special collision presence signal
DataLink Layer 44
Algorithm (cont)
If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes
of data) delay and try again
bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected
k=02n - 1bull give up after several tries (usually 16)bull exponential backoff
DataLink Layer 45
Binary Exponential Backoff Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and
reports error As congestion increases stations back off by larger
amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff
efficient over wide range of loads Low loads 1-persistence guarantees station can
seize channel once idle High loads at least as stable as other techniques
Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first
DataLink Layer 46
Ethernet MAC Sublayer Protocol (2)
Collision detection can take as long as 2
DataLink Layer 47
Ethernet PerformanceEfficiency of Ethernet at 10 Mbps with
512-bit slot times
DataLink Layer 48
CSMACD efficiency Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame
Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap
transprop tt 511efficiency
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 13
Slotted Aloha efficiency
Suppose N nodes with many frames to send each transmits in slot with probability p
probability that node 1 has success in a slot = p(1-p)N-1
probability that any node has a success = Np(1-p)N-1
For max efficiency with N nodes find p that maximizes Np(1-p)N-1
For many nodes take limit of Np(1-p)N-1
as N goes to infinity gives 1e = 37
Efficiency is the long-run fraction of successful slots when there are many nodes each with many frames to send
At best channelused for useful transmissions 37of time
DataLink Layer 15
Pure ALOHA (2)Vulnerable period for the shaded frame
DataLink Layer 16
Pure Aloha efficiencyP(success by given node) = P(node transmits) P(no other node transmits in [p0-1p0]
P(no other node transmits in [p0-1p0] = p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n -gt infty
= 1(2e) = 18 Even worse
DataLink Layer 17
ALOHA EfficiencyThroughput versus offered traffic for
ALOHA systems
DataLink Layer 18
CSMA (Carrier Sense Multiple Access) Propagation time is much less than transmission time All stations know that a transmission has started almost immediately First listen for clear medium (carrier sense) If channel sensed busy defer transmission If channel sensed idle transmit entire frame
Wait reasonable time (round trip plus ACK contention) No ACK then retransmit
If two stations start at the same instant collision Max utilization depends on propagation time (medium length) and frame
length Longer frame and shorter propagation gives better utilization
DataLink Layer 19
CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted
spatial layout of nodes
noterole of distance amp propagation delay in determining collision probability
DataLink Layer 20
Nonpersistent CSMA1 If medium is idle transmit otherwise go to 22 If medium is busy wait amount of time drawn
from probability distribution (retransmission delay) and repeat 1
Random delays reduces probability of collisions Consider two stations become ready to transmit at
same time bull While another transmission is in progress
If both stations delay same time before retrying both will attempt to transmit at same time
Capacity is wasted because medium will remain idle following end of transmission Even if one or more stations waiting
Nonpersistent stations deferential
DataLink Layer 21
1-persistent CSMA To avoid idle channel time 1-persistent protocol
used Station wishing to transmit listens and obeys
following 1 If medium idle transmit otherwise go to step 22 If medium busy listen until idle then transmit
immediately 1-persistent stations selfish If two or more stations waiting collision
guaranteed Gets sorted out after collision
DataLink Layer 22
P-persistent CSMA Compromise that attempts to reduce collisions
Like nonpersistent And reduce idle time
Like1-persistent Rules1 If medium idle transmit with probability p and
delay one time unit with probability (1 ndash p) Time unit typically maximum propagation delay
2 If medium busy listen until idle and repeat step 13 If transmission is delayed one time unit repeat
step 1 What is an effective value of p
DataLink Layer 23
Value of p Avoid instability under heavy load n stations waiting to send End of transmission expected number of stations attempting
to transmit is number of stations ready times probability of transmitting n x p
If n x p gt 1 on average there will be a collision Repeated attempts to transmit almost guaranteeing more
collisions Retries compete with new transmissions Eventually all stations trying to send
Continuous collisions zero throughput So nxp lt 1 for expected peaks of n If heavy load expected p small However as p made smaller stations wait longer At low loads this gives very long delays
DataLink Layer 24
Persistent and Nonpersistent CSMA
Comparison of the channel utilization versus load for various
random access protocols
DataLink Layer 25
Which Persistence Algorithm IEEE 8023 uses 1-persistent Both nonpersistent and p-persistent have
performance problems 1-persistent (p = 1) seems more unstable
than p-persistent Greed of the stations But wasted time due to collisions is short (if
frames long relative to propagation delay With random backoff unlikely to collide on next
tries To ensure backoff maintains stability IEEE 8023
and Ethernet use binary exponential backoff
DataLink Layer 26
CSMACD (Collision Detection) With CSMA collision occupies medium
for duration of transmission Stations listen whilst transmitting
1 If medium idle transmit otherwise step 2
2 If busy listen for idle then transmit3 If collision detected jam then cease
transmission4 After jam wait random time then start
from step 1
DataLink Layer 27
CSMACDCSMACD carrier sensing deferral as in CSMA
collisions detected within short time colliding transmissions aborted reducing channel
wastage collision detection
easy in wired LANs measure signal strengths compare transmitted received signals
difficult in wireless LANs receiver shut off while transmitting
human analogy the polite conversationalist
DataLink Layer 28
CSMACD collision detection
DataLink Layer 29
CSMACD
DataLink Layer 30
CSMACDOperation
DataLink Layer 31
ldquoTaking Turnsrdquo MAC protocolsPolling master node
ldquoinvitesrdquo slave nodes to transmit in turn
concerns polling overhead latency single point of
failure (master)
Token passing control token passed
from one node to next sequentially
token message concerns
token overhead latency single point of failure
(token)
DataLink Layer 32
Summary of MAC protocols What do you do with a shared media
Channel Partitioning by time frequency or code
bull Time Division Frequency Division Random partitioning (dynamic)
bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire)
hard in others (wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
Taking Turnsbull polling from a central site token passing
DataLink Layer 33
Summary of MAC protocolsChannel partitioning MAC protocols
share channel efficiently and fairly at high load inefficient at low load delay in channel access
1N 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
ldquotaking turnsrdquo protocolslook for best of both worlds
DataLink Layer 34
Ethernet Overview History
developed by Xerox PARC in mid-1970s roots in Aloha packet-radio network standardized by Xerox DEC and Intel in
1978 similar to IEEE 8023 standard
Metcalfersquos Ethernetsketch
DataLink Layer 35
Ethernetldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps
DataLink Layer 36
Star topology Bus topology popular through mid 90s Now star topology prevails Connection choices hub or switch (more later)
hub orswitch
DataLink Layer 37
Ethernet Frame StructureSending adapter encapsulates IP datagram (or
other network layer protocol packet) in Ethernet frame
Preamble 7 bytes with pattern 10101010 followed by one
byte with pattern 10101011 used to synchronize receiver sender clock rates
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 38
Ethernet Frame Structure (more) Addresses 6 bytes
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol
otherwise adapter discards frame Type indicates the higher layer protocol
(mostly IP but others may be supported such as Novell IPX and AppleTalk)
CRC checked at receiver if error is detected the frame is simply dropped
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 39
Unreliable connectionless service Connectionless No handshaking between
sending and receiving adapter Unreliable receiving adapter doesnrsquot send
acks or nacks to sending adapter stream of datagrams passed to network layer can
have gaps gaps will be filled if app is using TCP otherwise app will see the gaps
DataLink Layer 40
Ethernet uses CSMACD No slots adapter doesnrsquot
transmit if it senses that some other adapter is transmitting that is carrier sense
transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection
Before attempting a retransmission adapter waits a random time that is random access
DataLink Layer 41
Ethernet CSMACD algorithm1 Adaptor receives datagram
from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
DataLink Layer 42
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential Backoff Goal adapt retransmission
attempts to estimated current load heavy load random wait
will be longer first collision choose K
from 01 delay is K 512 bit transmission times
after second collision choose K from 0123hellip
after ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
DataLink Layer 43
Collision Detection On baseband bus collision produces much
higher signal voltage than signal Collision detected if cable signal greater than
single station signal Signal attenuated over distance Limit distance to 500m (10Base5) or 200m
(10Base2) For twisted pair (star-topology) activity on
more than one port is collision Special collision presence signal
DataLink Layer 44
Algorithm (cont)
If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes
of data) delay and try again
bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected
k=02n - 1bull give up after several tries (usually 16)bull exponential backoff
DataLink Layer 45
Binary Exponential Backoff Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and
reports error As congestion increases stations back off by larger
amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff
efficient over wide range of loads Low loads 1-persistence guarantees station can
seize channel once idle High loads at least as stable as other techniques
Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first
DataLink Layer 46
Ethernet MAC Sublayer Protocol (2)
Collision detection can take as long as 2
DataLink Layer 47
Ethernet PerformanceEfficiency of Ethernet at 10 Mbps with
512-bit slot times
DataLink Layer 48
CSMACD efficiency Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame
Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap
transprop tt 511efficiency
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 15
Pure ALOHA (2)Vulnerable period for the shaded frame
DataLink Layer 16
Pure Aloha efficiencyP(success by given node) = P(node transmits) P(no other node transmits in [p0-1p0]
P(no other node transmits in [p0-1p0] = p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n -gt infty
= 1(2e) = 18 Even worse
DataLink Layer 17
ALOHA EfficiencyThroughput versus offered traffic for
ALOHA systems
DataLink Layer 18
CSMA (Carrier Sense Multiple Access) Propagation time is much less than transmission time All stations know that a transmission has started almost immediately First listen for clear medium (carrier sense) If channel sensed busy defer transmission If channel sensed idle transmit entire frame
Wait reasonable time (round trip plus ACK contention) No ACK then retransmit
If two stations start at the same instant collision Max utilization depends on propagation time (medium length) and frame
length Longer frame and shorter propagation gives better utilization
DataLink Layer 19
CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted
spatial layout of nodes
noterole of distance amp propagation delay in determining collision probability
DataLink Layer 20
Nonpersistent CSMA1 If medium is idle transmit otherwise go to 22 If medium is busy wait amount of time drawn
from probability distribution (retransmission delay) and repeat 1
Random delays reduces probability of collisions Consider two stations become ready to transmit at
same time bull While another transmission is in progress
If both stations delay same time before retrying both will attempt to transmit at same time
Capacity is wasted because medium will remain idle following end of transmission Even if one or more stations waiting
Nonpersistent stations deferential
DataLink Layer 21
1-persistent CSMA To avoid idle channel time 1-persistent protocol
used Station wishing to transmit listens and obeys
following 1 If medium idle transmit otherwise go to step 22 If medium busy listen until idle then transmit
immediately 1-persistent stations selfish If two or more stations waiting collision
guaranteed Gets sorted out after collision
DataLink Layer 22
P-persistent CSMA Compromise that attempts to reduce collisions
Like nonpersistent And reduce idle time
Like1-persistent Rules1 If medium idle transmit with probability p and
delay one time unit with probability (1 ndash p) Time unit typically maximum propagation delay
2 If medium busy listen until idle and repeat step 13 If transmission is delayed one time unit repeat
step 1 What is an effective value of p
DataLink Layer 23
Value of p Avoid instability under heavy load n stations waiting to send End of transmission expected number of stations attempting
to transmit is number of stations ready times probability of transmitting n x p
If n x p gt 1 on average there will be a collision Repeated attempts to transmit almost guaranteeing more
collisions Retries compete with new transmissions Eventually all stations trying to send
Continuous collisions zero throughput So nxp lt 1 for expected peaks of n If heavy load expected p small However as p made smaller stations wait longer At low loads this gives very long delays
DataLink Layer 24
Persistent and Nonpersistent CSMA
Comparison of the channel utilization versus load for various
random access protocols
DataLink Layer 25
Which Persistence Algorithm IEEE 8023 uses 1-persistent Both nonpersistent and p-persistent have
performance problems 1-persistent (p = 1) seems more unstable
than p-persistent Greed of the stations But wasted time due to collisions is short (if
frames long relative to propagation delay With random backoff unlikely to collide on next
tries To ensure backoff maintains stability IEEE 8023
and Ethernet use binary exponential backoff
DataLink Layer 26
CSMACD (Collision Detection) With CSMA collision occupies medium
for duration of transmission Stations listen whilst transmitting
1 If medium idle transmit otherwise step 2
2 If busy listen for idle then transmit3 If collision detected jam then cease
transmission4 After jam wait random time then start
from step 1
DataLink Layer 27
CSMACDCSMACD carrier sensing deferral as in CSMA
collisions detected within short time colliding transmissions aborted reducing channel
wastage collision detection
easy in wired LANs measure signal strengths compare transmitted received signals
difficult in wireless LANs receiver shut off while transmitting
human analogy the polite conversationalist
DataLink Layer 28
CSMACD collision detection
DataLink Layer 29
CSMACD
DataLink Layer 30
CSMACDOperation
DataLink Layer 31
ldquoTaking Turnsrdquo MAC protocolsPolling master node
ldquoinvitesrdquo slave nodes to transmit in turn
concerns polling overhead latency single point of
failure (master)
Token passing control token passed
from one node to next sequentially
token message concerns
token overhead latency single point of failure
(token)
DataLink Layer 32
Summary of MAC protocols What do you do with a shared media
Channel Partitioning by time frequency or code
bull Time Division Frequency Division Random partitioning (dynamic)
bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire)
hard in others (wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
Taking Turnsbull polling from a central site token passing
DataLink Layer 33
Summary of MAC protocolsChannel partitioning MAC protocols
share channel efficiently and fairly at high load inefficient at low load delay in channel access
1N 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
ldquotaking turnsrdquo protocolslook for best of both worlds
DataLink Layer 34
Ethernet Overview History
developed by Xerox PARC in mid-1970s roots in Aloha packet-radio network standardized by Xerox DEC and Intel in
1978 similar to IEEE 8023 standard
Metcalfersquos Ethernetsketch
DataLink Layer 35
Ethernetldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps
DataLink Layer 36
Star topology Bus topology popular through mid 90s Now star topology prevails Connection choices hub or switch (more later)
hub orswitch
DataLink Layer 37
Ethernet Frame StructureSending adapter encapsulates IP datagram (or
other network layer protocol packet) in Ethernet frame
Preamble 7 bytes with pattern 10101010 followed by one
byte with pattern 10101011 used to synchronize receiver sender clock rates
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 38
Ethernet Frame Structure (more) Addresses 6 bytes
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol
otherwise adapter discards frame Type indicates the higher layer protocol
(mostly IP but others may be supported such as Novell IPX and AppleTalk)
CRC checked at receiver if error is detected the frame is simply dropped
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 39
Unreliable connectionless service Connectionless No handshaking between
sending and receiving adapter Unreliable receiving adapter doesnrsquot send
acks or nacks to sending adapter stream of datagrams passed to network layer can
have gaps gaps will be filled if app is using TCP otherwise app will see the gaps
DataLink Layer 40
Ethernet uses CSMACD No slots adapter doesnrsquot
transmit if it senses that some other adapter is transmitting that is carrier sense
transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection
Before attempting a retransmission adapter waits a random time that is random access
DataLink Layer 41
Ethernet CSMACD algorithm1 Adaptor receives datagram
from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
DataLink Layer 42
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential Backoff Goal adapt retransmission
attempts to estimated current load heavy load random wait
will be longer first collision choose K
from 01 delay is K 512 bit transmission times
after second collision choose K from 0123hellip
after ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
DataLink Layer 43
Collision Detection On baseband bus collision produces much
higher signal voltage than signal Collision detected if cable signal greater than
single station signal Signal attenuated over distance Limit distance to 500m (10Base5) or 200m
(10Base2) For twisted pair (star-topology) activity on
more than one port is collision Special collision presence signal
DataLink Layer 44
Algorithm (cont)
If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes
of data) delay and try again
bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected
k=02n - 1bull give up after several tries (usually 16)bull exponential backoff
DataLink Layer 45
Binary Exponential Backoff Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and
reports error As congestion increases stations back off by larger
amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff
efficient over wide range of loads Low loads 1-persistence guarantees station can
seize channel once idle High loads at least as stable as other techniques
Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first
DataLink Layer 46
Ethernet MAC Sublayer Protocol (2)
Collision detection can take as long as 2
DataLink Layer 47
Ethernet PerformanceEfficiency of Ethernet at 10 Mbps with
512-bit slot times
DataLink Layer 48
CSMACD efficiency Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame
Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap
transprop tt 511efficiency
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 16
Pure Aloha efficiencyP(success by given node) = P(node transmits) P(no other node transmits in [p0-1p0]
P(no other node transmits in [p0-1p0] = p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n -gt infty
= 1(2e) = 18 Even worse
DataLink Layer 17
ALOHA EfficiencyThroughput versus offered traffic for
ALOHA systems
DataLink Layer 18
CSMA (Carrier Sense Multiple Access) Propagation time is much less than transmission time All stations know that a transmission has started almost immediately First listen for clear medium (carrier sense) If channel sensed busy defer transmission If channel sensed idle transmit entire frame
Wait reasonable time (round trip plus ACK contention) No ACK then retransmit
If two stations start at the same instant collision Max utilization depends on propagation time (medium length) and frame
length Longer frame and shorter propagation gives better utilization
DataLink Layer 19
CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted
spatial layout of nodes
noterole of distance amp propagation delay in determining collision probability
DataLink Layer 20
Nonpersistent CSMA1 If medium is idle transmit otherwise go to 22 If medium is busy wait amount of time drawn
from probability distribution (retransmission delay) and repeat 1
Random delays reduces probability of collisions Consider two stations become ready to transmit at
same time bull While another transmission is in progress
If both stations delay same time before retrying both will attempt to transmit at same time
Capacity is wasted because medium will remain idle following end of transmission Even if one or more stations waiting
Nonpersistent stations deferential
DataLink Layer 21
1-persistent CSMA To avoid idle channel time 1-persistent protocol
used Station wishing to transmit listens and obeys
following 1 If medium idle transmit otherwise go to step 22 If medium busy listen until idle then transmit
immediately 1-persistent stations selfish If two or more stations waiting collision
guaranteed Gets sorted out after collision
DataLink Layer 22
P-persistent CSMA Compromise that attempts to reduce collisions
Like nonpersistent And reduce idle time
Like1-persistent Rules1 If medium idle transmit with probability p and
delay one time unit with probability (1 ndash p) Time unit typically maximum propagation delay
2 If medium busy listen until idle and repeat step 13 If transmission is delayed one time unit repeat
step 1 What is an effective value of p
DataLink Layer 23
Value of p Avoid instability under heavy load n stations waiting to send End of transmission expected number of stations attempting
to transmit is number of stations ready times probability of transmitting n x p
If n x p gt 1 on average there will be a collision Repeated attempts to transmit almost guaranteeing more
collisions Retries compete with new transmissions Eventually all stations trying to send
Continuous collisions zero throughput So nxp lt 1 for expected peaks of n If heavy load expected p small However as p made smaller stations wait longer At low loads this gives very long delays
DataLink Layer 24
Persistent and Nonpersistent CSMA
Comparison of the channel utilization versus load for various
random access protocols
DataLink Layer 25
Which Persistence Algorithm IEEE 8023 uses 1-persistent Both nonpersistent and p-persistent have
performance problems 1-persistent (p = 1) seems more unstable
than p-persistent Greed of the stations But wasted time due to collisions is short (if
frames long relative to propagation delay With random backoff unlikely to collide on next
tries To ensure backoff maintains stability IEEE 8023
and Ethernet use binary exponential backoff
DataLink Layer 26
CSMACD (Collision Detection) With CSMA collision occupies medium
for duration of transmission Stations listen whilst transmitting
1 If medium idle transmit otherwise step 2
2 If busy listen for idle then transmit3 If collision detected jam then cease
transmission4 After jam wait random time then start
from step 1
DataLink Layer 27
CSMACDCSMACD carrier sensing deferral as in CSMA
collisions detected within short time colliding transmissions aborted reducing channel
wastage collision detection
easy in wired LANs measure signal strengths compare transmitted received signals
difficult in wireless LANs receiver shut off while transmitting
human analogy the polite conversationalist
DataLink Layer 28
CSMACD collision detection
DataLink Layer 29
CSMACD
DataLink Layer 30
CSMACDOperation
DataLink Layer 31
ldquoTaking Turnsrdquo MAC protocolsPolling master node
ldquoinvitesrdquo slave nodes to transmit in turn
concerns polling overhead latency single point of
failure (master)
Token passing control token passed
from one node to next sequentially
token message concerns
token overhead latency single point of failure
(token)
DataLink Layer 32
Summary of MAC protocols What do you do with a shared media
Channel Partitioning by time frequency or code
bull Time Division Frequency Division Random partitioning (dynamic)
bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire)
hard in others (wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
Taking Turnsbull polling from a central site token passing
DataLink Layer 33
Summary of MAC protocolsChannel partitioning MAC protocols
share channel efficiently and fairly at high load inefficient at low load delay in channel access
1N 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
ldquotaking turnsrdquo protocolslook for best of both worlds
DataLink Layer 34
Ethernet Overview History
developed by Xerox PARC in mid-1970s roots in Aloha packet-radio network standardized by Xerox DEC and Intel in
1978 similar to IEEE 8023 standard
Metcalfersquos Ethernetsketch
DataLink Layer 35
Ethernetldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps
DataLink Layer 36
Star topology Bus topology popular through mid 90s Now star topology prevails Connection choices hub or switch (more later)
hub orswitch
DataLink Layer 37
Ethernet Frame StructureSending adapter encapsulates IP datagram (or
other network layer protocol packet) in Ethernet frame
Preamble 7 bytes with pattern 10101010 followed by one
byte with pattern 10101011 used to synchronize receiver sender clock rates
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 38
Ethernet Frame Structure (more) Addresses 6 bytes
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol
otherwise adapter discards frame Type indicates the higher layer protocol
(mostly IP but others may be supported such as Novell IPX and AppleTalk)
CRC checked at receiver if error is detected the frame is simply dropped
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 39
Unreliable connectionless service Connectionless No handshaking between
sending and receiving adapter Unreliable receiving adapter doesnrsquot send
acks or nacks to sending adapter stream of datagrams passed to network layer can
have gaps gaps will be filled if app is using TCP otherwise app will see the gaps
DataLink Layer 40
Ethernet uses CSMACD No slots adapter doesnrsquot
transmit if it senses that some other adapter is transmitting that is carrier sense
transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection
Before attempting a retransmission adapter waits a random time that is random access
DataLink Layer 41
Ethernet CSMACD algorithm1 Adaptor receives datagram
from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
DataLink Layer 42
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential Backoff Goal adapt retransmission
attempts to estimated current load heavy load random wait
will be longer first collision choose K
from 01 delay is K 512 bit transmission times
after second collision choose K from 0123hellip
after ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
DataLink Layer 43
Collision Detection On baseband bus collision produces much
higher signal voltage than signal Collision detected if cable signal greater than
single station signal Signal attenuated over distance Limit distance to 500m (10Base5) or 200m
(10Base2) For twisted pair (star-topology) activity on
more than one port is collision Special collision presence signal
DataLink Layer 44
Algorithm (cont)
If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes
of data) delay and try again
bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected
k=02n - 1bull give up after several tries (usually 16)bull exponential backoff
DataLink Layer 45
Binary Exponential Backoff Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and
reports error As congestion increases stations back off by larger
amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff
efficient over wide range of loads Low loads 1-persistence guarantees station can
seize channel once idle High loads at least as stable as other techniques
Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first
DataLink Layer 46
Ethernet MAC Sublayer Protocol (2)
Collision detection can take as long as 2
DataLink Layer 47
Ethernet PerformanceEfficiency of Ethernet at 10 Mbps with
512-bit slot times
DataLink Layer 48
CSMACD efficiency Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame
Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap
transprop tt 511efficiency
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 17
ALOHA EfficiencyThroughput versus offered traffic for
ALOHA systems
DataLink Layer 18
CSMA (Carrier Sense Multiple Access) Propagation time is much less than transmission time All stations know that a transmission has started almost immediately First listen for clear medium (carrier sense) If channel sensed busy defer transmission If channel sensed idle transmit entire frame
Wait reasonable time (round trip plus ACK contention) No ACK then retransmit
If two stations start at the same instant collision Max utilization depends on propagation time (medium length) and frame
length Longer frame and shorter propagation gives better utilization
DataLink Layer 19
CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted
spatial layout of nodes
noterole of distance amp propagation delay in determining collision probability
DataLink Layer 20
Nonpersistent CSMA1 If medium is idle transmit otherwise go to 22 If medium is busy wait amount of time drawn
from probability distribution (retransmission delay) and repeat 1
Random delays reduces probability of collisions Consider two stations become ready to transmit at
same time bull While another transmission is in progress
If both stations delay same time before retrying both will attempt to transmit at same time
Capacity is wasted because medium will remain idle following end of transmission Even if one or more stations waiting
Nonpersistent stations deferential
DataLink Layer 21
1-persistent CSMA To avoid idle channel time 1-persistent protocol
used Station wishing to transmit listens and obeys
following 1 If medium idle transmit otherwise go to step 22 If medium busy listen until idle then transmit
immediately 1-persistent stations selfish If two or more stations waiting collision
guaranteed Gets sorted out after collision
DataLink Layer 22
P-persistent CSMA Compromise that attempts to reduce collisions
Like nonpersistent And reduce idle time
Like1-persistent Rules1 If medium idle transmit with probability p and
delay one time unit with probability (1 ndash p) Time unit typically maximum propagation delay
2 If medium busy listen until idle and repeat step 13 If transmission is delayed one time unit repeat
step 1 What is an effective value of p
DataLink Layer 23
Value of p Avoid instability under heavy load n stations waiting to send End of transmission expected number of stations attempting
to transmit is number of stations ready times probability of transmitting n x p
If n x p gt 1 on average there will be a collision Repeated attempts to transmit almost guaranteeing more
collisions Retries compete with new transmissions Eventually all stations trying to send
Continuous collisions zero throughput So nxp lt 1 for expected peaks of n If heavy load expected p small However as p made smaller stations wait longer At low loads this gives very long delays
DataLink Layer 24
Persistent and Nonpersistent CSMA
Comparison of the channel utilization versus load for various
random access protocols
DataLink Layer 25
Which Persistence Algorithm IEEE 8023 uses 1-persistent Both nonpersistent and p-persistent have
performance problems 1-persistent (p = 1) seems more unstable
than p-persistent Greed of the stations But wasted time due to collisions is short (if
frames long relative to propagation delay With random backoff unlikely to collide on next
tries To ensure backoff maintains stability IEEE 8023
and Ethernet use binary exponential backoff
DataLink Layer 26
CSMACD (Collision Detection) With CSMA collision occupies medium
for duration of transmission Stations listen whilst transmitting
1 If medium idle transmit otherwise step 2
2 If busy listen for idle then transmit3 If collision detected jam then cease
transmission4 After jam wait random time then start
from step 1
DataLink Layer 27
CSMACDCSMACD carrier sensing deferral as in CSMA
collisions detected within short time colliding transmissions aborted reducing channel
wastage collision detection
easy in wired LANs measure signal strengths compare transmitted received signals
difficult in wireless LANs receiver shut off while transmitting
human analogy the polite conversationalist
DataLink Layer 28
CSMACD collision detection
DataLink Layer 29
CSMACD
DataLink Layer 30
CSMACDOperation
DataLink Layer 31
ldquoTaking Turnsrdquo MAC protocolsPolling master node
ldquoinvitesrdquo slave nodes to transmit in turn
concerns polling overhead latency single point of
failure (master)
Token passing control token passed
from one node to next sequentially
token message concerns
token overhead latency single point of failure
(token)
DataLink Layer 32
Summary of MAC protocols What do you do with a shared media
Channel Partitioning by time frequency or code
bull Time Division Frequency Division Random partitioning (dynamic)
bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire)
hard in others (wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
Taking Turnsbull polling from a central site token passing
DataLink Layer 33
Summary of MAC protocolsChannel partitioning MAC protocols
share channel efficiently and fairly at high load inefficient at low load delay in channel access
1N 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
ldquotaking turnsrdquo protocolslook for best of both worlds
DataLink Layer 34
Ethernet Overview History
developed by Xerox PARC in mid-1970s roots in Aloha packet-radio network standardized by Xerox DEC and Intel in
1978 similar to IEEE 8023 standard
Metcalfersquos Ethernetsketch
DataLink Layer 35
Ethernetldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps
DataLink Layer 36
Star topology Bus topology popular through mid 90s Now star topology prevails Connection choices hub or switch (more later)
hub orswitch
DataLink Layer 37
Ethernet Frame StructureSending adapter encapsulates IP datagram (or
other network layer protocol packet) in Ethernet frame
Preamble 7 bytes with pattern 10101010 followed by one
byte with pattern 10101011 used to synchronize receiver sender clock rates
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 38
Ethernet Frame Structure (more) Addresses 6 bytes
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol
otherwise adapter discards frame Type indicates the higher layer protocol
(mostly IP but others may be supported such as Novell IPX and AppleTalk)
CRC checked at receiver if error is detected the frame is simply dropped
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 39
Unreliable connectionless service Connectionless No handshaking between
sending and receiving adapter Unreliable receiving adapter doesnrsquot send
acks or nacks to sending adapter stream of datagrams passed to network layer can
have gaps gaps will be filled if app is using TCP otherwise app will see the gaps
DataLink Layer 40
Ethernet uses CSMACD No slots adapter doesnrsquot
transmit if it senses that some other adapter is transmitting that is carrier sense
transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection
Before attempting a retransmission adapter waits a random time that is random access
DataLink Layer 41
Ethernet CSMACD algorithm1 Adaptor receives datagram
from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
DataLink Layer 42
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential Backoff Goal adapt retransmission
attempts to estimated current load heavy load random wait
will be longer first collision choose K
from 01 delay is K 512 bit transmission times
after second collision choose K from 0123hellip
after ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
DataLink Layer 43
Collision Detection On baseband bus collision produces much
higher signal voltage than signal Collision detected if cable signal greater than
single station signal Signal attenuated over distance Limit distance to 500m (10Base5) or 200m
(10Base2) For twisted pair (star-topology) activity on
more than one port is collision Special collision presence signal
DataLink Layer 44
Algorithm (cont)
If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes
of data) delay and try again
bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected
k=02n - 1bull give up after several tries (usually 16)bull exponential backoff
DataLink Layer 45
Binary Exponential Backoff Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and
reports error As congestion increases stations back off by larger
amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff
efficient over wide range of loads Low loads 1-persistence guarantees station can
seize channel once idle High loads at least as stable as other techniques
Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first
DataLink Layer 46
Ethernet MAC Sublayer Protocol (2)
Collision detection can take as long as 2
DataLink Layer 47
Ethernet PerformanceEfficiency of Ethernet at 10 Mbps with
512-bit slot times
DataLink Layer 48
CSMACD efficiency Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame
Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap
transprop tt 511efficiency
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 18
CSMA (Carrier Sense Multiple Access) Propagation time is much less than transmission time All stations know that a transmission has started almost immediately First listen for clear medium (carrier sense) If channel sensed busy defer transmission If channel sensed idle transmit entire frame
Wait reasonable time (round trip plus ACK contention) No ACK then retransmit
If two stations start at the same instant collision Max utilization depends on propagation time (medium length) and frame
length Longer frame and shorter propagation gives better utilization
DataLink Layer 19
CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted
spatial layout of nodes
noterole of distance amp propagation delay in determining collision probability
DataLink Layer 20
Nonpersistent CSMA1 If medium is idle transmit otherwise go to 22 If medium is busy wait amount of time drawn
from probability distribution (retransmission delay) and repeat 1
Random delays reduces probability of collisions Consider two stations become ready to transmit at
same time bull While another transmission is in progress
If both stations delay same time before retrying both will attempt to transmit at same time
Capacity is wasted because medium will remain idle following end of transmission Even if one or more stations waiting
Nonpersistent stations deferential
DataLink Layer 21
1-persistent CSMA To avoid idle channel time 1-persistent protocol
used Station wishing to transmit listens and obeys
following 1 If medium idle transmit otherwise go to step 22 If medium busy listen until idle then transmit
immediately 1-persistent stations selfish If two or more stations waiting collision
guaranteed Gets sorted out after collision
DataLink Layer 22
P-persistent CSMA Compromise that attempts to reduce collisions
Like nonpersistent And reduce idle time
Like1-persistent Rules1 If medium idle transmit with probability p and
delay one time unit with probability (1 ndash p) Time unit typically maximum propagation delay
2 If medium busy listen until idle and repeat step 13 If transmission is delayed one time unit repeat
step 1 What is an effective value of p
DataLink Layer 23
Value of p Avoid instability under heavy load n stations waiting to send End of transmission expected number of stations attempting
to transmit is number of stations ready times probability of transmitting n x p
If n x p gt 1 on average there will be a collision Repeated attempts to transmit almost guaranteeing more
collisions Retries compete with new transmissions Eventually all stations trying to send
Continuous collisions zero throughput So nxp lt 1 for expected peaks of n If heavy load expected p small However as p made smaller stations wait longer At low loads this gives very long delays
DataLink Layer 24
Persistent and Nonpersistent CSMA
Comparison of the channel utilization versus load for various
random access protocols
DataLink Layer 25
Which Persistence Algorithm IEEE 8023 uses 1-persistent Both nonpersistent and p-persistent have
performance problems 1-persistent (p = 1) seems more unstable
than p-persistent Greed of the stations But wasted time due to collisions is short (if
frames long relative to propagation delay With random backoff unlikely to collide on next
tries To ensure backoff maintains stability IEEE 8023
and Ethernet use binary exponential backoff
DataLink Layer 26
CSMACD (Collision Detection) With CSMA collision occupies medium
for duration of transmission Stations listen whilst transmitting
1 If medium idle transmit otherwise step 2
2 If busy listen for idle then transmit3 If collision detected jam then cease
transmission4 After jam wait random time then start
from step 1
DataLink Layer 27
CSMACDCSMACD carrier sensing deferral as in CSMA
collisions detected within short time colliding transmissions aborted reducing channel
wastage collision detection
easy in wired LANs measure signal strengths compare transmitted received signals
difficult in wireless LANs receiver shut off while transmitting
human analogy the polite conversationalist
DataLink Layer 28
CSMACD collision detection
DataLink Layer 29
CSMACD
DataLink Layer 30
CSMACDOperation
DataLink Layer 31
ldquoTaking Turnsrdquo MAC protocolsPolling master node
ldquoinvitesrdquo slave nodes to transmit in turn
concerns polling overhead latency single point of
failure (master)
Token passing control token passed
from one node to next sequentially
token message concerns
token overhead latency single point of failure
(token)
DataLink Layer 32
Summary of MAC protocols What do you do with a shared media
Channel Partitioning by time frequency or code
bull Time Division Frequency Division Random partitioning (dynamic)
bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire)
hard in others (wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
Taking Turnsbull polling from a central site token passing
DataLink Layer 33
Summary of MAC protocolsChannel partitioning MAC protocols
share channel efficiently and fairly at high load inefficient at low load delay in channel access
1N 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
ldquotaking turnsrdquo protocolslook for best of both worlds
DataLink Layer 34
Ethernet Overview History
developed by Xerox PARC in mid-1970s roots in Aloha packet-radio network standardized by Xerox DEC and Intel in
1978 similar to IEEE 8023 standard
Metcalfersquos Ethernetsketch
DataLink Layer 35
Ethernetldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps
DataLink Layer 36
Star topology Bus topology popular through mid 90s Now star topology prevails Connection choices hub or switch (more later)
hub orswitch
DataLink Layer 37
Ethernet Frame StructureSending adapter encapsulates IP datagram (or
other network layer protocol packet) in Ethernet frame
Preamble 7 bytes with pattern 10101010 followed by one
byte with pattern 10101011 used to synchronize receiver sender clock rates
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 38
Ethernet Frame Structure (more) Addresses 6 bytes
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol
otherwise adapter discards frame Type indicates the higher layer protocol
(mostly IP but others may be supported such as Novell IPX and AppleTalk)
CRC checked at receiver if error is detected the frame is simply dropped
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 39
Unreliable connectionless service Connectionless No handshaking between
sending and receiving adapter Unreliable receiving adapter doesnrsquot send
acks or nacks to sending adapter stream of datagrams passed to network layer can
have gaps gaps will be filled if app is using TCP otherwise app will see the gaps
DataLink Layer 40
Ethernet uses CSMACD No slots adapter doesnrsquot
transmit if it senses that some other adapter is transmitting that is carrier sense
transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection
Before attempting a retransmission adapter waits a random time that is random access
DataLink Layer 41
Ethernet CSMACD algorithm1 Adaptor receives datagram
from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
DataLink Layer 42
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential Backoff Goal adapt retransmission
attempts to estimated current load heavy load random wait
will be longer first collision choose K
from 01 delay is K 512 bit transmission times
after second collision choose K from 0123hellip
after ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
DataLink Layer 43
Collision Detection On baseband bus collision produces much
higher signal voltage than signal Collision detected if cable signal greater than
single station signal Signal attenuated over distance Limit distance to 500m (10Base5) or 200m
(10Base2) For twisted pair (star-topology) activity on
more than one port is collision Special collision presence signal
DataLink Layer 44
Algorithm (cont)
If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes
of data) delay and try again
bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected
k=02n - 1bull give up after several tries (usually 16)bull exponential backoff
DataLink Layer 45
Binary Exponential Backoff Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and
reports error As congestion increases stations back off by larger
amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff
efficient over wide range of loads Low loads 1-persistence guarantees station can
seize channel once idle High loads at least as stable as other techniques
Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first
DataLink Layer 46
Ethernet MAC Sublayer Protocol (2)
Collision detection can take as long as 2
DataLink Layer 47
Ethernet PerformanceEfficiency of Ethernet at 10 Mbps with
512-bit slot times
DataLink Layer 48
CSMACD efficiency Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame
Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap
transprop tt 511efficiency
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 19
CSMA collisionscollisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmissioncollisionentire packet transmission time wasted
spatial layout of nodes
noterole of distance amp propagation delay in determining collision probability
DataLink Layer 20
Nonpersistent CSMA1 If medium is idle transmit otherwise go to 22 If medium is busy wait amount of time drawn
from probability distribution (retransmission delay) and repeat 1
Random delays reduces probability of collisions Consider two stations become ready to transmit at
same time bull While another transmission is in progress
If both stations delay same time before retrying both will attempt to transmit at same time
Capacity is wasted because medium will remain idle following end of transmission Even if one or more stations waiting
Nonpersistent stations deferential
DataLink Layer 21
1-persistent CSMA To avoid idle channel time 1-persistent protocol
used Station wishing to transmit listens and obeys
following 1 If medium idle transmit otherwise go to step 22 If medium busy listen until idle then transmit
immediately 1-persistent stations selfish If two or more stations waiting collision
guaranteed Gets sorted out after collision
DataLink Layer 22
P-persistent CSMA Compromise that attempts to reduce collisions
Like nonpersistent And reduce idle time
Like1-persistent Rules1 If medium idle transmit with probability p and
delay one time unit with probability (1 ndash p) Time unit typically maximum propagation delay
2 If medium busy listen until idle and repeat step 13 If transmission is delayed one time unit repeat
step 1 What is an effective value of p
DataLink Layer 23
Value of p Avoid instability under heavy load n stations waiting to send End of transmission expected number of stations attempting
to transmit is number of stations ready times probability of transmitting n x p
If n x p gt 1 on average there will be a collision Repeated attempts to transmit almost guaranteeing more
collisions Retries compete with new transmissions Eventually all stations trying to send
Continuous collisions zero throughput So nxp lt 1 for expected peaks of n If heavy load expected p small However as p made smaller stations wait longer At low loads this gives very long delays
DataLink Layer 24
Persistent and Nonpersistent CSMA
Comparison of the channel utilization versus load for various
random access protocols
DataLink Layer 25
Which Persistence Algorithm IEEE 8023 uses 1-persistent Both nonpersistent and p-persistent have
performance problems 1-persistent (p = 1) seems more unstable
than p-persistent Greed of the stations But wasted time due to collisions is short (if
frames long relative to propagation delay With random backoff unlikely to collide on next
tries To ensure backoff maintains stability IEEE 8023
and Ethernet use binary exponential backoff
DataLink Layer 26
CSMACD (Collision Detection) With CSMA collision occupies medium
for duration of transmission Stations listen whilst transmitting
1 If medium idle transmit otherwise step 2
2 If busy listen for idle then transmit3 If collision detected jam then cease
transmission4 After jam wait random time then start
from step 1
DataLink Layer 27
CSMACDCSMACD carrier sensing deferral as in CSMA
collisions detected within short time colliding transmissions aborted reducing channel
wastage collision detection
easy in wired LANs measure signal strengths compare transmitted received signals
difficult in wireless LANs receiver shut off while transmitting
human analogy the polite conversationalist
DataLink Layer 28
CSMACD collision detection
DataLink Layer 29
CSMACD
DataLink Layer 30
CSMACDOperation
DataLink Layer 31
ldquoTaking Turnsrdquo MAC protocolsPolling master node
ldquoinvitesrdquo slave nodes to transmit in turn
concerns polling overhead latency single point of
failure (master)
Token passing control token passed
from one node to next sequentially
token message concerns
token overhead latency single point of failure
(token)
DataLink Layer 32
Summary of MAC protocols What do you do with a shared media
Channel Partitioning by time frequency or code
bull Time Division Frequency Division Random partitioning (dynamic)
bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire)
hard in others (wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
Taking Turnsbull polling from a central site token passing
DataLink Layer 33
Summary of MAC protocolsChannel partitioning MAC protocols
share channel efficiently and fairly at high load inefficient at low load delay in channel access
1N 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
ldquotaking turnsrdquo protocolslook for best of both worlds
DataLink Layer 34
Ethernet Overview History
developed by Xerox PARC in mid-1970s roots in Aloha packet-radio network standardized by Xerox DEC and Intel in
1978 similar to IEEE 8023 standard
Metcalfersquos Ethernetsketch
DataLink Layer 35
Ethernetldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps
DataLink Layer 36
Star topology Bus topology popular through mid 90s Now star topology prevails Connection choices hub or switch (more later)
hub orswitch
DataLink Layer 37
Ethernet Frame StructureSending adapter encapsulates IP datagram (or
other network layer protocol packet) in Ethernet frame
Preamble 7 bytes with pattern 10101010 followed by one
byte with pattern 10101011 used to synchronize receiver sender clock rates
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 38
Ethernet Frame Structure (more) Addresses 6 bytes
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol
otherwise adapter discards frame Type indicates the higher layer protocol
(mostly IP but others may be supported such as Novell IPX and AppleTalk)
CRC checked at receiver if error is detected the frame is simply dropped
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 39
Unreliable connectionless service Connectionless No handshaking between
sending and receiving adapter Unreliable receiving adapter doesnrsquot send
acks or nacks to sending adapter stream of datagrams passed to network layer can
have gaps gaps will be filled if app is using TCP otherwise app will see the gaps
DataLink Layer 40
Ethernet uses CSMACD No slots adapter doesnrsquot
transmit if it senses that some other adapter is transmitting that is carrier sense
transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection
Before attempting a retransmission adapter waits a random time that is random access
DataLink Layer 41
Ethernet CSMACD algorithm1 Adaptor receives datagram
from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
DataLink Layer 42
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential Backoff Goal adapt retransmission
attempts to estimated current load heavy load random wait
will be longer first collision choose K
from 01 delay is K 512 bit transmission times
after second collision choose K from 0123hellip
after ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
DataLink Layer 43
Collision Detection On baseband bus collision produces much
higher signal voltage than signal Collision detected if cable signal greater than
single station signal Signal attenuated over distance Limit distance to 500m (10Base5) or 200m
(10Base2) For twisted pair (star-topology) activity on
more than one port is collision Special collision presence signal
DataLink Layer 44
Algorithm (cont)
If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes
of data) delay and try again
bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected
k=02n - 1bull give up after several tries (usually 16)bull exponential backoff
DataLink Layer 45
Binary Exponential Backoff Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and
reports error As congestion increases stations back off by larger
amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff
efficient over wide range of loads Low loads 1-persistence guarantees station can
seize channel once idle High loads at least as stable as other techniques
Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first
DataLink Layer 46
Ethernet MAC Sublayer Protocol (2)
Collision detection can take as long as 2
DataLink Layer 47
Ethernet PerformanceEfficiency of Ethernet at 10 Mbps with
512-bit slot times
DataLink Layer 48
CSMACD efficiency Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame
Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap
transprop tt 511efficiency
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 20
Nonpersistent CSMA1 If medium is idle transmit otherwise go to 22 If medium is busy wait amount of time drawn
from probability distribution (retransmission delay) and repeat 1
Random delays reduces probability of collisions Consider two stations become ready to transmit at
same time bull While another transmission is in progress
If both stations delay same time before retrying both will attempt to transmit at same time
Capacity is wasted because medium will remain idle following end of transmission Even if one or more stations waiting
Nonpersistent stations deferential
DataLink Layer 21
1-persistent CSMA To avoid idle channel time 1-persistent protocol
used Station wishing to transmit listens and obeys
following 1 If medium idle transmit otherwise go to step 22 If medium busy listen until idle then transmit
immediately 1-persistent stations selfish If two or more stations waiting collision
guaranteed Gets sorted out after collision
DataLink Layer 22
P-persistent CSMA Compromise that attempts to reduce collisions
Like nonpersistent And reduce idle time
Like1-persistent Rules1 If medium idle transmit with probability p and
delay one time unit with probability (1 ndash p) Time unit typically maximum propagation delay
2 If medium busy listen until idle and repeat step 13 If transmission is delayed one time unit repeat
step 1 What is an effective value of p
DataLink Layer 23
Value of p Avoid instability under heavy load n stations waiting to send End of transmission expected number of stations attempting
to transmit is number of stations ready times probability of transmitting n x p
If n x p gt 1 on average there will be a collision Repeated attempts to transmit almost guaranteeing more
collisions Retries compete with new transmissions Eventually all stations trying to send
Continuous collisions zero throughput So nxp lt 1 for expected peaks of n If heavy load expected p small However as p made smaller stations wait longer At low loads this gives very long delays
DataLink Layer 24
Persistent and Nonpersistent CSMA
Comparison of the channel utilization versus load for various
random access protocols
DataLink Layer 25
Which Persistence Algorithm IEEE 8023 uses 1-persistent Both nonpersistent and p-persistent have
performance problems 1-persistent (p = 1) seems more unstable
than p-persistent Greed of the stations But wasted time due to collisions is short (if
frames long relative to propagation delay With random backoff unlikely to collide on next
tries To ensure backoff maintains stability IEEE 8023
and Ethernet use binary exponential backoff
DataLink Layer 26
CSMACD (Collision Detection) With CSMA collision occupies medium
for duration of transmission Stations listen whilst transmitting
1 If medium idle transmit otherwise step 2
2 If busy listen for idle then transmit3 If collision detected jam then cease
transmission4 After jam wait random time then start
from step 1
DataLink Layer 27
CSMACDCSMACD carrier sensing deferral as in CSMA
collisions detected within short time colliding transmissions aborted reducing channel
wastage collision detection
easy in wired LANs measure signal strengths compare transmitted received signals
difficult in wireless LANs receiver shut off while transmitting
human analogy the polite conversationalist
DataLink Layer 28
CSMACD collision detection
DataLink Layer 29
CSMACD
DataLink Layer 30
CSMACDOperation
DataLink Layer 31
ldquoTaking Turnsrdquo MAC protocolsPolling master node
ldquoinvitesrdquo slave nodes to transmit in turn
concerns polling overhead latency single point of
failure (master)
Token passing control token passed
from one node to next sequentially
token message concerns
token overhead latency single point of failure
(token)
DataLink Layer 32
Summary of MAC protocols What do you do with a shared media
Channel Partitioning by time frequency or code
bull Time Division Frequency Division Random partitioning (dynamic)
bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire)
hard in others (wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
Taking Turnsbull polling from a central site token passing
DataLink Layer 33
Summary of MAC protocolsChannel partitioning MAC protocols
share channel efficiently and fairly at high load inefficient at low load delay in channel access
1N 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
ldquotaking turnsrdquo protocolslook for best of both worlds
DataLink Layer 34
Ethernet Overview History
developed by Xerox PARC in mid-1970s roots in Aloha packet-radio network standardized by Xerox DEC and Intel in
1978 similar to IEEE 8023 standard
Metcalfersquos Ethernetsketch
DataLink Layer 35
Ethernetldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps
DataLink Layer 36
Star topology Bus topology popular through mid 90s Now star topology prevails Connection choices hub or switch (more later)
hub orswitch
DataLink Layer 37
Ethernet Frame StructureSending adapter encapsulates IP datagram (or
other network layer protocol packet) in Ethernet frame
Preamble 7 bytes with pattern 10101010 followed by one
byte with pattern 10101011 used to synchronize receiver sender clock rates
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 38
Ethernet Frame Structure (more) Addresses 6 bytes
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol
otherwise adapter discards frame Type indicates the higher layer protocol
(mostly IP but others may be supported such as Novell IPX and AppleTalk)
CRC checked at receiver if error is detected the frame is simply dropped
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 39
Unreliable connectionless service Connectionless No handshaking between
sending and receiving adapter Unreliable receiving adapter doesnrsquot send
acks or nacks to sending adapter stream of datagrams passed to network layer can
have gaps gaps will be filled if app is using TCP otherwise app will see the gaps
DataLink Layer 40
Ethernet uses CSMACD No slots adapter doesnrsquot
transmit if it senses that some other adapter is transmitting that is carrier sense
transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection
Before attempting a retransmission adapter waits a random time that is random access
DataLink Layer 41
Ethernet CSMACD algorithm1 Adaptor receives datagram
from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
DataLink Layer 42
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential Backoff Goal adapt retransmission
attempts to estimated current load heavy load random wait
will be longer first collision choose K
from 01 delay is K 512 bit transmission times
after second collision choose K from 0123hellip
after ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
DataLink Layer 43
Collision Detection On baseband bus collision produces much
higher signal voltage than signal Collision detected if cable signal greater than
single station signal Signal attenuated over distance Limit distance to 500m (10Base5) or 200m
(10Base2) For twisted pair (star-topology) activity on
more than one port is collision Special collision presence signal
DataLink Layer 44
Algorithm (cont)
If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes
of data) delay and try again
bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected
k=02n - 1bull give up after several tries (usually 16)bull exponential backoff
DataLink Layer 45
Binary Exponential Backoff Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and
reports error As congestion increases stations back off by larger
amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff
efficient over wide range of loads Low loads 1-persistence guarantees station can
seize channel once idle High loads at least as stable as other techniques
Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first
DataLink Layer 46
Ethernet MAC Sublayer Protocol (2)
Collision detection can take as long as 2
DataLink Layer 47
Ethernet PerformanceEfficiency of Ethernet at 10 Mbps with
512-bit slot times
DataLink Layer 48
CSMACD efficiency Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame
Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap
transprop tt 511efficiency
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 21
1-persistent CSMA To avoid idle channel time 1-persistent protocol
used Station wishing to transmit listens and obeys
following 1 If medium idle transmit otherwise go to step 22 If medium busy listen until idle then transmit
immediately 1-persistent stations selfish If two or more stations waiting collision
guaranteed Gets sorted out after collision
DataLink Layer 22
P-persistent CSMA Compromise that attempts to reduce collisions
Like nonpersistent And reduce idle time
Like1-persistent Rules1 If medium idle transmit with probability p and
delay one time unit with probability (1 ndash p) Time unit typically maximum propagation delay
2 If medium busy listen until idle and repeat step 13 If transmission is delayed one time unit repeat
step 1 What is an effective value of p
DataLink Layer 23
Value of p Avoid instability under heavy load n stations waiting to send End of transmission expected number of stations attempting
to transmit is number of stations ready times probability of transmitting n x p
If n x p gt 1 on average there will be a collision Repeated attempts to transmit almost guaranteeing more
collisions Retries compete with new transmissions Eventually all stations trying to send
Continuous collisions zero throughput So nxp lt 1 for expected peaks of n If heavy load expected p small However as p made smaller stations wait longer At low loads this gives very long delays
DataLink Layer 24
Persistent and Nonpersistent CSMA
Comparison of the channel utilization versus load for various
random access protocols
DataLink Layer 25
Which Persistence Algorithm IEEE 8023 uses 1-persistent Both nonpersistent and p-persistent have
performance problems 1-persistent (p = 1) seems more unstable
than p-persistent Greed of the stations But wasted time due to collisions is short (if
frames long relative to propagation delay With random backoff unlikely to collide on next
tries To ensure backoff maintains stability IEEE 8023
and Ethernet use binary exponential backoff
DataLink Layer 26
CSMACD (Collision Detection) With CSMA collision occupies medium
for duration of transmission Stations listen whilst transmitting
1 If medium idle transmit otherwise step 2
2 If busy listen for idle then transmit3 If collision detected jam then cease
transmission4 After jam wait random time then start
from step 1
DataLink Layer 27
CSMACDCSMACD carrier sensing deferral as in CSMA
collisions detected within short time colliding transmissions aborted reducing channel
wastage collision detection
easy in wired LANs measure signal strengths compare transmitted received signals
difficult in wireless LANs receiver shut off while transmitting
human analogy the polite conversationalist
DataLink Layer 28
CSMACD collision detection
DataLink Layer 29
CSMACD
DataLink Layer 30
CSMACDOperation
DataLink Layer 31
ldquoTaking Turnsrdquo MAC protocolsPolling master node
ldquoinvitesrdquo slave nodes to transmit in turn
concerns polling overhead latency single point of
failure (master)
Token passing control token passed
from one node to next sequentially
token message concerns
token overhead latency single point of failure
(token)
DataLink Layer 32
Summary of MAC protocols What do you do with a shared media
Channel Partitioning by time frequency or code
bull Time Division Frequency Division Random partitioning (dynamic)
bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire)
hard in others (wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
Taking Turnsbull polling from a central site token passing
DataLink Layer 33
Summary of MAC protocolsChannel partitioning MAC protocols
share channel efficiently and fairly at high load inefficient at low load delay in channel access
1N 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
ldquotaking turnsrdquo protocolslook for best of both worlds
DataLink Layer 34
Ethernet Overview History
developed by Xerox PARC in mid-1970s roots in Aloha packet-radio network standardized by Xerox DEC and Intel in
1978 similar to IEEE 8023 standard
Metcalfersquos Ethernetsketch
DataLink Layer 35
Ethernetldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps
DataLink Layer 36
Star topology Bus topology popular through mid 90s Now star topology prevails Connection choices hub or switch (more later)
hub orswitch
DataLink Layer 37
Ethernet Frame StructureSending adapter encapsulates IP datagram (or
other network layer protocol packet) in Ethernet frame
Preamble 7 bytes with pattern 10101010 followed by one
byte with pattern 10101011 used to synchronize receiver sender clock rates
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 38
Ethernet Frame Structure (more) Addresses 6 bytes
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol
otherwise adapter discards frame Type indicates the higher layer protocol
(mostly IP but others may be supported such as Novell IPX and AppleTalk)
CRC checked at receiver if error is detected the frame is simply dropped
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 39
Unreliable connectionless service Connectionless No handshaking between
sending and receiving adapter Unreliable receiving adapter doesnrsquot send
acks or nacks to sending adapter stream of datagrams passed to network layer can
have gaps gaps will be filled if app is using TCP otherwise app will see the gaps
DataLink Layer 40
Ethernet uses CSMACD No slots adapter doesnrsquot
transmit if it senses that some other adapter is transmitting that is carrier sense
transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection
Before attempting a retransmission adapter waits a random time that is random access
DataLink Layer 41
Ethernet CSMACD algorithm1 Adaptor receives datagram
from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
DataLink Layer 42
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential Backoff Goal adapt retransmission
attempts to estimated current load heavy load random wait
will be longer first collision choose K
from 01 delay is K 512 bit transmission times
after second collision choose K from 0123hellip
after ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
DataLink Layer 43
Collision Detection On baseband bus collision produces much
higher signal voltage than signal Collision detected if cable signal greater than
single station signal Signal attenuated over distance Limit distance to 500m (10Base5) or 200m
(10Base2) For twisted pair (star-topology) activity on
more than one port is collision Special collision presence signal
DataLink Layer 44
Algorithm (cont)
If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes
of data) delay and try again
bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected
k=02n - 1bull give up after several tries (usually 16)bull exponential backoff
DataLink Layer 45
Binary Exponential Backoff Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and
reports error As congestion increases stations back off by larger
amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff
efficient over wide range of loads Low loads 1-persistence guarantees station can
seize channel once idle High loads at least as stable as other techniques
Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first
DataLink Layer 46
Ethernet MAC Sublayer Protocol (2)
Collision detection can take as long as 2
DataLink Layer 47
Ethernet PerformanceEfficiency of Ethernet at 10 Mbps with
512-bit slot times
DataLink Layer 48
CSMACD efficiency Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame
Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap
transprop tt 511efficiency
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 22
P-persistent CSMA Compromise that attempts to reduce collisions
Like nonpersistent And reduce idle time
Like1-persistent Rules1 If medium idle transmit with probability p and
delay one time unit with probability (1 ndash p) Time unit typically maximum propagation delay
2 If medium busy listen until idle and repeat step 13 If transmission is delayed one time unit repeat
step 1 What is an effective value of p
DataLink Layer 23
Value of p Avoid instability under heavy load n stations waiting to send End of transmission expected number of stations attempting
to transmit is number of stations ready times probability of transmitting n x p
If n x p gt 1 on average there will be a collision Repeated attempts to transmit almost guaranteeing more
collisions Retries compete with new transmissions Eventually all stations trying to send
Continuous collisions zero throughput So nxp lt 1 for expected peaks of n If heavy load expected p small However as p made smaller stations wait longer At low loads this gives very long delays
DataLink Layer 24
Persistent and Nonpersistent CSMA
Comparison of the channel utilization versus load for various
random access protocols
DataLink Layer 25
Which Persistence Algorithm IEEE 8023 uses 1-persistent Both nonpersistent and p-persistent have
performance problems 1-persistent (p = 1) seems more unstable
than p-persistent Greed of the stations But wasted time due to collisions is short (if
frames long relative to propagation delay With random backoff unlikely to collide on next
tries To ensure backoff maintains stability IEEE 8023
and Ethernet use binary exponential backoff
DataLink Layer 26
CSMACD (Collision Detection) With CSMA collision occupies medium
for duration of transmission Stations listen whilst transmitting
1 If medium idle transmit otherwise step 2
2 If busy listen for idle then transmit3 If collision detected jam then cease
transmission4 After jam wait random time then start
from step 1
DataLink Layer 27
CSMACDCSMACD carrier sensing deferral as in CSMA
collisions detected within short time colliding transmissions aborted reducing channel
wastage collision detection
easy in wired LANs measure signal strengths compare transmitted received signals
difficult in wireless LANs receiver shut off while transmitting
human analogy the polite conversationalist
DataLink Layer 28
CSMACD collision detection
DataLink Layer 29
CSMACD
DataLink Layer 30
CSMACDOperation
DataLink Layer 31
ldquoTaking Turnsrdquo MAC protocolsPolling master node
ldquoinvitesrdquo slave nodes to transmit in turn
concerns polling overhead latency single point of
failure (master)
Token passing control token passed
from one node to next sequentially
token message concerns
token overhead latency single point of failure
(token)
DataLink Layer 32
Summary of MAC protocols What do you do with a shared media
Channel Partitioning by time frequency or code
bull Time Division Frequency Division Random partitioning (dynamic)
bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire)
hard in others (wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
Taking Turnsbull polling from a central site token passing
DataLink Layer 33
Summary of MAC protocolsChannel partitioning MAC protocols
share channel efficiently and fairly at high load inefficient at low load delay in channel access
1N 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
ldquotaking turnsrdquo protocolslook for best of both worlds
DataLink Layer 34
Ethernet Overview History
developed by Xerox PARC in mid-1970s roots in Aloha packet-radio network standardized by Xerox DEC and Intel in
1978 similar to IEEE 8023 standard
Metcalfersquos Ethernetsketch
DataLink Layer 35
Ethernetldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps
DataLink Layer 36
Star topology Bus topology popular through mid 90s Now star topology prevails Connection choices hub or switch (more later)
hub orswitch
DataLink Layer 37
Ethernet Frame StructureSending adapter encapsulates IP datagram (or
other network layer protocol packet) in Ethernet frame
Preamble 7 bytes with pattern 10101010 followed by one
byte with pattern 10101011 used to synchronize receiver sender clock rates
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 38
Ethernet Frame Structure (more) Addresses 6 bytes
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol
otherwise adapter discards frame Type indicates the higher layer protocol
(mostly IP but others may be supported such as Novell IPX and AppleTalk)
CRC checked at receiver if error is detected the frame is simply dropped
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 39
Unreliable connectionless service Connectionless No handshaking between
sending and receiving adapter Unreliable receiving adapter doesnrsquot send
acks or nacks to sending adapter stream of datagrams passed to network layer can
have gaps gaps will be filled if app is using TCP otherwise app will see the gaps
DataLink Layer 40
Ethernet uses CSMACD No slots adapter doesnrsquot
transmit if it senses that some other adapter is transmitting that is carrier sense
transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection
Before attempting a retransmission adapter waits a random time that is random access
DataLink Layer 41
Ethernet CSMACD algorithm1 Adaptor receives datagram
from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
DataLink Layer 42
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential Backoff Goal adapt retransmission
attempts to estimated current load heavy load random wait
will be longer first collision choose K
from 01 delay is K 512 bit transmission times
after second collision choose K from 0123hellip
after ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
DataLink Layer 43
Collision Detection On baseband bus collision produces much
higher signal voltage than signal Collision detected if cable signal greater than
single station signal Signal attenuated over distance Limit distance to 500m (10Base5) or 200m
(10Base2) For twisted pair (star-topology) activity on
more than one port is collision Special collision presence signal
DataLink Layer 44
Algorithm (cont)
If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes
of data) delay and try again
bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected
k=02n - 1bull give up after several tries (usually 16)bull exponential backoff
DataLink Layer 45
Binary Exponential Backoff Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and
reports error As congestion increases stations back off by larger
amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff
efficient over wide range of loads Low loads 1-persistence guarantees station can
seize channel once idle High loads at least as stable as other techniques
Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first
DataLink Layer 46
Ethernet MAC Sublayer Protocol (2)
Collision detection can take as long as 2
DataLink Layer 47
Ethernet PerformanceEfficiency of Ethernet at 10 Mbps with
512-bit slot times
DataLink Layer 48
CSMACD efficiency Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame
Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap
transprop tt 511efficiency
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 23
Value of p Avoid instability under heavy load n stations waiting to send End of transmission expected number of stations attempting
to transmit is number of stations ready times probability of transmitting n x p
If n x p gt 1 on average there will be a collision Repeated attempts to transmit almost guaranteeing more
collisions Retries compete with new transmissions Eventually all stations trying to send
Continuous collisions zero throughput So nxp lt 1 for expected peaks of n If heavy load expected p small However as p made smaller stations wait longer At low loads this gives very long delays
DataLink Layer 24
Persistent and Nonpersistent CSMA
Comparison of the channel utilization versus load for various
random access protocols
DataLink Layer 25
Which Persistence Algorithm IEEE 8023 uses 1-persistent Both nonpersistent and p-persistent have
performance problems 1-persistent (p = 1) seems more unstable
than p-persistent Greed of the stations But wasted time due to collisions is short (if
frames long relative to propagation delay With random backoff unlikely to collide on next
tries To ensure backoff maintains stability IEEE 8023
and Ethernet use binary exponential backoff
DataLink Layer 26
CSMACD (Collision Detection) With CSMA collision occupies medium
for duration of transmission Stations listen whilst transmitting
1 If medium idle transmit otherwise step 2
2 If busy listen for idle then transmit3 If collision detected jam then cease
transmission4 After jam wait random time then start
from step 1
DataLink Layer 27
CSMACDCSMACD carrier sensing deferral as in CSMA
collisions detected within short time colliding transmissions aborted reducing channel
wastage collision detection
easy in wired LANs measure signal strengths compare transmitted received signals
difficult in wireless LANs receiver shut off while transmitting
human analogy the polite conversationalist
DataLink Layer 28
CSMACD collision detection
DataLink Layer 29
CSMACD
DataLink Layer 30
CSMACDOperation
DataLink Layer 31
ldquoTaking Turnsrdquo MAC protocolsPolling master node
ldquoinvitesrdquo slave nodes to transmit in turn
concerns polling overhead latency single point of
failure (master)
Token passing control token passed
from one node to next sequentially
token message concerns
token overhead latency single point of failure
(token)
DataLink Layer 32
Summary of MAC protocols What do you do with a shared media
Channel Partitioning by time frequency or code
bull Time Division Frequency Division Random partitioning (dynamic)
bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire)
hard in others (wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
Taking Turnsbull polling from a central site token passing
DataLink Layer 33
Summary of MAC protocolsChannel partitioning MAC protocols
share channel efficiently and fairly at high load inefficient at low load delay in channel access
1N 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
ldquotaking turnsrdquo protocolslook for best of both worlds
DataLink Layer 34
Ethernet Overview History
developed by Xerox PARC in mid-1970s roots in Aloha packet-radio network standardized by Xerox DEC and Intel in
1978 similar to IEEE 8023 standard
Metcalfersquos Ethernetsketch
DataLink Layer 35
Ethernetldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps
DataLink Layer 36
Star topology Bus topology popular through mid 90s Now star topology prevails Connection choices hub or switch (more later)
hub orswitch
DataLink Layer 37
Ethernet Frame StructureSending adapter encapsulates IP datagram (or
other network layer protocol packet) in Ethernet frame
Preamble 7 bytes with pattern 10101010 followed by one
byte with pattern 10101011 used to synchronize receiver sender clock rates
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 38
Ethernet Frame Structure (more) Addresses 6 bytes
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol
otherwise adapter discards frame Type indicates the higher layer protocol
(mostly IP but others may be supported such as Novell IPX and AppleTalk)
CRC checked at receiver if error is detected the frame is simply dropped
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 39
Unreliable connectionless service Connectionless No handshaking between
sending and receiving adapter Unreliable receiving adapter doesnrsquot send
acks or nacks to sending adapter stream of datagrams passed to network layer can
have gaps gaps will be filled if app is using TCP otherwise app will see the gaps
DataLink Layer 40
Ethernet uses CSMACD No slots adapter doesnrsquot
transmit if it senses that some other adapter is transmitting that is carrier sense
transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection
Before attempting a retransmission adapter waits a random time that is random access
DataLink Layer 41
Ethernet CSMACD algorithm1 Adaptor receives datagram
from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
DataLink Layer 42
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential Backoff Goal adapt retransmission
attempts to estimated current load heavy load random wait
will be longer first collision choose K
from 01 delay is K 512 bit transmission times
after second collision choose K from 0123hellip
after ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
DataLink Layer 43
Collision Detection On baseband bus collision produces much
higher signal voltage than signal Collision detected if cable signal greater than
single station signal Signal attenuated over distance Limit distance to 500m (10Base5) or 200m
(10Base2) For twisted pair (star-topology) activity on
more than one port is collision Special collision presence signal
DataLink Layer 44
Algorithm (cont)
If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes
of data) delay and try again
bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected
k=02n - 1bull give up after several tries (usually 16)bull exponential backoff
DataLink Layer 45
Binary Exponential Backoff Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and
reports error As congestion increases stations back off by larger
amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff
efficient over wide range of loads Low loads 1-persistence guarantees station can
seize channel once idle High loads at least as stable as other techniques
Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first
DataLink Layer 46
Ethernet MAC Sublayer Protocol (2)
Collision detection can take as long as 2
DataLink Layer 47
Ethernet PerformanceEfficiency of Ethernet at 10 Mbps with
512-bit slot times
DataLink Layer 48
CSMACD efficiency Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame
Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap
transprop tt 511efficiency
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 24
Persistent and Nonpersistent CSMA
Comparison of the channel utilization versus load for various
random access protocols
DataLink Layer 25
Which Persistence Algorithm IEEE 8023 uses 1-persistent Both nonpersistent and p-persistent have
performance problems 1-persistent (p = 1) seems more unstable
than p-persistent Greed of the stations But wasted time due to collisions is short (if
frames long relative to propagation delay With random backoff unlikely to collide on next
tries To ensure backoff maintains stability IEEE 8023
and Ethernet use binary exponential backoff
DataLink Layer 26
CSMACD (Collision Detection) With CSMA collision occupies medium
for duration of transmission Stations listen whilst transmitting
1 If medium idle transmit otherwise step 2
2 If busy listen for idle then transmit3 If collision detected jam then cease
transmission4 After jam wait random time then start
from step 1
DataLink Layer 27
CSMACDCSMACD carrier sensing deferral as in CSMA
collisions detected within short time colliding transmissions aborted reducing channel
wastage collision detection
easy in wired LANs measure signal strengths compare transmitted received signals
difficult in wireless LANs receiver shut off while transmitting
human analogy the polite conversationalist
DataLink Layer 28
CSMACD collision detection
DataLink Layer 29
CSMACD
DataLink Layer 30
CSMACDOperation
DataLink Layer 31
ldquoTaking Turnsrdquo MAC protocolsPolling master node
ldquoinvitesrdquo slave nodes to transmit in turn
concerns polling overhead latency single point of
failure (master)
Token passing control token passed
from one node to next sequentially
token message concerns
token overhead latency single point of failure
(token)
DataLink Layer 32
Summary of MAC protocols What do you do with a shared media
Channel Partitioning by time frequency or code
bull Time Division Frequency Division Random partitioning (dynamic)
bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire)
hard in others (wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
Taking Turnsbull polling from a central site token passing
DataLink Layer 33
Summary of MAC protocolsChannel partitioning MAC protocols
share channel efficiently and fairly at high load inefficient at low load delay in channel access
1N 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
ldquotaking turnsrdquo protocolslook for best of both worlds
DataLink Layer 34
Ethernet Overview History
developed by Xerox PARC in mid-1970s roots in Aloha packet-radio network standardized by Xerox DEC and Intel in
1978 similar to IEEE 8023 standard
Metcalfersquos Ethernetsketch
DataLink Layer 35
Ethernetldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps
DataLink Layer 36
Star topology Bus topology popular through mid 90s Now star topology prevails Connection choices hub or switch (more later)
hub orswitch
DataLink Layer 37
Ethernet Frame StructureSending adapter encapsulates IP datagram (or
other network layer protocol packet) in Ethernet frame
Preamble 7 bytes with pattern 10101010 followed by one
byte with pattern 10101011 used to synchronize receiver sender clock rates
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 38
Ethernet Frame Structure (more) Addresses 6 bytes
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol
otherwise adapter discards frame Type indicates the higher layer protocol
(mostly IP but others may be supported such as Novell IPX and AppleTalk)
CRC checked at receiver if error is detected the frame is simply dropped
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 39
Unreliable connectionless service Connectionless No handshaking between
sending and receiving adapter Unreliable receiving adapter doesnrsquot send
acks or nacks to sending adapter stream of datagrams passed to network layer can
have gaps gaps will be filled if app is using TCP otherwise app will see the gaps
DataLink Layer 40
Ethernet uses CSMACD No slots adapter doesnrsquot
transmit if it senses that some other adapter is transmitting that is carrier sense
transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection
Before attempting a retransmission adapter waits a random time that is random access
DataLink Layer 41
Ethernet CSMACD algorithm1 Adaptor receives datagram
from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
DataLink Layer 42
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential Backoff Goal adapt retransmission
attempts to estimated current load heavy load random wait
will be longer first collision choose K
from 01 delay is K 512 bit transmission times
after second collision choose K from 0123hellip
after ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
DataLink Layer 43
Collision Detection On baseband bus collision produces much
higher signal voltage than signal Collision detected if cable signal greater than
single station signal Signal attenuated over distance Limit distance to 500m (10Base5) or 200m
(10Base2) For twisted pair (star-topology) activity on
more than one port is collision Special collision presence signal
DataLink Layer 44
Algorithm (cont)
If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes
of data) delay and try again
bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected
k=02n - 1bull give up after several tries (usually 16)bull exponential backoff
DataLink Layer 45
Binary Exponential Backoff Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and
reports error As congestion increases stations back off by larger
amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff
efficient over wide range of loads Low loads 1-persistence guarantees station can
seize channel once idle High loads at least as stable as other techniques
Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first
DataLink Layer 46
Ethernet MAC Sublayer Protocol (2)
Collision detection can take as long as 2
DataLink Layer 47
Ethernet PerformanceEfficiency of Ethernet at 10 Mbps with
512-bit slot times
DataLink Layer 48
CSMACD efficiency Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame
Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap
transprop tt 511efficiency
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 25
Which Persistence Algorithm IEEE 8023 uses 1-persistent Both nonpersistent and p-persistent have
performance problems 1-persistent (p = 1) seems more unstable
than p-persistent Greed of the stations But wasted time due to collisions is short (if
frames long relative to propagation delay With random backoff unlikely to collide on next
tries To ensure backoff maintains stability IEEE 8023
and Ethernet use binary exponential backoff
DataLink Layer 26
CSMACD (Collision Detection) With CSMA collision occupies medium
for duration of transmission Stations listen whilst transmitting
1 If medium idle transmit otherwise step 2
2 If busy listen for idle then transmit3 If collision detected jam then cease
transmission4 After jam wait random time then start
from step 1
DataLink Layer 27
CSMACDCSMACD carrier sensing deferral as in CSMA
collisions detected within short time colliding transmissions aborted reducing channel
wastage collision detection
easy in wired LANs measure signal strengths compare transmitted received signals
difficult in wireless LANs receiver shut off while transmitting
human analogy the polite conversationalist
DataLink Layer 28
CSMACD collision detection
DataLink Layer 29
CSMACD
DataLink Layer 30
CSMACDOperation
DataLink Layer 31
ldquoTaking Turnsrdquo MAC protocolsPolling master node
ldquoinvitesrdquo slave nodes to transmit in turn
concerns polling overhead latency single point of
failure (master)
Token passing control token passed
from one node to next sequentially
token message concerns
token overhead latency single point of failure
(token)
DataLink Layer 32
Summary of MAC protocols What do you do with a shared media
Channel Partitioning by time frequency or code
bull Time Division Frequency Division Random partitioning (dynamic)
bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire)
hard in others (wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
Taking Turnsbull polling from a central site token passing
DataLink Layer 33
Summary of MAC protocolsChannel partitioning MAC protocols
share channel efficiently and fairly at high load inefficient at low load delay in channel access
1N 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
ldquotaking turnsrdquo protocolslook for best of both worlds
DataLink Layer 34
Ethernet Overview History
developed by Xerox PARC in mid-1970s roots in Aloha packet-radio network standardized by Xerox DEC and Intel in
1978 similar to IEEE 8023 standard
Metcalfersquos Ethernetsketch
DataLink Layer 35
Ethernetldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps
DataLink Layer 36
Star topology Bus topology popular through mid 90s Now star topology prevails Connection choices hub or switch (more later)
hub orswitch
DataLink Layer 37
Ethernet Frame StructureSending adapter encapsulates IP datagram (or
other network layer protocol packet) in Ethernet frame
Preamble 7 bytes with pattern 10101010 followed by one
byte with pattern 10101011 used to synchronize receiver sender clock rates
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 38
Ethernet Frame Structure (more) Addresses 6 bytes
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol
otherwise adapter discards frame Type indicates the higher layer protocol
(mostly IP but others may be supported such as Novell IPX and AppleTalk)
CRC checked at receiver if error is detected the frame is simply dropped
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 39
Unreliable connectionless service Connectionless No handshaking between
sending and receiving adapter Unreliable receiving adapter doesnrsquot send
acks or nacks to sending adapter stream of datagrams passed to network layer can
have gaps gaps will be filled if app is using TCP otherwise app will see the gaps
DataLink Layer 40
Ethernet uses CSMACD No slots adapter doesnrsquot
transmit if it senses that some other adapter is transmitting that is carrier sense
transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection
Before attempting a retransmission adapter waits a random time that is random access
DataLink Layer 41
Ethernet CSMACD algorithm1 Adaptor receives datagram
from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
DataLink Layer 42
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential Backoff Goal adapt retransmission
attempts to estimated current load heavy load random wait
will be longer first collision choose K
from 01 delay is K 512 bit transmission times
after second collision choose K from 0123hellip
after ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
DataLink Layer 43
Collision Detection On baseband bus collision produces much
higher signal voltage than signal Collision detected if cable signal greater than
single station signal Signal attenuated over distance Limit distance to 500m (10Base5) or 200m
(10Base2) For twisted pair (star-topology) activity on
more than one port is collision Special collision presence signal
DataLink Layer 44
Algorithm (cont)
If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes
of data) delay and try again
bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected
k=02n - 1bull give up after several tries (usually 16)bull exponential backoff
DataLink Layer 45
Binary Exponential Backoff Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and
reports error As congestion increases stations back off by larger
amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff
efficient over wide range of loads Low loads 1-persistence guarantees station can
seize channel once idle High loads at least as stable as other techniques
Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first
DataLink Layer 46
Ethernet MAC Sublayer Protocol (2)
Collision detection can take as long as 2
DataLink Layer 47
Ethernet PerformanceEfficiency of Ethernet at 10 Mbps with
512-bit slot times
DataLink Layer 48
CSMACD efficiency Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame
Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap
transprop tt 511efficiency
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 26
CSMACD (Collision Detection) With CSMA collision occupies medium
for duration of transmission Stations listen whilst transmitting
1 If medium idle transmit otherwise step 2
2 If busy listen for idle then transmit3 If collision detected jam then cease
transmission4 After jam wait random time then start
from step 1
DataLink Layer 27
CSMACDCSMACD carrier sensing deferral as in CSMA
collisions detected within short time colliding transmissions aborted reducing channel
wastage collision detection
easy in wired LANs measure signal strengths compare transmitted received signals
difficult in wireless LANs receiver shut off while transmitting
human analogy the polite conversationalist
DataLink Layer 28
CSMACD collision detection
DataLink Layer 29
CSMACD
DataLink Layer 30
CSMACDOperation
DataLink Layer 31
ldquoTaking Turnsrdquo MAC protocolsPolling master node
ldquoinvitesrdquo slave nodes to transmit in turn
concerns polling overhead latency single point of
failure (master)
Token passing control token passed
from one node to next sequentially
token message concerns
token overhead latency single point of failure
(token)
DataLink Layer 32
Summary of MAC protocols What do you do with a shared media
Channel Partitioning by time frequency or code
bull Time Division Frequency Division Random partitioning (dynamic)
bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire)
hard in others (wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
Taking Turnsbull polling from a central site token passing
DataLink Layer 33
Summary of MAC protocolsChannel partitioning MAC protocols
share channel efficiently and fairly at high load inefficient at low load delay in channel access
1N 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
ldquotaking turnsrdquo protocolslook for best of both worlds
DataLink Layer 34
Ethernet Overview History
developed by Xerox PARC in mid-1970s roots in Aloha packet-radio network standardized by Xerox DEC and Intel in
1978 similar to IEEE 8023 standard
Metcalfersquos Ethernetsketch
DataLink Layer 35
Ethernetldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps
DataLink Layer 36
Star topology Bus topology popular through mid 90s Now star topology prevails Connection choices hub or switch (more later)
hub orswitch
DataLink Layer 37
Ethernet Frame StructureSending adapter encapsulates IP datagram (or
other network layer protocol packet) in Ethernet frame
Preamble 7 bytes with pattern 10101010 followed by one
byte with pattern 10101011 used to synchronize receiver sender clock rates
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 38
Ethernet Frame Structure (more) Addresses 6 bytes
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol
otherwise adapter discards frame Type indicates the higher layer protocol
(mostly IP but others may be supported such as Novell IPX and AppleTalk)
CRC checked at receiver if error is detected the frame is simply dropped
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 39
Unreliable connectionless service Connectionless No handshaking between
sending and receiving adapter Unreliable receiving adapter doesnrsquot send
acks or nacks to sending adapter stream of datagrams passed to network layer can
have gaps gaps will be filled if app is using TCP otherwise app will see the gaps
DataLink Layer 40
Ethernet uses CSMACD No slots adapter doesnrsquot
transmit if it senses that some other adapter is transmitting that is carrier sense
transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection
Before attempting a retransmission adapter waits a random time that is random access
DataLink Layer 41
Ethernet CSMACD algorithm1 Adaptor receives datagram
from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
DataLink Layer 42
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential Backoff Goal adapt retransmission
attempts to estimated current load heavy load random wait
will be longer first collision choose K
from 01 delay is K 512 bit transmission times
after second collision choose K from 0123hellip
after ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
DataLink Layer 43
Collision Detection On baseband bus collision produces much
higher signal voltage than signal Collision detected if cable signal greater than
single station signal Signal attenuated over distance Limit distance to 500m (10Base5) or 200m
(10Base2) For twisted pair (star-topology) activity on
more than one port is collision Special collision presence signal
DataLink Layer 44
Algorithm (cont)
If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes
of data) delay and try again
bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected
k=02n - 1bull give up after several tries (usually 16)bull exponential backoff
DataLink Layer 45
Binary Exponential Backoff Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and
reports error As congestion increases stations back off by larger
amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff
efficient over wide range of loads Low loads 1-persistence guarantees station can
seize channel once idle High loads at least as stable as other techniques
Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first
DataLink Layer 46
Ethernet MAC Sublayer Protocol (2)
Collision detection can take as long as 2
DataLink Layer 47
Ethernet PerformanceEfficiency of Ethernet at 10 Mbps with
512-bit slot times
DataLink Layer 48
CSMACD efficiency Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame
Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap
transprop tt 511efficiency
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 27
CSMACDCSMACD carrier sensing deferral as in CSMA
collisions detected within short time colliding transmissions aborted reducing channel
wastage collision detection
easy in wired LANs measure signal strengths compare transmitted received signals
difficult in wireless LANs receiver shut off while transmitting
human analogy the polite conversationalist
DataLink Layer 28
CSMACD collision detection
DataLink Layer 29
CSMACD
DataLink Layer 30
CSMACDOperation
DataLink Layer 31
ldquoTaking Turnsrdquo MAC protocolsPolling master node
ldquoinvitesrdquo slave nodes to transmit in turn
concerns polling overhead latency single point of
failure (master)
Token passing control token passed
from one node to next sequentially
token message concerns
token overhead latency single point of failure
(token)
DataLink Layer 32
Summary of MAC protocols What do you do with a shared media
Channel Partitioning by time frequency or code
bull Time Division Frequency Division Random partitioning (dynamic)
bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire)
hard in others (wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
Taking Turnsbull polling from a central site token passing
DataLink Layer 33
Summary of MAC protocolsChannel partitioning MAC protocols
share channel efficiently and fairly at high load inefficient at low load delay in channel access
1N 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
ldquotaking turnsrdquo protocolslook for best of both worlds
DataLink Layer 34
Ethernet Overview History
developed by Xerox PARC in mid-1970s roots in Aloha packet-radio network standardized by Xerox DEC and Intel in
1978 similar to IEEE 8023 standard
Metcalfersquos Ethernetsketch
DataLink Layer 35
Ethernetldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps
DataLink Layer 36
Star topology Bus topology popular through mid 90s Now star topology prevails Connection choices hub or switch (more later)
hub orswitch
DataLink Layer 37
Ethernet Frame StructureSending adapter encapsulates IP datagram (or
other network layer protocol packet) in Ethernet frame
Preamble 7 bytes with pattern 10101010 followed by one
byte with pattern 10101011 used to synchronize receiver sender clock rates
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 38
Ethernet Frame Structure (more) Addresses 6 bytes
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol
otherwise adapter discards frame Type indicates the higher layer protocol
(mostly IP but others may be supported such as Novell IPX and AppleTalk)
CRC checked at receiver if error is detected the frame is simply dropped
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 39
Unreliable connectionless service Connectionless No handshaking between
sending and receiving adapter Unreliable receiving adapter doesnrsquot send
acks or nacks to sending adapter stream of datagrams passed to network layer can
have gaps gaps will be filled if app is using TCP otherwise app will see the gaps
DataLink Layer 40
Ethernet uses CSMACD No slots adapter doesnrsquot
transmit if it senses that some other adapter is transmitting that is carrier sense
transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection
Before attempting a retransmission adapter waits a random time that is random access
DataLink Layer 41
Ethernet CSMACD algorithm1 Adaptor receives datagram
from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
DataLink Layer 42
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential Backoff Goal adapt retransmission
attempts to estimated current load heavy load random wait
will be longer first collision choose K
from 01 delay is K 512 bit transmission times
after second collision choose K from 0123hellip
after ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
DataLink Layer 43
Collision Detection On baseband bus collision produces much
higher signal voltage than signal Collision detected if cable signal greater than
single station signal Signal attenuated over distance Limit distance to 500m (10Base5) or 200m
(10Base2) For twisted pair (star-topology) activity on
more than one port is collision Special collision presence signal
DataLink Layer 44
Algorithm (cont)
If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes
of data) delay and try again
bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected
k=02n - 1bull give up after several tries (usually 16)bull exponential backoff
DataLink Layer 45
Binary Exponential Backoff Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and
reports error As congestion increases stations back off by larger
amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff
efficient over wide range of loads Low loads 1-persistence guarantees station can
seize channel once idle High loads at least as stable as other techniques
Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first
DataLink Layer 46
Ethernet MAC Sublayer Protocol (2)
Collision detection can take as long as 2
DataLink Layer 47
Ethernet PerformanceEfficiency of Ethernet at 10 Mbps with
512-bit slot times
DataLink Layer 48
CSMACD efficiency Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame
Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap
transprop tt 511efficiency
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 28
CSMACD collision detection
DataLink Layer 29
CSMACD
DataLink Layer 30
CSMACDOperation
DataLink Layer 31
ldquoTaking Turnsrdquo MAC protocolsPolling master node
ldquoinvitesrdquo slave nodes to transmit in turn
concerns polling overhead latency single point of
failure (master)
Token passing control token passed
from one node to next sequentially
token message concerns
token overhead latency single point of failure
(token)
DataLink Layer 32
Summary of MAC protocols What do you do with a shared media
Channel Partitioning by time frequency or code
bull Time Division Frequency Division Random partitioning (dynamic)
bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire)
hard in others (wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
Taking Turnsbull polling from a central site token passing
DataLink Layer 33
Summary of MAC protocolsChannel partitioning MAC protocols
share channel efficiently and fairly at high load inefficient at low load delay in channel access
1N 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
ldquotaking turnsrdquo protocolslook for best of both worlds
DataLink Layer 34
Ethernet Overview History
developed by Xerox PARC in mid-1970s roots in Aloha packet-radio network standardized by Xerox DEC and Intel in
1978 similar to IEEE 8023 standard
Metcalfersquos Ethernetsketch
DataLink Layer 35
Ethernetldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps
DataLink Layer 36
Star topology Bus topology popular through mid 90s Now star topology prevails Connection choices hub or switch (more later)
hub orswitch
DataLink Layer 37
Ethernet Frame StructureSending adapter encapsulates IP datagram (or
other network layer protocol packet) in Ethernet frame
Preamble 7 bytes with pattern 10101010 followed by one
byte with pattern 10101011 used to synchronize receiver sender clock rates
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 38
Ethernet Frame Structure (more) Addresses 6 bytes
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol
otherwise adapter discards frame Type indicates the higher layer protocol
(mostly IP but others may be supported such as Novell IPX and AppleTalk)
CRC checked at receiver if error is detected the frame is simply dropped
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 39
Unreliable connectionless service Connectionless No handshaking between
sending and receiving adapter Unreliable receiving adapter doesnrsquot send
acks or nacks to sending adapter stream of datagrams passed to network layer can
have gaps gaps will be filled if app is using TCP otherwise app will see the gaps
DataLink Layer 40
Ethernet uses CSMACD No slots adapter doesnrsquot
transmit if it senses that some other adapter is transmitting that is carrier sense
transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection
Before attempting a retransmission adapter waits a random time that is random access
DataLink Layer 41
Ethernet CSMACD algorithm1 Adaptor receives datagram
from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
DataLink Layer 42
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential Backoff Goal adapt retransmission
attempts to estimated current load heavy load random wait
will be longer first collision choose K
from 01 delay is K 512 bit transmission times
after second collision choose K from 0123hellip
after ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
DataLink Layer 43
Collision Detection On baseband bus collision produces much
higher signal voltage than signal Collision detected if cable signal greater than
single station signal Signal attenuated over distance Limit distance to 500m (10Base5) or 200m
(10Base2) For twisted pair (star-topology) activity on
more than one port is collision Special collision presence signal
DataLink Layer 44
Algorithm (cont)
If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes
of data) delay and try again
bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected
k=02n - 1bull give up after several tries (usually 16)bull exponential backoff
DataLink Layer 45
Binary Exponential Backoff Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and
reports error As congestion increases stations back off by larger
amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff
efficient over wide range of loads Low loads 1-persistence guarantees station can
seize channel once idle High loads at least as stable as other techniques
Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first
DataLink Layer 46
Ethernet MAC Sublayer Protocol (2)
Collision detection can take as long as 2
DataLink Layer 47
Ethernet PerformanceEfficiency of Ethernet at 10 Mbps with
512-bit slot times
DataLink Layer 48
CSMACD efficiency Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame
Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap
transprop tt 511efficiency
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 29
CSMACD
DataLink Layer 30
CSMACDOperation
DataLink Layer 31
ldquoTaking Turnsrdquo MAC protocolsPolling master node
ldquoinvitesrdquo slave nodes to transmit in turn
concerns polling overhead latency single point of
failure (master)
Token passing control token passed
from one node to next sequentially
token message concerns
token overhead latency single point of failure
(token)
DataLink Layer 32
Summary of MAC protocols What do you do with a shared media
Channel Partitioning by time frequency or code
bull Time Division Frequency Division Random partitioning (dynamic)
bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire)
hard in others (wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
Taking Turnsbull polling from a central site token passing
DataLink Layer 33
Summary of MAC protocolsChannel partitioning MAC protocols
share channel efficiently and fairly at high load inefficient at low load delay in channel access
1N 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
ldquotaking turnsrdquo protocolslook for best of both worlds
DataLink Layer 34
Ethernet Overview History
developed by Xerox PARC in mid-1970s roots in Aloha packet-radio network standardized by Xerox DEC and Intel in
1978 similar to IEEE 8023 standard
Metcalfersquos Ethernetsketch
DataLink Layer 35
Ethernetldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps
DataLink Layer 36
Star topology Bus topology popular through mid 90s Now star topology prevails Connection choices hub or switch (more later)
hub orswitch
DataLink Layer 37
Ethernet Frame StructureSending adapter encapsulates IP datagram (or
other network layer protocol packet) in Ethernet frame
Preamble 7 bytes with pattern 10101010 followed by one
byte with pattern 10101011 used to synchronize receiver sender clock rates
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 38
Ethernet Frame Structure (more) Addresses 6 bytes
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol
otherwise adapter discards frame Type indicates the higher layer protocol
(mostly IP but others may be supported such as Novell IPX and AppleTalk)
CRC checked at receiver if error is detected the frame is simply dropped
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 39
Unreliable connectionless service Connectionless No handshaking between
sending and receiving adapter Unreliable receiving adapter doesnrsquot send
acks or nacks to sending adapter stream of datagrams passed to network layer can
have gaps gaps will be filled if app is using TCP otherwise app will see the gaps
DataLink Layer 40
Ethernet uses CSMACD No slots adapter doesnrsquot
transmit if it senses that some other adapter is transmitting that is carrier sense
transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection
Before attempting a retransmission adapter waits a random time that is random access
DataLink Layer 41
Ethernet CSMACD algorithm1 Adaptor receives datagram
from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
DataLink Layer 42
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential Backoff Goal adapt retransmission
attempts to estimated current load heavy load random wait
will be longer first collision choose K
from 01 delay is K 512 bit transmission times
after second collision choose K from 0123hellip
after ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
DataLink Layer 43
Collision Detection On baseband bus collision produces much
higher signal voltage than signal Collision detected if cable signal greater than
single station signal Signal attenuated over distance Limit distance to 500m (10Base5) or 200m
(10Base2) For twisted pair (star-topology) activity on
more than one port is collision Special collision presence signal
DataLink Layer 44
Algorithm (cont)
If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes
of data) delay and try again
bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected
k=02n - 1bull give up after several tries (usually 16)bull exponential backoff
DataLink Layer 45
Binary Exponential Backoff Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and
reports error As congestion increases stations back off by larger
amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff
efficient over wide range of loads Low loads 1-persistence guarantees station can
seize channel once idle High loads at least as stable as other techniques
Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first
DataLink Layer 46
Ethernet MAC Sublayer Protocol (2)
Collision detection can take as long as 2
DataLink Layer 47
Ethernet PerformanceEfficiency of Ethernet at 10 Mbps with
512-bit slot times
DataLink Layer 48
CSMACD efficiency Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame
Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap
transprop tt 511efficiency
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 30
CSMACDOperation
DataLink Layer 31
ldquoTaking Turnsrdquo MAC protocolsPolling master node
ldquoinvitesrdquo slave nodes to transmit in turn
concerns polling overhead latency single point of
failure (master)
Token passing control token passed
from one node to next sequentially
token message concerns
token overhead latency single point of failure
(token)
DataLink Layer 32
Summary of MAC protocols What do you do with a shared media
Channel Partitioning by time frequency or code
bull Time Division Frequency Division Random partitioning (dynamic)
bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire)
hard in others (wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
Taking Turnsbull polling from a central site token passing
DataLink Layer 33
Summary of MAC protocolsChannel partitioning MAC protocols
share channel efficiently and fairly at high load inefficient at low load delay in channel access
1N 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
ldquotaking turnsrdquo protocolslook for best of both worlds
DataLink Layer 34
Ethernet Overview History
developed by Xerox PARC in mid-1970s roots in Aloha packet-radio network standardized by Xerox DEC and Intel in
1978 similar to IEEE 8023 standard
Metcalfersquos Ethernetsketch
DataLink Layer 35
Ethernetldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps
DataLink Layer 36
Star topology Bus topology popular through mid 90s Now star topology prevails Connection choices hub or switch (more later)
hub orswitch
DataLink Layer 37
Ethernet Frame StructureSending adapter encapsulates IP datagram (or
other network layer protocol packet) in Ethernet frame
Preamble 7 bytes with pattern 10101010 followed by one
byte with pattern 10101011 used to synchronize receiver sender clock rates
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 38
Ethernet Frame Structure (more) Addresses 6 bytes
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol
otherwise adapter discards frame Type indicates the higher layer protocol
(mostly IP but others may be supported such as Novell IPX and AppleTalk)
CRC checked at receiver if error is detected the frame is simply dropped
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 39
Unreliable connectionless service Connectionless No handshaking between
sending and receiving adapter Unreliable receiving adapter doesnrsquot send
acks or nacks to sending adapter stream of datagrams passed to network layer can
have gaps gaps will be filled if app is using TCP otherwise app will see the gaps
DataLink Layer 40
Ethernet uses CSMACD No slots adapter doesnrsquot
transmit if it senses that some other adapter is transmitting that is carrier sense
transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection
Before attempting a retransmission adapter waits a random time that is random access
DataLink Layer 41
Ethernet CSMACD algorithm1 Adaptor receives datagram
from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
DataLink Layer 42
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential Backoff Goal adapt retransmission
attempts to estimated current load heavy load random wait
will be longer first collision choose K
from 01 delay is K 512 bit transmission times
after second collision choose K from 0123hellip
after ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
DataLink Layer 43
Collision Detection On baseband bus collision produces much
higher signal voltage than signal Collision detected if cable signal greater than
single station signal Signal attenuated over distance Limit distance to 500m (10Base5) or 200m
(10Base2) For twisted pair (star-topology) activity on
more than one port is collision Special collision presence signal
DataLink Layer 44
Algorithm (cont)
If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes
of data) delay and try again
bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected
k=02n - 1bull give up after several tries (usually 16)bull exponential backoff
DataLink Layer 45
Binary Exponential Backoff Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and
reports error As congestion increases stations back off by larger
amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff
efficient over wide range of loads Low loads 1-persistence guarantees station can
seize channel once idle High loads at least as stable as other techniques
Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first
DataLink Layer 46
Ethernet MAC Sublayer Protocol (2)
Collision detection can take as long as 2
DataLink Layer 47
Ethernet PerformanceEfficiency of Ethernet at 10 Mbps with
512-bit slot times
DataLink Layer 48
CSMACD efficiency Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame
Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap
transprop tt 511efficiency
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 31
ldquoTaking Turnsrdquo MAC protocolsPolling master node
ldquoinvitesrdquo slave nodes to transmit in turn
concerns polling overhead latency single point of
failure (master)
Token passing control token passed
from one node to next sequentially
token message concerns
token overhead latency single point of failure
(token)
DataLink Layer 32
Summary of MAC protocols What do you do with a shared media
Channel Partitioning by time frequency or code
bull Time Division Frequency Division Random partitioning (dynamic)
bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire)
hard in others (wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
Taking Turnsbull polling from a central site token passing
DataLink Layer 33
Summary of MAC protocolsChannel partitioning MAC protocols
share channel efficiently and fairly at high load inefficient at low load delay in channel access
1N 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
ldquotaking turnsrdquo protocolslook for best of both worlds
DataLink Layer 34
Ethernet Overview History
developed by Xerox PARC in mid-1970s roots in Aloha packet-radio network standardized by Xerox DEC and Intel in
1978 similar to IEEE 8023 standard
Metcalfersquos Ethernetsketch
DataLink Layer 35
Ethernetldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps
DataLink Layer 36
Star topology Bus topology popular through mid 90s Now star topology prevails Connection choices hub or switch (more later)
hub orswitch
DataLink Layer 37
Ethernet Frame StructureSending adapter encapsulates IP datagram (or
other network layer protocol packet) in Ethernet frame
Preamble 7 bytes with pattern 10101010 followed by one
byte with pattern 10101011 used to synchronize receiver sender clock rates
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 38
Ethernet Frame Structure (more) Addresses 6 bytes
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol
otherwise adapter discards frame Type indicates the higher layer protocol
(mostly IP but others may be supported such as Novell IPX and AppleTalk)
CRC checked at receiver if error is detected the frame is simply dropped
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 39
Unreliable connectionless service Connectionless No handshaking between
sending and receiving adapter Unreliable receiving adapter doesnrsquot send
acks or nacks to sending adapter stream of datagrams passed to network layer can
have gaps gaps will be filled if app is using TCP otherwise app will see the gaps
DataLink Layer 40
Ethernet uses CSMACD No slots adapter doesnrsquot
transmit if it senses that some other adapter is transmitting that is carrier sense
transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection
Before attempting a retransmission adapter waits a random time that is random access
DataLink Layer 41
Ethernet CSMACD algorithm1 Adaptor receives datagram
from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
DataLink Layer 42
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential Backoff Goal adapt retransmission
attempts to estimated current load heavy load random wait
will be longer first collision choose K
from 01 delay is K 512 bit transmission times
after second collision choose K from 0123hellip
after ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
DataLink Layer 43
Collision Detection On baseband bus collision produces much
higher signal voltage than signal Collision detected if cable signal greater than
single station signal Signal attenuated over distance Limit distance to 500m (10Base5) or 200m
(10Base2) For twisted pair (star-topology) activity on
more than one port is collision Special collision presence signal
DataLink Layer 44
Algorithm (cont)
If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes
of data) delay and try again
bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected
k=02n - 1bull give up after several tries (usually 16)bull exponential backoff
DataLink Layer 45
Binary Exponential Backoff Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and
reports error As congestion increases stations back off by larger
amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff
efficient over wide range of loads Low loads 1-persistence guarantees station can
seize channel once idle High loads at least as stable as other techniques
Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first
DataLink Layer 46
Ethernet MAC Sublayer Protocol (2)
Collision detection can take as long as 2
DataLink Layer 47
Ethernet PerformanceEfficiency of Ethernet at 10 Mbps with
512-bit slot times
DataLink Layer 48
CSMACD efficiency Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame
Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap
transprop tt 511efficiency
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 32
Summary of MAC protocols What do you do with a shared media
Channel Partitioning by time frequency or code
bull Time Division Frequency Division Random partitioning (dynamic)
bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire)
hard in others (wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
Taking Turnsbull polling from a central site token passing
DataLink Layer 33
Summary of MAC protocolsChannel partitioning MAC protocols
share channel efficiently and fairly at high load inefficient at low load delay in channel access
1N 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
ldquotaking turnsrdquo protocolslook for best of both worlds
DataLink Layer 34
Ethernet Overview History
developed by Xerox PARC in mid-1970s roots in Aloha packet-radio network standardized by Xerox DEC and Intel in
1978 similar to IEEE 8023 standard
Metcalfersquos Ethernetsketch
DataLink Layer 35
Ethernetldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps
DataLink Layer 36
Star topology Bus topology popular through mid 90s Now star topology prevails Connection choices hub or switch (more later)
hub orswitch
DataLink Layer 37
Ethernet Frame StructureSending adapter encapsulates IP datagram (or
other network layer protocol packet) in Ethernet frame
Preamble 7 bytes with pattern 10101010 followed by one
byte with pattern 10101011 used to synchronize receiver sender clock rates
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 38
Ethernet Frame Structure (more) Addresses 6 bytes
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol
otherwise adapter discards frame Type indicates the higher layer protocol
(mostly IP but others may be supported such as Novell IPX and AppleTalk)
CRC checked at receiver if error is detected the frame is simply dropped
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 39
Unreliable connectionless service Connectionless No handshaking between
sending and receiving adapter Unreliable receiving adapter doesnrsquot send
acks or nacks to sending adapter stream of datagrams passed to network layer can
have gaps gaps will be filled if app is using TCP otherwise app will see the gaps
DataLink Layer 40
Ethernet uses CSMACD No slots adapter doesnrsquot
transmit if it senses that some other adapter is transmitting that is carrier sense
transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection
Before attempting a retransmission adapter waits a random time that is random access
DataLink Layer 41
Ethernet CSMACD algorithm1 Adaptor receives datagram
from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
DataLink Layer 42
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential Backoff Goal adapt retransmission
attempts to estimated current load heavy load random wait
will be longer first collision choose K
from 01 delay is K 512 bit transmission times
after second collision choose K from 0123hellip
after ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
DataLink Layer 43
Collision Detection On baseband bus collision produces much
higher signal voltage than signal Collision detected if cable signal greater than
single station signal Signal attenuated over distance Limit distance to 500m (10Base5) or 200m
(10Base2) For twisted pair (star-topology) activity on
more than one port is collision Special collision presence signal
DataLink Layer 44
Algorithm (cont)
If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes
of data) delay and try again
bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected
k=02n - 1bull give up after several tries (usually 16)bull exponential backoff
DataLink Layer 45
Binary Exponential Backoff Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and
reports error As congestion increases stations back off by larger
amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff
efficient over wide range of loads Low loads 1-persistence guarantees station can
seize channel once idle High loads at least as stable as other techniques
Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first
DataLink Layer 46
Ethernet MAC Sublayer Protocol (2)
Collision detection can take as long as 2
DataLink Layer 47
Ethernet PerformanceEfficiency of Ethernet at 10 Mbps with
512-bit slot times
DataLink Layer 48
CSMACD efficiency Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame
Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap
transprop tt 511efficiency
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 33
Summary of MAC protocolsChannel partitioning MAC protocols
share channel efficiently and fairly at high load inefficient at low load delay in channel access
1N 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
ldquotaking turnsrdquo protocolslook for best of both worlds
DataLink Layer 34
Ethernet Overview History
developed by Xerox PARC in mid-1970s roots in Aloha packet-radio network standardized by Xerox DEC and Intel in
1978 similar to IEEE 8023 standard
Metcalfersquos Ethernetsketch
DataLink Layer 35
Ethernetldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps
DataLink Layer 36
Star topology Bus topology popular through mid 90s Now star topology prevails Connection choices hub or switch (more later)
hub orswitch
DataLink Layer 37
Ethernet Frame StructureSending adapter encapsulates IP datagram (or
other network layer protocol packet) in Ethernet frame
Preamble 7 bytes with pattern 10101010 followed by one
byte with pattern 10101011 used to synchronize receiver sender clock rates
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 38
Ethernet Frame Structure (more) Addresses 6 bytes
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol
otherwise adapter discards frame Type indicates the higher layer protocol
(mostly IP but others may be supported such as Novell IPX and AppleTalk)
CRC checked at receiver if error is detected the frame is simply dropped
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 39
Unreliable connectionless service Connectionless No handshaking between
sending and receiving adapter Unreliable receiving adapter doesnrsquot send
acks or nacks to sending adapter stream of datagrams passed to network layer can
have gaps gaps will be filled if app is using TCP otherwise app will see the gaps
DataLink Layer 40
Ethernet uses CSMACD No slots adapter doesnrsquot
transmit if it senses that some other adapter is transmitting that is carrier sense
transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection
Before attempting a retransmission adapter waits a random time that is random access
DataLink Layer 41
Ethernet CSMACD algorithm1 Adaptor receives datagram
from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
DataLink Layer 42
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential Backoff Goal adapt retransmission
attempts to estimated current load heavy load random wait
will be longer first collision choose K
from 01 delay is K 512 bit transmission times
after second collision choose K from 0123hellip
after ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
DataLink Layer 43
Collision Detection On baseband bus collision produces much
higher signal voltage than signal Collision detected if cable signal greater than
single station signal Signal attenuated over distance Limit distance to 500m (10Base5) or 200m
(10Base2) For twisted pair (star-topology) activity on
more than one port is collision Special collision presence signal
DataLink Layer 44
Algorithm (cont)
If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes
of data) delay and try again
bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected
k=02n - 1bull give up after several tries (usually 16)bull exponential backoff
DataLink Layer 45
Binary Exponential Backoff Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and
reports error As congestion increases stations back off by larger
amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff
efficient over wide range of loads Low loads 1-persistence guarantees station can
seize channel once idle High loads at least as stable as other techniques
Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first
DataLink Layer 46
Ethernet MAC Sublayer Protocol (2)
Collision detection can take as long as 2
DataLink Layer 47
Ethernet PerformanceEfficiency of Ethernet at 10 Mbps with
512-bit slot times
DataLink Layer 48
CSMACD efficiency Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame
Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap
transprop tt 511efficiency
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 34
Ethernet Overview History
developed by Xerox PARC in mid-1970s roots in Aloha packet-radio network standardized by Xerox DEC and Intel in
1978 similar to IEEE 8023 standard
Metcalfersquos Ethernetsketch
DataLink Layer 35
Ethernetldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps
DataLink Layer 36
Star topology Bus topology popular through mid 90s Now star topology prevails Connection choices hub or switch (more later)
hub orswitch
DataLink Layer 37
Ethernet Frame StructureSending adapter encapsulates IP datagram (or
other network layer protocol packet) in Ethernet frame
Preamble 7 bytes with pattern 10101010 followed by one
byte with pattern 10101011 used to synchronize receiver sender clock rates
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 38
Ethernet Frame Structure (more) Addresses 6 bytes
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol
otherwise adapter discards frame Type indicates the higher layer protocol
(mostly IP but others may be supported such as Novell IPX and AppleTalk)
CRC checked at receiver if error is detected the frame is simply dropped
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 39
Unreliable connectionless service Connectionless No handshaking between
sending and receiving adapter Unreliable receiving adapter doesnrsquot send
acks or nacks to sending adapter stream of datagrams passed to network layer can
have gaps gaps will be filled if app is using TCP otherwise app will see the gaps
DataLink Layer 40
Ethernet uses CSMACD No slots adapter doesnrsquot
transmit if it senses that some other adapter is transmitting that is carrier sense
transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection
Before attempting a retransmission adapter waits a random time that is random access
DataLink Layer 41
Ethernet CSMACD algorithm1 Adaptor receives datagram
from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
DataLink Layer 42
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential Backoff Goal adapt retransmission
attempts to estimated current load heavy load random wait
will be longer first collision choose K
from 01 delay is K 512 bit transmission times
after second collision choose K from 0123hellip
after ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
DataLink Layer 43
Collision Detection On baseband bus collision produces much
higher signal voltage than signal Collision detected if cable signal greater than
single station signal Signal attenuated over distance Limit distance to 500m (10Base5) or 200m
(10Base2) For twisted pair (star-topology) activity on
more than one port is collision Special collision presence signal
DataLink Layer 44
Algorithm (cont)
If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes
of data) delay and try again
bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected
k=02n - 1bull give up after several tries (usually 16)bull exponential backoff
DataLink Layer 45
Binary Exponential Backoff Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and
reports error As congestion increases stations back off by larger
amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff
efficient over wide range of loads Low loads 1-persistence guarantees station can
seize channel once idle High loads at least as stable as other techniques
Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first
DataLink Layer 46
Ethernet MAC Sublayer Protocol (2)
Collision detection can take as long as 2
DataLink Layer 47
Ethernet PerformanceEfficiency of Ethernet at 10 Mbps with
512-bit slot times
DataLink Layer 48
CSMACD efficiency Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame
Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap
transprop tt 511efficiency
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 35
Ethernetldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps
DataLink Layer 36
Star topology Bus topology popular through mid 90s Now star topology prevails Connection choices hub or switch (more later)
hub orswitch
DataLink Layer 37
Ethernet Frame StructureSending adapter encapsulates IP datagram (or
other network layer protocol packet) in Ethernet frame
Preamble 7 bytes with pattern 10101010 followed by one
byte with pattern 10101011 used to synchronize receiver sender clock rates
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 38
Ethernet Frame Structure (more) Addresses 6 bytes
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol
otherwise adapter discards frame Type indicates the higher layer protocol
(mostly IP but others may be supported such as Novell IPX and AppleTalk)
CRC checked at receiver if error is detected the frame is simply dropped
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 39
Unreliable connectionless service Connectionless No handshaking between
sending and receiving adapter Unreliable receiving adapter doesnrsquot send
acks or nacks to sending adapter stream of datagrams passed to network layer can
have gaps gaps will be filled if app is using TCP otherwise app will see the gaps
DataLink Layer 40
Ethernet uses CSMACD No slots adapter doesnrsquot
transmit if it senses that some other adapter is transmitting that is carrier sense
transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection
Before attempting a retransmission adapter waits a random time that is random access
DataLink Layer 41
Ethernet CSMACD algorithm1 Adaptor receives datagram
from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
DataLink Layer 42
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential Backoff Goal adapt retransmission
attempts to estimated current load heavy load random wait
will be longer first collision choose K
from 01 delay is K 512 bit transmission times
after second collision choose K from 0123hellip
after ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
DataLink Layer 43
Collision Detection On baseband bus collision produces much
higher signal voltage than signal Collision detected if cable signal greater than
single station signal Signal attenuated over distance Limit distance to 500m (10Base5) or 200m
(10Base2) For twisted pair (star-topology) activity on
more than one port is collision Special collision presence signal
DataLink Layer 44
Algorithm (cont)
If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes
of data) delay and try again
bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected
k=02n - 1bull give up after several tries (usually 16)bull exponential backoff
DataLink Layer 45
Binary Exponential Backoff Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and
reports error As congestion increases stations back off by larger
amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff
efficient over wide range of loads Low loads 1-persistence guarantees station can
seize channel once idle High loads at least as stable as other techniques
Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first
DataLink Layer 46
Ethernet MAC Sublayer Protocol (2)
Collision detection can take as long as 2
DataLink Layer 47
Ethernet PerformanceEfficiency of Ethernet at 10 Mbps with
512-bit slot times
DataLink Layer 48
CSMACD efficiency Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame
Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap
transprop tt 511efficiency
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 36
Star topology Bus topology popular through mid 90s Now star topology prevails Connection choices hub or switch (more later)
hub orswitch
DataLink Layer 37
Ethernet Frame StructureSending adapter encapsulates IP datagram (or
other network layer protocol packet) in Ethernet frame
Preamble 7 bytes with pattern 10101010 followed by one
byte with pattern 10101011 used to synchronize receiver sender clock rates
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 38
Ethernet Frame Structure (more) Addresses 6 bytes
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol
otherwise adapter discards frame Type indicates the higher layer protocol
(mostly IP but others may be supported such as Novell IPX and AppleTalk)
CRC checked at receiver if error is detected the frame is simply dropped
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 39
Unreliable connectionless service Connectionless No handshaking between
sending and receiving adapter Unreliable receiving adapter doesnrsquot send
acks or nacks to sending adapter stream of datagrams passed to network layer can
have gaps gaps will be filled if app is using TCP otherwise app will see the gaps
DataLink Layer 40
Ethernet uses CSMACD No slots adapter doesnrsquot
transmit if it senses that some other adapter is transmitting that is carrier sense
transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection
Before attempting a retransmission adapter waits a random time that is random access
DataLink Layer 41
Ethernet CSMACD algorithm1 Adaptor receives datagram
from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
DataLink Layer 42
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential Backoff Goal adapt retransmission
attempts to estimated current load heavy load random wait
will be longer first collision choose K
from 01 delay is K 512 bit transmission times
after second collision choose K from 0123hellip
after ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
DataLink Layer 43
Collision Detection On baseband bus collision produces much
higher signal voltage than signal Collision detected if cable signal greater than
single station signal Signal attenuated over distance Limit distance to 500m (10Base5) or 200m
(10Base2) For twisted pair (star-topology) activity on
more than one port is collision Special collision presence signal
DataLink Layer 44
Algorithm (cont)
If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes
of data) delay and try again
bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected
k=02n - 1bull give up after several tries (usually 16)bull exponential backoff
DataLink Layer 45
Binary Exponential Backoff Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and
reports error As congestion increases stations back off by larger
amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff
efficient over wide range of loads Low loads 1-persistence guarantees station can
seize channel once idle High loads at least as stable as other techniques
Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first
DataLink Layer 46
Ethernet MAC Sublayer Protocol (2)
Collision detection can take as long as 2
DataLink Layer 47
Ethernet PerformanceEfficiency of Ethernet at 10 Mbps with
512-bit slot times
DataLink Layer 48
CSMACD efficiency Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame
Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap
transprop tt 511efficiency
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 37
Ethernet Frame StructureSending adapter encapsulates IP datagram (or
other network layer protocol packet) in Ethernet frame
Preamble 7 bytes with pattern 10101010 followed by one
byte with pattern 10101011 used to synchronize receiver sender clock rates
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 38
Ethernet Frame Structure (more) Addresses 6 bytes
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol
otherwise adapter discards frame Type indicates the higher layer protocol
(mostly IP but others may be supported such as Novell IPX and AppleTalk)
CRC checked at receiver if error is detected the frame is simply dropped
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 39
Unreliable connectionless service Connectionless No handshaking between
sending and receiving adapter Unreliable receiving adapter doesnrsquot send
acks or nacks to sending adapter stream of datagrams passed to network layer can
have gaps gaps will be filled if app is using TCP otherwise app will see the gaps
DataLink Layer 40
Ethernet uses CSMACD No slots adapter doesnrsquot
transmit if it senses that some other adapter is transmitting that is carrier sense
transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection
Before attempting a retransmission adapter waits a random time that is random access
DataLink Layer 41
Ethernet CSMACD algorithm1 Adaptor receives datagram
from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
DataLink Layer 42
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential Backoff Goal adapt retransmission
attempts to estimated current load heavy load random wait
will be longer first collision choose K
from 01 delay is K 512 bit transmission times
after second collision choose K from 0123hellip
after ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
DataLink Layer 43
Collision Detection On baseband bus collision produces much
higher signal voltage than signal Collision detected if cable signal greater than
single station signal Signal attenuated over distance Limit distance to 500m (10Base5) or 200m
(10Base2) For twisted pair (star-topology) activity on
more than one port is collision Special collision presence signal
DataLink Layer 44
Algorithm (cont)
If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes
of data) delay and try again
bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected
k=02n - 1bull give up after several tries (usually 16)bull exponential backoff
DataLink Layer 45
Binary Exponential Backoff Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and
reports error As congestion increases stations back off by larger
amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff
efficient over wide range of loads Low loads 1-persistence guarantees station can
seize channel once idle High loads at least as stable as other techniques
Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first
DataLink Layer 46
Ethernet MAC Sublayer Protocol (2)
Collision detection can take as long as 2
DataLink Layer 47
Ethernet PerformanceEfficiency of Ethernet at 10 Mbps with
512-bit slot times
DataLink Layer 48
CSMACD efficiency Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame
Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap
transprop tt 511efficiency
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 38
Ethernet Frame Structure (more) Addresses 6 bytes
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol
otherwise adapter discards frame Type indicates the higher layer protocol
(mostly IP but others may be supported such as Novell IPX and AppleTalk)
CRC checked at receiver if error is detected the frame is simply dropped
Destaddr
64 48 32CRCPreamble Src
addr Type Body1648
DataLink Layer 39
Unreliable connectionless service Connectionless No handshaking between
sending and receiving adapter Unreliable receiving adapter doesnrsquot send
acks or nacks to sending adapter stream of datagrams passed to network layer can
have gaps gaps will be filled if app is using TCP otherwise app will see the gaps
DataLink Layer 40
Ethernet uses CSMACD No slots adapter doesnrsquot
transmit if it senses that some other adapter is transmitting that is carrier sense
transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection
Before attempting a retransmission adapter waits a random time that is random access
DataLink Layer 41
Ethernet CSMACD algorithm1 Adaptor receives datagram
from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
DataLink Layer 42
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential Backoff Goal adapt retransmission
attempts to estimated current load heavy load random wait
will be longer first collision choose K
from 01 delay is K 512 bit transmission times
after second collision choose K from 0123hellip
after ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
DataLink Layer 43
Collision Detection On baseband bus collision produces much
higher signal voltage than signal Collision detected if cable signal greater than
single station signal Signal attenuated over distance Limit distance to 500m (10Base5) or 200m
(10Base2) For twisted pair (star-topology) activity on
more than one port is collision Special collision presence signal
DataLink Layer 44
Algorithm (cont)
If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes
of data) delay and try again
bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected
k=02n - 1bull give up after several tries (usually 16)bull exponential backoff
DataLink Layer 45
Binary Exponential Backoff Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and
reports error As congestion increases stations back off by larger
amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff
efficient over wide range of loads Low loads 1-persistence guarantees station can
seize channel once idle High loads at least as stable as other techniques
Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first
DataLink Layer 46
Ethernet MAC Sublayer Protocol (2)
Collision detection can take as long as 2
DataLink Layer 47
Ethernet PerformanceEfficiency of Ethernet at 10 Mbps with
512-bit slot times
DataLink Layer 48
CSMACD efficiency Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame
Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap
transprop tt 511efficiency
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 39
Unreliable connectionless service Connectionless No handshaking between
sending and receiving adapter Unreliable receiving adapter doesnrsquot send
acks or nacks to sending adapter stream of datagrams passed to network layer can
have gaps gaps will be filled if app is using TCP otherwise app will see the gaps
DataLink Layer 40
Ethernet uses CSMACD No slots adapter doesnrsquot
transmit if it senses that some other adapter is transmitting that is carrier sense
transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection
Before attempting a retransmission adapter waits a random time that is random access
DataLink Layer 41
Ethernet CSMACD algorithm1 Adaptor receives datagram
from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
DataLink Layer 42
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential Backoff Goal adapt retransmission
attempts to estimated current load heavy load random wait
will be longer first collision choose K
from 01 delay is K 512 bit transmission times
after second collision choose K from 0123hellip
after ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
DataLink Layer 43
Collision Detection On baseband bus collision produces much
higher signal voltage than signal Collision detected if cable signal greater than
single station signal Signal attenuated over distance Limit distance to 500m (10Base5) or 200m
(10Base2) For twisted pair (star-topology) activity on
more than one port is collision Special collision presence signal
DataLink Layer 44
Algorithm (cont)
If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes
of data) delay and try again
bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected
k=02n - 1bull give up after several tries (usually 16)bull exponential backoff
DataLink Layer 45
Binary Exponential Backoff Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and
reports error As congestion increases stations back off by larger
amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff
efficient over wide range of loads Low loads 1-persistence guarantees station can
seize channel once idle High loads at least as stable as other techniques
Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first
DataLink Layer 46
Ethernet MAC Sublayer Protocol (2)
Collision detection can take as long as 2
DataLink Layer 47
Ethernet PerformanceEfficiency of Ethernet at 10 Mbps with
512-bit slot times
DataLink Layer 48
CSMACD efficiency Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame
Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap
transprop tt 511efficiency
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 40
Ethernet uses CSMACD No slots adapter doesnrsquot
transmit if it senses that some other adapter is transmitting that is carrier sense
transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection
Before attempting a retransmission adapter waits a random time that is random access
DataLink Layer 41
Ethernet CSMACD algorithm1 Adaptor receives datagram
from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
DataLink Layer 42
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential Backoff Goal adapt retransmission
attempts to estimated current load heavy load random wait
will be longer first collision choose K
from 01 delay is K 512 bit transmission times
after second collision choose K from 0123hellip
after ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
DataLink Layer 43
Collision Detection On baseband bus collision produces much
higher signal voltage than signal Collision detected if cable signal greater than
single station signal Signal attenuated over distance Limit distance to 500m (10Base5) or 200m
(10Base2) For twisted pair (star-topology) activity on
more than one port is collision Special collision presence signal
DataLink Layer 44
Algorithm (cont)
If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes
of data) delay and try again
bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected
k=02n - 1bull give up after several tries (usually 16)bull exponential backoff
DataLink Layer 45
Binary Exponential Backoff Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and
reports error As congestion increases stations back off by larger
amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff
efficient over wide range of loads Low loads 1-persistence guarantees station can
seize channel once idle High loads at least as stable as other techniques
Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first
DataLink Layer 46
Ethernet MAC Sublayer Protocol (2)
Collision detection can take as long as 2
DataLink Layer 47
Ethernet PerformanceEfficiency of Ethernet at 10 Mbps with
512-bit slot times
DataLink Layer 48
CSMACD efficiency Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame
Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap
transprop tt 511efficiency
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 41
Ethernet CSMACD algorithm1 Adaptor receives datagram
from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
DataLink Layer 42
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential Backoff Goal adapt retransmission
attempts to estimated current load heavy load random wait
will be longer first collision choose K
from 01 delay is K 512 bit transmission times
after second collision choose K from 0123hellip
after ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
DataLink Layer 43
Collision Detection On baseband bus collision produces much
higher signal voltage than signal Collision detected if cable signal greater than
single station signal Signal attenuated over distance Limit distance to 500m (10Base5) or 200m
(10Base2) For twisted pair (star-topology) activity on
more than one port is collision Special collision presence signal
DataLink Layer 44
Algorithm (cont)
If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes
of data) delay and try again
bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected
k=02n - 1bull give up after several tries (usually 16)bull exponential backoff
DataLink Layer 45
Binary Exponential Backoff Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and
reports error As congestion increases stations back off by larger
amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff
efficient over wide range of loads Low loads 1-persistence guarantees station can
seize channel once idle High loads at least as stable as other techniques
Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first
DataLink Layer 46
Ethernet MAC Sublayer Protocol (2)
Collision detection can take as long as 2
DataLink Layer 47
Ethernet PerformanceEfficiency of Ethernet at 10 Mbps with
512-bit slot times
DataLink Layer 48
CSMACD efficiency Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame
Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap
transprop tt 511efficiency
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 42
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential Backoff Goal adapt retransmission
attempts to estimated current load heavy load random wait
will be longer first collision choose K
from 01 delay is K 512 bit transmission times
after second collision choose K from 0123hellip
after ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
DataLink Layer 43
Collision Detection On baseband bus collision produces much
higher signal voltage than signal Collision detected if cable signal greater than
single station signal Signal attenuated over distance Limit distance to 500m (10Base5) or 200m
(10Base2) For twisted pair (star-topology) activity on
more than one port is collision Special collision presence signal
DataLink Layer 44
Algorithm (cont)
If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes
of data) delay and try again
bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected
k=02n - 1bull give up after several tries (usually 16)bull exponential backoff
DataLink Layer 45
Binary Exponential Backoff Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and
reports error As congestion increases stations back off by larger
amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff
efficient over wide range of loads Low loads 1-persistence guarantees station can
seize channel once idle High loads at least as stable as other techniques
Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first
DataLink Layer 46
Ethernet MAC Sublayer Protocol (2)
Collision detection can take as long as 2
DataLink Layer 47
Ethernet PerformanceEfficiency of Ethernet at 10 Mbps with
512-bit slot times
DataLink Layer 48
CSMACD efficiency Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame
Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap
transprop tt 511efficiency
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 43
Collision Detection On baseband bus collision produces much
higher signal voltage than signal Collision detected if cable signal greater than
single station signal Signal attenuated over distance Limit distance to 500m (10Base5) or 200m
(10Base2) For twisted pair (star-topology) activity on
more than one port is collision Special collision presence signal
DataLink Layer 44
Algorithm (cont)
If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes
of data) delay and try again
bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected
k=02n - 1bull give up after several tries (usually 16)bull exponential backoff
DataLink Layer 45
Binary Exponential Backoff Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and
reports error As congestion increases stations back off by larger
amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff
efficient over wide range of loads Low loads 1-persistence guarantees station can
seize channel once idle High loads at least as stable as other techniques
Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first
DataLink Layer 46
Ethernet MAC Sublayer Protocol (2)
Collision detection can take as long as 2
DataLink Layer 47
Ethernet PerformanceEfficiency of Ethernet at 10 Mbps with
512-bit slot times
DataLink Layer 48
CSMACD efficiency Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame
Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap
transprop tt 511efficiency
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 44
Algorithm (cont)
If collisionhellip jam for 32 bits then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes
of data) delay and try again
bull 1st time 0 or 512usbull 2nd time 0 512 or 1024usbull 3rd time512 1024 or 1536usbull nth time k x 512us for randomly selected
k=02n - 1bull give up after several tries (usually 16)bull exponential backoff
DataLink Layer 45
Binary Exponential Backoff Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and
reports error As congestion increases stations back off by larger
amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff
efficient over wide range of loads Low loads 1-persistence guarantees station can
seize channel once idle High loads at least as stable as other techniques
Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first
DataLink Layer 46
Ethernet MAC Sublayer Protocol (2)
Collision detection can take as long as 2
DataLink Layer 47
Ethernet PerformanceEfficiency of Ethernet at 10 Mbps with
512-bit slot times
DataLink Layer 48
CSMACD efficiency Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame
Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap
transprop tt 511efficiency
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 45
Binary Exponential Backoff Attempt to transmit repeatedly if repeated collisions First 10 attempts mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts station gives up and
reports error As congestion increases stations back off by larger
amounts to reduce the probability of collision 1-persistent algorithm with binary exponential backoff
efficient over wide range of loads Low loads 1-persistence guarantees station can
seize channel once idle High loads at least as stable as other techniques
Backoff algorithm gives last-in first-out effect Stations with few collisions transmit first
DataLink Layer 46
Ethernet MAC Sublayer Protocol (2)
Collision detection can take as long as 2
DataLink Layer 47
Ethernet PerformanceEfficiency of Ethernet at 10 Mbps with
512-bit slot times
DataLink Layer 48
CSMACD efficiency Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame
Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap
transprop tt 511efficiency
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 46
Ethernet MAC Sublayer Protocol (2)
Collision detection can take as long as 2
DataLink Layer 47
Ethernet PerformanceEfficiency of Ethernet at 10 Mbps with
512-bit slot times
DataLink Layer 48
CSMACD efficiency Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame
Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap
transprop tt 511efficiency
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 47
Ethernet PerformanceEfficiency of Ethernet at 10 Mbps with
512-bit slot times
DataLink Layer 48
CSMACD efficiency Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame
Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap
transprop tt 511efficiency
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 48
CSMACD efficiency Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame
Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap
transprop tt 511efficiency
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 49
Ethernet CablingThe most common kinds of Ethernet
cabling
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 50
Ethernet Cabling (2)Three kinds of Ethernet cabling
(a) 10Base5 (b) 10Base2 (c) 10Base-T
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 51
Ethernet Cabling (3)Cable topologies (a) Linear (b) Spine (c)
Tree (d) Segmented
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 52
10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100
m max distance between nodes and hub
twisted pair
hub
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 53
100Mbps Fast Ethernet Use IEEE 8023 MAC protocol and frame format 100BASE-X use physical medium specifications
from FDDI Two physical links between nodes
bull Transmission and reception 100BASE-TX uses STP or Cat 5 UTP
bull May require new cable 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 voice-grade UTP
bull Uses four twisted-pair lines between nodesbull Data transmission uses three pairs in one direction at a
time Star-wire topology
Similar to 10BASE-T
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 54
Fast EthernetThe original fast Ethernet cabling
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 55
Gigabit EthernetGigabit Ethernet cabling
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 56
Ethernet (cont) Addresses
unique 48-bit unicast address assigned to each adapter example 80e4b12 broadcast all 1s multicast first bit is 1
Bandwidth 10Mbps 100Mbps 1Gbps Length 2500m (500m segments with 4 repeaters) Problem Distributed algorithm that provides fair
access
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 57
Wireless Link CharacteristicsDifferences from wired link hellip
decreased signal strength radio signal attenuates as it propagates through matter (path loss)
interference from other sources standardized wireless network frequencies (eg 24 GHz) shared by other devices (eg phone) devices (motors) interfere as well
multipath propagation radio signal reflects off objects ground arriving ad destination at slightly different times
hellip make communication across (even a point to point) wireless link much more ldquodifficultrdquo
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 58
Wireless network characteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problem B A hear each other B C hear each other A C can not hear each othermeans A C unaware of their
interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fading B A hear each other B C hear each other A C can not hear each other
interferring at B
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 59
IEEE 80211 Wireless LAN 80211b
24-5 GHz unlicensed radio spectrum
up to 11 Mbps direct sequence
spread spectrum (DSSS) in physical layer
bull all hosts use same chipping code
widely deployed using base stations
80211a 5-6 GHz range up to 54 Mbps
80211g 24-5 GHz range up to 54 Mbps
All use CSMACA for multiple access
All have base-station and ad-hoc network versions
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 60
Figure 3-12ISM bands
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 61
80211 LAN architecture wireless host
communicates with base station base station = access
point (AP) Basic Service Set (BSS)
(aka ldquocellrdquo) in infrastructure mode contains wireless hosts access point (AP) base
station ad hoc mode hosts only
BSS 1
BSS 2
Internet
hub switchor routerAP
AP
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 62
80211 Channels association 80211b 24GHz-2485GHz spectrum divided
into 11 channels at different frequencies AP admin chooses frequency for AP interference possible channel can be same as
that chosen by neighboring AP host must associate with an AP
scans channels listening for beacon frames containing APrsquos name (SSID) and MAC address
selects AP to associate with may perform authentication [Chapter 8] will typically run DHCP to get IP address in
APrsquos subnet
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 63
IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same
time 80211 CSMA - sense before transmitting
donrsquot collide with ongoing transmission by other node 80211 no collision detection
difficult to receive (sense collisions) when transmitting due to weak received signals (fading)
canrsquot sense all collisions in any case hidden terminal fading
goal avoid collisions CSMAC(ollision)A(voidance)
AB
CA B C
Arsquos signalstrength
space
Crsquos signalstrength
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 64
IEEE 80211 MAC Protocol CSMACA80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff
interval repeat 280211 receiver- if frame received OK return ACK after SIFS (ACK needed due
to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 65
Avoiding collisions (more)idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets
to BS using CSMA RTSs may still collide with each other (but theyrsquore short)
BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes
sender transmits data frame other stations defer transmissions
Avoid data frame collisions completely using small reservation packets
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 66
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-
DataLink Layer 67
IEEE 802 Standards
The 802 working groups The important ones are marked with The ones marked with are hibernating The one marked with dagger gave up
- Slide 1
- Media Access Control
- Asynchronous Systems
- Multiple Access Links and Protocols
- Multiple Access protocols
- Ideal Mulitple Access Protocol
- MAC Protocols a taxonomy
- Channel Partitioning MAC protocols TDMA
- Channel Partitioning MAC protocols FDMA
- Random Access Protocols
- Slotted ALOHA
- Slide 12
- Slotted Aloha efficiency
- Pure ALOHA (2)
- Pure Aloha efficiency
- ALOHA Efficiency
- CSMA (Carrier Sense Multiple Access)
- CSMA collisions
- Nonpersistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Value of p
- Persistent and Nonpersistent CSMA
- Which Persistence Algorithm
- CSMACD (Collision Detection)
- CSMACD
- CSMACD collision detection
- Slide 29
- CSMACD Operation
- ldquoTaking Turnsrdquo MAC protocols
- Summary of MAC protocols
- Summary of MAC protocols
- Ethernet Overview
- Ethernet
- Star topology
- Ethernet Frame Structure
- Ethernet Frame Structure (more)
- Unreliable connectionless service
- Ethernet uses CSMACD
- Ethernet CSMACD algorithm
- Ethernetrsquos CSMACD (more)
- Collision Detection
- Algorithm (cont)
- Binary Exponential Backoff
- Ethernet MAC Sublayer Protocol (2)
- Ethernet Performance
- CSMACD efficiency
- Ethernet Cabling
- Ethernet Cabling (2)
- Ethernet Cabling (3)
- 10BaseT and 100BaseT
- 100Mbps Fast Ethernet
- Fast Ethernet
- Gigabit Ethernet
- Ethernet (cont)
- Wireless Link Characteristics
- Wireless network characteristics
- IEEE 80211 Wireless LAN
- Slide 60
- 80211 LAN architecture
- 80211 Channels association
- IEEE 80211 multiple access
- IEEE 80211 MAC Protocol CSMACA
- Avoiding collisions (more)
- Collision Avoidance RTS-CTS exchange
- IEEE 802 Standards
-