1 chapter 6 medium access control protocols and local area networks part i: medium access control...
TRANSCRIPT
1
Chapter 6 Medium Access Control
Protocols and Local Area Networks
Part I: Medium Access Control
Part II: Local Area Networks
2
Chapter Overview
Switched Networks Interconnection services by
means of transmission, multiplexing, and switching/routing
Broadcast Networks All information sent to all
users No routing Shared media
Radio: Cellular telephony, Wireless LANs
Copper & Optical: Ethernet LANs, Cable Modem Access
Local Area Networks High-speed, low-cost
communications between co-located computers
Typically based on broadcast networks
Simple & cheap Limited number of users
Medium Access Control To coordinate the access to
shared medium Information can get through
the broadcast network from source to destination
3
Chapter 6 Medium Access Control
Protocols and Local Area Networks
Part I: Medium Access ControlMultiple Access Communications
Random AccessScheduling
ChannelizationDelay Performance
4
Part II: Local Area NetworksOverview of LANs
LAN Standards: Ethernet LAN* LAN Standards: Token Ring and FDDI LAN
LAN Standards: 802.11 Wireless LAN* LAN Bridges
Chapter 6 Medium Access Control
Protocols and Local Area Networks
5
Chapter 6Medium Access Control
Protocols and Local Area Networks
6.1 Multiple Access Communications
6
Multiple Access Communications
Shared media basis for broadcast networks Inexpensive: radio over air; copper or coaxial cable M users communicate each other by broadcasting into
medium
Key issue: How to share and access the medium?
12
3
4
5M
Shared multipleaccess medium
7
Medium sharing techniques
Static channelization
Dynamic medium access control
Scheduling Random access
Approaches to Media Sharing
Centralized FDMA/TDMA/CDMA Dedicated allocation
of channels to users Satellite
communication systems
Cellular communication systems
Centralized/Distributed Polling: take turns Request for slot in
transmission schedule Token ring Wireless LANs
Distributed Loose coordination Send, wait, retry if
necessary Aloha Ethernet
8
Satellite Channel:
Frequency Division Multiple Access (FDMA),
Time Division Multiple Access (TDMA)
uplink fin downlink fout
Satellite Communication Systems
9
Cellular Communication Systems
uplink f1 ; downlink f2 uplink f3 ; downlink f4
Multiple Access Methods:
1G: FDMA (Frequency Division Multiple Access)
2G: TDMA (Time Division Multiple Access)
3G: CDMA (Code Division Multiple Access)
10
Inbound line
Outbound lineHost
computer
Stations
Scheduling: Polling
1 2 3 M
Poll 1
Data from 1
Poll 2
Data from 2
Data to M
11
Ring networks
Scheduling: Token-Passing
token
Station that holds token transmits data into the ring
tokenData to M
12
Multi-tapped Bus
Random Access
Crash!!
Transmit when ready
Collision may occur; need transmission and re-transmission strategy
13
AdHoc: station-to-station Infrastructure: stations to base station (Access Point) Random access and polling
Wireless LAN
14
Selecting a Medium Access Control
Applications What type of traffic? Voice streams? Steady traffic, low delay/jitter Data? Short messages? Web page downloads? Enterprise or Consumer market? Reliability, cost
Scale How much traffic can be carried? How many users can be supported?
Current Examples: Design MAC to provide wireless DSL-equivalent access to
rural communities (Fixed Wireless Access) Design MAC to provide Wireless-LAN-equivalent access to
mobile users (user in car travelling at 130 km/hr)
15
Delay-Bandwidth Product
Delay-bandwidth product: key parameter Delay-bandwidth product affects the performance of the random
access protocol Difficulty of coordination commensurate with delay-bandwidth
product
Consider a simple example: two-station case Station with frame to send listens to the channel (medium) and
transmits if the medium is found idle Station continues monitoring the medium to avoid collision There is a capture effect, meaning that the station captures the
medium channel if there is no collision and its entire message can through the medium channel
16
Two stations are trying to share a common medium
Two-Station MAC Example
A transmits
at t = 0
Distance d meterstprop = d / v seconds
A B
A B
B does not transmit before t = tprop and A captures the channel
Case 1
B transmits before t = tprop and detectscollision soonthereafter
A B
A B
A detectscollision at
t = 2 tprop
Case 2
17
Efficiency of the Two-Station MAC
Each frame transmission requires 2tprop of quiet time to detect collision Approximately 2tprop is required to coordinate the success for each frame
transmitted R transmission bit rate L bits/frame
Normalized Delay-Bandwidth Product
Propagation delay
Time to transmit a frame
18
Typical MAC Efficiencies
CSMA-CD (Ethernet) protocol:
Token-ring network
a΄= latency of the ring (bits)/average frame length = sum of bit delays at every ring adapter + the delay-bandwidth product
Two-Station Example:
If a<<1, then efficiency close to 100%
As a approaches 1, the efficiency becomes low
19
Typical Delay-Bandwidth Products
Max size Ethernet frame: 1500 bytes = 12000 bits
Distance 10 Mbps 100 Mbps 1 Gbps Network Type
1 m 3.33 x 10-02 3.33 x 10-01 3.33 x 100 Desk area network
100 m 3.33 x 1001 3.33 x 1002 3.33 x 1003 Local area network
10 km 3.33 x 1002 3.33 x 1003 3.33 x 1004 Metropolitan area network
1000 km 3.33 x 1004 3.33 x 1005 3.33 x 1006 Wide area network
100000 km 3.33 x 1006 3.33 x 1007 3.33 x 1008 Global area network
20
MAC protocol features
Delay-bandwidth product Efficiency Transfer delay Fairness Reliability Capability to carry different types of traffic Quality of service Cost
21
MAC Delay Performance Frame transfer delay: from first bit of frame arrives at source
MAC to last bit of frame delivered at destination MAC Throughput: actual transfer rate through the shared medium
measured in frames/sec or bits/sec
ParametersR bits/sec: Transmission rate and L bits/frame: Frame length
X = L/R seconds/frame: frame transmission time
λ frames/second: average arrival rate
Load ρ = λ X= λ L/R < 1, rate at which “work” arrives
22
Load
Tra
nsfe
r d
ela
y
E[T]/X
ρρ max 1
1
Normalized Delay versus Load
E[T] = average frametransfer delay
X = average frametransmission time
At low arrival rate, only frame transmission time
At high arrival rates, increasingly longer waits to access channel
Max efficiency typically less than 100%
23
Dependence on Rtprop/LT
rans
fer
De
lay
Load
E[T]/X
ρmax 1
1
aa’
a’ > a
ρ’ max
24
Chapter 6Medium Access Control
Protocols and Local Area Networks
6.2 Random Access
25
6.2.1 ALOHA Wireless link to provide data transfer between main
campus & remote campuses of University of Hawaii Simplest solution: just do it
A station transmits whenever it has data to transmit If more than one stations have data to transmit, they interfere
with each other (collide) and data are lost If ACK not received within timeout, then a station picks random
backoff time (to avoid repeated collision) Station retransmits frame after backoff time
tt0t0-X t0+X t0+X+2tprop
t0+X+2tprop + B
Vulnerableperiod
Time-outBackoff period B
First transmission Retransmission
Fig. 6.10: ALOHA random access scheme
Retransmission if necessary
26
ALOHA Model
Definitions and assumptions X: frame transmission time (assume constant) S: throughput (average number of successful frame transmissions per
X seconds) G: load (average number of transmission attempts per X sec.) Psuccess : probability a frame transmission is successful
XX
frame transmission
Prior interval
Any transmission that begins during vulnerable period leads to collision
Assume Poisson arrival of data in each station
Success if no arrivals during 2X seconds
27
Abramson’s Assumption
What is probability of no arrivals in vulnerable period? Abramson assumption: The backoff algorithm spreads the
retransmissions so that frame transmissions, new and repeated, are equally likely to occur at any time instant
This implies that the number of frames transmitted in a time interval has a Poisson distribution with the average number of arrivals of 2G/2X
G is the total arrival rate of frames (new arrivals + retransmission arrivals) per X seconds
!0
)2(
seconds] 2Xin arrivals 0[
20
G
success
eG
PP
28
Throughput of ALOHA
Collisions are means for coordinating access
Max throughput is max=1/2e (18.4%) at G=0.5 WHY ?
Bimodal behavior:Small G, S≈G
Large G, S↓0 Collisions can
snowball and drop throughput to zero
e/2 = 0.184
29
6.2.2 Slotted ALOHA Time is slotted in X seconds slots Stations are synchronized to frame times Stations having frame arrivals will transmit frames
immediately at the first slot after the frame arrival Backoff intervals in multiples of slots, depending on the
number of collisions
t(k+1)XkX t0 +X+2tprop+ B
Vulnerableperiod
Time-out
Collision Detection
Backoff period B
t0 +X+2tprop
Only frames that arrive during the vulnerable period will make collision
t0 t0 +XRetransmissionFirst transmission
Retransmission If necessary
30
Throughput of Slotted ALOHA
GG
success
GeeG
G
GPGPS
0
!0
)(
seconds] Xin arrivals no[
Ge-G
Ge-2G
G
S0.184
0.368=1/e
The maximum throughput happens at G=1The maximum throughput of ALOHA system is not sensitive to the reaction time because stations act independently
31
Reservation ALOHA
Reservation protocol allows a large number of stations with infrequent traffic to reserve slots to transmit their frames in future cycles
Each cycle has mini-slots allocated for making reservations
Stations use slotted ALOHA during mini-slots to request slots
cycle
X-second slotReservation mini-slots
. . .. . .
32
6.2.3 Carrier Sense Multiple Access (CSMA)
A
Station A begins transmission at t = 0
A
Station A captureschannel at t = tprop
A station senses the medium channel before it starts transmission to avoid too many collisions If sensing idle, start transmission If busy, either wait or schedule backoff (different options) ACK is sent by the receiver Vulnerable period is reduced to tprop When collisions occur they involve entire frame transmission times If tprop >X (or if a>1), no gain compared to ALOHA or slotted ALOHA
X
ta prop
33
CSMA differs when the channel is sensed busy 1-persistent CSMA (most greedy)
Start transmission as soon as the channel becomes idle again Low delay and low efficiency
Non-persistent CSMA (least greedy) Wait a backoff period, then sense the carrier again High delay and high efficiency
p-persistent CSMA (adjustable greedy) Wait till channel becomes idle, transmit with probability p; or wait
one propagation delay tprop and re-sense with probability 1-p Delay and efficiency can be balanced
CSMA Options
Sensing
34
0.53
0.45
0.16
S
G
a 0.01
a =0.1
a = 1
1-Persistent CSMA Throughput
Better than Aloha & slotted Aloha for small a
Worse than Aloha for a > 1
35
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
0.…
0.…
0.…
0.…
0.25 0.5 1 2 4 8 16 32 64
0.81
0.51
0.14
S
G
a = 0.01
Non-Persistent CSMA Throughput
a = 0.1
a = 1
Higher maximum throughput than 1-persistent for small a
Worse than Aloha for a > 1
36
6.2.4 CSMA with Collision Detection (CSMA/CD)
Monitor for collisions & abort transmission Stations with frames to send, first do carrier sensing After beginning transmissions, stations continue listening to the
medium to detect collisions If a collision is detected during transmission, a short jamming
signal is transmitted to ensure all other stations to know that collision has occurred before aborting the transmission, and then adopts a backoff algorithm to reschedule the future transmission
In CSMA, collisions result in wastage of X seconds spent transmitting an entire frame. But CSMA-CD reduces wastage to a time (2 propagation time) to detect collision and abort transmission
37
CSMA/CD reaction time
Station A takes about 2 tprop to find out if it has been successfully captured the channel.
Question: minimum frame size ?
A begins to transmit at
t = 0
A B
B begins to transmit at t = tprop- δ;B detectscollision at t = tprop
A B
A B
A detectscollision at t= 2 tprop- δ
38
CSMA-CD Model
Assumptions Collisions can be detected and resolved in 2tprop
Each contention interval takes 2tprop seconds, which is regarded as one minislot
Assume n stations are contending for the channel, and each may transmit with probability p in each contention time slot
Once the contention period is over (a station successfully occupies the channel), it takes X seconds for a frame to be transmitted
It takes tprop before the next contention period starts.
Busy Contention Busy(a)
Time
Idle Contention Busy
39
Contention Resolution
How long does it take to resolve contention? Contention is resolved (“success’) if exactly 1 station transmits in a
minislot:
By taking derivative of Psuccess we find max occurs at p=1/n
The average number of minislots that elapse until a station successfully captures the channel is 1/Pmax = e = 2.718 time slots
40
CSMA/CD Throughput
At maximum throughput, systems alternates between contention periods and frame transmission times
Time
Busy Contention Busy Contention Busy Contention Busy
where:R bits/sec, L bits/frame, X=L/R seconds/frame
a = tprop/X
meters/sec. speed of light in medium
d meters is diameter of system
2e+1 = 6.44
41
CSMA-CD Application: Ethernet
First Ethernet LAN standard used CSMA-CD 1-persistent Carrier Sensing R = 10 Mbps tprop = 51.2 microseconds
512 bits = 64 byte slot accommodates 2.5 km + 4 repeaters
Truncated Binary Exponential Backoff After nth collision, select backoff from {0, 1,…, 2k – 1},
where k=min(n, 10)
42
Maximum Achievable Throughputs for Random Access Schemes
ALOHA
Slotted ALOHA
1-P CSMA
Non-P CSMA
CSMA/CD
a
ρmax
For small a: CSMA-CD has best throughput For larger a: Aloha & slotted Aloha better throughput
43
Carrier Sensing and Priority Transmission Certain applications require faster response than others,
e.g. real-time services and ACK messages Impose different interframe times
High priority traffic sense channel for time Low priority traffic sense channel for time High priority traffic, if present, seizes channel first
This priority mechanism is used in IEEE 802.11 wireless LAN
Problems for Sections 6.1 and 6.2
6.1 (10%) 6.6 (10%) 6.8 (10%) 6.10 (20%) 6.13 (20%)
44
45
6.3 Scheduling Approaches to Medium Access Control
Chapter 6Medium Access Control
Protocols and Local Area Networks
46
Scheduling for Medium Access Control
Schedule frame transmissions (assignment) to avoid collision in shared medium More efficient channel utilization Less variability in delay Fairness provisioning to stations Increased computational or procedural complexity
Two main approaches Reservation Polling
47
6.3.1 Reservation Systems
Time
Cycle n
Reservationinterval
Frame transmissions
r d d d r d d d
Cycle (n + 1)
r = 1 2 3 M
Transmissions organized into cycles Cycle: reservation interval + frame transmissions Reservation interval has a minislot for each station to request
reservations for frame transmissions
Fig. 6.19 Basic reservation system: each station has own minislot for making reservation
48
Reservation System Options Centralized or distributed system
Centralized systems: A central controller listens to reservation information, decides order of transmission, issues grants
Distributed systems: Each station determines its slot for transmission from the reservation information
Single or Multiple Frames Single frame reservation: Only one frame transmission can be
reserved within a reservation cycle Multiple frame reservation: More than one frame transmission
can be reserved within a frame Channelized or Random Access Reservations
Channelized (typically TDMA) reservation: Reservation messages from different stations are multiplexed without any risk of collision
Random access reservation: Each station transmits its reservation message randomly until the message goes through
49
tr 3 5 r 3 5 r 3 5 8 r 3 5 8 r 3
(a)
tr 3 5 r 3 5 r 3 5 8 r 3 5 8 r 3
8(b)
Example Initially stations 3 & 5 have reservations to transmit frames
Station 8 becomes active and makes reservation Cycle now also includes frame transmissions from station 8
50
Efficiency of Reservation Systems Assume minislot duration = vX TDM single frame reservation scheme
If propagation delay is negligible, a single frame transmission requires (1+v)X seconds
Link is fully loaded when all M stations transmit, maximum efficiency is:
TDM k frame reservation scheme If k consecutive frame transmissions can be reserved with a
reservation message and if there are M stations, as many as Mk frames can be transmitted in XM(k+v) seconds
Maximum efficiency is:
vv
1
1max XMMX
MX
kXMMkX
MkXvv
1
1max
51
Random Access Reservation Systems
Large number of light traffic stations Dedicating a minislot to each station is inefficient
Slotted ALOHA reservation scheme Stations use slotted Aloha on reservation minislots On average, each reservation takes at least “e” minislot attempts Effective time required for the reservation is 2.71vX The maximum achievable throughput ρmax is given by
If v = 5%, then we have ρmax = 0.88 1 1 + 2.71v
ρmax = =X(1+ev)
X
52
Example: GPRS
General Packet Radio Service (GPRS) in 2G GSM cellular telephone system Packet data service in GSM cellular telephone network GPRS devices, e.g. cell phones or laptops, send packet data over
radio and then to Internet Slotted Aloha MAC protocol is used for making reservations Single and multi-slot reservations can be supported
53
6.3.2 Polling Systems Centralized polling systems: A central controller transmits
polling messages to stations according to a certain order Distributed polling systems: A permit for frame
transmission is passed from station to station according to a certain order
A signaling procedure exists for setting up order
CentralController
Centralized Polling System
The central controller might poll the stations in a round-robin fashion, or according to some pre-determined order
The normal response mode of HDLC, discussed in Chapter 5, was developed for this type of system
54
Inbound line
Outbound lineHost
computer
Stations
Fig. 6.21(a) Polling by central controller over lines
55
6.3.2 Polling Systems Centralized polling systems over radio: A central controller accepts
requests from stations and issues grants to transmit Frequency Division Duplex (FDD): One frequency band for downlink (outbound)
and the other frequency band for uplink (inbound) Time-Division Duplex (TDD): Inbound and outbound transmissions share the
same frequency band but in different time slots
Distributed polling systems: Stations implement a decentralized algorithm to determine transmission order
All stations can receive the transmissions (broadcasting) After a station is done transmitting, it is responsible for sending a polling
message to the next station according to the polling list
CentralController
Fig. 6.21(b) Polling by central controller over radio
Fig. 6.21(c) Polling without central controller
57
Average Cycle Time Assume walk times all equal to t’
Exhaustive Service Duscipline: stations empty their buffers Cycle time = Mt’ + time to empty M station buffers Assume λ/M to be the frame arrival rate at a station NC average number of frames transmitted from a station Time to empty one station buffer, Tstation:
t1 32 4 5 1… M
t’ t’ t’ t’ t’ t’
Tc
,)(
))(()(M
TEXTE
MXNET c
ccstation
Average Cycle Time:
1
)E( )()()(tM
TTEtMTtMTE ccstationc
Xwhere
58
Polling System Options
Service Limits: How many blocks of information is a station allowed to transmit per poll? Exhaustive: until station’s data buffer is empty (including new
frame arrivals) Gated: all data in buffer when poll arrives Frame-Limited: one frame per poll Time-Limited: up to some maximum time
Priority mechanisms More bandwidth & lower delay for stations that appear multiple
times in the polling list Issue polls for stations with message of priority k or higher
59
Efficiency of Polling Systems Exhaustive Service: high throughput and large delay
Cycle time increases as traffic increases, so delays become very large Efficiency:
If walk time per cycle becomes negligible compared to cycle time the system throughput or say system efficiency can approach 100%
c
c
T
tMTEfficiency
Limited Service: relatively, low throughput, small delay The applications which cannot tolerate extremely long delays can adopt
limited service discipline The number of frames transmitted per station is limited This limits the cycle time and hence delay Efficiency of 100% is not possible; The efficiency of a single frame per
poll limited service polling system
60
6.3.3 Token-Passing Rings
Free Token = Poll
Listen mode
DelayInputfromring
Outputto
ring
Ready station looks for free token Flips bit to change free token to busyThe delay is due to processing of the input information
Transmit mode
Delay
To device From device Ready station inserts its frames into the ring
Reinserts free token when done
token
Frame Delimiter is TokenFree = 01111110Busy = 01111111
61
Three Approaches to Token Reinsertion
Ring latency: time required for bit to circulate ring (including interface delay)
Multi-token operation Free token transmitted immediately after the last bit
of data frame This allows several frames to be transmitted in
different parts of the ring Single-token operation
Free token inserted after the last bit of the busy token is received back and the last bit of the frame is transmitted
If frame is longer than ring latency, equivalent to multi-token operation
Simple error recovery by allowing only one token in the ring
Single-Frame operation Free token inserted after the transmitting station has
received the last bit of its frame This allows the transmitting station to check the
return frame for errors before the relinquishing the control of the token
Busy token
Free token
Frame
Idle Fill
Multi-token operation
Single-token operation
Single-frame operation
62
Token Ring Throughput Definition
: ring latency (time required for bit to circulate the ring)
X: maximum frame transmission time allowed per station Multi-token operation
Assume network is fully loaded, and all M stations transmit for X seconds upon the reception of a free token
This is a polling system with limited service time:
,R
Mb
: The total propagation delay around the ringb: the number of bit delays in an interface
63
Single-token operation Effective frame transmission time is maximum of X and ,
therefore
Token Ring Throughput
ρmax = = MX
M(X+ ) +
1 1+a΄(1 + 1/M)
ρmax = =
MX
M max{(X, }+
1
max{1, a΄} + a΄/M
Single-frame operation Effective frame transmission time is X+ ,therefore
64
Token Reinsertion Efficiency Comparison
Max
imum
th
roug
hput
a’
Multiple tokenoperation
0
0.2
0.4
0.6
0.8
1
1.2
0 0.4 0.8 1.2 1.6 2 2.4 2.8 3.2 3.6 4 4.4 4.8
Single frameoperation
M = 50
M = 10
Single tokenoperation
M = 50M = 10
a’ <<1, any token reinsertion strategy acceptable a’ ≈1, single token reinsertion strategy acceptable a’ >1, multi-token reinsertion strategy necessary
65
Application Examples
Single-frame reinsertion IEEE 802.5 Token Ring LAN @ 4 Mbps
Single token reinsertion IBM Token Ring @ 4 Mbps
Multi-token reinsertion IEEE 802.5 and IBM Ring LANs @ 16 Mbps FDDI Ring @ 50 Mbps
All of these LANs incorporate token priority mechanisms
66
6.3.4 Comparison of Scheduling Approaches in Medium Access Control
Reservation On-demand transmission of bursty or steady streams Accommodates large number of low-traffic users with slotted
Aloha reservations Can support QoS provisioning Handles large delay-bandwidth product via delayed grants
Polling Generalization of time-division multiplexing Provides fairness through regular access opportunities Can provide bounds on access delay Performance deteriorates with large delay-bandwidth product
67
6.3.5 Comparison of Random Access and Scheduling Medium Access Controls
Aloha & Slotted Aloha Simple & quick transfer at very low load Accommodates large number of low-traffic bursty users Highly variable delay at moderate loads Efficiency does not depend on a
CSMA-CD Quick transfer and high efficiency for low delay-bandwidth
product Can accommodate large number of bursty users Variable and unpredictable delay
68
Chapter 6Medium Access Control
Protocols and Local Area Networks
6.4 Channelization
69
Why Channelization?
Channelization Semi-static bandwidth allocation of portion of
shared medium to a given user during his data transfer period
Highly efficient for constant-bit rate traffic Preferred approach in
Cellular telephone networks Terrestrial & satellite broadcast radio & TV
70
Why not Channelization? Inflexible in allocation of bandwidth to users with different
requirements Inefficient for bursty traffic Does not scale well to large numbers of users
Average transfer delay increases with number of users M Dynamic MAC algorithms achieve better sharing and much better at
handling bursty traffic
Average delay for TDMA If we divide the transmission medium into M channels that can be allocated to the M users
71
Channelization Approaches
Frequency Division Multiple Access (FDMA) Frequency band allocated to users Broadcast radio & TV, analog cellular phone
Time Division Multiple Access (TDMA) Periodic time slots allocated to users Telephone backbone, 2G GSM digital cellular phone
Code Division Multiple Access (CDMA) Code allocated to users Cellular phones, 3G cellular
72
6.4.1 FDMA Divide the spectrum W into M frequency bands Each station transmits its information continuously on the assigned
bands during the data transfer phase
Each station transmits at most R/M bps Good for stream traffic; Used in connection-oriented systems Inefficient for bursty traffic
Frequency
Guard bands
Time
W
1
2
M
M–1
…
73
6.4.2 TDMA
Dedicate 1 slot per station in transmission cycles Stations transmit data burst at full channel bandwidth
Each station transmits at R bps 1/M of the time Excellent for stream traffic; Used in connection-oriented systems Inefficient for bursty traffic due to unused dedicated slots
1
Time
Guard time
One cycle
12 3 MW
Frequency
...
74
Guardbands
FDMA Frequency bands must be non-overlapping to prevent
interference Guardbands ensure separation; but a kind of overhead
TDMA Stations must be synchronized to common clock Time gaps between transmission bursts from different
stations to prevent collisions; form of overhead Must take into account propagation delays
75
6.4.3 CDMA Code Division Multiple Access
Channels determined by a code used in modulation and demodulation Stations transmit over entire frequency band all of the time!
Time
W
Frequency1
2
3
76
xBinaryinformation
R1 bpsW1 Hz
Unique user binary random
sequence
DigitalModulation
With carrier fc
Radio Antenna
Transmitter from one user
R >> R1bpsW >> W1 Hz
x
CDMA Spread Spectrum Signal
User information mapped into: +1 or -1 for T sec. Multiply user information by pseudo- random binary pattern of G “chips” of +1’s
and -1’s Resulting spread spectrum signal occupies G times more bandwidth: W = GW1
Modulate the spread signal by sinusoid at appropriate carrier fc
77
Signal and residualinterference
Correlate touser binary
random sequence
Signalsfrom all
transmittersDigital
demodulation
Binaryinformation
x x
CDMA Demodulation
Recover the spread spectrum signal Synchronize to and multiply spread signal by same pseudo-random
binary pattern used at the transmitter In absence of other transmitters and noise, we should recover the
original +1 or -1 of user information Other transmitters using different codes appear as residual noise
78
Channelization in Code Space
Each channel uses a different pseudorandom code Codes should have low cross-correlation
If they differ in approximately half the bits, the correlation between codes is close to zero and the effect at the output of each other’s receiver is small
As number of users increases, effect of other users on a given receiver increases as additive noise
CDMA has gradual increase in BER due to noise as number of users is increased
Interference between channels can be eliminated if codes are selected orthogonal and if receivers and transmitters are synchronized Shown in next example
79
Example: CDMA with 3 users Assume three users share same medium Users are synchronized & use different 4-bit orthogonal codes:
{-1,-1,-1,-1}, {-1, +1,-1,+1}, {-1,-1,+1,+1}, {-1,+1,+1,-1},
-1 +1 -1
User 1 x
+1 +1 -1
User 2 x
User 3 x
-1 -1 +1 SharedMedium
+
Receiver
80
Channel 1: 110 -> +1+1-1 -> (-1,-1,-1,-1),(-1,-1,-1,-1),(+1,+1,+1,+1)Channel 2: 010 -> -1+1-1 -> (+1,-1,+1,-1),(-1,+1,-1,+1),(+1,-1,+1,-1)Channel 3: 001 -> -1-1+1 -> (+1,+1,-1,-1),(+1,+1,-1,-1),(-1,-1,+1,+1)Sum Signal: (+1,-1,-1,-3),(-1,+1,-3,-1),(+1,-1,+3,+1)
Channel 1
Channel 2
Channel 3
Sum Signal
Sum signal is input to receiver
81
Example: Receiver for Station 2 Each receiver takes sum signal and multiplies by the
code sequence of desired transmitter Integrate over T seconds to smooth out noise
x
SharedMedium
+
Decoding signal from station 2
Integrate over T sec
a=(a1,a2,…an), b=(b1,b2,…bn)a * b = 0 (if orthogonal)a * a=b * b = n r= -a+b (station A send 0, station B send 1)a * r = -n+0 = -n (station A receive 0)
82
Sum Signal: (+1,-1,-1,-3),(-1,+1,-3,-1),(+1,-1,+3,+1) Channel 2 Sequence:(-1,+1,-1,+1),(-1,+1,-1,+1),(-1,+1,-1,+1)Correlator Output: (-1,-1,+1,-3),(+1,+1,+3,-1),(-1,-1,-3,+1)Integrated Output: -4, +4, -4Binary Output: 0, 1, 0
Sum Signal
Channel 2Sequence
CorrelatorOutput
IntegratorOutput
-4
+4
-4
Decoding at Receiver 2
X
=
6.5 Delay Performance of MAC and Channelization Schemes
We have already discussed the impact of delay-bandwidth product on the maximum throughput that can be achieved by an MAC protocol and by a channelization scheme
This section present performance models for assessing the frame (packet) transfer delay performance
But it is in the scope of queueing theory, which we shall not cover it because of time limitation
83
84
Chapter 6Medium Access Control
Protocols and Local Area Networks
Part II: Local Area NetworksOverview of LANs
Ethernet*Token Ring and FDDI
802.11 Wireless LAN*LAN Bridges
85
Chapter 6Medium Access Control
Protocols and Local Area Networks
6.6 LAN Protocols
86
Local Area Networks (LANs)
Local area means: Private ownership
freedom from regulatory constraints of WANs Short distance (~1km) between computers
low cost very high-speed, reliable, relatively error-free communication Unnecessary complex error control
Need a medium access control protocol Simply give each machine a unique address Broadcast all messages to all machines in the LAN
Most LAN standard has been developed by the IEEE 802 committee, which has been accredited by ANSI The set of standards include CSMA-CD (Ethernet) LAN and
token-passing ring LAN and place LAN within the data link layer of the OSI reference model
87
6.6.1 LAN Structure
RAM
RAMROM
Ethernet Processor
LAN structure can be arranged in a bus, ring, or star topology
Transmission Medium (Cabling System): twisted-pair cable, coaxial cable, or optical fiber, or even wireless
Network Interface Card (NIC): coordinate the transfer of information between the computer and the network, implement the MAC protocol
Unique MAC or “physical” address that is burned into the ROM
88
6.6.2 Medium Access Control Sublayer
In IEEE 802.1, Data Link Layer divided into:
1. Medium Access Control (MAC) Sublayer Execute the MAC protocol to access to the shared physical medium Provide for the connectionless frame transfer of datagrams Usually do not include procedures for error control Accept the block of information from the LLC sublayer or directly from
network layer and construct a PDU that includes source and destination MA addresses as well as a frame check sequence (FCS)
Machines identified by MAC/physical address Broadcast frames with MAC addresses
2. Logical Link Control (LLC) Sublayer Between Network layer & MAC sublayer
89
IEEE 802 LAN Standards
Data linklayer
802.3Ethernet
802.5Token Ring
802.2 Logical link control
Physicallayer
MAC
LLC
802.11Wireless
LAN
Network layer Network layer
Physicallayer
OSIIEEE 802
Various physical layers
OtherLANs
90
6.6.3 The Logical Link Control Layer
PHY
MAC
PHY
MAC
PHY
MAC
Unreliable Datagram Service
PHY
MAC
PHY
MAC
PHY
MAC
Reliable frame service
LLCLLC LLC
A C
A C
IEEE 802.2: LLC enhances service provided by MAC
91
Logical Link Control Services
The LLC builds on the MAC datagram service to provide three HDLC services Type 1: Unacknowledged connectionless service: the most
common one Unnumbered frame mode of HDLC
Type 2: Reliable connection-oriented service Asynchronous balanced mode of HDLC
Type 3: Acknowledged connectionless service
Additional addressing (Source + Destination) A workstation has a single MAC physical address Can simultaneously handle several logical connections for
data exchange in the workstation, distinguished by their SAP (service access points), over the same physical connection.
Source SAP Address Information
1
Control
1 or 2 bytes
Destination SAP Address Source SAP Address
I/G
7 bits1
C/R
7 bits1
I/G = Individual or group addressC/R = Command or response frame
DestinationSAP Address
1 byte
Figure 6.49LLC PDU Structure
LLC PDU Structure
93
IEEE MAC frames
IP
LLC Header
Data
MAC Header
FCS
LLC PDU
IP Packet
94
Chapter 6Medium Access Control
Protocols and Local Area Networks
6.7 Ethernet and IEEE 802.3 LAN Standard
95
A bit of history…
1970 ALOHA radio network deployed in Hawaiian islands 1973 Robert Metcalf and his colleagues invented Ethernet LAN
protocol for connecting workstations 1979 DIX (DEC, Intel, and Xerox) Ethernet Standard for 10 Mbps LAN
based on coaxial cable transmission 1985 IEEE 802.3 LAN Standard (10 Mbps) 1995 Fast Ethernet (100 Mbps) 1998 Gigabit Ethernet 2002 10 Gigabit Ethernet Ethernet is the dominant LAN standard
Metcalf’s Sketch
Problem 6.15 Problem 6.26 Problem 6.31 Problem 6.36 Problem 6.38
96
97
6.7.1 IEEE 802.3 Ethernet Protocol
CSMA/CD for MAC protocol (1-persistent) Reschedule retransmission attempts after collision Truncated binary exponential backoff algorithm
for retransmission n, backoff r mini-slots, where 0 < r < 2k, and k = min (n,10)
Maximum retransmission times: 16 Mini-slot Time: the critical system parameter (see p. 428)
The basis for contention resolution that is required for a station to detect collision, or say to seize control of the channel
The time duration that is at least as big as two propagation delays
98
The Original IEEE 802.3
Transmission Rate: 10 Mbps Maximum Distance: 2500 meters + 4 repeaters Minislot time: 51.2 sec = 512 bits/10 Mbps
51.2 sec x (~3) x105 km/sec =15.0 km, 2 ways for 3 spans
Min Frame Length: 512 bits = 64 bytes
Each x10 increase in bit rate, must be accompanied by x10 decrease in distance
99
6.7.2 IEEE 802.3 MAC Frame Structure
Preamble SDDestination
addressSource address
Length Information Pad FCS
7-octet 1 6 6-octet 2 4
64 - 1518 bytesSynch Startframe
0 Single address
1 Group address
• Preamble for clock synchronization• Start frame delimiter for frame synchronization • The First bit of destination address
• single address• group address• broadcast = 111...111
• The second bit of destination addresses• local or global
• Global addresses• first 24 bits assigned to vendor, called OUI• next 24 bits assigned by vendor• Cisco 00-00-0C• 3Com 02-60-8C
• Pad to ensure the frame length is always at least 64 bytes• FCS is the CCITT 32-bit CRC check covering address, length, information, and pad
0 Local address
1 Global address
802.3 MAC Frame
100
6.7.3 IEEE 802.3 Physical Layer
Fig. 6.55(a) transceiversFig. 6.55(b)
10base5 10base2 10baseT 10baseF
MediumThick coax
10 mm
Thin coax
5 mmTwisted pair Optical fiber
Max. Segment Length 500 m200 m
185 m100 m 2 km
Topology Bus Bus StarPoint-to-point link
Table 6.2 IEEE 802.3 10 Mbps medium alternatives
Thick Coax: Stiff, hard to work withBaseband transmission: Manchester code T-shaped BNC junctions
Attach to NIC
Hubs & Switches!
101
Star Topology of 10 Base-T
Fig. 6.56(a)
The 1st approach using twisted-pair cabling
Single collision domain
Ethernet Hub• Cheap• Easy to work with• Reliable • Star-topology • CSMA-CD
The hub monitors all transmissions from the stations When there is only one transmission, the hub repeats the transmission on the other lines If there is a collision, the hub sends a jamming signal to all the stations The stations are said to be in the same collision domain, a domain where a collision will occur if two or more stations transmit simultaneously The CSMA-CD MAC procedure is applied Notice that the “a“ will become smaller
Ethernet Hub
102
High-Speed backplane or interconnection fabric
Ethernet Switch• Cheap• Bridging increases scalability• Separate collision domains• Full duplex operation
Ethernet Switch
It is a transparent bridging In the switch, the input port buffers incoming transmission frames The incoming frames are examined and transferred to appropriate outgoing port Collision will not occur if only one station is attached to the line; otherwise there is a collision domain if several stations share an input using another hubThe switching LANs provide a means of interconnecting a large numbers of stations without reaching the limit
Fig. 6.56(b)
The 2nd approach using twisted-pair cabling
103
6.7.4 Fast Ethernet
100baseT4 100baseTX 100baseFX
MediumTwisted pair category 3
UTP 4 pairs
Twisted pair category 5
UTP two pairs
Optical fiber multimode
Two strands
Max. Segment Length
100 m 100 m 2 km
Topology Star Star Star
Table 6.4 IEEE 802.3 100 Mbps Ethernet medium alternatives
Same frame format, same interfaces, same protocols to preserve compatibility with 10 Mbps Ethernet
But just to define a set of physical layers that are entirely based on hub (star) topology only involving twisted pair and optical fiber
Category 3 twisted pair (ordinary telephone grade) requires 4 pairs, and the transmission is divided among three of the twisted pairs
Category 5 twisted pair requires 2 pairs (most popular), one for transmission and one for reception
Most prevalent LAN today Two modes of operation: hub and switch
104
6.7.5 Gigabit EthernetTable 6.3 IEEE 802.3 1 Gbps Fast Ethernet medium alternatives
1000baseSX 1000baseLX 1000baseCX 1000baseT
Medium
Optical fiber
multimode
Two strands
Optical fiber
single mode
Two strands
Shielded copper cable
Twisted pair category 5
UTP
Max. Segment Length
550 m 5 km 25 m 100 m
Topology Star Star Star Star
Slot time increased to 512 bytes Small frames need to be extended to 512 B Frame bursting to allow stations to transmit a burst of small frames Frame structure is preserved but operates primarily for the switch mode and
the CSMA-CD is essentially abandoned Extensive deployment in backbone of enterprise data networks and in server
farms
105
6.7.6 10 Gigabit Ethernet
Table 6.5 IEEE 802.3 10 Gbps Ethernet medium alternatives
10GbaseSR 10GBaseLR 10GbaseEW 10GbaseLX4
Medium
Two optical fibersMultimode at 850 nm
64B66B code
Two optical fibersSingle-mode at 1310 nm
64B66B
Two optical fibers Single-mode at 1550 nm
SONET compatibility
Two optical fibers multimode/single-mode with four wavelengths at 1310 nm band8B10B code
Max. Segment Length
300 m 10 km 40 km 300 m – 10 km
Frame structure preserved CSMA-CD protocol officially abandoned LAN PHY for local network applications WAN PHY for wide area interconnection using SONET OC-192c Extensive deployment in metro networks anticipated
106
Server
100 Mbps links
10 Mbps links
ServerServer
Server
100 Mbps links
10 Mbps links
Server
100 Mbps links
10 Mbps links
Server
Gigabit Ethernet links
Gigabit Ethernet links
Server farm
Department A Department B Department C
Hub Hub Hub
Ethernet switch
Ethernet switch
Ethernet switch
Switch/router Switch/router
Typical Ethernet Deployment
107
Chapter 6Medium Access Control
Protocols and Local Area Networks
6.10 Wireless LAN and IEEE 802.11 Standard
108
Wireless Data Communications
Wireless communications compelling Easy, low-cost deployment User mobility & roaming: Access information anywhere Supports personal devices
PDAs, laptops, data-cell-phones Supports communicating devices
Cameras, location devices, wireless identification Signal strength varies in space & time because of fading effect Signal can be captured by snoopers, not secure Spectrum is limited & usually regulated
Wireless LANs Ad hoc LAN Infrastructure LAN with wireless access point (AP)
109
B D
CA
6.10.1 Ad Hoc and Infrastructure Networks
Temporary association of a group of stations Within range of each other Need to exchange information E.g. Presentation in meeting, or distributed computer
game, or both
Fig. 6.65 Ad Hoc network 隨意網路
110
A2 B2
B1A1
AP1
AP2
Distribution SystemServer
Gateway tothe InternetPortal
Portal
BSS A BSS B
Infrastructure Network
Permanent Access Points provide access to Internet
111
A transmits data frame to BBut signal cannot reach C
(a)
Data Frame Data Frame
A
B C
C transmits data frame & collides with A at B
(b)
C senses medium, station A is hidden from C
Data Frame
B
CA
Hidden Terminal Problem
New MAC: CSMA with Collision Avoidance (CSMA-CA)
112
RTS
A requests to send
B
C
(a)
CTS CTS
A
B
C
B announces A ok to send
(b)
Data Frame
A sends
B
C remains quiet
(c)
CSMA with Collision Avoidance
113
IEEE 802.11 Wireless LAN
Stimulated by availability of unlicensed spectrum U.S. Industrial, Scientific, Medical (ISM) bands 902-928 MHz, 2.400-2.4835 GHz, 5.725-5.850 GHz
Targeted wireless LANs @ 20 Mbps MAC for high speed wireless LAN Ad Hoc & Infrastructure networks Variety of physical layers
114
802.11 Architecture
Basic Service Set (BSS) Group of stations that coordinate their access using a given
instance of MAC Located in a Basic Service Area (BSA) Stations in BSS can communicate with each other Uncorrelated BSSs may be colocated
Extended Service Set (ESS) Multiple BSSs interconnected by Distribution System (DS) Each BSS is like a cell and stations in BSS communicate with an
Access Point (AP) Portals attached to DS provide access to Internet
115
A2 B2
B1A1
AP1
AP2
Distribution SystemServer
Gateway tothe InternetPortal
Portal
BSS A BSS B
Infrastructure Network
116
Distribution Services
Stations within BSS can communicate directly with each other
DS provides distribution services: Transfer MAC SDUs between APs in ESS Transfer MSDUs between portals & BSSs in ESS Transfer MSDUs between stations in same BSS
Multicast, broadcast, or stations’s preference
ESS looks like single BSS to LLC layer
117
Infrastructure Services
Select AP and establish association with AP Then can send/receive frames via AP & DS
Reassociation service to move from one AP to another AP
Dissociation service to terminate association Authentication service to establish identity of other
stations Privacy service to keep contents secret
6.10.2 Frame Structure and Addressing
Management frames Station association & disassociation with AP Timing & synchronization Authentication & deauthentication
Control frames Handshaking ACKs during data transfer
Data frames Data transfer
Address2
FrameControl
Duration/ID
Address1
Address3
Sequencecontrol
Address4
Framebody
CRC
2 2 6 6 6 2 6 0-2312 4MAC header (bytes)
Frame Structure
MAC Header: 30 bytes Frame Body: 0-2312 bytes CRC: CCITT-32 4 bytes CRC over MAC
header & frame body
Address2
FrameControl
Duration/ID
Address1
Address3
Sequencecontrol
Address4
Framebody
CRC
Protocolversion
Type SubtypeToDS
FromDS
Morefrag
RetryPwrmgt
Moredata
WEP Rsvd
2 2 6 6 6 2 6 0-2312 4
2 2
MAC header (bytes)
4 1 1 1 1 1 1 1 1
Frame Control (1)
Protocol version = 0 Type: Management (00), Control (01), Data (10) Subtype within frame type Type=00, subtype=association; Type=01, subtype=ACK MoreFrag=1 if another fragment of MSDU to follow
ToDS
FromDS
Address1
Address2
Address3
Address4
0 0Destinationaddress
Sourceaddress
BSSID N/A
0 1Destinationaddress
BSSIDSourceaddress
N/A
1 0 BSSIDSourceaddress
Destinationaddress
N/A
1 1Receiveraddress
Transmitteraddress
Destinationaddress
Sourceaddress
Meaning
Data frame from station to station within a BSS
Data frame exiting the DS
Data frame destined for the DS
WDS frame being distributed from AP to AP
Address2
FrameControl
Duration/ID
Address1
Address3
Sequencecontrol
Address4
Framebody
CRC
Protocolversion
Type SubtypeToDS
FromDS
Morefrag
RetryPwrmgt
Moredata
WEP Rsvd
2 2 6 6 6 2 6 0-2312 4
2 2 4 1 1 1 1 1 1 1 1
To DS = 1 if frame goes to DS; From DS = 1 if frame exiting DS
Frame Control (2)
Address2
FrameControl
Duration/ID
Address1
Address3
Sequencecontrol
Address4
Framebody
CRC
Protocolversion
Type SubtypeToDS
FromDS
Morefrag
RetryPwrmgt
Moredata
WEP Rsvd
2 2 6 6 6 2 6 0-2312 4
2 2
MAC header (bytes)
4 1 1 1 1 1 1 1 1
Frame Control (3)
Retry=1 if mgmt/control frame is a retransmission Power Management used to put station in/out of sleep mode More Data =1 to tell station in power-save mode more data buffered
for it at AP WEP=1 if frame body encrypted
123q
6.10.3 IEEE 802.11 MAC
MAC sublayer responsibilities Channel access PDU addressing, formatting, error checking Fragmentation & reassembly of MAC SDUs
MAC security service options Authentication and privacy mechanisms
MAC management services Roaming within ESS
Power management
124
MAC Services The 802.11 MAC protocol defines the coordination functions that determines when a
station is allowed to transmit and receive. Distributed Coordination Function (DCF): the basic access method, supports for
asynchronous data transfer of MSDUs on a best-effort basis and in a contention mode exclusively
Point Coordination Function (PCF): optional, supports connection-oriented, time-bounded transfer of MSDUs. Under this function, the medium can alternate between contention period (CP), where the stations use the contention mode, and contention-free period (CFP), where the station access is controlled by AP, thereby more efficient.
Physical
Distribution coordination function(CSMA-CA)
Point coordinationfunction
Contention-free service Contention service
MAC
Distributed Coordination Function (DCF)
DCF is the basic access method Asynchronous best-effort data transfer All stations contend for access to medium Based on CSMA-CA protocol. Since collision detection is not possible here, a
random delay time for station access after sensing the channel busy is designed This approach reduces the likelihood of simultaneous attempts
Ready stations wait for completion of transmission (channel busy) Moreover, All stations are obliged to remain quite for a certain minimum period
after a transmission has been completed. Called the Interframe Space (IFS) The length of IFS is endowed with the priority of frame transmission. There are
SIFS, PIFS, and CIFS (see page 455)
DIFS
DIFS
PIFS
SIFS
Contentionwindow
Next frame
Defer access Wait for reattempt time
Time
Busy medium
Priorities through Interframe Spacing
High-Priority frames wait Short IFS (SIFS) Typically to complete exchange in progress ACKs, CTS, data frames of segmented MSDU, etc.
PCF IFS (PIFS) to initiate Contention-Free Periods DCF IFS (DIFS) to transmit data & MPDUs
DIFS
DIFS
PIFS
SIFS
Contention Window (CW):The idle period after DIFS period
Next frame
Defer access Backoff time; Wait for reattempt
Time
Busy medium
Fig. 6.69 Basic CSMA-CA operation
Contention Window
Basic CSMA-CA Operation (Fig. 6.69)
A ready station is allowed to transmit an initial MPDU under the DCF method if channel is still idle after a DIFS period or greater
If the station detects the medium busy, then the station must calculate a random backoff time to schedule a reattempt Backoff period is an integer number of idle contention time slots
The station monitors the medium and decrements backoff timer each time an idle contention slot transpires The station is allowed to transmit when its backoff timer expires
during the contention period If another station transmits during the contention period before the given
station, then the backoff procedure is suspended and resumed the next time the contention period takes places
A station that successfully completes a frame transmission is not allowed to transmit immediately. It must first perform a backoff procedure
Fairness of the CSMA-CA protocol
RTS20 bytes
CTS14 bytes CTS
Data Frame2300 bytes
A requests to send
BC
A
A sends
B
B
C
C knows that A has been given permission to send and remains quiet
B announces A ok to send
(a)
(b)
(c)
ACK
B(d)
ACK
B responses with ACKIf no error
C
C
A
A
A
Fig. 6.70 CSMA-CA Protocol
Carrier Sensing in 802.11 Carrier sensing at both air interface and MAC sublayer Physical Carrier Sensing at air interface
Detects the presence of other stations by analyzing all detected frames Detects activity in the channel via relative signal strength from other
sources
Virtual Carrier Sensing at MAC sublayer Source station informs other stations in the BSS of how long (in sec)
will be utilized for the successful transmission of an MPDU The source station sets the Duration field in the MAC header of data
frame or in RTS & CTS control frames Stations detecting the duration field in a transmitted MSDU adjust their
network allocation vector (NAV), which indicates the amount of time that must elapse until the current transmission is complete and the channel can be samples again for idle status
Channel is marked busy if either the physical or virtual carrier sensing mechanism indicates that the channel is busy
Data FrameDIFS
SIFS
Defer AccessWait for Reattempt Time
ACK
DIFS
NAV
Source
Destination
Other
Transmission of MPDU without RTS/CTS
NAV=Data Frame+SIFS+ACK
The duration field in the data frame lets all other stations know how long the medium will be busy
Data
SIFS
Defer access
Ack
DIFSNAV (RTS)
Source
Destination
Other
RTSDIFS
SIFSCTS
SIFS
NAV (CTS)
NAV (Data)
Transmission of MPDU with RTS/CTS
Collision Avoidance of CSMA-CA
Collision Avoidance If a station with a frame to transmit initially senses the channel to be busy, it
waits until channel becomes idle for DIFS period and then computes a random backoff time (in units of time slot. For IEEE 802.11, time is slotted that corresponds to Slot_Time.)
Stations decrement their backoff timer until the medium becomes busy again or the timer reaches zero; the station freezes its timer when the channel is busy
The station transmits its frame when the backoff timer expires. If two or more stations decrement to zero at the same time, collision will occur and each station will generate a new backoff time in the range interval that is twice longer than the previous one, which grows exponentially
Receiving stations will send ACK if no error by CRC The sending station interprets no reception of ACK as a loss of frame The sending station executes the backoff procedure and then reschedule a
retransmission attempt Receiving stations use sequence numbers to identify duplicate frames
Point Coordination Function PCF is an optional capability to provide connection-
oriented, contention-free services by enabling polled station to transmit without contending for the channel
Point coordinator (PC) in AP performs the PCF function, and the stations within the BSS that are capable of operating in the CFP are known as the CF-aware stations
Polling table are maintained in the PC of AP The PCF coexist with the DCF and logically sits on the top
of the DCF The CFP repetition interval (CFP_Rate) determines the frequency
with which the PCF occurs The CFP repetition interval is initiated by beacon frame transmitted
by PC in AP Within the repetition interval, a portion of time is allocated to
contention-free traffic and the remainder for contention-based traffic The maximum size of CFP is CFP_Max_Duration
CF End
NAV
PIFS
B D1 + Poll
SIFS
U 1 + ACK
D2+Ack+Poll
SIFS SIFS
U 2 + ACK
SIFS SIFS
CFP repetition interval
Contention period
CFP_Max_duration
Reset NAV
D1, D2 = frame sent by point coordinatorU1, U2 = frame sent by polled stationTBTT = target beacon transmission timeB = beacon frame
TBTT
PCF Frame Transfer
Contention-free period
1.The CFP repetition interval is initiated by beacon frame transmitted by PC in AP2. Within the repetition interval, a portion of timeis allocated to contention-free traffic and the remainder for contention-based traffic3. The maximum size of CFP is CFP_Max_Duration
4.During the CFP, stations may transmit only to respond a poll from the PCOr to transmit acknowledgement
Physicallayer
LLC
Physical layerconvergenceprocedure
Physical mediumdependent
MAClayer
PLCPpreamble
LLC PDU
MAC SDUMACheader
CRC
PLCPheader PLCP PDU
6.10.4 Physical Layers
The IEEE 802.11 LAN has several physical layer defined to operate with its MAC layer
The physical layer convergence procedure (PLCP) sublayer maps the MPDU into a format suitable for transmission and reception over a given physical medium
The physical medium dependent (PMD) sublayer is concerned with the characteristic and methods for transmitting over the wireless medium
PLCP Preamble and PLCP Header
The PLCP frame consists of three parts The first part is a preamble that provides synchronization and
start-of-frame information The second part is a PLCP header that provides transmission bit
rate and other initialization information as well as frame-length information and a CRC
The third part consists of the MPDU possibly modified (scrambled) to meet the requirement of the transmission system
The specific structure of PLCP depends on the particular physical layer definition
136
137
IEEE 802.11 Physical Layer Options
Frequency Band
Bit Rate Modulation Scheme
802.11 2.4 GHz 1-2 Mbps Frequency-Hopping Spread Spectrum, Direct Sequence Spread Spectrum
802.11b 2.4 GHz 11 Mbps Complementary Code Keying & QPSK
802.11g 2.4 GHz 54 Mbps Orthogonal Frequency Division Multiplexing
& CCK for backward compatibility with 802.11b
802.11a 5-6 GHz 54 Mbps Orthogonal Frequency Division Multiplexing
138
Chapter 6Medium Access Control
Protocols and Local Area Networks
6.11 LAN Bridges and
Ethernet Switches
139
Hub
Station Station Station
Two TwistedPairs
Hubs, Bridges, Routers & Gateway
Hub: Active central element in a star topology Twisted Pair: inexpensive, easy to install Simple repeater in Ethernet LANs “Intelligent hub”: fault isolation, net configuration, statistics Requirements that arise:
Hub
Station Station Station
Two TwistedPairs
User community grows, need to interconnect hubs
?
Hubs are for different types of LANs
Hub
140
Hub
Station Station Station
Two TwistedPairs
Hubs, Bridges, Routers & Gateway Interconnecting Hubs
Repeater: Signal regeneration All traffic appears in both LANs
Bridge: interconnect at MAC or data link layer MAC address filtering
Routers: interconnect at network layer Internet routing
Gateway: interconnect at higher layer Protocol conversion and security functions
Hub
Station Station Station
Two TwistedPairs
?
HigherScalability
141
Operation at data link level implies capability to work with multiple network layers
However, must deal with Difference in MAC formats Difference in data rates; buffering; timers Difference in maximum frame length
PHY
MAC
LLC
Network Network
PHY
MAC
LLC
802.3 802.3 802.5 802.5
802.3
802.3
802.3 802.5
802.5
802.5
CSMA/CD Token Ring
General Bridge Issues
142
Bridge
Network
Physical
Network
LLC
PhysicalPhysicalPhysical
LLC
MAC MACMAC MAC
Bridges of Same Type
Common case involves LANs of same type Bridging is done at MAC level
143
Interconnection of IEEE LANs with complete transparency
Use table lookup, and discard frame, if source &
destination in same LAN forward frame, if source &
destination in different LAN use flooding, if destination
unknown Use backward learning to build
table observe source address of
arriving LANs handle topology changes by
removing old entries
Transparent Bridges
Bridge
S1 S2
S4
S3
S5 S6
LAN1
LAN2
144
B1
S1 S2
B2
S3 S4 S5
Port 1 Port 2 Port 1 Port 2
LAN1 LAN2 LAN3
Address Port Address Port
Forwarding Table Forwarding Table
145
B1
S1 S2
B2
S3 S4 S5
Port 1 Port 2 Port 1 Port 2
LAN1 LAN2 LAN3
Address Port
S1 1
Address Port
S1 1
S1→S5
S1 to S5 S1 to S5 S1 to S5 S1 to S5
146
B1
S1 S2
B2
S3 S4 S5
Port 1 Port 2 Port 1 Port 2
LAN1 LAN2 LAN3
Address Port
S1 1S3 1
Address Port
S1 1S3 2
S3→S2
S3S2S3S2 S3S2
S3S2 S3S2
147
B1
S1 S2
B2
S3 S4 S5
Port 1 Port 2 Port 1 Port 2
LAN1 LAN2 LAN3
S4 S3
Address Port
S1 1S3 2
S4 2
Address Port
S1 1S3 1
S4 2
S4S3
S4S3S4S3
S4S3
148
B1
S1 S2
B2
S3 S4 S5
Port 1 Port 2 Port 1 Port 2
LAN1 LAN2 LAN3
Address Port
S1 1S3 2
S4 2
S2 1
Address Port
S1 1S3 1
S4 2
S2S1
S2S1
S2S1
149
Adaptive Learning
In a static network, tables eventually store all addresses & learning stops
In practice, stations are added & moved all the time Introduce timer (minutes) to age each entry &
force it to be relearned periodically If frame arrives on port that differs from frame
address & port in table, update immediately
150
Avoiding LoopsLAN1
LAN2
LAN3
B1 B2
B3
B4
B5
LAN4
(1)
(2)
(1)
151
Spanning Tree Algorithm1. Select a root bridge among all the bridges.
• root bridge = the lowest bridge ID.
2. Determine the root port for each bridge except the root bridge
• root port = port with the least-cost path to the root bridge
3. Select a designated bridge for each LAN• designated bridge = bridge has least-cost path from the LAN
to the root bridge. • designated port connects the LAN and the designated bridge
4. All root ports and all designated ports are placed into a “forwarding” state. These are the only ports that are allowed to forward frames. The other ports are placed into a “blocking” state.
152
LAN1
LAN2
LAN3
B1 B2
B3
B4
B5
LAN4
(1)
(2)
(1)
(1)
(1)
(1)
(2)
(2)
(2)
(2)
(3)
153
LAN1
LAN2
LAN3
B1 B2
B3
B4
B5
LAN4
(1)
(2)
(1)
(1)
(1)
(1)
(2)
(2)
(2)
(2)
(3)
Bridge 1 selected as root bridge
154
LAN1
LAN2
LAN3
B1 B2
B3
B4
B5
LAN4
(1)
(2)
(1)
(1)
(1)
(1)
(2)
(2)
(2)
(2)
(3)
Root port selected for every bridge except root port
R
R
R
R
155
LAN1
LAN2
LAN3
B1 B2
B3
B4
B5
LAN4
(1)
(2)
(1)
(1)
(1)
(1)
(2)
(2)
(2)
(2)
(3)
Select designated bridge for each LAN
R
R
R
R
D
D
D D
156
LAN1
LAN2
LAN3
B1 B2
B3
B4
B5
LAN4
(1)
(2)
(1)
(1)
(1)
(1)
(2)
(2)
(2)
(2)
(3)
All root ports & designated ports put in forwarding state
R
R
R
R
D
D
D DLAN1
LAN3 LAN4LAN2
B3B1 B3
B2,B4 and B5 are disabled !
157
Source Routing Bridges
To interconnect IEEE 802.5 token rings Each source station determines route to
destination Routing information inserted in frame
Routingcontrol
Route 1designator
Route 2designator
Route mdesignator
Destinationaddress
Sourceaddress
Routinginformation
Data FCS
2 bytes 2 bytes 2 bytes 2 bytes
158
Route Discovery
To discover route to a destination each station broadcasts a single-route broadcast frame
Frame visits every LAN once & eventually reaches destination
Destination sends all-routes broadcast frame which generates all routes back to source
Source collects routes & picks best
159
B4
B6
B3 B7LAN 1
B1
B2
S1S2
S3
B5
LAN 2 LAN 4
LAN 3 LAN 5
Find routes from S1 to S3
LAN1 B1
B3
B4
LAN3 B6 LAN5
LAN4
LAN2
160
B4
B6
B3 B7LAN 1
B1
B2
S1S2
S3
B5
LAN 2 LAN 4
LAN 3 LAN 5
LAN5
B6
B7
LAN3
LAN4
B2
B3
B5
LAN1 B1 LAN2B3
B4 LAN4 B5B7
LAN2B1
B4
LAN1 B2
LAN4 B5B7
LAN4 B4
B7
LAN2 B1B3
LAN1 B2
B4
B5
LAN2B1
B3 LAN3B2B5B6
LAN1 B1
LAN1
B2 LAN3B3B5B6
LAN3 B3
B2
B6
LAN1
LAN2
B1 LAN2B3B4
B1B4
LAN1 B2
161
Physical
partition
Logical partition
Bridge
or
switch
VLAN 1 VLAN 2 VLAN 3
S17
2 3 4 5 61
8
9 Floor n – 1
Floor n
Floor n + 1
S2
S3
S4
S5
S6
S7
S8
S9
Virtual LAN
162
Logical partition
Bridge
or
switch
VLAN 1 VLAN 2 VLAN 3
S17
2 3 4 5 61
8
9 Floor n – 1
Floor n
Floor n + 1
S2
S3
S4
S5
S6
S7
S8
S9
Per-Port VLANs
Bridge only forwards frames to outgoing ports associated with same VLAN
163
Tagged VLANs
More flexible than Port-based VLANs Insert VLAN tag after source MAC address in
each frame VLAN protocol ID + tag
VLAN-aware bridge forwards frames to outgoing ports according to VLAN ID
VLAN ID can be associated with a port statically through configuration or dynamically through bridge learning
IEEE 802.1q
164
Home Work
6.1 (10%), 6.6 (10%), 6.8 (10%) 6.10 (20%), 6.13 (20%)