0% found this document useful (0 votes)
28 views163 pages

4 Mac

Uploaded by

kingsleydingke
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views163 pages

4 Mac

Uploaded by

kingsleydingke
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 163

4 The Medium Access

Control Sublayer

1
High Lights
n Channel allocation algorithms
Contention:ALOHA,S-ALOHA,CSMA,CSMA/CD
Collision-Free Protocols : bit-map, binary countdown, Token
Limited-Contention Protocols

n LAN
IEEE802.3, HIGH-SPEED LANS (802.3u)
Gigabit Ethernet(802.3z)
IEEE802.11(WLAN) LLC(802.2)

n BRIDGE: transparent bridge


n REPEATER、HUB、 BRIDGE、
SWITCH、ROUTER
n VLAN
2
4.1 The Channel
Allocation Problem

3
M/M/1 System

4
M/M/1 System
P[k ] =
(lT ) e
k - lT
T=
1
K! µ -l

nIncoming number is K in period T

nλ: mean arrival rate (frames/sec)


1/µ: mean frame length (bits/frame)
C: data transmission rate, channel capacity
(bits/sec) , the service rate is µC frames/sec

nmean time delay T = 1


µC - l

5
The Channel Allocation Problem
n Static Channel Allocation in LANs
and MANs
n Dynamic Channel Allocation in LANs
and MANs

6
Static Channel Allocation

7
Static Channel Allocation
1
T=
µC - l
Divide the single channel into N (TDM or
FDM) independent subchannels, each
channel capacity C
N

l
mean arrival rate
N
1
mean time delayT sub = C l
= NT
µ -
N N
8
Static Channel Allocation(2)
n Single channel
u C is 100 Mbps
u Mean frame length, 1/µ, is 10,000 bits
u µC=10000 frames/sec
u Frame arrival rate is 5000 frames/sec
Mean delay = 200 µsec
n Divide the channel into N
u Replace the 100-Mbps network with 10
networks of 10 Mbps each and statically
allocate each user to one of them
Mean delay = 2 msec
9
Dynamic Channel Allocation

10
Classification of Dynamic Channel
Allocation
n Controlled multiple access
u Centralized: polling
u Decentralized: token
n Random multiple access
u ALOHA
u CSMA, CSMA/CD, CSMA/CA

11
Five Key Assumptions of Dynamic Channel
Allocation
n Station Model

n Single Channel Assumption.

n Collision Assumption

n (a) Continuous Time.


(b) Slotted Time.

n (a) Carrier Sense.


(b) No Carrier Sense.
12
Station Model.
n N independent stations, generates frames
for transmission
n The probability of a frame being generated
in an interval of length t is λt, where λ is a
constant (the arrival rate of new frames).
n Once a frame has been generated, the
station is blocked and does nothing until the
frame has been successfully transmitted

13
Single Channel Assumption
n A single channel is available for all
communication
n All stations can transmit on it and all can
receive from it
n All stations are equivalent, although protocol
software may assign priorities to them.

14
Collision Assumption
n If two frames are transmitted
simultaneously, they overlap in time and
the resulting signal is garbled
n All stations can detect collisions
n A collided frame must be transmitted again
later

15
Continuous Time &Slotted Time.
n Continuous Time
Frame transmission can begin at any instant
n Slotted Time
Time is divided into discrete intervals (slots).
Frame transmissions always begin at the
start of a slot.
A slot may contain 0, 1, or more frames,
corresponding to an idle slot, a successful
transmission, or a collision, respectively.

16
Carrier Sense
n Stations can tell if the channel is in use
before trying to use it. If busy, no station
will attempt to use it until it goes idle.
n No Carrier Sense. Stations cannot sense
the channel before trying to use it. They
just go ahead and transmit. Only later can
they determine whether the transmission
was successful

17
4.2 Multiple Access
Protocols

18
Multiple Access Protocols
n ALOHA
n Carrier Sense Multiple Access
Protocols
n Token
n Collision-Free Protocols
n Limited-Contention Protocols
n Wireless LAN Protocols

19
ALOHA

20
Pure ALOHA
In pure ALOHA, frames are transmitted at
completely arbitrary times.

21
Pure ALOHA Model

n Each station transmit frames arbitrarily


n If collision occurs, the sender waits a
random time and sends it again

N N-1 2 1

Bus channel interface

The model of ALOHA

22
Pure ALOHA: Collision Demo(1)

1 2 ... N-1 N

Collision reason:two station send frame simultaneously

23
Pure ALOHA: Collision Demo(2)

