SESSION 6 SESSION 6. LAN AND MAC PROTOCOLS

Dongsoo S. Kim ([email protected])
http://www.ece.iupui.edu/~dskim/
Electrical and Computer Engineering
Indiana U. Purdue U. Indianapolis
SESSION 6.
SESSION 6
LAN AND MAC PROTOCOLS
Introduction
ƒ Switched network
à
à
à
Interconnect users with transmission lines, multiplexers, switches
R i bl di
Routing tables to direct the packets from source to destination
h k f
d i i
Hierarchical addressing scheme
ƒ Broadcast network
à
à
à
à
à
Much simpler than the switched network
All information is received by all users
No need of routing
A simple flat addressing scheme is enough
Require a medium access control
‚ To decide turns when each host can talk
ƒ Choice of networks in Local Area Network
à
à
Low‐cost and simple
Mostly based on the broadcast approach
6-2
1
Multiple Access Communication
ƒ M stations share a single transmission medium
à
The transmission medium is broadcast
All station can hear what the medium is carrying
à When 2+ stations transmit simultaneously, their signals collide and interfere with each other
à
ƒ Sharing the medium
à
Channelization scheme: a static and collision‐free sharing
‚ Partition the medium into channels and allocate dedicated channels to a particular user
‚ Suitable to real‐time because of the guaranteed resources
S it bl t l ti b
f th t d à
Medium access control scheme: a dynamic sharing on need‐based
‚ Must achieve a reasonable utilization of the medium
‚ Suitable to a bursty traffic
‚ Random access or scheduling access
6-3
Examples of Multiple Access, 1
ƒ Satellite communication
à Uplink frequency – for transmitting to the satellite
à Downlink frequency – for transmitting to ground stations
ƒ Cellular telephony
à Two frequencies to each mobile user – inbound/outbound channel
ƒ Multidrop telephone line – channel sharing in wired
à A central host computer uses outbound line to broadcast information
à Inbound line is shared by many terminals.
ƒ Cable networks
à Outbound is shared by multiple content channels
à Inbound is shared for control channels
6-4
2
Examples of Multiple Access, 2
ƒ
Multi‐tapped bus
à
Users transmit a signal in both direction, so all stations can listen and extract transmissions destined to them
à If 2+ stations transmit simultaneously, the signal is garbled. Need to coordinate access to the medium
à Eg) IEEE 802.3 (Ethernet), IEEE 802.4 (Token‐bus)
ƒ
Ring networks à
A packet is created by any station, and all stations can monitor the passing signal and extract packets destined to them
à Question: Who will remove the packet from the ring?
à Eg) IEEE 802.5 (Token‐ring)
ƒ
Unlicensed wireless communication
à
à
à
Wireless LAN, cordless phone, bluetooth
Small coverage, but need some level of QoS control
Can use either techniques
‚ Channelization – eg) frequency‐hopping for IEEE 802.11
‚ MAC – eg) ad hoc wireless LAN for IEEE 802.11
6-5
Local Area Networks, 1
ƒ Environment and requirement
à
à
à
Short distance, High‐speed, Low cost
Question: Do you prefer a long frame or a short frame?
Question: Do you prefer a switched or a broadcast network?
ƒ Standards
à
à
à
à
à
à
à
à
IEEE 802.1 – Introduction
Network Layer
IEEE 802.2 – Logical Link Control (LLC) 802.2 LLC
IEEE 802.3 – CSMA/CD (Ethernet) from Xerox
802.3
802.4
802.5
CSMA/CD Token bus Token ring
IEEE 802.4 – Token bus from GM
IEEE 802.5 – Token ring from IBM
Physical Layer
IEEE 802.11 – Wireless LAN
IEEE 802.15 – Bluetooth, Zigbee
IEEE 802.16 – Wireless Metropolitan Area Networks
802.11
Wireless
6-6
3
Local Area Networks, 2
ƒ Topology – bus, ring or star
ƒ Definition of physical layer –
p y
y
connectors, maximum cable length, ,
g ,
digital transmission system, modulation, line encoding, transmission speed
ƒ Network interface card (NIC)
à
Expansion slot, embedded into system, PCMCIA, USB
Parallel communication to the system
à Serial communication to the cable (sort‐of, some exception for high‐
speed LAN’s)
à Parallel‐to‐serial conversion or vice versa
à Physical address
à
‚ Correction: Some devices allow user to change the physical address. Moreover, it doesn’t need to be globally unique as long as it is unique within a LAN. (pp. 423)
6-7
MAC Sublayer
ƒ Deals with the coordination of the access to the shared medium
à Decides when it transmits the frames into the shared medium
à Performs recovery for a garbled frame
ƒ Provide unreliable connectionless transfer of datagram
d
t
ƒ Rely on relatively error‐free transmission
à No error control
6-8
4
LLC Sublayer
ƒ Enhances the datagram service
ƒ Provides a bridge capability to exchange frames b/w two different MAC g
p
y
g
/
protocols
ƒ Provides an encapsulation of data link layer to the network layer
à
Supports IP, IPX and SNAP at the same time within a LAN by using SAP
Destination
SAP addr
1 byte
Source
SAP addr
1 byte
Control
1 or 2 byte
IP or other
LLC
header
Command
/Response
Individual/
group access
MAC
Header
DATA
DATA
CRC
6-9
Medium Access Protocols
ƒ Random Access
à
à
à
ALOHA
Sl
Slotted ALOHA
d ALOHA
Carrier Sensing Multiple Access (CSMA)
‚ 1‐Persistent
‚ Non‐Persistent
‚ P‐Persistent
à
CSMA with Collision Detection (CSMA/CD)
ƒ Contention‐Free Protocols (scheduled access)
à
à
à
à
à
Bit‐map protocol
Binary countdown
Limited‐contention protocol
Adaptive tree walk protocol
Token passing protocol
6-10
5
ALOHA, 1
ƒ History
à
à
University of Hawaii, 1970’s
N d i
Need to interconnect terminals at campuses on different islands
i l diff
i l d
ƒ Very simple radio transmission
ƒ Method
à
à
Each station transmit messages as soon as they are ready
If the packet is collide with others, the station can detect the collision and retransmit the messages after waiting a random amount of time
à Note
‚ The station simply transmit a message whenever it has a request from the upper layer, without monitoring the channel beforehand. ‚ Once it starts transmitting a packet, it completes the transmission without monitoring the channel
‚ But, it can detect the collision
à
Question: Why should the station wait a random time?
6-11
ALOHA, 2
ƒ Random waiting time
à If two or more stations use the same time‐out value, ,
they will try to retransmit them at the same time, and the retransmission will also collide
à Spread out the retransmission and reduce the probability of additional collisions
ƒ Analysis
L
Fixed frame size
R
Bandwidth
L/R
Frame time
S
Arrival rate of new packet. The # of packet for L/R
seconds. All new packet eventually pass through the
channel. So, S is the throughput of the system.
G
The total load including new packets and retransmitted
packets. The # of packets for L/R seconds.
6-12
6
ALOHA, 3
time
My packet
Your packet
Your packet
Vulnerable period
ƒ
ƒ
Vulnerable period = 2 L/R
Packet (re)transmission has Poisson distribution
à
Average number of arrivals for 2 L/R seconds = 2G
( 2G ) k − 2G
e , k transmission in 2 L/R seconds
k!
S = G ⋅ P[no collision] = G ⋅ P[0]
P[k ] =
=G
(2G ) 0 − 2G
e = Ge − 2G
0!
6-13
ALOHA, 4
dS/dG=e-2G(1-2G)
Smax=1/2e=0.184
=1/2e=0 184 at G=.5
G= 5
0.4
S
0.35
S=Ge-2G
0.3
0.25
0.2
0.184
0.15
0.1
0.05
8
4
2
1
0.5
0.25
0.125
0.0625
0.03125
0.01563
0
G
6-14
7
Slotted ALOHA, 1
ƒ Improve the ALOHA by reducing the collision probability
à Synchronize all stations with master clock
S h i ll t ti ith t l k
à Each station is allowed to start transmission only at the beginning of a time slot
à The vulnerable period is L/R, that is half of the pure ALOHA
G k −G
e , k transmission in L/R seconds
k!
S = G ⋅ P[no collision] = G ⋅ P[0]
P[k ] =
=G
G 0 −G
e = Ge −G
0!
dS
= e −G (1 − G )
dG
S max = 1 / e = 0.368, at G = 1
6-15
S (tthroughput per frame tim
me)
Slotted ALOHA, 2
0.4
0.368
0 35
0.35
Slotted ALOHA: S=Ge-G
0.3
0.25
0.184
0.2
0.15
Pure ALOHA: S=Ge-2G
0.1
0.05
0
0.0
0.5
1.0
1.5
2.0
2.5
3.0
G (attempts per packet time)
6-16
8
CSMA, 1
ƒ Avoid collision
à
à
à
à
à
à
Improve the ALOHA by avoiding transmissions that are certain to cause collisions
Sense the medium before a station transmits a frame. Transmit a packet only if the channel is idle
All stations are able to determine if there is a transmission within tprop
The vulnerable period becomes the propagation delay, but not a packet time
Question: What if the channel is busy?
Station
St
ti A b
begins
i
transmission at t=0
Station A captures
Channel at t=tprop
A
A
6-17
CSMA, 2
ƒ 1‐Persistent
à
à
à
If the channel is busy, the station continuously sense the channel. A As soon as the channel is sensed idle, the station transmits the packet
h h
l i d idl h i i h k
If 2+ station were waiting, a collision will happen
ƒ Non‐Persistent
à
If the channel is busy, the station reschedule a future sensing time by using random backoff algorithm.
ƒ p‐Persistent
à
à
If the channel is busy, the station persists with sensing
If the channel becomes idle the station transmits its packet with If the channel becomes idle, the station transmits its packet with probability p, it waits another propagation delay with probability 1‐p
à Try to spread the transmission of the waiting stations, so reduce the possibility of collision after the busy channel ƒ Note that collisions involve an entire packet time, once there is a collision
6-18
9
Performance of CSMA Protocols
Non-persistent
1.0
0.01-persistent
0.8
0.6
0.5-persistent
0.1-persistent
1-persistent
0.4
Slotted ALOHA
02
0.2
ALOHA
1
2
3
4
5
6-19
CSMA‐CD, 1
ƒ What if a station can determine whether its frame is collided?
à
Stop the transmission when a collision is detected. So, reduce the wasted bandwidth
ƒ How it works à
à
Station A starts transmitting a frame at t=0
The frame reaches the station B at t=τ
‚ If no other station starts transmission until this time, A captures the channel
‚ If station B starts transmission just before this time, station A doesn’t know the collision until t=2τ
A begins to
transmit at
t=0
A
B
A
B
A detects
collision at
A
B
B begins to
transmit at t=τ-δ
B detects collision
at t= τ
t= 2 τ-δ
6-20
10
CSMA‐CD, 2
ƒ How it works, continued
à
à
A station senses the channel and transmits if it is idle
If the channel is busy, ‚ Persist with sensing (1‐persistent), or
‚ Backoff (non‐persistent), or
‚ Persist and transmit with probability p (p‐persistent)
à
If a collision is detected, transmit a short jamming signal to make sure the collision
à Three states of channel
‚ Busy – transmitting a frame
‚ Idle
‚ Contention – colliding with other frame
ƒ Question: If the frame time is smaller than 2τ, what will be happened?
contentions
frame
frame
frame
6-21
CSMA‐CD, 3
A begins to
transmit at
t=0
A
B
A
B
A detects
collision at
A
B
B begins to
transmit at t<τ
t< 2 τ
Is this collision
involved with my
f
frame
or not?
t?
ƒ The frame time must be at least 2τ so that station A can distinguish the collision is with its frame or not
6-22
11
CSMA‐CD, 4
contentions
frame
frame
frame
ƒ Probability of success
à
à
à
For a contention minislot, each station transmit with prob. p
Psuccess=np(1‐p)n‐1
Psuccess has a maximum 1/e at p=1/n
ƒ P[j minislots in a contention period]=(1‐Psuccess)jPsuccess
ƒ Expected number of minislots E[J]
∞
max
max
)i Psuccess
E[ J ] = ∑ i (1 − Psuccess
=
i =0
max
1 − Psuccess
max
Psuccess
Expected number of trials until a successful frame:
E[N]=E[J]+1=1/Psuccess=e=2.718
6-23
CSMA‐CD, 5
Performance
E[ X ]
1
=
,
E[ X ] + τ + 2eτ 1 + (2e + 1)a
where a = τ/E[X]
ρ max =
ƒ The smaller a, the more efficient network
à Small propagation delay, ie. Short distance
à Large frame time
‚ Low speed
‚ Large frame size
6-24
12
Contention‐Free Protocols (Scheduled access)
ƒ Stations schedule their medium access prior to real transmission
à
Produce an ordered access to medium
ƒ Pros
à
à
No waste of bandwidth due to collision
Capable of controlling Quality‐of‐Service
ƒ Cons
à
à
Data communication is random in nature
Complicated
ƒ Example
à
Reservation: bit‐map protocols, Polling : binary countdown, limited contention, adaptive tree walk
à Token passing
à
6-25
Bit‐map protocol
ƒ A variable length frame consists of à
à
a reservation interval and data transmissions
ƒ The reservation interval consists of n minislots, one for each station
à
à
Each station use its minislot to indicate whether it has a packet or not.
By listening the minislot, all stations know other station’s intention and decide the order packet transmission
ƒ It is an asymmetric protocol
Reservation
Interval
10110001
D0
D2
One frame
D3
D7
00000010
D6
One frame
6-26
13
Bit‐map protocol, Efficiency
ƒ Assumption
à Maximum throughputs –
M i
h
h
every stations have i h packets
à size of minislot=m, number of station=n
ƒ The smaller v, the more throughput
S=
n × E[ X ]
1
=
, where v = m/E[X]
n × ( E[ X ] + m ) 1 + v
à “v” is proportional to the propagation delay
6-27
Binary Countdown
ƒ Problem in the bit‐map protocol
à The overhead is 1‐bit per stations
Th h d i bit t ti
ƒ Binary Countdown
à A station broadcasts its address as a binary bit string, starting with the high‐order bit.
à Assume that all addresses are the same length.
à The bits in each address position from different stations are Boolean Ored together. 6-28
14
Binary Countdown, Arbitration
ƒ To avoid conflicts, à As soon as a station sees that a high‐order bit position that is 0 in As soon as a station sees that a high order bit position that is 0 in its address has been overwritten with a 1, the station gives up. Bit Time
Station 2
0010
0---
Station 4
0100
0---
Station 9
1001
100-
Station 10
1010
1010
Result
1010
Station 2 and 4 give up
Station 9 gives up
6-29
Binary Countdown, Performance
ƒ Efficiency:
à The number of stations: n
Th b f t ti
à The frame size: d‐bit
à Efficiency : d/(d+log2n)
ƒ Fairness? à High numbered stations have preference over low numbered stations
à Virtual station number
‚ A station change its ID to a lowest number once it successfully transmits. 6-30
15
Adaptive Tree Walk Protocol (ATW)
ƒ Procedure
à Stations are logically considered as g
y
leaves of a binary tree. à After a successful TX , all stations are allowed to try to acquire the channel. (slot 0)
à If there is only one such station, fine. à If there is a collision,
‚ Only stations under node 2 may compete during slot 1
‚ If no collision during slot 1, the slot following the frame will be reserved for the stations under node 3
‚ If collision during slot 1, recursively apply this process for node 4. 1
2
4
3
5
A B C D
6
7
E F G H
6-31
ATW, Improvement
ƒ For heavy traffic, à
it is worthless to start the process from the root, because it will p
,
cause a collision all the time.
à For the same argument, node 2 and 3 can be skipped as well. à What is the proper level to start with for maximizing the efficiency? ƒ Probe skipping.
à Assume that node 1 has a collision. à So, it will probe node 2. Assume that it turns out that node 2 is idle. à Then, it is very sure that node 3 will have a collision. So, don’t need to probe node 3. Instead, skip to node 6 and 7. 6-32
16
Polling
ƒ Central control
à The central controller polls its client stations using a certain resource for outbound message, and stations share a different resource for the inbound message
à Frequency division duplex (FDD), time division duplex (TDD)
ƒ Distributive control
à Each station has “polling order list”
à After a station is done transmitting, it is responsible for transferring a polling message to the next station in the polling list
6-33
Token passing protocol, 1
ƒ
ƒ
Interface connected by point‐to‐point transmission line
M d f i t f
Modes of interface
à
Listen mode – reproduce each bit received at its input to its output after some constant delay (usually 1‐bit delay)
‚ To monitor the destination address. Once it detects the address, the packet is copied to the station
‚ To monitor a free‐token. If the station has a frame to send, the interface changes the token to a busy‐token. The station is then changed to the transmit mode à
Transmit mode – transmit a packet from the station
Listen Mode
Input from
ring
Transmit mode
Output to
ring
To Station
From Station
Input from
ring
Output to
ring
To Station
From Station
6-34
17
Ring and Packet at token ring
ƒ Relation of ring latency and packet time
à If ring < packet time,
g p
,
‚ A station receives its own packet at the input line. So, the packet can be discarded.
à If ring > packet time
‚ Possible to present more than one packet simultaneously
‚ But, the station is in the transmit mode. So, it must buffer the packet for later transmission
ƒ Removal of Packet
à The destination station removes the packet
‚ Question: How can it handle the multicast?
à The source station removes the packet
‚ Use the packet as an indication of acknowledgement
6-35
Operation of token ring
ƒ Multitoken operation
à
A free token is transmitted immediately after the last bit of the data packet
Several packets may be in transit
à Question: How many tokens do we need to have in the ring? Especially, after many short packets, the ring will contain many tokens
à
ƒ Single token
à
à
A free token is transmitted after receiving back the last bit of the busy token
If the packet time is longer than the ring latency, the free token is inserted immediately after the last bit of the packet (identical to the multitoken)
ƒ Single packet
à
A free token is inserted after the station receives the last bit of its packet. The station can check an error in transmission before giving up the token
ƒ Efficiency
à
Multitoken ≥ single token > single packet
6-36
18
Token hold time
ƒ Limit on the time that a station can transmit at a time
ƒ Methods
à Unlimited token holding
‚ Minimized delay, but unbounded on two consecutive tokens
à Enforce the number of packet that can be E f
th b f k t th t b transmitted for each token
ƒ Question: Which station will insert the very first token?
6-37
Efficiency of token ring
Parameters
τ = propagation delay
b = the number of bit delays in an interface
M = the number of stations
R = transmission speed
L = mean packet size
E[X] = mean packet time = L/R
τ ' = effective propagation delay
Mb
=τ+
R
Multitoken protocol
ρ max =
ME[ X ]
1
=
ME[ X ] + τ ' 1 + τ ' / ME[ X ]
Single token protocol
ME[ X ]
M max{E[ X ],τ '} + τ '
1
=
max{1,τ ' / E[ X ]} + τ ' / ME[ X ]
ρ max =
Single packet protocol
ρ max =
ME[ X ]
1
=
M ( E[ X ] + τ ' ) + τ ' 1 + (1 + M −1 )τ ' / E[ X ]
6-38
19
Efficiency of token ring, 2
1.2
M=50
Maximum Throughput
1
Multiple Token
Operation
M=10
0.8
M=50
M=10
0.6
0.4
Single Packet
Operation
0.2
Single Token
Operation
0
0
0.4 0.8 1.2 1.6
2
2.4 2.8 3.2 3.6
4
4.4 4.8
τ ′/E[X]
6-39
Performance of token ring
Parameters
E[C ] = mean token cycle time
E[ N ] = average number of messages of a station
λ = arrival rate of M stations
E[ N ] = (λ / M ) E[C ], Little' s formula
E[C ] = ME[ N ]E[ X ] + τ '
⎧λ
⎫
= M ⎨ E[C ]E[ X ]⎬ + τ '
⎩M
⎭
τ'
τ'
E[C ] =
=
1 − λE[ X ] 1 − ρ
E[C]
1 ρ
6-40
20
Delay of token ring
ƒ Components of transmission time
à
Queuing delay
à Token waiting time delay
à Packet time : E[X]
à Propagation delay from the source to the destination
ρ
τ ' (1 − ρ / M )
E[ X ] + a2
+ E[ X ]
1− ρ
1− ρ
E[W ] = E[T ] − E[ X ]
E[W ] / E[ X ] = normalized
li d waiting
i i time
i
ρ
τ ' (1 − ρ / M )
= a1
+ a2'
1− ρ
1− ρ
E[W]/E
E[X]
E[T ] = a1
Each model produces different
characteristic. See details in the text book
ρ
6-41
FDMA
ƒ Divide the medium into M separate frequency range
à
à
Each station transmits information using only the assigned bandwidth
In practice, guard bandwidths are assigned between the assigned bandwidth in order to reduce interference
ƒ Proper to connection‐oriented fixed bandwidth communication
Frequency
Guard bands
…
W
1
2
M-1
M
Time
6-42
21
TDMA
ƒ Stations take turns to make an entire transmission ,
time slots
frame, which consists of M
à Guard time – ensure the transmission from different stations do not overlap
à Preamble – allow receiver to synchronize to the transmitted bit stream
Synchronization intervals
Frequency
W
1 2 3 4 5 …M 1 2 3 4
Time
One frame
6-43
Code Division Multiple Access
ƒ The transmission occupy an entire frequency band at the same time
ƒ Separated by the different codes
ƒ To transmit binary information
à Each user bit is transformed into G bits by multiplying the user bit by G‐bit “chip” value called a spreading factor
à The chip value is uniquely assigned to the station and appears to be random
à Other station transmits in the same manner at the same time (all the frequency band and all the time), but use a different binary random chip value
6-44
22
CDMA, 2
Transmitter from one user
Binary Info
R1 bps
W1 Hz
X
R >> R1bps
W >> W1 Hz
Unique User Binary
Random Sequence
Radio
Antenna
X
Digital
Modulatio
n
Signal plus residual
interference
X
Signals
from all
transmitters
Digital
Demodulation
Binary
Information
X
Correlate to
User Binary
Random Sequence
6-45
Operation of CDMA, 1 ƒ Spreading factor
à
à
User data information is a binary symbol from {+1, ‐1}
Th f
The factor is a pseudo‐random binary sequence of {+1,‐1}*, say C=c
i d
d bi
f {
}* C 1, c
2, c3, c4,… cG
à Symbol +1 chip
+1×C= (c1,c2,…,cG)
à Symbol –1 chip
‐1×C= (‐c1,‐c2,…,‐cG)
ƒ Power of signal
à
The arrived chips are applied a dot‐product with the known factor
‚ Correlated output for symbol +1 ‚ Correlated output for symbol ‐1 à
⇒ c12+c22+…+cG2=G
⇒ ‐c12‐c22‐…‐cG2=‐G
If you have a different spreading factor D=(d1,d2,…,dG)
‚ Correlated output = c1d1+ c2d2+…+ cGdG
‚ Expected value of cidi =.25×(1×1) + .25×(‐1×‐1)+ .25×(1×‐1)+ .25×(‐1×1) = 0
à
A station with a correct factor receives an amplified signal, but a station with an incorrect factor receives no signal 6-46
23
Characteristics of CDMA
ƒ Power
à Requires all the signals at the receiver to have approximately the same power
i
l h à Otherwise, a powerful transmission from a nearby station could overwhelm the desired signal from a distant station
à Implement a dynamic power control mechanism
ƒ Interference
à The more users, the more interference
à Gradual trade‐off between the # of users and the bit error rate
à Flexibility to provide differentiation of traffic types
ƒ Better quality of using synchronous transmission
à Make the spreading factors to be independent to each other 6-47
Orthogonal factor of CDMA
ƒ Two sequences of a and b are orthogonal if a•b=0
à a•b = Σajbj=a1b1+ a2b2+…+ anbn=0
à
Example: a=(‐1,+1,‐1,+1), b=(‐1,+1,+1,‐1)
a•b=(‐1)×(‐1)+(+1)×(+1)+(‐1)×(+1)+(+1)×(‐1)=1+1‐1‐1=0
ƒ Transmission Ch1: 110⇒
(-1,+1,-1,+1) (-1,+1,-1,+1) (+1,-1,+1,-1)
Ch2: 011⇒
(+1,-1,-1,+1) (-1,+1,+1,-1) (-1,+1,+1,-1)
Transmitted signal
(0,0,-2,+2) (-2,+2,0,0) (0,0,+2,-2)
6-48
24
Signal recovery of CDMA
Received signal
(0 0 -2
(0,0,
2,+2)
+2) ((-2
2,+2,0,0)
+2 0 0) (0,0,+2,
(0 0 +2 -2)
2)
Ch1: Speading factor (-1,+1,-1,+1)
Ch1: Correlated output and
integrated output
6-49
Walsh‐Hadamard Matrix of CDMA
ƒ Systematic approach to obtain orthogonal sequence
Wn −1 ⎤
⎡W
W0 = [0],Wn = ⎢ n −1
⎥
⎣Wn −1 Wn −1 ⎦
à Replace 0 by –1, and 1 by +1
à Each row provides a spreading sequence
‚ Prove it!
⎡0 0 ⎤
W0 = [0],W1 = ⎢
⎥,
⎣0 1 ⎦
⎡0 0 0 0 ⎤
⎢0 1 0 1 ⎥
⎥
W2 = ⎢
⎢0 0 1 1 ⎥
⎥
⎢
⎣0 1 1 0 ⎦
6-50
25
Evolution of Wireless Comm. NMT450 (1981)
AMPS (1983)
Inmarsat-A (1982)
CT1 (1984)
NMT900 (1986)
CDMA (1991)
GSM (1992)
Cordless
CT0 (1982)
Inmarsat-B (1988)
D-AMPS (1991)
PDC (1993)
Inmarsat-B
InMarsat-M
(1992)
CT1+ (1987)
CT2 (1989)
Wireless
LAN
DECT (1991)
DCS1800 (1994)
802.11 (1997)
Iridium (1998)
GPRS (2000)
Cellular
Satellites
IMT-2000 (2001)
802.11b,
Blutooth (1997)
802.11a (2000)
6-51
LAN and MAN Standards ƒ
IEEE Standards
à
à
à
IEEE 802.1 (Introduction)
IEEE 8
IEEE 802.2 (LLC) –
(LLC) the upper part of the data link layer
h f h d li k l
Coexist several standards for MAC/LAN
‚ IEEE 802.3 (CSMA/CD, Ethernet) ‐ Initiated by Xerox. Proposed by Xerox, DEC, and Intel. To connect office devices and workstations
‚ IEEE 802.4 (Token bus) ‐ Proposed by General Motors. Factory automation – real‐time, priority scheme. Physical bus, but logical ring ‚ IEEE 802.5 (Token ring) ‐ Proposed by IBM. Fairness and distributive
à
à
IEEE 802.6 (DQDB: Distributed Queue Dual Bus) for MAN
IEEE 802.11 (Wireless LAN) ƒ
FDDI (Fiber Distributed Data Interface) ‐ ANSI standard for MAN
ƒ
Others à
à
HIPPI: High‐Performance Parallel Interface
Fibre Channel
6-52
26
IEEE 802.3 (Ethernet)
ƒ Bus‐based coaxial cable
à
Broadcast over the bus medium using CSMA/CD
Operate at 10 Mbps over a maximum distance of 2.5Km, and allow 4 repeaters
à The maximum end‐to‐end delay is 51.2 microsec, ie. 512 bits or 64 bytes at 10 Mbps, which is the minimum frame size
à Use Manchester encoding
à
ƒ CSMA/CD
à
A station waits until the channel is silent
à Once the channel goes silent, the station transmits but continues to listen the channel to detect collision
à If a collision occurs, the station stops the transmission immediately and schedules a later random time
à If no collision for 2τ, it knows that it captured the channel
6-53
Baseband Manchester Encoding
ƒ Baseband here means that no carrier is modulated; instead bits are encoded using Manchester encoding and transmitted directly by modified voltage of a DC signal
ƒ Manchester encoding ensures that a voltage transition occurs in each bit time which helps with receiver and sender clock synchronization
6-54
27
Binary Exponential Backoff Algorithm
ƒ To reschedule retransmission after a collision
ƒ After the first collision, each station waits either 0 or 1 slot times ,
before trying again
à
If 2 stations choose same random number, they will collide again
ƒ After the second collision, each station picks either 0, 1, 2 or 3 at random
ƒ In general, after k collisions, a random number between 0 to 2k‐1 is chosen
ƒ However, after 10 collisions, the random interval is fixed to 0‐1023
However after 10 collisions the random interval is fixed to 0 1023
ƒ After 16 collisions, the station gives up and reports failure to the upper layer
ƒ Correction> pp 399, the last 4th line must read as “…of 210”
6-55
Efficiency of Ethernet
ƒ The status of channel
à Successful transmission (L/R)
à Contention periods (E[N] × round‐trip‐time)
‚ E[N] = expected number of retrial until a successful transmission
à Idle ‚ Time to detect idle (propagation delay)
ƒ Efficiency of Ethernet
0.9
0.8
0.7
0.6
Eff
L/R
E=
L / R + τ + 2eτ
1
=
1 + (1 + 2e)τR / L
1
=
1 + 6.44a
0.5
0.4
0.3
0.2
0.1
0
0
500
1000
1500
2000
2500
L (bytes)
, where a=τR/L, or the number of packets in the propagation delay
6-56
28
E[T] of Ethernet
ƒ The short frame, the long propagation delay and g
the high bandwidth make them worse
CSMA-CD
25
20
a=0.2
15
a=0.01
a=0.1
10
5
0.96
0.9
0.84
0.78
0.72
0.66
0.6
0.54
0.48
0.42
0.3
0.36
0.24
0.18
0.12
0
0
0.06
Avg. Transfer Delay
30
Load
6-57
Frame Structure of Ethernet
ƒ
7‐byte preamble of repeative 1010…10
à
à
In Manchester encoding, this pattern generates a sine wave
The receiver uses it to synchronize to the beginning of the frame ƒ
1‐byte Start Delimiter of 10101011
ƒ
6‐byte Destination and Source addresses
ƒ
2‐byte Length field
à
After the preamble, the two consecutive 1’s indicates the start of frame
à
Question: Can we exchange the order of destination and source addresses?
à
The number of bytes in the payload including 18‐byte overhead (DA,SA,FCS), but excluding Preamble and SD
1518‐byte maximum
8b t i
à
ƒ
ƒ
Pad (variable length) – to Maintain the frame size at least 64 bytes
4‐bytes FCS ‐ CCITT 32‐bit CRC
7
1
Preamble SD
2 or 6
2 or 6
2
Dest.
Addr
Src.
Addr
Length
4
Payload
Pad
FCS
6-58
29
Destination Address Field of Ethernet
ƒ Indicators
à
à
The first bit – 0:single address, 1:group address
The second bit 0:local address, 1:global address
The second bit –
0 local address 1 global address
ƒ Types of address
à
à
Unicast address – unique address assigned a NIC device
Multicast address – the host computer can configure its NIC device to accept specific multicast address
à Broadcast address – indicated by all 1’s. All stations are to receive a given packet
Question: What is the application of the broadcast address?
0
Single address
1
Group address
0
Local address
1
Global address
6-59
Physical Layer of Ethernet, Coaxial
ƒ
10base5
à
à
à
à
Thick (10mm) coaxial yellow cable
Base‐band
Base
band
Maximum segment 500m
Use of tranceiver
‚
‚
ƒ
Thin(5mm) coaxial cable
Maximum segment 200m
T‐shaped BNC connector
Repeater
à
à
ƒ
Vampire tap to the cable
Send a special invalid signal when it detects a collision
10base2
à
à
à
ƒ
transceivers
To combine two segments
Forward signal from a segment to another
Question: how can we detect a broken cable? How can we locate the problem?
6-60
Figure 6.55
30
Physical Layer of Ethernet, Twisted ƒ 10BaseT
à Two unshielded twisted pairs, connection to a hub
T hi ld d i d i i h b
à Low cost but the shorter distance (maximum 100 m)
à Star topology instead of bus
ƒ The central controller using a hub or a switch to make a point‐to‐point channel
k
h
l
6-61
Fast Ethernet
ƒ Property
à
à
IEEE 802.3u, 1995, Operating at 100Mbps
C
Compatibility to the existing Ethernet ‐
ibili h i i E h
Frame format, interface, and F
f
i
f
d procedures are same
à 100BaseT does not use Manchester encoding; it uses 4B5B for better coding efficiency
ƒ Issues
à
The minimum frame size was derived from the bandwidth and the maximum distance
à Throughput = (1+6.44τR/L)‐1, increasing the bandwidth 10 times, you will get 1/10 throughput
t / th
h t
à Solution
‚ Alternative 1: increase the minimum frame size 10 times (640 byte)
‚ Alternative 2: reduce the maximum distance by the factor of 10 (250 meters)
‚ Question: Which one do you like better?
6-62
31
Fast Ethernet, 2
ƒ Decision
à
Keep the minimum frame size, but reduce the maximum distance to 250 meters to maintain the compatibility with the existing Ethernet
meters, to maintain the compatibility with the existing Ethernet
à How we can build a LAN only with 250 meters?
‚ Hub connection only in a star topology
‚ UTP cable only (The coaxial cable forms a bus topology which requires a long distance)
 100BaseT: use 2 “category 5 UTP wires”. One pair for TX, anther pair for RX in full‐
duplex
 100BaseT4: use 4 “category 3 UTP wires”. 3 pairs for data in a half‐duplex. Note that this cable is also used for the telephone line.
 100BaseFX: use 2 strands of multimode optic in full‐duplex. Can reach reach 2000m.
Question: How it can support the longer distance?
 Buffered switch
à
Note that the maximum distance between two stations is 250m so that the length of the cable must be smaller than 125m. The standard restricts the maximum segment as 100m
6-63
Hubs
ƒ Physical Layer devices: essentially repeaters operating at bit levels: repeat received bits on one interface to all other interfaces
ƒ Hubs can be arranged in a hierarchy (or multi‐
tier design), with a backbone hub at its top
z z z z z z
Single collision domain
6-64
32
Hubs, 2
ƒ Hub Limitations:
à
à
à
à
à
à
à
Monitor all transmission from the station
When there is a single transmission, it repeats the signal on the other lines
If there is collision, the hub sends a jamming signal to all the stations
Always broadcasts packets (i.e., no smarts about which link to send on)
Single collision domain results in no increase in max throughput; the multi‐tier throughput same as the the single segment throughput
Individual LAN restrictions pose limits on the number of nodes in the same collision domain (thus per Hub); and on the total allowed same collision domain (thus, per Hub); and on the total allowed geographical coverage Cannot connect different Ethernet types (e.g., 10BaseT and 100baseT)
6-65
Hubs, 3
ƒ Each connected LAN is referred to as a LAN segment
ƒ Hubs do not isolate collision domains: a node may collide with any y
y
node residing at any segment in the LAN ƒ Hub Advantages:
à
à
à
à
à
Simple, inexpensive device
Multi‐tier provides graceful degradation: portions of the LAN continue to operate if one of the hubs malfunction
Extends maximum distance between node pairs (100m per Hub)
can disconnect a jabbering adapter ; 10base2 would not work if an can disconnect a “jabbering adapter”; 10base2 would not work if an adapter does not stop transmitting on the cable
can gather monitoring information and statistics for display to LAN administrators
6-66
33
Ethernet Switch
ƒ A switch is a device that incorporates bridge functions as well as point‐to‐
point ‘dedicated connections’ ƒ Each input port buffers incoming transmissions. The incoming frames are examined and transferred to the proper outgoing ports
à
No collision if each port has a single device.
à If a port is connected to another hub using uplink, the port has its own i li k th t h it collision domain
à Can support a larger number of stations
à A host attached to a switch via a dedicated point‐to‐point connection; will always sense the medium as idle; no collisions ever!
High-Speed Backplane or
Interconnection fabric
z
z
z
z
6-67
Ethernet Switch, 2
ƒ Full duplex mode
‚ If each port is connected to a single host in the switch, the station will not see any collision by assigning a dedicated line t ti ill t lli i b i i d di t d li for each direction
ƒ Ethernet Switches provide a combinations of shared/dedicated, 10/100/1000 Mbps connections
ƒ Some Ethernet switches support cut‐through switching: frame forwarded immediately to destination without awaiting for assembly of the entire frame in the switch buffer slight reduction in entire frame in the switch buffer; slight reduction in latency
ƒ Ethernet switches vary in size, with the largest ones incorporating a high bandwidth interconnection network
6-68
34
Ethernet Switch, 3
Dedicated link
Wide Area
Network
File
server
router
switch
Mail
server
Shared uplink
hub
ECE
Web
server
hub
SL 143
hub
SL 1136-69
Gigabit Ethernet
ƒ IEEE 802.3z, 1998
ƒ Use the standard Ethernet frame format
U th t d d Eth
t f
f
t
à But, the minimum frame size is 512 bytes
ƒ Allows for Point‐to‐point links (switches) and shared broadcast channels (hubs)
à Uses Hubs called here “Buffered Distributors”
à Full‐Duplex at 1 Gbps for point‐to‐point links
6-70
35
IEEE 802.4 (Token Bus)
Not in the textbook
ƒ Access Method
à A token controls the right of access to the physical medium; the station which holds (possesses) the token has momentary control over the medium
à The token is passed by stations residing on the medium
à Steady state operation consists of a data transfer phase and a token transfer phase
à Ring maintenance functions include ring initialization, lost token recovery, new station addition and general housekeeping of the logical ring
6-71
Logical Ring on Physical Bus
H
G
F
I
E
A
D
B
C
6-72
36
Frame of Token Bus
ƒ Frame format
à
à
à
à
à
à
à
à
Preamble – to set receiver’s modem clock and level ( 1+ octets)
SD – start delimiter (1 octet)
FC – frame control
DA – destination address
SA – source address
Payload – 0+ octets FCS – frame check sequence ( 4 octets)
ED – end delimiter (1 octet)
ƒ The maximum frame size = 8191 bytes between SD and ED, exclusive
The maximum frame size = 8191 bytes between SD and ED exclusive
preamble SD
FC
DA
SA
Payload
FCS
ED
Question: Why do we need the “ED”?
6-73
Characteristics of Token Bus
ƒ Speed – 1 Mbps, 5 Mbps, 10 Mbps
ƒ 3 different Analog modulation
à
à
à
Phase continuous frequency shift keying
Phase coherent frequency shift keying
Multilevel duobinary amplitude modulated phase shift keying
ƒ Control frame
à
à
à
à
à
à
à
Claim_token: claim token during ring initialization
Solicit_successor_1: allow station to enter the ring
Solicit_successor_2: allow station to enter the ring
Who follows: recover from lost token
Who_follows: recover from lost token
Resolve_contention: used when multiple stations want to enter the ring
Token: pass the token
Set_successor: allow stations to leave the ring
6-74
37
Normal Operation of Token Bus
ƒ
Token passing is done from high to low address
ƒ
Each station knows the addresses of its predecessor and successor
ƒ
Each time a station acquires the token, it can transmit frames for certain amount of time. Then it must pass the token to its successor. If a station has no data, it passes the token immediately upon receiving it.
ƒ
There are 4 priority classes, 0, 2, 4, and 6 for traffic with 0 the lowest and 6 the highest
ƒ
When the token comes to a station, it is passed internally to the priority 6 substation, which may begin transmitting frame if it has any. When it is done or when its timer expires the token is passed internally to priority 4 or when its timer expires, the token is passed internally to priority 4 substation, which may transmit frames until its timer expires, at which point the token is passed to priority 2 substation. This process is repeated until priority 0 substation has sent all its frames or its timer expires. Either way the token is passed to the next station
6-75
Logical Ring Maintenance
ƒ Join the ring
à
Periodically, the token holder solicits bids from stations not currently in the ring that wish to join by sending SOLICIT_SUCCESSOR_1 frame. The frame, gives the senders’ address and the successor’s address. Stations inside the range may bid to enter
à If no station bids to enter within a slot time, the response window is closed and the token holder continues with its normal business
à If two or more stations bid to enter, the token holder then run an arbitration algorithm, starting with the broadcast of a resolve contention frame. The algorithm is a variation of binary countdown scheme
ƒ Leave the ring
à
A station X, with successor S and predecessor P, leaves the ring by sending P a SET_SUCCESSOR frame telling it that henceforth its successor is S instead of X. Then X just stops transmitting
6-76
38
IEEE 802.5 (Token‐Ring)
ƒ Method
à Medium access control is provided via a small frame called a token. The token circulates around a uni‐
called a token
The token circ lates aro nd a ni
directional ring‐topology network. The station that acquires the token can transmit its frame
à Operate at 4 Mbps and 16 Mbps using differential Manchester encoding. The maximum number of stations is 250
ƒ Advantage of ring
à Fairness
à Capable of providing priority
ƒ Disadvantage of ring
à A single fault impacts the whole network
à Question: How can we make it robust to a component fail?
6-77
Star Topology of Token Ring
ƒ Connect stations to a wiring center in both directions
ƒ A relay can bypass the wires of stations if they are considered as failed
Wiring Center
6-78
39
Token‐ring Protocol
ƒ How it works
à A station waits for a “free” token. When a free token arrives, the station acquires the token by removing it arri
es the station acq ires the token b remo ing it from the ring (Actually, the station converts a single bit from 0 to 1 for making it as a “busy” token)
à The station transmit its frame into its outgoing line
à Each station examines the destination address in each passing frame to see whether it matches the station’s own address
‚ If it is, the frame is copied to a local buffer, several status bits in the frame are set and forwarded to along the ring
bits in the frame are set,and forwarded to along the ring
‚ If not, the frame is forwarded to the next link after a few bits delay
à The sending station has the responsibility of removing the frame from the ring and reinsert a free token
6-79
Efficiency of Token‐ring
ƒ When a station inserts a free token
à
After receiving the last bit of the frame
à
After receiving the header of the frame
‚ Use the returned frame as a sort of acknowledgement
‚ To obtain a benefit for a long frame
à
After completing the frame transmission
‚ High efficiency in high speed and a long turn‐around time
ƒ How long a station can hold the token
à
For a single frame transmission
à
As‐it‐wish
à
Limited time
‚ Too strict. Spend most of time in the token circulation
‚ The best efficiency, but the worst quality control
‚ Intermediate between those two approaches
6-80
40
Frame Structure of Token‐ring, 1
ƒ SD – Start delimiter
à
à
à
à
Differential Manchester encoding
JK0JK000 J and K are nondata symbols
JK0JK000 –
J – begin with 0, and no transition in the middle
K – begin with 1, and no transition in the middle
ƒ AC – Access control
à
à
3 bit – priority (8 levels)
1 bit – token
‚ 0 – token frame
‚ 1 – data frame à
1 bit – monitor
1 bit à
3 bit – reservation of priority
‚ Use for eliminating orphan frames
1
1
SD
AC
1
2 or 6
2 or 6
FC
Dest
Addr
Src
Addr
Payload
6
1
1
FCS
ED
FS
6-81
Frame Structure of Token‐ring, 2
ƒ
FC – Frame Control
à
2 bit – frame type
‚ 01 01 – data frame
‚ 00 – MAC control frame
à
6 bit – control bit (type of control frame)
ƒ
Destination Address and Source Address
ƒ
FCS (Frame Check Sequence) – CCITT‐32 CRC
ED (Ending Delimiter)
à
ƒ
à
à
à
ƒ
1
SD
2 bytes or 6 bytes
6 bits – JK1JK1
1 bits intermediate‐frame bit to indicate the last frame in a sequence 1 bits –
intermediate frame bit to indicate the last frame in a sequence 1 bit – error‐detection bit to indicate the detection of errors FS (Frame status) 1
AC
continues…
1
2 or 6
2 or 6
FC
Dest
Addr
Src
Addr
Payload
6
1
1
FCS
ED
FS
6-82
41
Frame Structure of Token‐ring, 3
ƒ Frame Status
à To allow the destination to send transfer status info T ll h d i i d f i f back to the sender
à A & C bits are repeated (Question: Why?)
à A=1 : the destination address was recognized by the recipient
à C=1 : the data was received by the recepient C 1 the data was received by the recepient A C NA A C NA
A
C
0
0
1
0
1
1
6-83
Maintenance of Token‐ring
ƒ Priority
à
To send a frame of a given priority, a station must capture a token of equal or lower priority
à Reserve a token priority by setting the reservation field in passing frames if the current reservation field is lower than its intended priority. So, the stations bids for the token priority using the reservation field
à A station clears the reservation field and transmits data frame of the same priority
ƒ Ring Monitoring
à
Problems
‚
‚
‚
‚
à
A circulating frame whose destination is not alive
A missing token
Corruption of frame structure
Link break
Solution
‚ Active monitor – monitor the ring and solve the problems
‚ Question: Who will be the active monitor?
6-84
42
FDDI
ƒ Overview
à Token‐based MAN standard by ANSI
à 100 Mbps, 200 Km, +500 stations, fiber optic in b
fb
multimode or single‐mode
à 4B5B binary encode NRZ
‚ 125 Msymbol/sec
‚ No self‐clock as Manchester encoding
‚ No global clock as telephone system
‚ Usage





16 combinations for data
3 for delimiters
2 for control
3 for hardware signaling
8 unused
‚ Question: How can the receiver synchronize the transmission?
6-85
Synchronization of FDDI
ƒ A long long preamble ƒ High accurate clock: 125MHz ± 0.005%
à
à
à
à
The worst case difference = 0.01% (10‐4)
(125 MHz × 10‐4)‐1 sec = 80 usec for 1‐bit distortion
5‐bit elastic buffer can handle up to 400 usec
400 usec × 125 MHz = 50,000 symbols = 40,000 bits in 4B5B, which limits the maximum frame size (4500 bytes)
ƒ Reliability
à Dual ring in opposite direction
à Up on failure, the dual ring is converted into a single long ring
6-86
43
Frame Structure of FDDI
ƒ Similar to IEEE 802.5
ƒ Token frame
k f
à Instead of a token bit
à 10000000 or 11000000 in FC field
8
1
1
Data Frame
Pre
SD
FC
Token Frame
Pre
SD
FC
2 or 6
Dest
Addr
2 or 6
Src
Addr
Payload
4
1
1
FCS
ED
FS
ED
6-87
FDDI Protocol
ƒ Background
à 500 stations, 10‐bit delay per each, 200 Km
à Delay= 500 (station) × 10 (bit/station) + 200 (Km) / 200,000 (Km/sec) x 100 Mbps
= 105,000 bits
ƒ Improvement
à Insert a token immediately after completing frame transmission
à Multiple tokens at the same time optionally
ƒ Adaptive real‐time traffic
d
l
ff
à Compute “token hold time” when it receives a token
à If the traffic is heavy, transmit only sync traffic
à If the traffic is light, transmit both sync and async traffic
6-88
44
IEEE 802.11 (Wireless LAN)
ƒ Private cellular system
ƒ Very low‐power radio transmission
ƒ Unlicensed radio frequency
à ISM Band: 902 – 928 MHz, 2.4 – 2.4835 GHz, 5.725 –
5.850 GHz (in US) à Share the resources with the neighbor (security)
à Assigned by a government (different for different country)
t )
ƒ Architectures
à Infrastructure – with wireless access points
à Ad hoc wireless LAN – no access points
6-89
Hidden Station Problem
ƒ Situation
à
While A transmits to B, C will not hear A because A is out of range
A
Data Frame
à If C starts transmitting, the frame will interfere at B
à CSMA works if there is one A transmits
data frame
transmission
à In low‐power radio transmission, there could be multiple transmission
C
B
C senses medium,
station A is hidden
from C
ƒ Solution
à
CSMA‐CA (Collision Avoidance)
à Two stations exchange RTS and CTS management info which contain the length of data frame
A
Data Frame
B
C
Data Frame
C transmits data
frame and collides
with A at B
6-90
45
Terminology of Wireless LAN
ƒ BSS (Basic Service Set)
à Basic building block as a cell in cellular system
B i b ildi bl k ll i ll l t
à Defined as a group of stations that coordinate their access to the medium
à BSA – a geographical area covered by the BSS
ƒ ESS (Extended Service Set)
à A set of BSS interconnected by a distribution systems
à A gateway to outside
6-91
Internet
Networking Wireless LAN
Gateway to
Internet
portal
Distribution System
Server
portal
AP1
BSS A
A1
AP2
A2
B1
BSS B
B2
6-92
Figure 6.66
46
IEEE 802.11 Frame Structure, 1
ƒ Three types of Frames
à M
Management frame
t f
‚ Station association and disassociation with AP
‚ Timing and synchronization
‚ Authentication and deauthentication
à Control frame
‚ Handshaking, and acknowledgement of data
Handshaking and acknowledgement of data
à Data frame
6-93
IEEE 802.11 Frame Structure, 2
MAC Header (bytes)
2
Frame
control
2
Protocol
Version
2
6
Duration/
ID
Address
1
2
Type
6
Address
2
6
2
6
0~2312
4
Address
3
Sequence
Control
Address
4
Frame
Body
CRC
2
1
1
1
Subtype
To
DS
From
DS
More
Frag
1
Retry
1
1
Pwr.
Mgt.
More
Data
1
WEP
1
(bits)
Rsvd
6-94
47
IEEE 802.11 Frame Structure, 3
ƒ Frame Control
à Protocol version: currently, it is zero
y,
à Type: management(00), control(01), or data(10)
à Subtype: type specific
à To DS, From DS: Indicate the meaning of 4 addresses in the header
à More Frag: set to 1 if another frame follows.
à Pwr. Mgt.: indication of station’s power management mode
à More Data: 1 if a station in power save mode that more MAC SDUs are buffered for it at the AP
à WEP: 1 if the frame body contains info encrypted
2
2
Protocol
Version
Type
2
1
1
1
Subtype
To
DS
From
DS
More
Frag
1
Retry
1
1
Pwr.
Mgt.
More
Data
1
1
WEP
(bits)
Rsvd
6-95
IEEE 802.11 Frame Structure, 4
ƒ Duration/ID: à Duration value (NAV, net allocation vector), or
(
,
),
à Station’s ID for control type and PS‐poll subtype
ƒ 4 Addresses:
à Destination address, source address, à Transmit address, receiver address, à Source/destin BSS ID
ƒ Sequence Control: à 4 bits: the number of each fragment of a MAC SDU
à 12 bits: sequence numbering
ƒ CRC: 32‐bit CRC for MAC header and Frame body
2
Frame
control
2
6
Duration/
ID
Address
1
6
Address
2
6
2
6
0~2312
4
Address
3
Sequence
Control
Address
4
Frame
Body
CRC
6-96
48
IEEE 802.11 Medium Access Control
ƒ Goals:
à Channel access Ch
l à PDU addressing
à Frame formatting
à Error checking
à Fragmentation and reassembly
à Security, authentication, privacy issues
6-97
IEEE 802.11 Two Types of MAC
ƒ DCF (Distributed Coordination Function): Support for asynchronous transfer on best‐effort basis (in contention mode)
ƒ PCF (Point Coordination Function): à Impremented by an AP
à Support connection‐oriented time‐bounded transfer
à Two periods
‚ Contention period (CP):
‚ Contention Free Period (CFP): the medium is controlled by the AP
6-98
49
IEEE 802.11 DCF
ƒ All station must support DCF at least
ƒ Only MAC for ad‐hoc networks
Only MAC for ad hoc networks
ƒ Based on CSMA/CA à IFS (Interframe Space) : All stations must remain quiet for a certain time period after transmission
à The length of IFS
‚ SIFS (Short IFS): for short control message (ACK, Polling response, highest priority)
‚ PIFS (PCF IFS): for support real‐time PCF
‚ DIFS (DCF IFS): for support asynchronous transfer in DCF
‚ EIFS (Extended IFS): used for resynchronization when PHY detects incorrect MAC frames (lowest priority)
à The higher priority frame, the shorter waiting
à SIFS < PIFS < EIFS < EIFS
6-99
IEEE 802.11 DCF, Procedure
ƒ A station can transmit an initial MAC PDU under the DCF if the staion detects the medium idle for a DIFS or longer.
à If the medium is busy, re‐schedule using a random backoff.
ƒ A station can transmit when its backoff timer eexpires during the contention period.
pires d ring the contention period
ƒ After a successful transmission, the station must execute the backoff procedure before sending the next frame.
6-100
50
IEEE 802.11 CSMA/CA
ƒ If a station (A) has a frame to be transmitted, it first sends request‐to‐send(RTS) frame containing the duration. All listening nodes within the range of A know the expected duration. ƒ Once a destine station (B) receives an RTS, it sends a clear‐to‐
send(CTS) frame containing the duration. All listening nodes within the range of B know the expected duration. ƒ A proceed with its data frame. ƒ If B receives the frame without error, it responds with an ACK.
ƒ It is still possible for two RTS’s frame collides. Resolve the collision using the exponential backoff. à
The Collision of RTS’s is better than a collision with a data frame, because the length of RTS is much shorter than the length of data frame.
6-101
IEEE 802.11 NAV
ƒ
Duration field in a MAC header indicates the amount of time (in micro‐
second)
à
ƒ
After the end of the present frame, the channel will be utilized to complete Aft
th d f th t f
th h
l ill b tili d t l t successful TX. Stations listening the duration field adjust their network allocation vector (NAV), for indicating the amount of time elapsed until the current TX is complete and the channel can be sampled again for idle status. DIFS
Source
Data
SIFS
Destination
Other
ACK
DIFS
NAV
Defer access
Wait for backoff
6-102
51
IEEE 802.11 RTS/CTS/Data/ACK
DIFS
S
RTS
Source
Data
SIFS
CTS
SIFS
SIFS
ACK
Destination
Other
DIFS
NAV (RTS)
NAV (CTS)
(
)
NAV (Data)
Defer access
6-103
IEEE 802.11 Exponential Backoff
ƒ A station with a frame first waits until the channel is idle at least DIFS period, and then computer a random backoff time. ƒ IEEE 802.11 uses a slotted time unit (an integer value), much smaller than the size of MAC PDU.
ƒ Initially the backoff counter is chosen in [0, 2m‐1]
ƒ For each DIFS period, the counter decrements by 1. ƒ Note that a station freezes its timer during a busy channel time. ƒ If the counter reaches zero, it transmits its frame. ƒ For each collision, the contention window (CW) doubles until [0, 2M‐1]. 6-104
52
IEEE 802.6 (DQDB)
Not in the textbook
ƒ Overview
à Distributed Queue Dual Bus
à For MAN
à Two parallel unidirectional buses passing thru the city
Slot
generator
…
S1
Si
…
SN
6-105
DQDB
Slot
generator
Channel A
…
S1
Si
…
Channel B
ƒ One new frame every 125 usec
SN
Slot
generator
ƒ Two types of slots
à
à
Queued arbitrated slot (QA) – for packet‐switch service
Non‐arbitrated slot (NA) – for circuit‐switch service
Access
Control (8 bit)
Busy
(1)
Type resrvd)
(1)
(1)
Segment (52x8 bit)
PSR
(1)
Request
(1)
6-106
53
DQDB Protocol
ƒ Transmission
à A station must know whether the destination is to the left or the right
à If it is to the right, use the bus A
ƒ Distributive queuing
à A method to build fair access to the medium
‚ Each station queued their frame to a conceptual global q
p
g
queue, without having a central queue
‚ Each station maintains 2 counter, RC and CD
‚ RC counts the number of pending downstream requests
‚ Reserve slots thru in the reverse direction
6-107
Consideration for MAC
ƒ Efficiency ‐ Depends on distance, bandwidth, p
packet length
g
ƒ Fairness ‐Stations acquire a reasonable portion of resources (bandwidth, delay, and so on)
ƒ Reliability ‐ Robustness with failure or faults in equipments ƒ QOS à Different types of traffic
à Differentiate services
ƒ Scalability ‐ Maximum number of users
ƒ Cost 6-108
54
Performance of MAC
ƒ Throughput – the actual transmission rate through the shared medium
à Frame/sec or bit/sec
à For R‐bps medium and L‐bit frame, the maximum possible throughput is R/L
à The real achievable throughput is much small than R/L
‚ The overheads are h
h d
 In collision,
 For coordinating the collision, and  For transmitting coordination information
6-109
LAN Bridges
ƒ Interconnection of networks
à
Repeater – Layer‐1 (physical device)
‚ Amplifying or reproducing signals without understanding what they mean
à
Bridge – Layer‐2 (MAC or data link layer)
à Router – Layer‐3 (network layer), also called a gateway
à Most of network devices are not dealing with L4 or higher
Question: Why not?
ƒ Why Bridges?
à
As the number of stations increases, a single LAN may not able to handle all traffic
ll ff
à A different department wants to maintain its own LAN
à ECE wants Ethernet and ME wants Token‐ring. But they want to share a file server in ENGR.
à BE has two LAN’s: one in SL building, the other in WX building 6-110
55
LAN Bridges at a glance
ƒ Two or more MAC’s share an LLC
ƒ No layer above LLC
l
b
Host A
Host B
Network or
above
Bridge
Network or
above
LLC
LLC
LLC
802.x
802.x
802.y
802.y
Physical
Physical
Physical
Physical
6-111
Network Topology with Bridges
ƒ
Local traffic: S1‐S3
à
à
à
ƒ
ƒ
ƒ
S1
S3
L1
P2
Bridge1
B1 forwards the frame and makes L1 and L2 busy, but L3 is independent
If repeaters are used instead of the bridges, all LANs are busy with one f
frame transmission
B2 cannot be replaced by a repeater
Question: What are the problems in converting 802.x to 802.y?
S2
P1
Remote traffic: S1‐S4
à
ƒ
Broadcast only on L1
B1 and B2 do not forward the frame to other LANs
L2 and L3 work independently
L2
S4
Bridge2
P2
S5
P1
S6
L3
S7
6-112
56
Conversion of MAC Protocols, 1
ƒ Common Problems
à
à
à
à
Different frame format
Diff
Different data rate
d Bottleneck at the bridge – timeout and retransmission
Different maximum frame length ‚ Remember that the fragmentation is none of business in this layer
‚ The bridge may split the long frame, but the recipient cannot reassemble the fragmented frame in this layer
à
Order of address bits: big endian (802.5) and little endian (802.3)
ƒ 802.3 to 802.3
à
No additional problem except the different data rate and bottleneck problems
ƒ 802.3 to 802.5
à
à
The bridge must create priority bits
The checksum must be re‐calculated
6-113
Conversion of MAC Protocols, 2
ƒ 802.5 to 802.3
à
à
à
à
à
Re‐caluculating the checksum
Discard the priority
Set A and C bits in the FS (by cheating)
E bit in the ED
A frame longer than 1500 bytes
ƒ 802.5 to 802.5
à
Set A and C bits in the FS (by cheating)
6-114
57
Transparent Bridge
ƒ Objectives
à A station doesn’t need to know the presence of the bridge
à So, the bridge doesn’t need to be configured
S1
S3
L1
P1
ƒ Functions
P2
Bridge1
à Forwards frames from one LAN to another LAN
à Learns where stations are attached to the LAN
à Prevent loops in the topology
S2
L2
S4
Bridge2
P2
P1
S5
L3
S6
S7
6-115
Address Table of Transparent Bridge ƒ When a frame arrives on one of the ports, the bridge must decide whether or not to forward the incoming frame to another port by looking at its destination
ƒ The bridge must have a knowledge which port the station is attached to, whether directly or indirectly
Question: What does the “indirect” mean?
ƒ To do so, the bridge needs information associated a destination address with a port, called address table, address translation table or forwarding table
ƒ Question: How we can fill in the table?
P1
AT for B1
AT for B2
Addr
Port
Addr
Port
1
P1
1
P1
3
P2
3
P1
9
P2
9
P2
1
B1
3
P2
P1
B2
9
P2
6-116
58
Maintaining the Address Table
ƒ
The sysop records entries and load them up when the bridge is power on
à
à
à
à
ƒ
Good, but How does the sysop know all MAC addresses?
How does the sysop know the entire network topology? Especially when it is dynamic
If I move my station, I have to notify it to the sysop. The sysop will update the entries. (Oops, the sysop is on vacation)
Backward learning
à
à
à
The bridge is operating in “promiscuous” mode
If it receives a frame but it doesn’t know where the destination is, then “floods (broadcast)” the frame to all ports. But, it records its source address and port number to the address table
The bridge receives a frame and knows where the destination is by looking at the address table: ‚ If its source port # is same as the destination port number in the AT, ignore the frame. The bridge knows that no forwarding needs
‚ If its source port # is different from the destination port #, forward the frame to the destination port
6-117
Illustration of Backward Learning
1
2
3
P2
D5 S1
D2
S2
S6
P1
B1
4
D2 S6
P3
5
D5 S2
P1
B2
6
D5 S6
D2
S2
P2
D5 S2
7
8
Addr
Port
Addr
2
1
2
1
6
2
6
2
Port
6-118
59
Memory for Address Table
ƒ If the bridge operates for a long time, both tables store all the addresses of each stations in LAN’s.
ƒ Question Q estion à
How can it handle a station which moved from one LAN to another?
à
ƒ
What if the space for tables is not large enough to store all address?
Aging
à
à
à
Each entry is associated with a timer. Whenever hit, set the timer to the current time
Periodically, the bridge scans each entry. If it is x‐minute old, erase it. LANs
Bridge 1
LANs
Bridge 2
Infinite flood -> network down
6-119
Spanning Tree Bridges
ƒ Broadcast storm
à
A loop in bridges LANs causes a catastrophe because of flooding a frame whose destination is unknown
à Disable a certain portion of bridges to construct a logical tree for the flooding operation
ƒ Methods
à
à
à
Transform the bridged LAN to a graph G=(V,E)
Select a root bridge with the lowest serial number
Assign a cost to each edge
‚ Based on speed, distance, or the number of stations
à
à
à
From each bridge, find a path to the root bridge with the minimum cost
Select a designated bridge for each LAN
Break tie with arbitrary rules such as the serial number and/or the port number à Forward an unknown frame only through the spanning tree
6-120
60
Illustration of Spanning Tree
L1 (3)
B1
B2
L1
3
B3
L2 (2)
B4
3
3
B1
B2
2
L3 (5)
L2
4
5
2
L4
L3
2
B4
B5
B3
5
5
B5
4
L4(4)
ƒ
Spanning Tree Algorithms
à
à
Krushal’s algorithm
Prim’s algorithm
6-121
Source Routing Bridge
ƒ For IEEE 802.5
ƒ Simple bridge, but complicated end stations
Simple bridge but complicated end stations
à Each station determine the route to the destination when it want to send a frame
à Include the route info in the header of the frame
‚ Insert only if two stations are on different LAN
‚ Indicated by I/G bit in source address is 1
‚ 2‐byte routing control + consecutive 2‐byte route designator
 R
Routing control: type of frame, length of routing information, ti t l t
f f
l
th f ti i f
ti direction of the route (LR or RL)
 Route designator: 12‐bit LAN number and 4‐bit bridge number
à Load balancing – the route is distributed over all network
à Alternative path in the case of failure
6-122
61
Illustration of Source Routing
S2
S1
LAN 2
B4
LAN 4
B3
B5
B7
LAN 3
B6
LAN 5
B1
LAN 1
B2
S3
From S1 to S2:
LAN1→B1→LAN2→B4→LAN4
6-123
Routing Table for Source Routing
ƒ Each station has a routing table
ƒ To transmit a frame to a different LAN, the To transmit a frame to a different LAN the station first refers its routing table
ƒ If the route info is found, the station insert the routing info into the frame.
ƒ Otherwise the station starts a route discovery procedure
ƒ Once the route is found, the station stores the route info to its routing table for future use
6-124
62
How to Discover the Route
ƒ Single‐route broadcast
à
A station broadcast the special frame, which visits every LAN exactly once, eventually to the destination using a spanning tree
à Whenever an first bridge sees this frame, it inserts its LAN number, the bridge number and the outgoing LAN number à An intermediate bridge inserts its bridge number and the outgoing LAN
ƒ All‐routes broadcast frame
à
Up receiving the single‐route frame, the destination responds with the other special frame, which generates all possible routes back to the h i l f
hi h ll ibl b k h source station
à After collecting all routes, the source station chooses the best route
6-125
63