slide-part2

advertisement
Chapter 4 The Medium Access Control Sublayer
4.3 Etherent
IEEE 802 Group
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
1
Chapter 4 The Medium Access Control Sublayer
4.3 Etherent
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
2
Chapter 4 The Medium Access Control Sublayer
4.3 Etherent
Classical Ethernet
IEEE 802.3: 1-persistent CSMA/CD
Switched Ethernet
Fast Ethernet (100Mbps), Gigabit Ethernet, 10G Ethernet
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
3
Chapter 4 The Medium Access Control Sublayer
4.3.1 Classical Ethernet Physical Layer
MIT->Harvard->Hawaii->Xerox PARC
(Palo Alto Research Center)->Ethernet
->3COM
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
4
Chapter 4 The Medium Access Control Sublayer
4.3.1 Classical Ethernet Physical Layer
The Xerox Ethernet was so successful that DEC, Intel, and
Xerox drew up a standard in 1978 for a 10-Mbps Ethernet,
called DIX standard. DIX became IEEE 802.3 in 1983.
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
5
Chapter 4 The Medium Access Control Sublayer
4.3.1 Classical Ethernet Physical Layer
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
6
Chapter 4 The Medium Access Control Sublayer
4.3.1 Classical Ethernet Physical Layer
Cable topologies. (a) Linear, (b) Spine, (c) Tree, (d) Segmented
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
7
Chapter 4 The Medium Access Control Sublayer
4.3.1 Classical Ethernet Physical Layer
To allow larger networks, multiple cables can be connected by
repeaters.
A repeater is a physical layer
device. It receives, amplifies,
and retransmits signals in both
directions. As far as the software
is concerned, a series of cable
segments connected by repeaters
is no different than a single
cable.
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
8
Chapter 4 The Medium Access Control Sublayer
medium
signals
maximum
segment
maximum
distance
nodes per
segment
collision
detection
Notes
10BASE5
Ethernet
coaxial cable
50ohm-10mm
10Mbps
Manch
10BASE2
1BASE5
10BROAD36
Cheaper net StarLAN
Broadband
coaxial cable twisted-pair coaxial cable
50ohms-5mm unshielded
75ohms
10BASE-T
Twisted-pair
2 simplex TP
unshielded
10Mbps
Manch
1Mbps
Manch
10Mbps
DPSK
10Mbps
Manch
500m
185m
500m
1800m
100m
2.5km
0.925km
2.5km
3.6km
1km
100
30
excess current
2
2 active hub
inputs
transmission
=reception
activity on
receiver and
transmitter
slot time=512 bits; gap time=96 bits; jam=32 to 48 bits
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
9
Chapter 4 The Medium Access Control Sublayer
4.3.1 Classical Ethernet Physical Layer
Manchester Encoding
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
10
Chapter 4 The Medium Access Control Sublayer
4.3.2 Classical Ethernet MAC Sublayer Protocol
Frame formats. (a) Ethernet (DIX). (b) IEEE
802.3.
>1500 is type, otherwise interprets as length
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
11
Chapter 4 The Medium Access Control Sublayer
4.3.2 Classical Ethernet MAC
Sublayer
The first
3 bytesProtocol
are OUI
802.3 frame format
(Organizationally Unique Identifier)
(Manufacturer)
0 single address
1 group address
multicast (all 1's for broadcast)
0 local address
No significance outside
46
1 global address one of 2 unique address
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
12
Chapter 4 The Medium Access Control Sublayer
4.3.2 Classical Ethernet MAC Sublayer Protocol
802.3 frame format
Minimum frame length: 64 bytes (6+6+2+46+4)
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
13
Chapter 4 The Medium Access Control Sublayer
4.3.2 Classical Ethernet MAC Sublayer Protocol
For a 10 Mbps LAN with a maximum length of 2500
meters (with 4 repeaters), the round-trip time is 50 msec
in the worst case.
(10M)x(50 msec) =500 bits~512 bits=64 bytes
Checksum= 32-bit CRC=
x32+x26+x23+x22+x16+x12+x11+x10+x8+x7+x5+x4+x2+x+1
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
14
Chapter 4 The Medium Access Control Sublayer
4.3.2 Classical Ethernet MAC Sublayer Protocol
802.3 frame format
As the network speed goes up, the minimum frame length must
go up or the maximum cable length must come down
proportionally.
For a 2500-meter LAN operating at 1 Gbps, the minimum frame
size would have to be 6400 bytes.
Alternatively, the minimum frame size could be 64 bytes and the
maximum distance between any two stations 250 meters.
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
15
Chapter 4 The Medium Access Control Sublayer
4.3.2 Classical Ethernet MAC Sublayer Protocol
Ethernet Frame Structure v2 (or DIX Ethernet, for DEC, Intel, Xerox)
7
1
6
6
2
preamble SFD DA SA type
synchronize
the receiver
start frame
delimiter
4
Data
CRC
60 to 1514 bytes
Cyclic Redundancy Check
Type>0x0600=1536
0800: IPv4 datagram
0806: ARP request/reply
8035: RARP request/reply
86DD: IPv6
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
16
Chapter 4 The Medium Access Control Sublayer
4.3.2 Classical Ethernet MAC Sublayer Protocol
The Binary Exponential Backoff Algorithm
If a frame has collided n successive times, where n<16, then the
node chooses a random number K with equal probability from the
set {0,1,2,3,...,2m-1} where m=min{10,n}. The node then waits
for K  512 bit times. (slot time=512 bit time)
after first collision
after second collision
after third
collision
select one to start transmission
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
17
Chapter 4 The Medium Access Control Sublayer
4.3.2 Classical Ethernet MAC Sublayer Protocol
Acknowledgements
As far as CSMA/CD is concerned, an acknowledgement
would be just another frame and would have to fight for
channel time just like a data frame.
(What is the problem?)
A simple modification would allow speedy confirmation of
frame receipt. All that would be needed is to reserve the first
contention slot following successful transmission for the
destination station.
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
18
Chapter 4 The Medium Access Control Sublayer
4.3.3 Ethernet Performance
Performance
Assume k stations are always ready to transmit and a constant
retransmission probability in each slot. (A rigorous analysis of
the binary exponential backoff algorithm is complicated.)
If each station transmits during a contention slot with probability
p, the probability A that some station acquires the channel in that
slot is A  kp (1  p ) k  1
A is maximized
when p 
1
, with
k
A  1 /e as k   .
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
19
Chapter 4 The Medium Access Control Sublayer
4.3.3 Ethernet Performance
Performance
The probability that the contention interval has exactly j slots
in it is A(1-A)j-1, so the mean number of slots per contention is
given by 
1
j 1

j0
jA (1  A )

A
Since each slot has a duration 2t, the mean contention interval,
w, is 2t/A. Assuming optimal p, the mean number of contention
slots is never more than e, so w is at most 2te5.4t.
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
20
Chapter 4 The Medium Access Control Sublayer
4.3.3 Ethernet Performance
Performance
If the mean frame takes P sec to transmit, when many stations
have frames to send,
P
channel efficiency=
P  2t / A
Here we see where the maximum cable distance between any
two stations enters into the performance figures. The longer
the cable, the longer the contention interval. By allowing no
more than 2.5km of cable and four repeaters between any two
transceivers, the round-trip time can be bounded to 51.2 msec,
which at 10Mbps corresponds to 512 bits or 64 bytes, the
minimum frame size.
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
21
Chapter 4 The Medium Access Control Sublayer
4.3.3 Ethernet Performance
Performance
Let P=F/B (frame_length/bandwidth) and t=L/C
(cable_length/signal_propagation_speed). For the optimal case
of e contention slots per frame,
1
channel efficiency=
1  2 BLe / cF
Increasing network bandwidth or distance (the BL product)
reduces efficiency for a given frame size. Unfortunately, much
research on network hardware is aimed precisely at increasing
this product. People want high bandwidth over long distances,
which suggests that 802.3 may not be the best system for these
applications.
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
22
Chapter 4 The Medium Access Control Sublayer
4.3.3 Ethernet Performance
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
23
Chapter 4 The Medium Access Control Sublayer
4.3.3 Ethernet Performance
Many theoretical analysis assume the input traffic is Poisson.
It now appears that network traffic is rarely Poisson, but selfsimilar. What this means is that averaging over long periods
of time does not smooth out the traffic.
The average number of packets in each minute of an hour has
as much variance as the average number of packets in each
second of s minute.
The consequence of this discovery is that most models of
network traffic do not apply to the real world and should be
taken with a grain of salt.
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
24
Chapter 4 The Medium Access Control Sublayer
4.3.4 Switched Ethernet
Just like a single cable
Ethernet
Not necessarily this kind
of wiring
(a) Hub. (b) Switch.
Must know which station
is in which port
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
25
Chapter 4 The Medium Access Control Sublayer
4.3.4 Switched Ethernet
An Ethernet switch.
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
26
Chapter 4 The Medium Access Control Sublayer
4.3.5 Fast Ethernet
Fast Ethernet
The three primary reasons that the 803 committee decided to
go with a souped-up 802.3 LAN (instead of a totally new
one) were:
1. The need to be backward compatible with thousands of
existing LANs.
2. The fear that a new protocol might have unforeseen
problems.
3. The desire to get the job done before the technology
changed.
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
27
Chapter 4 The Medium Access Control Sublayer
4.3.5 Fast Ethernet
Fast Ethernet
The basic idea behind fast Ethernet was simple: keep all the old
packet formats, interfaces, and procedural rules, but just reduce
the bit time form 100 nsec to 10 nsec.
Technically, it would have been possible to copy 10Base5 or
10Base2 and still detect collisions on time by just reducing the
maximum cable length by a factor of ten.
However, the advantages of 10BaseT wiring were so
overwhelming that fast Ethernet is based entirely on this design.
Thus all fast Ethernet systems use hubs and switches.
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
28
Chapter 4 The Medium Access Control Sublayer
4.3.5 Fast Ethernet
Fast Ethernet
The category 3 UTP scheme, called 100Base-T4, uses a signaling
speed of 25 MHz, only 25 percent faster than standard 802.3’s 20
MHz. To achieve the necessary bandwidth, 100BaseT4 requires
four twisted pairs.
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
29
Chapter 4 The Medium Access Control Sublayer
4.3.5 Fast Ethernet
Fast Ethernet
Of the four twisted pairs, one is always to the hub, one is always
from the hub, and the other two are switchable to the current
transmission direction.
To get the necessary bandwidth, Manchester encoding is not used,
but with modern clocks and such short distances, it is no longer
needed.
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
30
Chapter 4 The Medium Access Control Sublayer
4.3.5 Fast Ethernet
Fast Ethernet
Ternary signals are sent, so that during a single clock period the
wire can contain a 0, a 1, or a 2. With three twisted pairs going in
the forward direction and ternary signaling, any one of the 27
possible symbols can be transmitted, making it possible to send 4
bits with some redundancy. Transmitting 4 bits in each of the 25
million clock cycles per second gives the necessary 100 Mbps.
In addition, there is always a 33.3 Mbps (100/3) reverse channel
using the remaining twisted pair.
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
31
Chapter 4 The Medium Access Control Sublayer
4.3.5 Fast Ethernet
Fast Ethernet
For category 5 wiring, the design, 100Base-TX, is simpler
because the wires can handle clock rates up to 125 MHz and
beyond. Only two twisted pairs per station are used, one to the
hub and one from it.
Rather than just use straight binary coding, a scheme called
4B5B is used at 125 MHz. Every group of 5 clock periods is
used to send 4 bits in order to give some redundancy, provide
enough transitions to allow easy clock synchronization, create
unique patterns for frame delimiting, and be compatible with
FDDI in the physical layer.
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
32
Chapter 4 The Medium Access Control Sublayer
4.3.5 Fast Ethernet
Fast Ethernet
Consequently, 100Base-TX is a full-duplex system; stations can
transmit at 100 Mbps and receive at 100 Mbps at the same time.
Often 100Base-TX and 100Base-T4 are collectively referred as
100Base-T.
The last option, 100Base-FX, uses two strands of multimode
fiber, one for each direction, so it, too, is full duplex with 100
Mbps in each direction. In addition, the distance between a
station and the hub can be up to 2 km.
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
33
Chapter 4 The Medium Access Control Sublayer
4.3.6 Gigabit Ethernet
Gigabit Ethernet
The ink was barely dry on the fast Ethernet standard when the
802 committee bagan working on a yet faster Ethernet. It was
quickly dubbed gigabit Ethernet and was ratified by IEEE in
1999 under the name 802.3ab.
An important design goal: remain backward compatibility
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
34
Chapter 4 The Medium Access Control Sublayer
4.3.6 Gigabit Ethernet
Gigabit Ethernet
All configurations of gigabit Ethernet are point-to-point.
Each individual Ethernet cable has exactly two devices on it, no
more and no fewer.
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
35
Chapter 4 The Medium Access Sublayer
Control Sublayer
4.3.6 Gigabit Ethernet
Gigabit Ethernet
Two different modes of operation: full duplex and half duplex
The normal mode is full-duplex used when computers are
connected to a switch.
The sender does not have to sense the channel to see if
anybody else is using it because contention is impossible. So
CSMA/CD protocol is not used.
So the maximum length of the cable is determined by signal
strength issues rather than by the collision detection issue.
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
36
Chapter 4 The Medium Access Control Sublayer
4.3.6 Gigabit Ethernet
Gigabit Ethernet
Half-duplex is used when the computers are connected to a hub.
A hub does not buffer incoming frames. So collisions are
possible and CSMA/CD is required.
But now the transmission time for a 64-byte frame is 100
times faster. So the distance is 100 times less than Ethernet.
That is, only 25 meters.
The 802.3ab committee considered a radius of 25 meters to
be unacceptable and added two features to the standard to
increase the radius.
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
37
Chapter 4 The Medium Access Control Sublayer
4.3.6 Gigabit Ethernet
Gigabit Ethernet
The first feature, called carrier extension, essentially tells the
hardware to add its own padding to extend the frame to 512
bytes. Of course, using 512 bytes to transmit 64 bytes of data
has a line efficiency of 9%.
The second feature, called frame bursting, allows a sender to
transmit a concatenated sequence of multiple frames in a
single transmission. If the total length is less than 512 bytes,
the hardware pads it again.
Just for backward compatibility. Most will use switches.
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
38
Chapter 4 The Medium Access Control Sublayer
4.3.6 Gigabit Ethernet
Gigabit Ethernet
Cabling
Gigabit Ethernet uses new encoding rules on the fiber.
Manchester encoding at 1Gbps would require 2G baud signal,
too difficult and too wasteful.
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
39
Chapter 4 The Medium Access Control Sublayer
4.3.6 Gigabit Ethernet
Gigabit Ethernet
8B/10B is used. Each 8-bit byte is encoded as 10 bits.
256 out of 1024. Two rules are used:
1. No codeword may have more than four identical bits in a row.
2. No codeword may have more than six 0s or six 1s.
In addition, many input bytes have two possible codewords
assigned to them. When there is a choice, the encoder always
chooses the one that tries to equalize the number of 0s and 1s
transmitted so far.
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
40
Chapter 4 The Medium Access Control Sublayer
4.3.6 Gigabit Ethernet
Gigabit Ethernet
1000Base-T uses a different encoding scheme since clocking
data onto copper wire in 1 nsec is too difficult.
The solution uses four category 5 twisted pairs to allow four
symbols to be transmitted in parallel.
Each symbol is encoded using one of five voltage levels. This
scheme allows a single symbol to encode 00, 01, 10, 11, or a
special value for control purposes.
The clock runs at 125MHz, allowing 1-Gbps operation.
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
41
Chapter 4 The Medium Access Control Sublayer
4.3.6 Gigabit Ethernet
Gigabit Ethernet
Gigabit Ethernet supports flow control which consists of one
end sending a special control frame to the other end telling it to
pause for some period of time.
For gigabit Ethernet, the time unit for pause is 512 nsec. The
maximum is 33.6 msec.
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
42
Chapter 4 The Medium Access Control Sublayer
4.3.7 10-Gigabit Ethernet
10 Gigabit Ethernet cabling
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
43
Chapter 4 The Medium Access Control Sublayer
4.3.8 Retrospective on Ethernet
Ethernet has been around for over 30 years and has no serious
competitions.
Few CPU architectures, operating systems, or programming
languages have been king of the mountain for three decades
going on strong.
Clearly, Ethernet did something right. What?
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
44
Chapter 4 The Medium Access Control Sublayer
4.3.8 Retrospective on Ethernet
Simple and Flexible
Simple translates into reliable, cheap, and easy to maintain.
Ethernet interworks easily with TCP/IP, which has become
dominant. (Both are connectionless)
Lastly and perhaps the most importantly, Ethernet has been
able to evolve in certain crucial ways
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
45
Chapter 4 The Medium Access Control Sublayer
4.3.8 Retrospective on Ethernet
• In anyway,
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
46
Chapter 4 The Medium Access Control Sublayer
4.3.8 Retrospective on Ethernet
 What I see in the Korea Customs:
 Korea Immigration Smart Service
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
47
Chapter 4 The Medium Access Control Sublayer
4.4 Wireless LANS
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
48
Chapter 4 The Medium Access Control Sublayer
4.4.1 The 802.11 Architecture and Protocol Stack
Access
Point
To Network
Client
802.11 architecture – infrastructure mode
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
49
Chapter 4 The Medium Access Control Sublayer
4.4.1 The 802.11 Architecture and Protocol Stack
802.11 architecture – ad-hoc mode
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
50
Chapter 4 The Medium Access Control Sublayer
4.4.1 The 802.11 Architecture and Protocol Stack
Part of the 802.11 protocol stack.
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
51
Chapter 4 The Medium Access Control Sublayer
4.4.1 The 802.11 Architecture and Protocol Stack
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
52
Chapter 4 The Medium Access Control Sublayer
4.4.2 The 802.11 Physical Layer
Rate adaptation: Reduce rate if signal is bad
OFDM (Orthogonal Frequency Division Multiplexing)
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
53
Chapter 4 The Medium Access Control Sublayer
4.4.2 The 802.11 Physical Layer
MIMO (Multiple Input Multiple Output)
Note that the
terms input and output
refer to the radio
channel carrying the
signal, not to the
devices having
antennas.
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
54
Chapter 4 The Medium Access Control Sublayer
4.4.3 The 802.11 MAC Sublayer Protocol
CSMA/CA: CSMA with Collision Avoidance
DCF: Distributed Coordination Function
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
55
Chapter 4 The Medium Access Control Sublayer
4.4.3 The 802.11 MAC Sublayer Protocol
CSMA/CA: CSMA with Collision Avoidance
Two modes of operation:
DCF: distributed coordination function, no central control
PCF: point coordination function, the base station controls
all activity in its cell
All implementations must support DCF but PCF is optional.
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
56
Chapter 4 The Medium Access Control Sublayer
4.4.3 The 802.11 MAC Sublayer Protocol
CSMA/CA: CSMA with Collision Avoidance
When DCF is employed, 802.11 uses a protocol called
CSMA/CA (CSMA with Collision Avoidance). Two
methods of operation are supported by CSMA/CA.
In the first method:
1. When a station wants to transmit, it senses the channel. If it
is idle, it just starts transmitting.
2. If the channel is busy, the sender defers until it is idle and
then starts transmitting.
3. It does not sense the channel while transmitting.
4. If a collision occurs, the colliding stations wait a random
time, using Ethernet binary exponential backoff algorithm,
and try again later.
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
57
Chapter 4 The Medium Access Control Sublayer
4.4.3 The 802.11 MAC Sublayer Protocol
CSMA/CA: CSMA with Collision Avoidance
(a) The hidden station problem
(b) The exposed station problem
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
58
Chapter 4 The Medium Access Control Sublayer
4.4.3 The 802.11 MAC Sublayer Protocol
CSMA/CA: CSMA with Collision Avoidance
Virtual channel sensing.
A wants to send to B. C is within range of A. D is within range of
B, but not A. (NAV: network allocation vector)
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
59
Chapter 4 The Medium Access Control Sublayer
4.4.3 The 802.11 MAC Sublayer Protocol
CSMA/CA: CSMA with Collision Avoidance
Wireless networks are noisy and unreliable. If a frame is too
long, it has very little chance of getting through undamaged. So
802.11 allows frames to be fragmented into smaller pieces, each
with its own checksum.
Stop and Wait is used.
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
60
Chapter 4 The Medium Access Control Sublayer
4.4.3 The 802.11 MAC Sublayer Protocol
CSMA/CA: CSMA with Collision Avoidance
In PCF, the base stations polls the other stations, asking them if
they have any frames to send.
The basic mechanism is for the base station to broadcast a
beacon frame periodically (10 to 100 times per second).
Battery life is always an issue with mobile devices, so in
802.11, the base station can direct a mobile station to go into
sleep until explicitly awakened by the base station or the user.
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
61
Chapter 4 The Medium Access Control Sublayer
4.4.3 The 802.11 MAC Sublayer Protocol
CSMA/CA: CSMA with Collision Avoidance
PCF and DCF can coexist within one cell.
SIFS: Short InterFrame Spacing, PIFS: PCF IFS, DIFS: DCF IFS,
EIFS: Extended IFS
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
62
Chapter 4 The Medium Access Control Sublayer
4.4.3 The 802.11 MAC Sublayer Protocol
CSMA/CA: CSMA with Collision Avoidance
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
63
Chapter 4 The Medium Access Control Sublayer
4.4.4 The 802.11 Frame Structure
802.11 Frame Structure
Format of the 802.11 data frame
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
64
Chapter 4 The Medium Access Control Sublayer
4.4.4 The 802.11 Frame Structure
802.11 Frame Structure
• Frame Control Field :
– Retry: Indicates that the frame is a retransmission of an
earlier frame.
– To DS, From DS (DS=Distribution System, meaning AP)
– More Fragment, More Data
– Power Management :Active Mode, PS Mode (Power Save)
– Protected: Data are encypted
– Order: Frame must arrive in order
• Duration: how long the frame and ack will control the channel
(NAV)
• Address 3: the distant endpoint
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
65
Chapter 4 The Medium Access Control Sublayer
4.4.4 The 802.11 Frame Structure
802.11 Frame Structure
RTS Frame
MAC Header
Frame
Control
Duration
RA
TA
FCS
CTS Frame
MAC Header
Frame
Control
Duration
RA
FCS
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
66
Chapter 4 The Medium Access Control Sublayer
4.4.5 The 802.11 Services
Five distribution services and four station services
Five distribution services:
1. Association: connect to a base station
2. Disassociation: break the association either by the base
station or the station
3. Reassociation: change preferred base station
4. Distribution: how to route frames sent to the base station
5. Integration: translate from 802.11 to non-802.11 (in
address scheme or frame format)
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
67
Chapter 4 The Medium Access Control Sublayer
4.4.5 The 802.11 Services
Four intercell station services
1. Authentication: a station proves its knowledge of the
secret key by encrypting the challenge frame and sending
it back to the base station
2. Deauthentication
3. Privacy: manage the encryption and decryption using RC4
4. Data delivery
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
68
Chapter 4 The Medium Access Control Sublayer
4.5 Broadband Wireless
802.16: Broadband Wireless Access
Running fiber, coaxial, or even category 5 twisted pair to
millions of homes and businesses is prohibitively expensive!
What is a competitor can do?
The wireless local loop
The wireless last mile
The wireless MAN (metropolitan area network)
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
69
Chapter 4 The Medium Access Control Sublayer
4.5 Broadband Wireless
WiMAX, the Worldwide Interoperability for Microwave Access,
is a telecommunications technology aimed at providing wireless
data over long distances in a variety of ways, from point-to-point
links to full mobile cellular type access.
It is based on the IEEE 802.16 standard, which is also called
Wireless MAN. The name WiMAX was created by the WiMAX
Forum, which was formed in June 2001 to promote conformance
and interoperability of the standard. The forum describes WiMAX
as "a standards-based technology enabling the delivery of last mile
wireless broadband access as an alternative to cable and DSL."
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
70
Chapter 4 The Medium Access Control Sublayer
4.5 Broadband Wireless
The 802.16 architecture
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
71
Chapter 4 The Medium Access Control Sublayer
4.5 Broadband Wireless
Comparison of 802.11 with 802.16
1. 802.16 provides service to buildings, and buildings are not
mobile.
2. Buildings can have more than one computer in them.
3. Better radios are available for buildings. So 802.16 can use
full-duplex communications.
4. In 802.16, the distances involved can be several kilometers,
affect signal-to-noise ratio and need security and privacy.
5. More bandwidth is needed. Hence 802.16 has to operate in
higher 10-66 GHz band, thus require a completely different
physical layer.
6. Error handling is much more important in 802.16.
7. 802.16 should support QoS.
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
72
Chapter 4 The Medium Access Control Sublayer
4.5 Broadband Wireless
Comparison of 3G with 802.16
The next step of 3G is 4G, using LTE (Long Term Evolution).
It appears that LTE has prevailed over WiMax.
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
73
Chapter 4 The Medium Access Control Sublayer
4.5 Broadband Wireless
The 802.16 protocol stack
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
74
Chapter 4 The Medium Access Control Sublayer
4.5 Broadband Wireless
The 802.16 physical layer
Frames and time slots for time division duplexing.
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
75
Chapter 4 The Medium Access Control Sublayer
4.5 Broadband Wireless
The 802.16 MAC layer
All connection-oriented services
4 Service Classes:
Constant bit rate service
Real-time variable bit rate service
Non-real-time variable bit rate service
Best efforts service
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
76
Chapter 4 The Medium Access Control Sublayer
4.5 Broadband Wireless
The 802.16 frame structure
(a) A generic frame.
Encrypted or not
Encryption key
(b) A bandwidth request frame.
Final checksum present or not
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
77
Chapter 4 The Medium Access Control Sublayer
4.6 Bluetooth
Bluetooth is an industrial specification for wireless personal area
networks (PANs). Bluetooth provides a way to connect and
exchange information between devices such as mobile phones,
laptops, PCs, printers, digital cameras, and video game consoles
over a secure, globally unlicensed short-range radio frequency.
The Bluetooth specifications are developed and licensed by the
Bluetooth Special Interest Group.
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
78
Chapter 4 The Medium Access Control Sublayer
4.6 Bluetooth
Architecture
7 active slaves and 255 parked nodes
10 meters
Piconets can be connected to form a scatternet.
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
79
Chapter 4 The Medium Access Sublayer
Control Sublayer
4.6 Bluetooth
Profiles
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
80
Chapter 4 The Medium Access Control Sublayer
4.6 Bluetooth
Logical Link Control Adaptation Protocol
Protocol stack
The Bluetooth protocol architecture.
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
81
Chapter 4 The Medium Access Control Sublayer
4.6 Bluetooth
• SCO (synchronous connection oriented)
– fixed-bandwidth channel between a master and
a slave
– slots spaced by regular intervals
– up to 3 SCO links per master
– SCO packets are never retransmitted!
• bandwidth-guaranteed, but not error-free-guaranteed
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
82
Chapter 4 The Medium Access Control Sublayer
4.6 Bluetooth
• ACL (asynchronous connectionless)
– a point-to-multipoint link between a master and
ALL its slaves
– only on slots NOT reserved for SCO links
• but the communication can include a slave already
involves in a SCO link
– packet retransmission is applicable.
• packet-switched style
– a slave can send only when it is addressed in
the previous master-initiated slot
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
83
Chapter 4 The Medium Access Control Sublayer
4.6 Bluetooth
Detailed Connecting Steps
• inquiry:
– used by master to find the identities of devices within
range
• inquiry scan:
– listening for an inquiry message
• page:
– used by master to send PAGE message to connect to a
slave by transmitting slave’s device address code
(DAC)
• page scan:
– slave listening for a paging packet with its DAC
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
84
Chapter 4 The Medium Access Control Sublayer
4.6 Bluetooth
Slave’s Four Mode in Connection State
• Active:
– actively participates in the piconet by listening,
transmitting, and receiving packets.
– the master periodically transmits to the slave to
maintain synchronization
• Sniff:
– only wake up in specific slots, and go to
reduced-power mode in the rest of slots
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
85
Chapter 4 The Medium Access Control Sublayer
4.6 Bluetooth
Slave’s Four Mode in Connection State
• Hold:
– goes to reduced-power mode and does not
support ACL link any more
• may still participate in SCO exchanges
– while in reduced-power mode, the slave may
participate in another piconet
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
86
Chapter 4 The Medium Access Control Sublayer
4.6 Bluetooth
Slave’s Four Mode in Connection State
• Park:
– does not participate in the piconet
• but still wants to remain as a member and remain
time-synchronized
– the slave gets a parking member address
(PM_ADDR), and loses its AM_ADDR
– by so doing, a piconet can have > 7 slaves
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
87
Chapter 4 The Medium Access Control Sublayer
4.6 Bluetooth
Stop-and-wait sequence number
Piggyback ack
Typical Bluetooth data frame at (a) basic, and
(b) enhanced, data rates.
Flow control (slave buffer full)
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
88
Chapter 4 The Medium Access Control Sublayer
4.7 RFID (Radio Frequency Identification)
• A means of storing and retrieving data through
electromagnetic transmission to an RF compatible
integrated circuit.
• Basic components:
– RFID readers: read data emitted from RFID tags
– RFID tags: use a defined radio frequency and
protocol to transmit and receive data
• Passive: without a battery, reflect the RF signal
transmitted to them from a reader and add information
by modulating the reflected signal, replace barcode,
less expensive, unlimited operational lifetime, but read
ranges are limited
• Active: contain both a radio transceiver and a buttoncell battery to power the transceiver, longer range
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
89
Chapter 4 The Medium Access Control Sublayer
4.7 RFID (Radio Frequency Identification)
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
90
Chapter 4 The Medium Access Control Sublayer
4.7 RFID (Radio Frequency Identification)
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
91
Chapter 4 The Medium Access Control Sublayer
4.7 RFID (Radio Frequency Identification)
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
92
Chapter 4 The Medium Access Control Sublayer
4.7 RFID (Radio Frequency Identification)
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
93
Chapter 4 The Medium Access Control Sublayer
4.7 RFID (Radio Frequency Identification)
An Electronic
Product
Code (EPC) is
one common type
of data stored in a
tag
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
94
Chapter 4 The Medium Access Control Sublayer
4.7 RFID (Radio Frequency Identification)
技術應用
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
95
Chapter 4 The Medium Access Control Sublayer
4.7 RFID (Radio Frequency Identification)
實際運用上的問題
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
96
Chapter 4 The Medium Access Control Sublayer
4.7 RFID (Radio Frequency Identification)
Example message exchange to identify a tag
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
97
Chapter 4 The Medium Access Control Sublayer
4.7 RFID (Radio Frequency Identification)
Format of the Query message
Define the range of slots over which tags
will respond, from 0 to 2Q-1
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
98
Chapter 4 The Medium Access Control Sublayer
4.8 Datalink Layer Switching
Bridge
A
C
LANs can be connected by devices called bridges, which operate
in the data link layer. Bridges do not examine the network layer
header.
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
99
Chapter 4 The Medium Access Control Sublayer
4.8 Datalink Layer Switching
Router
A
C
Router
In contrast, a router examines network layer headers.
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
100
Chapter 4 The Medium Access Control Sublayer
4.8 Datalink Layer Switching
Multiple LANs connected by a backbone to handle a total
load higher than the capacity of a single LAN.
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
101
Chapter 4 The Medium Access Control Sublayer
4.8 Datalink Layer Switching
Why a single organization may end up with multiple LANs? (to
need bridges)
1. Autonomy of departments to choose their own types of LANs
2. Cheaper to have separate LANs than to run a single large LANs
3. Load splitting
4. Physical distance is too great. (For example, >2.5km in 802.3)
5. More reliable
6. More secure
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
102
Chapter 4 The Medium Access Control Sublayer
4.8 Datalink Layer Switching
Cut-through
switching
(wormhole
routing)
Bridge connecting two multidrop
LANs
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
103
Chapter 4 The Medium Access Control Sublayer
4.8 Datalink Layer Switching
Bridges (and a hub) connecting seven point-topoint stations
Backward learning algorithm: learn and forget
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
104
Chapter 4 The Medium Access Control Sublayer
4.8 Datalink Layer Switching
Operation of a LAN bridge from 802.11 to 802.3.
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
105
Chapter 4 The Medium Access Control Sublayer
4.8 Datalink Layer Switching
Bridges with two parallel links
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
106
Chapter 4 The Medium Access Control Sublayer
4.8 Datalink Layer Switching
A spanning tree connecting five bridges. The
dotted lines are links that are not part of the
spanning tree
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
107
Chapter 4 The Medium Access Control Sublayer
4.8 Datalink Layer Switching
(a) Which device is in which layer.
(b) Frames, packets, and headers
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
108
Chapter 4 The Medium Access Control Sublayer
4.8 Datalink Layer Switching
A building with centralized wiring using hubs and a
switch
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
109
Chapter 4 The Medium Access Control Sublayer
4.8 Datalink Layer Switching
Two VLANs, gray and white, on a bridged LAN
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
110
Chapter 4 The Medium Access Control Sublayer
4.8 Datalink Layer Switching
The IEEE 802.1Q Standard
Bridged LAN that is only partly VLAN-aware. The shaded
symbols are VLAN aware. The empty ones are not
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
111
Chapter 4 The Medium Access Control Sublayer
4.8 Datalink Layer Switching
The IEEE 802.1Q Standard
The 802.3 (legacy) and 802.1Q Ethernet frame formats
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
112
Chapter 4 The Medium Access Control Sublayer
Exercises:
Page 368: Problem1
Page 369: Problems 4, 9, 11
Page 370: Problems 15, 25
Page 371: Problems 35, 39
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU
113
Download