t1 t3
A1 A2 A2 A2 A3
station A t
new frame collison
t2 t4
Station B B1 B1 B2 B2 B3
t

Final effect A1 B1 A2 B2
t

24
Pure ALOHA:Performance Analysis(1)
Vulnerable period for the shaded frame.

25
Pure ALOHA: Performance Analysis(2)
n Assumptions
u Fixed frame length, frame time is t
u Frames generated according to Poisson distribution
u New frames and retransmitting frames also accord
to Poisson distribution
n Parameters
u Throughput S: mean successful frames per frame
time 0£ S £ 1
u Network load G: mean frames per frame time G≥S
u probability P0: successful transmission
S = G ´ P0

26
Pure ALOHA: Performance Analysis(3)

P0= P [no other traffic being initiated during the entire


vulnerable period] = e –λ(2T) = e –2G
[ P=(λT)K e-λt/K!]

Throughput: S = G ´ P0 = G e -2G
Maximum throughput occurs when G=0.5,
S=1/2e ≈ 0.184

27
Slotted ALOHA
n Principle
Divide time into discrete intervals, each interval
corresponding to one frame, so each user must
know slot boundaries (synchronization)
t1
A1 A2 A2 A3
station A
collision
new frame
t2 B3
B1 B2 B2
station B

final effect A1 B1 B2 A2 A3 B3

28
Slotted ALOHA(2)

Tx T

P0= P [ arrival interval > T ] = e - λ T = e –G


Throughput S = G ´ P0 = G e -G
Maximum throughput occurs when G=1, S=1/e ≈ 0.368
[ P=(λT)K e-λT/k!= =GK e-G/k!]
When G=1
37%: Slots empty
37%: Successes
26%: Collisions

29
ALOHA Summary
Throughput versus offered traffic for ALOHA
systems.

30
Expected number of transmissions
n Pure ALOHA
P0=e-2G
Pk=e-2G(1-e-2G)k-1
E= åkPk=e2G

n Slotted ALOHA
P0=e-G
Pk=e-G(1-e-G)k-1
E= åkPk=eG
Higher values of G reduces number of empties but
increases number of collisions exponentially
31
Carrier Sense Multiple
Access Protocols (CSMA)

32
CSMA protocols
n Station listens for a carrier before
Sending
n Classification
u 1-persistent CSMA
Ø If the channel is busy, waits until it becomes idle,
then transmits frame immediately,
Ø If a collision occurs, waits for a random amount
of time and start all over again.
u Nonpersistent CSMA
Ø if the channel is busy, waits for a random amount
of time and sense channel again

33
CSMA protocols
n P-persistent CSMA (slotted channel)
u If the channel is busy, waits to the next slot
u If idle, transmits frame with probability of p, with
a probability of q=1-p it defers to the next slot
u Repeated until either the frame has been
transmitted or another station has begun
transmitting
u If there had been a collision, waits a random time
and starts again

34
CSMA Comparison
n 1-persistent CSMA
u Low delay when low load
u Low throughput when high load
n Nonpersistent CSMA
u High throughput when high load

35
Persistent and Nonpersistent CSMA
Comparison of the channel utilization
versus load for various random
access protocols

36
CSMA Collision Reasons
1. Two or more stations sense the channel to
be idle and begin transmitting
2. Propagation time : t

Station A Station B
A detects
t B detects an idle channel
an idle channel
e,
t:Propagation time between A and B

37
CSMA with Collision Detection
(CSMA/CD)
n Principle
Station aborts the transmission as soon as it
detects a collision, it saves time and bandwidth
n 1-persistent CSMA/CD
When a station sense the channel idle, send
immediately and keep on sensing, when
collision occur, abort transmission immediately

38
CSMA/CD: Channel state

CSMA/CD can be in one of three states:


Contention, Transmission, or Idle.

39
CSMA/CD: Contention period

Station A Station B
TB
t B sense idle
2t
B sense collision
A sense collision
2t

TB<= t
t: single trip propagation

contention period = 2 t

40
CSMA/CD: Contention period(2)

CSMA/CD with a single channel is


inherently a half-duplex system

41
Collision-Free Protocols

42
Basic bit-map protocol
nPrinciple
uEach contention period consists of N slots (bits),
with each station use one slot
uIf station have frames to send, it reserve it by fill ‘1’
in its slot, (reservation protocols)

43
Bit-map protocol: Performance
n N station, contention time is N
n One data frame is d bits, so time is d
n Low load
Efficiency= d/(N+d)
n High load
All stations have frames to send, so the N bits
contention period prorated over N frames, yielding an 1
bit overhead per frame
Efficiency=d/(d+1)

