cal Area Networks by R.S. Chang, Dept. CSIE, NDHU pter 4 The Medium Access Control Sublayer 4.3 Etherent IEEE 802 Group
Mar 30, 2015
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 1
Chapter 4 The Medium Access Control Sublayer
4.3 Etherent
IEEE 802 Group
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 2
Chapter 4 The Medium Access Control Sublayer
4.3 Etherent
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 3
Chapter 4 The Medium Access Control Sublayer
IEEE 802.3: 1-persistent CSMA/CD
4.3 Etherent
Classical Ethernet
Switched Ethernet
Fast Ethernet (100Mbps), Gigabit Ethernet, 10G Ethernet
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
MIT->Harvard->Hawaii->Xerox PARC(Palo Alto Research Center)->Ethernet->3COM
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
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 6
Chapter 4 The Medium Access Control Sublayer
4.3.1 Classical Ethernet Physical Layer
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 7
Chapter 4 The Medium Access Control Sublayer
Cable topologies. (a) Linear, (b) Spine, (c) Tree, (d) Segmented
4.3.1 Classical Ethernet Physical Layer
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 8
Chapter 4 The Medium Access Control Sublayer
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.
4.3.1 Classical Ethernet Physical Layer
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 9
Chapter 4 The Medium Access Control Sublayer
10BASE5 10BASE2 1BASE5 10BROAD36 10BASE-TEthernet Cheaper net StarLAN Broadband Twisted-pair
medium coaxial cable50ohm-10mm
coaxial cable50ohms-5mm
twisted-pairunshielded
coaxial cable75ohms
2 simplex TPunshielded
signals
maximumsegment
nodes persegment
collisiondetection
Notes
10MbpsManch
10MbpsManch
1MbpsManch
10MbpsDPSK
10MbpsManch
500m 185m 500m 1800m 100m
maximumdistance 2.5km 0.925km 2.5km 3.6km 1km
100 30 2
excess current2 active hubinputs
transmission=reception
activity onreceiver andtransmitter
slot time=512 bits; gap time=96 bits; jam=32 to 48 bits
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 10
Chapter 4 The Medium Access Control Sublayer
Manchester Encoding
4.3.1 Classical Ethernet Physical Layer
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 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 12
Chapter 4 The Medium Access Control Sublayer
802.3 frame format
single address
group address
local address
global address
0
1
0
1
multicast (all 1's for broadcast)
No significance outside
one of 246 unique address
4.3.2 Classical Ethernet MAC Sublayer ProtocolThe first 3 bytes are OUI (Organizationally Unique Identifier) (Manufacturer)
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 13
Chapter 4 The Medium Access Control Sublayer
802.3 frame format
Minimum frame length: 64 bytes (6+6+2+46+4)
4.3.2 Classical Ethernet MAC Sublayer Protocol
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
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 15
Chapter 4 The Medium Access Control Sublayer
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.
4.3.2 Classical Ethernet MAC Sublayer Protocol
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 16
Chapter 4 The Medium Access Control Sublayer
Ethernet Frame Structure v2 (or DIX Ethernet, for DEC, Intel, Xerox)
preamble SFD DA SA type CRC
synchronizethe receiver
7 1 6 6 2 4
60 to 1514 bytes
start framedelimiter
Cyclic Redundancy Check
Type>0x0600=1536
Data
0800: IPv4 datagram0806: ARP request/reply8035: RARP request/reply86DD: IPv6
4.3.2 Classical Ethernet MAC Sublayer Protocol
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 17
Chapter 4 The Medium Access Control Sublayer
The Binary Exponential Backoff Algorithm
If a frame has collided n successive times, where n<16, then thenode chooses a random number K with equal probability from theset {0,1,2,3,...,2m-1} where m=min{10,n}. The node then waits for bit times. (slot time=512 bit time)K 512
after first collision
after second collision
after thirdcollision
select one to start transmission
4.3.2 Classical Ethernet MAC Sublayer Protocol
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 18
Chapter 4 The Medium Access Control Sublayer
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.
4.3.2 Classical Ethernet MAC Sublayer Protocol
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 19
Chapter 4 The Medium Access Control Sublayer
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
. as 1
with,1
whenmaximized is
)1( 1
k/eAk
pA
pkpA k
4.3.3 Ethernet Performance
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 20
Chapter 4 The Medium Access Control Sublayer
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
AAjA
j
j 1)1(
0
1
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 2te5.4t.
4.3.3 Ethernet Performance
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 21
Chapter 4 The Medium Access Control Sublayer
Performance
If the mean frame takes P sec to transmit, when many stations have frames to send, channel efficiency=
AP
P
/2Here 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.
4.3.3 Ethernet Performance
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 22
Chapter 4 The Medium Access Control Sublayer
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, channel efficiency=
cFBLe /21
1
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.
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
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 24
Chapter 4 The Medium Access Control Sublayer
Many theoretical analysis assume the input traffic is Poisson. It now appears that network traffic is rarely Poisson, but self-similar. 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.
4.3.3 Ethernet Performance
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 25
Chapter 4 The Medium Access Control Sublayer
4.3.4 Switched Ethernet
(a) Hub. (b) Switch.
Not necessarily this kind of wiring
Must know which station is in which port
Just like a single cable Ethernet
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 26
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 27
Chapter 4 The Medium Access Control Sublayer
The three primary reasons that the 803 committee decided togo 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.
Fast Ethernet
4.3.5 Fast Ethernet
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 28
Chapter 4 The Medium Access Control Sublayer
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.
Fast Ethernet
4.3.5 Fast Ethernet
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 29
Chapter 4 The Medium Access Control Sublayer
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.
Fast Ethernet
4.3.5 Fast Ethernet
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 30
Chapter 4 The Medium Access Control Sublayer
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.
Fast Ethernet
4.3.5 Fast Ethernet
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 31
Chapter 4 The Medium Access Control Sublayer
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.
Fast Ethernet
4.3.5 Fast Ethernet
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 32
Chapter 4 The Medium Access Control Sublayer
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.
Fast Ethernet
4.3.5 Fast Ethernet
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 33
Chapter 4 The Medium Access Control Sublayer
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.
Fast Ethernet
4.3.5 Fast Ethernet
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 34
Chapter 4 The Medium Access Control Sublayer
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
4.3.6 Gigabit Ethernet
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 35
Chapter 4 The Medium Access Control Sublayer
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.
4.3.6 Gigabit Ethernet
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 36
Chapter 4 The Medium Access Control SublayerChapter 4 The Medium Access Sublayer
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.
4.3.6 Gigabit Ethernet
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 37
Chapter 4 The Medium Access Control Sublayer
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.
4.3.6 Gigabit Ethernet
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 38
Chapter 4 The Medium Access Control Sublayer
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.
4.3.6 Gigabit Ethernet
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 39
Chapter 4 The Medium Access Control Sublayer
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.
4.3.6 Gigabit Ethernet
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 40
Chapter 4 The Medium Access Control Sublayer
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.
4.3.6 Gigabit Ethernet
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 41
Chapter 4 The Medium Access Control Sublayer
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.
4.3.6 Gigabit Ethernet
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 42
Chapter 4 The Medium Access Control Sublayer
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.
4.3.6 Gigabit Ethernet
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 43
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 44
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 45
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 46
Chapter 4 The Medium Access Control Sublayer
KISS
• In anyway,
4.3.8 Retrospective on Ethernet
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 47
Chapter 4 The Medium Access Control Sublayer
What I see in the Korea Customs:
Korea Immigration Smart Service
4.3.8 Retrospective on Ethernet
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 48
Chapter 4 The Medium Access Control Sublayer
4.4 Wireless LANS
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 – infrastructure mode
AccessPoint
Client
To Network
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
802.11 architecture – ad-hoc mode
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
Part of the 802.11 protocol stack.
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 52
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 53
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 54
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 55
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 56
Chapter 4 The Medium Access Control Sublayer
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.
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 57
Chapter 4 The Medium Access Control Sublayer
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.
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 58
Chapter 4 The Medium Access Control Sublayer
(a) The hidden station problem(b) The exposed station problem
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 59
Chapter 4 The Medium Access Control Sublayer
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)
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 60
Chapter 4 The Medium Access Control Sublayer
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.
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 61
Chapter 4 The Medium Access Control Sublayer
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.
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 62
Chapter 4 The Medium Access Control Sublayer
PCF and DCF can coexist within one cell.
SIFS: Short InterFrame Spacing, PIFS: PCF IFS, DIFS: DCF IFS, EIFS: Extended IFS
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.3 The 802.11 MAC Sublayer Protocol
CSMA/CA: CSMA with Collision Avoidance
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 64
Chapter 4 The Medium Access Control Sublayer
802.11 Frame Structure4.4.4 The 802.11 Frame Structure
Format of the 802.11 data frame
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 65
Chapter 4 The Medium Access Control Sublayer
• 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
802.11 Frame Structure4.4.4 The 802.11 Frame Structure
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 66
Chapter 4 The Medium Access Control Sublayer
802.11 Frame Structure4.4.4 The 802.11 Frame Structure
Frame Control
Duration RA TA FCS
MAC Header
RTS Frame
Frame Control
Duration RA FCS
MAC Header
CTS Frame
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 67
Chapter 4 The Medium Access Control Sublayer
Five distribution services and four station services
Five distribution services:1. Association: connect to a base station2. Disassociation: break the association either by the base
station or the station3. Reassociation: change preferred base station4. Distribution: how to route frames sent to the base station5. Integration: translate from 802.11 to non-802.11 (in
address scheme or frame format)
4.4.5 The 802.11 Services
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 68
Chapter 4 The Medium Access Control Sublayer
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. Deauthentication3. Privacy: manage the encryption and decryption using RC44. Data delivery
4.4.5 The 802.11 Services
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 69
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 loopThe wireless last mileThe wireless MAN (metropolitan area network)
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 70
Chapter 4 The Medium Access Control Sublayer
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."
4.5 Broadband Wireless
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 71
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 72
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 73
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 74
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 75
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 76
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 serviceReal-time variable bit rate serviceNon-real-time variable bit rate serviceBest efforts service
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 77
Chapter 4 The Medium Access Control Sublayer
4.5 Broadband Wireless
The 802.16 frame structure
(a) A generic frame. (b) A bandwidth request frame.
Encrypted or not Final checksum present or not
Encryption key
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 78
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 79
Chapter 4 The Medium Access Control Sublayer
4.6 Bluetooth
Architecture
Piconets can be connected to form a scatternet.
10 meters
7 active slaves and 255 parked nodes
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 80
Chapter 4 The Medium Access Control SublayerChapter 4 The Medium Access Sublayer
4.6 Bluetooth
Profiles
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 81
Chapter 4 The Medium Access Control Sublayer
4.6 Bluetooth
Protocol stack
The Bluetooth protocol architecture.
Logical Link Control Adaptation Protocol
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 82
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 83
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 84
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 85
Chapter 4 The Medium Access Control Sublayer
Slave’s Four Mode in Connection State
4.6 Bluetooth
• 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 86
Chapter 4 The Medium Access Control Sublayer
Slave’s Four Mode in Connection State
4.6 Bluetooth
• 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 87
Chapter 4 The Medium Access Control Sublayer
Slave’s Four Mode in Connection State
4.6 Bluetooth
• 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 88
Chapter 4 The Medium Access Control Sublayer
4.6 Bluetooth
Typical Bluetooth data frame at (a) basic, and (b) enhanced, data rates.
Flow control (slave buffer full)
Piggyback ack
Stop-and-wait sequence number
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 89
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 button-cell battery to power the transceiver, longer range
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)
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 94
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 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)
實際運用上的問題
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 97
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 98
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 99
Chapter 4 The Medium Access Control Sublayer
A
Bridge
CLANs can be connected by devices called bridges, which operate in the data link layer. Bridges do not examine the network layer header.
4.8 Datalink Layer Switching
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 100
Chapter 4 The Medium Access Control Sublayer
A
Router
C
RouterIn contrast, a router examines network layer headers.
4.8 Datalink Layer Switching
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 101
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 102
Chapter 4 The Medium Access Control Sublayer
Why a single organization may end up with multiple LANs? (to need bridges)
1. Autonomy of departments to choose their own types of LANs2. Cheaper to have separate LANs than to run a single large LANs3. Load splitting4. Physical distance is too great. (For example, >2.5km in 802.3)5. More reliable6. More secure
4.8 Datalink Layer Switching
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 103
Chapter 4 The Medium Access Control Sublayer
4.8 Datalink Layer Switching
Bridge connecting two multidrop LANs
Cut-through switching (wormhole routing)
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 104
Chapter 4 The Medium Access Control Sublayer
4.8 Datalink Layer Switching
Bridges (and a hub) connecting seven point-to-point stations
Backward learning algorithm: learn and forget
Local Area Networks by R.S. Chang, Dept. CSIE, NDHU 105
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 106
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 107
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 108
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 109
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 110
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 111
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 112
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 113
Chapter 4 The Medium Access Control Sublayer
Exercises:
Page 368: Problem1Page 369: Problems 4, 9, 11Page 370: Problems 15, 25Page 371: Problems 35, 39