44
Token Ring

45
Properties
• The ring is a single, shared
medium All nodes see all frames.
• A distributed algorithm
determines when a node can
transmit.
• Data always flows in one
direction.
Basic idea: A token circulates around the ring.
When a host has a frame to transmit, it seizes the
token and injects the frame on the medium. The
frame is forwarded by intermediate nodes until
arriving at the destination. The destination puts the
frame back after receiving it, but with a “special
mark”. The frame circulates back to the sender.
46
令牌环 操作
D
D
T

C
T=0 C AA T=0
A
A
T
B
B
D
T C Data T C Data
A准备截获令牌 A释放令牌

C
T=1
A A

T C Data
T C Data
B

A发数据
47
Protocol of token
n Token ring
u 802.5
n Token bus
u 802.4

48
binary countdown protocol
n Problem
u Basic bit-map protocol: the overhead is 1 bit per station
u It does not scale well to networks with thousands of
stations
u Solution:Using binary station addresses
n Principle
u Each station wanting to use the channel broadcast its
address as a binary bit string
u The bits in each address position from different stations
are BOOLEAN ORed together
n Efficiency
d/(log2N+d)
n Disadvantage
u high-numbered station always gets high priority to send
u Variation: set the lowest priority to the station which send
successfully in the last contention

49
Binary Countdown protocol

A dash indicates silence

50
Limited-Contention Protocols

51
Limited-Contention Protocols
n Basic strategies for channel acquisition
u Contention:CSMA/CD
u Collision-free methods: Bit-map
n Performance measures
u Delay at low load
u Channel efficiency at high load

52
Performance of Symmetric Contention
P=1/k, A=(k-1/k)k – 1
Acquisition probability for a symmetric contention channel

n The probability of some station acquiring


the channel can be increased only by
decreasing the amount of competition
53
Limited-Contention Protocols
n Limited-contention protocols
u Use contention at low load, use a
collision-free technique at high load
u Divide stations into groups, each station
contends the group’s slot

54
Adaptive Tree Walk Protocol
n depth search first
1. build a binary tree with stations as the leaves
2. all stations contend slot 0
3. if no collision, ok
4. else only stations falling under node 2
compete slot 1
Slot 0

Slot 1

55
Improvements to Adaptive Tree Walk Protocol
G and H being the only ones wanting to transmit

Level 0 1 Slot 0

Level 1 2 slot1 3

Level 2 4 5 6 Slot 2 7

Level 3
Slot 3 slot4
station A B C D E F G H

56
Wireless LAN Protocols

57
Problems
nRadio transmitter & receiver
u Radio transmitters have some fixed range.
u In some wireless LANs, not all stations are within
range of one another
u Interference at the receiver, not at the sender
u CSMA/CD is not appropriate
nHidden station problem
nExposed station problem

(a) A transmitting (b) B transmitting


58
Solutions
n PCF (Point Coordination Function)
u Uses the base station to control all activity in its cell
u Base station broadcasts a beacon frame periodically
u The beacon frame contains system parameters. It also
invites new stations to sign up for polling service
u Once a station has signed up, it is effectively
guaranteed a certain fraction of the bandwidth
n DCF (Distributed Coordination Function)
u MACA(Multiple Access with Collision Avoidance)
protocol
u CSMA/CA:CSMA with Collision Avoidance

59
MACA: Collision Avoidance
nA sends an RTS frame to B (30 bytes, contains data length)
nB replies with a CTS frame(contains data length from RTS)
nUpon receipt of the CTS frame, A begins data transmission
nStations hearing RTS remain silent long enough (C,E)
nStations hearing CTS remain silent during the upcoming
data transmission (D,E) RTS: Request To Send
CTS: Clear To Send

60
4.3 Ethernet

61
Bob Metcalfe’s Vision

June 1976 National Computer Conference


(INTEL had just developed 8080, running at 4.77M)
nRobert Metcalfe (1946~)
u1969 Graduated from MIT
u1973 Harward (Ph.D)
u1972~1979 Xerox PARC (Palo Alto Research Center)
Ø1973 Ethernet, 3Mbps
u1979~1990 3Com 62
Early History
1973 Xerox PARC begins development of bus
topology LAN
1976 Successful CSMA/CD system to connect 100
workstations on 1 km cable
1980 Digital Equipment Corp, Intel Corp, and Xerox
release de-facto Ethernet DIX standard
1980 IEEE 802 Standardization process begins
1983 IEEE 802.3 Standard Published

63
Ethernet
n Ethernet Cabling
n Manchester Encoding
n Ethernet MAC Sublayer Protocol
n Binary Exponential Backoff Algorithm
n Ethernet Performance
n Switched Ethernet
n Fast Ethernet
n Gigabit Ethernet
n 10 Gigabit Ethernet
n Retrospective on Ethernet

64
Ethernet Cabling

65
Ethernet Cabling
The most common kinds of Ethernet cabling.

66
Ethernet Cabling:AUI,BNC,UTP5
Three kinds of Ethernet cabling.
(a) 10Base5, (b) 10Base2, (c) 10Base-T.

67
10Base5: Thick Ethernet(1)
n Cable
u Φ10, Coax, 500m
u Connections to it are generally made using vampire
taps, in which a pin is very carefully forced halfway
into the coaxial cable's core
n Transceiver cable
u Connects the transceiver to an interface board in
computer
u Up to 50 meters long
u Contains five individually shielded twisted pairs
Ø Two of the pairs are for data in and data out
Ø Two more are for control signals in and out
Ø The fifth pair, not always used, allows the
computer to power the transceiver electronics

68
10Base5: Thick Ethernet(2)
n Interface board
u Transmits and receives frames, assembling
data into proper frame format, processing
checksums
u Manage a pool of buffers for incoming
frames, a queue of buffers to be transmitted,
direct memory transfers with the host
computers
n Transceiver
u Handle carrier detection and collision
detection
u For collision, puts a special invalid signal on
cable to ensure that all other transceivers
also realize that a collision has occurred
69
10Base2: Thin Ethernet
nCable: Φ5, Coax, 185m
nBNC T-junction connector
nTransceiver electronics are on the controller board

70
10BaseT
n 10Base-T: No shared cable at all
n HUB
u Station is connected to HUB by a dedicated cable
(Max 100m)
u A box full of electronics
Ø 物理上星状结构,逻辑上总线结构
Ø 任意站发送,所有站接收
u 媒体信号的再生(放大和整形)
n RJ-45, 5 UTP (Unshielded Twisted Pairs)
u 两对线,分别用于收和发
u 差分传输:减少电磁干扰
u 同一线对的绞合:减少近端串扰
n 3UTP
n STP: Shielded Twisted Pairs
71
Using Hubs to Enlarge a LAN

72
Ethernet Topologies
(a) Linear, (b) Spine
(c) Tree, (d) Segmented.

73
Manchester Encoding

74
Manchester Encoding
(a) Binary encoding
(b) Manchester encoding
(c) Differential Manchester encoding

75
Ethernet MAC Sublayer
Protocol

76
Ethernet MAC Sublayer Protocol

Type ( 0806:ARP, 0800:IP 8137:IPX)

Frame formats. (a) DIX Ethernet, (b) IEEE 802.3.

77
Ethernet address

78
Frame length
n Maximum frame length
u 1514 byes (Data length 1500 bytes)
u Based on the fact that a transceiver needs
enough RAM to hold an entire frame and RAM
was expensive in 1978
n Minimum frame length
u Valid frames must be at least 64 bytes long
u If data portion is less than 46 bytes, Pad field is
used to fill out the frame to the minimum size
u Prevent a station from completing the
transmission of a short frame before the first bit
has even reached the far end of the cable, where
it may collide with another frame
Ø network speed
Ø maximum cable length 79
Minimum frame length

Collision detection can take as long as 2t .


80
Binary Exponential Backoff Algorithm
time slots length: 512 bit times (51.2 µsec)
1st collision, random number 0~1
2nd collision, random number 0~3
….

9th collisoin, random number 0~511


10th collisoin, random number 0~1023
11th collisoin, random number 0~1023

16th collisoin, random number 0~1023

After 16 collisions, reports failure to computer


Further recovery is up to higher layers

81
IEEE 802.3 Performance
ØFrame length: F
ØBandwith: B
ØCable length: L
ØSpeed of signal propagation: c
1
channel efficency =
1+2BLe/cF

82
Ethernet Performance
Efficiency of Ethernet at 10 Mbps with 512-bit slot times

83
Switched Ethernet

84
Switched Ethernet
nHigh-speed backplane
nCollision domain
u With only one station per collision domain, collisions
are impossible and performance is improved

85
Fast Ethernet

86
802.3u: A Soaped-up Ethernet
n The need to be backward compatible with
existing Ethernet LANs
n The fear that a new protocol might have
unforeseen problems
n The desire to get the job done before the
technology changed

87
Fast Ethernet
n Keep all the old frame formats, interfaces,
and procedural rules
n Reduce the bit time from 100 ns to 10 ns
n Reducing maximum cable length by a factor
of 10
n All fast Ethernet systems use hubs and
switches; multidrop cables with vampire
taps or BNC connectors are not permitted

88
Fast Ethernet cabling

89
100Base-T4
n Uses a signaling speed of 25 MHz
n Requires 4 twisted pairs (category 3 UTP)
u One is always to the hub
u One is always from the hub
u The other two are switchable to the current
transmission direction
n Coding
u Manchester encoding is not used
u Ternary signals are sent during a clock period
Ø 27 possible symbols, transmit 4 bits
u At least 33.3-Mbps reverse channel(8B/6T)

90
100Base-TX
n Uses a signaling speed of 125 MHz
n Requires 2 twisted pairs (category 5 UTP)
u One is to the hub
u One is from the hub
(Full duplex)
n Coding
u 4B/5B: 125 * 4/5 = 100Mbps

91
Interconnection Devices
n Hub (Half-duplex communication)
u Incoming lines are logically connected, forming a
single collision domain
u All the standard rules, including the binary
exponential backoff algorithm, apply, so the
system works just like old-fashioned Ethernet
u Hubs are not permitted with 100Base-FX
n Switch
u Incoming frame is buffered and passed to the
destination
u 100Base-FX cables are too long for collision
algorithm, must be connected to switches

92
10-Mbps & 100-Mbps Autoconfiguration
n 802.3u provides a way for two stations to
negotiate the speed (10 or 100 Mbps) and
duplexity (half or full)
n Most fast Ethernet products use this feature
to autoconfigure themselves

93
Gigabit Ethernet

94
802.3z Goals
n Make Ethernet go 10 times faster
n Remain backward compatible with all
existing Ethernet standards
u Unacknowledged datagram service with both
unicast and multicast
u Use 48-bit addressing scheme already in use
u Maintain the same frame format, including the
minimum and maximum frame sizes

95
Gigabit Ethernet

(a) A two-station Ethernet.


(b) A multistation Ethernet.

96
Switch : Full-duplex Mode
n Switch (Full-duplex Mode)
u Since no contention is possible, the CSMA/CD
protocol is not used
u Maximum length of the cable is determined by
signal strength issues
u Switches are free to mix and match speeds.
Autoconfiguration is supported

97
Hub: Half-duplex Mode
n Simulating classic Ethernet
u Electrically connects all the lines internally
u Collisions are possible, so CSMA/CD protocol is required
n Problem: A radius of 25 meters
n Solutions
u Carrier extension
Ø Add padding after the normal frame to extend the
frame to 512 bytes (Padding is added by the sending
hardware and removed by the receiving hardware)
u Frame bursting
Ø Allows a sender to transmit a concatenated sequence
of multiple frames in a single transmission
Remain the radius of the network to 200 meters

98
Gigabit Ethernet cabling、Coding
n Cable

n Code
u 8B/10B
u 4D-5PAM

99
Flow Control
n Problem: 1 Gbps is quite fast
u If a receiver is busy with some other task for 1 ms, 1953
frames may have accumulated
u When a computer is shipping data to a computer on a
classic Ethernet, buffer overruns are very likely
n Control frames
u One end sending a special control frame to the other end
telling it to pause for some period of time
u Normal Ethernet frames containing a type of 0x8808
u The first two bytes of the data field give the command;
succeeding bytes provide the parameters.
n Flow control
u PAUSE frames are used, 512ns~33.6ms

100
Reasons for Longevity of Ethernet
n Reliable
u 10base2:BNC
u 10BaseT
n Cheap
u Thin Ethernet and twisted pair wiring is relatively
inexpensive
u Interface cards are also low cost
n Easy to maintain
u No software to install
u No configuration tables to manage
u Adding new hosts is as simple as just plugging
them in

101
10 Gigabit Ethernet

102
Where to be needed
n Inside data centers
n Exchanges to connect high-end routers,
switches, and servers
n In long-distance, high bandwidth trunks
between offices
n The long distance connections use optical
fiber, while the short connections may use
copper or fiber

103
Kind of 10-gigabit Ethernet
n Support only full-duplex operation
n Interfaces autonegotiate
n 64B/66B code

104
4.4 Wireless LAN

105
802.11/WIFI

106
802.11 LAN architecture
n wireless host
communicates with
base station
Internet
u base station =
access point (AP)
n Basic Service Set (BSS)
u wireless hosts
Switch or router
u access point (AP):
AP base station
BSS 1 u ad hoc mode: hosts
only
AP

BSS 2
107
802.11 protocol stack

n 2013 802.11ac MU-MIMO


n 2019 802.11ax MU-MIMO
n 2024 802.11be CMU-MIMO

108
IEEE 802.11 Wireless LAN
n 802.11b n 802.11a
u 2.4-5 GHz unlicensed u 5-6 GHz range
radio spectrum u up to 54 Mbps
u up to 11 Mbps u OFDM
u direct sequence spread n 802.11g
spectrum (DSSS) in
physical layer u 2.4-5 GHz range
u widely deployed, using
u up to 54 Mbps
base stations u OFDM, like ADSL
modem
n 802.11n
u up to 600 Mbps n All use CSMA/CA for
multiple access
u MIMO
n All have base-station
n 802.11ac、ac、be
and ad-hoc network
1.6G、9.6G、30G versions

109
IEEE 802.11: multiple access
n avoid collisions: nodes transmitting at same
time
n 802.11: CSMA - sense before transmitting
u don’t collide with ongoing transmission by other node
n 802.11: no collision detection!
u difficult to receive (sense collisions) when transmitting
due to weak received signals (fading)
u can’t sense all collisions in any case: hidden terminal
u goal: avoid collisions: CSMA/C(ollision)A(voidance)

110
CSMA/CA
n 802.11 MAC is different from that of Ethernet
u Radios are always half duplex
u Received signal is 106 times weaker than the
transmitted, collision detection mechanism does not
work
n Avoid collisions with a protocol called CSMA/CA
When a station has a frame to send:
u Waits until the channel is idle by sensing and wait
DIFS
u Random backoff (0~15 time slots): counts down idle
slots, pausing when frames are sent. Sends its frame
when the counter reaches 0
u If the frame gets through, destination sends a short
ACK
u Lack of an ACK is inferred to indicate a collision or
other error, doubles the backoff period and tries again
(as exponential backoff in Ethernet)
111
CSMA/CA

112
Channel Sensing
n Physical sensing
u Checks the medium to see if there is a valid signal
n Virtual sensing
u Each station keeps a logical record of when the
channel is in use by tracking NAV (Network Allocation
Vector)
u Each frame carries a NAV
Ø NAV of a data frame includes the time needed to send ACK
u Optional RTS/CTS mechanism

113
802.11 reliability
n Lower the transmission rate
n A fragment burst

114
802.11 Saving power
n Beacon frames
u Clients can enter power-save mode;
u AP will buffer traffic;
u the client sends a poll message to the AP

n APSD (Automatic Power Save Delivery)


u the AP buffers frames and sends them to a client just after
the client sends frames to it

115
QOS:Interframe Spacing (IFS) in 802.11
n DIFS (DCF) :Regular data frames
n SIFS allow the parties in a single dialog
u ACK frame
u Other control frame sequences like RTS and CTS
u A burst of fragments
n AIFS1 (Arbitration InterFrame Space)
u PCF, Voice or other high-priority traffic
n AIFS4 used for background traffic

116
QOS:TXOP
n Two stations: 6Mbps and 54M bps
They each get to send one frame, both get
5.4Mbps on average
n Use TXOP
Each station gets an equal amount of
airtime,they get 3 Mbps and 27 Mbps,
respectively

117
TXOP
某带AP的无线LAN有10个站点,其中4个站点的数据
率为6Mbps,4个站点的数据率为18Mbps,另外2个
站点的数据率为54Mbps。如果10个站点同时发送数
据,在不适用和使用TXOP情况下,每个站点或得的数
据率分别是多少?

54/(4*9+4*3+2)=1.08

118
MAC Layer Frames
n Data Frames
n Control Frames
u RTS,CTS,ACK
n Management Frames
u Beacon and Probe frames

119
Format of the 802.11 Data Frame

120
802.11 frame: addressing

2 2 6 6 6 2 0 - 2312 4
frame address address address seq
duration payload CRC
control 1 2 3 control

Address 1: MAC address


of wireless host or AP Address 3: MAC address
to receive this frame of router interface to
which AP is attached
Address 2: MAC address
of wireless host or AP
transmitting this frame

121
802.11 frame: addressing

Internet
H1 R1 router
AP

R1 MAC addr H1 MAC addr


dest. address source address

802.3 frame

AP MAC addr H1 MAC addr R1 MAC addr


address 1 address 2 address 3

802.11 frame

122
802.2: Logical Link Control

123
802.2: LLC
n Run on top of 802.3 & other 802 protocols
u Hides differences between the various kinds of
802 networks by providing a single format and
interface to the network layer
n LLC provides three service options
u Unreliable datagram service
(best-efforts datagram service)
u Acknowledged datagram service
(Error-controlled)
u Reliable connection-oriented service
(Error-controlled & flow-controlled)

124
Position of LLC

(a) Position of LLC. (b) Protocol formats.

125
4.8 Data Link Layer
Switching

126
Data Link Layer Switching
n Bridges from 802.x to 802.y
n Local Internetworking
n Spanning Tree Bridges
n Remote Bridges
n Repeaters, Hubs, Bridges, Switches,
Routers, Gateways
n Virtual LANs

127
Local Internetworking

128
Data Link Layer Switching
n The need for interaction
n The organization may be geographically
spread over several buildings
n Split a single LAN into separate LANs to
accommodate the load (multiple collision
domains)
n Physical distance(2500m)
n Reliability
n Security

129
Bridge

130
A LAN bridge from 802.11 to 802.3
Operation of a LAN bridge from 802.11 to 802.3.

131
Bridges from 802.x to 802.y
n Problems
u Each of the LANs uses a different frame format
u LANs do not run at the same data rate
u Different 802 LANs have different maximum
frame lengths.
u Security: Wireless networks support encryption
in the data link layer, Ethernet does not
u QoS (Quality of service:802.11、802.16)

132
IEEE 802 frame formats

133
A configuration with 4 LANs & 2 bridges

134
Learning Bridge
(Transparent)

135
Learning Bridge
n Operates in promiscuous mode
Accepting every frame transmitted on all the LANs to which
it is attached
n Station table
u Lists each possible destination and tell which output line
(LAN) it belongs on
n Routing procedure for an incoming frame
u If destination LAN and source LAN are the same, discard
the frame
u If destination LAN and source LAN are different, forward
the frame
u If destination LAN is unknown or multicast/broadcast
address, use flooding algorithm
Ø Flooding algorithm: output on all the LANs to which the
bridge is connected except the one it arrived on
136
Station table: Backward Learning
n Init
u When the bridges are first plugged in, all the
hash tables are empty
n Add
u Bridges operate in promiscuous mode, so they
see every frame sent on any of their LANs
u By looking at the source address, they can tell
which machine is accessible on which LAN

137
Dynamic topologies
n Problem
u The topology can change as machines and bridges are
powered up and down and moved around
n Solution
u Whenever a hash table entry is made, the arrival time of
the frame is noted in the entry
u Whenever a frame whose source is already in the table
arrives, its entry is updated with the current time
u Periodically scan the hash table and purges all entries
more than a few minutes old
Ø If a computer is unplugged from its LAN, moved around
the building, and plugged in again somewhere else,
within a few minutes it will be back in normal operation,
without any manual intervention
Ø This algorithm also means that if a machine is quiet for
a few minutes, any traffic sent to it will have to be
flooded until it next sends a frame itself
138
Example
B1 B2
1 2 1 2

A B C D E F

MAC Intf MAC Intf


A→B A 1 A→B A 1
F→C F 2 F→C F 2
B→A B 1
… …
… …

139
Example2

B1 B2
1 A send frame to C A 1 A 2
2 E send frame to A E 2 E 3
3 D send frame to E D 3
4 E move to LAN2
5 E send frame to A E 2 E 2
140
Protocol processing at a bridge

141
Spanning Tree Bridges

142
Loops in the Topology
n Problem
uTo increase reliability, some sites use two or
more bridges in parallel between pairs of LANs
uThis arrangement introduces problems because
it creates loops in the topology

143
Spanning Tree Bridges
n Solution (Radia Perlman, 1983)
u Bridges communicate with each other
and overlay the actual topology with a
spanning tree that reaches every LAN
u Using this spanning tree, there is exactly
one path from every LAN to every other
LAN, loops are impossible
u Some potential connections between
LANs are ignored in the interest of
constructing a fictitious loop-free
topology
Radia Perlman 2009
(born 1951)

144
Spanning Tree Bridges

(a) Interconnected LANs. (b) A spanning tree covering the LANs. The
dotted lines are not part of the spanning tree.

145
Spanning Tree Bridges

146
802.1d: Constructing the Spanning Tree
u Bridge periodically multicast a message out all of its ports, this
message is not forwarded, it includes:
Ø an ID based on its MAC address
Ø ID of the root it believe to be
Ø the distance to root
u Chose the bridge with the lowest ID to be the root, after
enough messages exchanged, all bridges will agree on the root
u Remembers the shortest path to root, if there are multiple
equivalent paths, the path via bridge with lowest ID is chosen
u Turn off ports that are not part of the shortest path
u Algorithm continues to run during normal operation to
automatically detect topology changes and update the tree

147
Dynamic Topologies
n BPDU (Bridge Protocol Data Unit)
Bridge periodically multicast a message (MAC 01:80:c2:00:00:00) out all of
its ports, this message is not forwarded, it includes:
uan ID based on its MAC address
uID of the root it believe to be
uthe distance to root
n Root Bridge of Whole Net
uChose the bridge with lowest ID to be the root, after enough
messages exchanged, all bridges will agree on the root
n Root Port of Every Bridge
uRemembers the shortest path to root, if there are multiple
equivalent paths, the path via bridge with lowest ID is chosen
n Algorithm continues to run during normal operation to
automatically detect topology changes and update the tree

148
Repeaters, Hubs, Bridges,
Switches, Routers and
Gateways

149
Repeaters, Hubs, Bridges, Switches, Routers
and Gateways

(a) Which device is in which layer.


(b) Frames, packets, and headers.

150
Hubs, Bridges, Switches
(a) A hub. (b) A bridge. (c) A switch.

n Bridges & Switchs


u Special-purpose VLSI chips lookup and update
station table entry in a few microseconds
u Buffer space: if frames come in faster than
they can be retransmitted, the switch may run
out of buffer space and start discarding frames
u Cut-through switches
151
Virtual LANs

152
Virtual LANs
A building with centralized wiring using hubs and a switch.

153
Virtual LANs
A building with centralized wiring using hubs and a switch.

154
Reason for Virtual LANs
n Broadcast storm
uLAN capacity is occupied by these frames
uMachines are crippled just processing and
discarding all the frames being broadcast
n Security
uMany departments have information that they
do not want passed outside their department

155
Virtual LANs

(a) Four physical LANs organized into two VLANs, gray and white, by two bridges.
(b) The same 15 machines organized into two VLANs by switches.

156
VLAN ID
uIn the switches, configuration tables tell which
VLANs are accessible via which ports
ØEvery port is assigned a VLAN ID
l This method only works if all machines on a port
belong to the same VLAN
ØEvery MAC address is assigned a VLAN ID
l When a frame arrives, the switch extracts the MAC
address and look it up in a table to see which VLAN
the frame came from
ØEvery layer 3 protocol or IP address is assigned a
VLAN ID

157
The IEEE 802.1Q Standard
Transition from legacy Ethernet to VLAN-aware Ethernet.
The shaded symbols are VLAN aware. The empty ones are not.

158
802.1Q: Frame formats
The 802.3 (legacy) and 802.1Q Ethernet frame formats.

uVLAN protocol ID (16 bits): 0x8100


uPri (3 bits)
uCFI (1 bit)
uVLAN Identifier (12 Bits)
u802.1Q Max frame length: 1522 bytes
159
Summary (1)
n Static & Dynamic Channel Allocation
n Multiple Access Protocols
u ALOHA
u Carrier Sense Multiple Access (CSMA/CD)
u Collision-Free Protocols
u Limited-Contention Protocols
u Wireless LAN Protocols (CSMA/CA)
n Ethernet
u Ethernet Cabling
u Manchester Encoding
u Ethernet MAC Sublayer Protocol
u Binary Exponential Backoff Algorithm
u Fast Ethernet / Gigabit Ethernet /10 Gigabit
Ethernet 160
Summary (2)
n Data Link Layer Switching
u Transparent Bridge
u Spanning Tree Bridges
u Remote Bridges
u Repeaters, Hubs, Bridges, Switches, Routers,
Gateways
u Virtual LANs

161
About ALOHA
n Norman Abramson先后毕业于
Harvard大学、UCLA(加州大学
Los Angeles分校)、Stanford
大学,分别获学士、硕士、博士学位,毕业后在
Stanford大学电子工程系任教。1967开始任Hawaii
大学信息与计算机科学系教授,并从事通信理论研
究,领导ALOHA系统研究项目,提出了著名的ALOHA
多址通信协议和CRC(循环冗余校验)专利技术,
并成功建立了世界上第一个数据通信网络ALOHANET,
开创了计算机局域网和现代数据通信网,同时也首
先实现了无线分组数据接入方法。

162
About ETHERNET
n 1973年,为了实现几台电脑之
间的简单联接和信息交互,施乐
公司Palo Alto研究中心(PARC)
的研究员Bob Metcalfe描绘出了
大致的网络构想,并将这项技术
命名为“Ethernet”。当时的数据传输速率为
2.94Mbps,以太网就此诞生。

163

You might also like