cs 453 computer networks lecture 15 medium access control sublayer
TRANSCRIPT
CS 453CS 453Computer NetworksComputer Networks
Lecture 15Lecture 15
Medium Access Control Medium Access Control
SublayerSublayer
MAC sublayerMAC sublayer
Gigabit EthernetGigabit Ethernet History has shown us that like Peanut butter History has shown us that like Peanut butter
cookies, you can’t have enough data rate cookies, you can’t have enough data rate capacitycapacity
As data rates have grown applications have As data rates have grown applications have quickly swelled to fill the capacityquickly swelled to fill the capacity
About the time that Fast Ethernet was hitting About the time that Fast Ethernet was hitting the streets, the IEEE 802 committee was the streets, the IEEE 802 committee was working on what became known as Gigabit working on what became known as Gigabit EthernetEthernet
MAC sublayerMAC sublayer
Gigabit EthernetGigabit Ethernet IEEE defined Gigabit Ethernet in 1998 and IEEE defined Gigabit Ethernet in 1998 and
labeled it 802.3zlabeled it 802.3zThey apparently thought was the final frontier in They apparently thought was the final frontier in terms of ethernetterms of ethernet
They were wrong on that pointThey were wrong on that point 802.3z goal to be802.3z goal to be
10x faster than 802.3u (Fast Ethernet)10x faster than 802.3u (Fast Ethernet)
Backward compatible with other Ethernet Backward compatible with other Ethernet standardsstandards
MAC sublayerMAC sublayer
Gigabit EthernetGigabit Ethernet GoalsGoals
Same Ethernet Frame formatSame Ethernet Frame format
Same min/max frame sizesSame min/max frame sizes
Same 48 bit Ethernet addressing schemeSame 48 bit Ethernet addressing scheme
Offer unacknowledged datagram serviceOffer unacknowledged datagram service
Unicast & multicastUnicast & multicast
MAC sublayerMAC sublayerGigabit EthernetGigabit Ethernet All connections are point-to-pointAll connections are point-to-point
No multidrop like 803.2 and 802.5No multidrop like 803.2 and 802.5
Any GigE cable – only two devicesAny GigE cable – only two devices
One device can be switch or hubOne device can be switch or hub Modes – full-duplexModes – full-duplex
NormalNormal
Connected to a switchConnected to a switch
Send/Receive at same timeSend/Receive at same time
What about cable length and collision alarm delay???What about cable length and collision alarm delay???
Remember the issue of cable length and the delay time for Remember the issue of cable length and the delay time for collision alarm to propagate from the station detecting the collision alarm to propagate from the station detecting the collision to the station transmitting?collision to the station transmitting?
MAC sublayerMAC sublayerGigabit EthernetGigabit Ethernet In standard Ethernet (802.3) with a multidrop medium…In standard Ethernet (802.3) with a multidrop medium…
……the minimum packet size (minus the preamble and SOF flag) is the minimum packet size (minus the preamble and SOF flag) is 64 bytes….64 bytes….
……so that a collision alarm could, worst case, reach from one end so that a collision alarm could, worst case, reach from one end of the medium to a transmitting station at the other end of the of the medium to a transmitting station at the other end of the medium while is it still transmitting…medium while is it still transmitting…
..but this can only be true for a maximum length cable…..but this can only be true for a maximum length cable…
For 802.3 that is 2500 metersFor 802.3 that is 2500 meters For full-duplex GigE, this is not an issueFor full-duplex GigE, this is not an issue
Each cable is “private” for two devicesEach cable is “private” for two devices
Collision are not possibleCollision are not possible
No CSMA/CDNo CSMA/CD
Only cable length issue is signal strength lossOnly cable length issue is signal strength loss
MAC sublayerMAC sublayerGigabit EthernetGigabit Ethernet Half-duplex Half-duplex
All connections are point-to-point, butAll connections are point-to-point, but
Connected to a common hubConnected to a common hub
… … functions like a bus-in-a-boxfunctions like a bus-in-a-box
So, collisions are possibleSo, collisions are possible
Uses CSMA/CDUses CSMA/CD
Then, in theory, due to collision alarm propagation delayThen, in theory, due to collision alarm propagation delay
Max cable length = [10base2MaxCableLength]/100 = Max cable length = [10base2MaxCableLength]/100 =
2500/100 = 25 meters2500/100 = 25 meters
That won’t do!That won’t do!
MAC sublayerMAC sublayerGigabit EthernetGigabit Ethernet Half-duplex - CollisionsHalf-duplex - Collisions
Carrier ExtensionCarrier Extension Pad the frame to 512 bytesPad the frame to 512 bytes Done padded and unpadded by hardware, no changes to softwareDone padded and unpadded by hardware, no changes to software Poor bandwidth efficiency for small payloadsPoor bandwidth efficiency for small payloads
Frame BurstingFrame Bursting ““Bunch up” several frames and transmit at one timeBunch up” several frames and transmit at one time If grouped frame is still less than 512 bytes pad to 512If grouped frame is still less than 512 bytes pad to 512 Efficient if there a good flow of frames to transmitEfficient if there a good flow of frames to transmit Allows cable lengths to 200 metersAllows cable lengths to 200 meters
MAC sublayerMAC sublayerGigabit EthernetGigabit Ethernet 1000BaseT Encoding1000BaseT Encoding
Uses 4 pair of Cat5/Cat6 cableUses 4 pair of Cat5/Cat6 cable
Five symbols using 5 voltage levelsFive symbols using 5 voltage levels
00, 01,10,11 and a control symbol00, 01,10,11 and a control symbol
So 2 bits per symbolSo 2 bits per symbol
Each symbol over one twisted pair Each symbol over one twisted pair
So, 2 bit per symbol * 4 pairs = 8 bits transmitted at same timeSo, 2 bit per symbol * 4 pairs = 8 bits transmitted at same time
125 Mhz * 8 bits = 1 Gbps125 Mhz * 8 bits = 1 Gbps
MAC sublayerMAC sublayerGigabit EthernetGigabit Ethernet Flow controlFlow control 1 msec delay in processing arriving data = up to 1953 1 msec delay in processing arriving data = up to 1953
frames lost in 1 msecframes lost in 1 msec GigE uses a flow control frameGigE uses a flow control frame
If busy host send PAUSE frame == type field = 0x8808 …If busy host send PAUSE frame == type field = 0x8808 …
First 2 bytes of payload field controls the flow control commandFirst 2 bytes of payload field controls the flow control command
Next bytes contain pause time in 512 nsec incrementsNext bytes contain pause time in 512 nsec increments
802.11 Wireless LANs
WiFi
Very popular local area networking
Operates in two modes Using a Base station /Access Point
(Infrastructure mode) Without an Access Point – station to station
(adhoc mode)
802.11 Wireless LANs
802.11 Physical layer/Data Link Layer Originally (1997) three transmission media
Infrared
FHSS
DSSS
802.11 Wireless LANs
802.11 Physical layer/Data Link LayerInfrared
Diffused Infrared light at 0.85 or 0.95 microns 1 or 2 Mbps Uses Gray code encoding
For 2 bits creates 4 bit codeword with never more than one 1 bit
Cannot penetrate walls – so good cell isolation Low bandwidth Inference from sunlight Not very popular
802.11 Wireless LANs
802.11 Physical layer/Data Link Layer FHSS (remember Hedy Lammar) 79 1 Mhz channels At 2.4 GHz ISM band All stations generate pseudorandom
sequence of channels to hop to If stations use same PRN seed and stay
synchronized… Will hop to the next channel in sequence
simultaneously
802.11 Wireless LANs
802.11 Physical layer/Data Link Layer FHSS (remember Hedy Lammar) Dwell time adjustable Dwell time must be < 400 msec Pretty secure from eavesdropping
Sniffer does not know hop sequence or
dwell time Uses same band as garage door openers,
microwave ovens and cordless phones
802.11 Wireless LANs
802.11 Physical layer/Data Link Layer DSSS (Direct Sequence Spread Spectrum)
Data bits combined with higher data rate bit Pseudo noise sequence called “chipping code”…
Then divides data according to spreading ratio
Chipping code is a redundant bit pattern of data bits
Bit errors can be corrected
Difficult to intercept
Difficult to jam
802.11 Wireless LANs
802.11 Physical layer/Data Link Layer 802.11a Orthogonal Frequency Division
Multiplexing (OFDM) 54 Mbps 5 GHz ISM band 52 frequency channels – 48 data,
synchronization Phase shift modulation up to 18 Mbps QAM from 18 Mbps to 54 Mbps
802.11 Wireless LANs
802.11 Physical layer/Data Link Layer 802.11b - High Rate Direct Sequence Spread
Spectrum 11 million chipping codes per second ~ 11
Mbps in 2.4 GHz band Actual preceded 802.11a 1,2, 5.5 and 11 Mbps Slower than 802.11a but range much greater
802.11 Wireless LANs
802.11 Physical layer/Data Link Layer 802.11g OFDM Enhancement to 802.11g Approved in 2001 Operates in the 2.4 GHz ISM band Up to 54 Mbps
802.11 Wireless LANs
Station B tries to communicate with A…
C cannot hear B’s communication and tries to communicate
AB C
802.11 Wireless LANs
D transmits to CA wants to transmit to B, butHears noise, delays transmission, unnecessarily
AB C
D
802.11 Wireless LANs
802.11 can’t use CSMA/CD
Can’t use “dead air” to indicate that it is ok to transmit
Need protocol to coordinate medium access DCF – Distributed Coordination Function PCF – Point Coordination Function
802.11 Wireless LANs
DCF – Distributed Coordination Function CSMA/CA - Collision Avoidance Physical Channel Sensing Virtual Channel Sensing
802.11 Wireless LANs
Virtual Channel Sensing A transmits a Request To Send (RTS) to B B responds with Clear To Send (CTS) to A C can hear RTS so self imposes Network Allocation Vector
(NAV), can’t transmit until hears ACK from B D does not hear RTS but hears CTS from B, self imposes NAV
until is hears ACK
Diagram from Tanenbaum (2003), pg. 297
802.11 Wireless LANs
DCF – Distributed Coordination Function Another problem – Wireless medium is
inherently noisy and unreliable Probability of large frame getting through
without error is relatively small… And will need retransmitted Solution: Frame fragmenting
802.11 Wireless LANsDCF – Distributed Coordination Function
Fragmented framesBreak large frames up into small frames
After sending RTS and receiving CTS, …
Sender sends a burst of frame fragments
Diagram from Tanenbaum (2003), pg. 297
802.11 Wireless LANs
PCF – Point Coordination Function Media Access is control from a Point (Access
Point) AP polls stations and asks if they have a
frame to send Transmission order is determined by AP
802.11 Wireless LANs
PCF – Point Coordination Function AP broadcasts beacon frame every 0.01 to
0.1 seconds Beacon frame contains hopping sequences,
dwell times, synchronization clock, etc. Invites stations to “log on” to polling service Once on polling service AP guarantees
designated fraction of bandwidthTherefore, can make QOS guarantee
802.11 Wireless LANs
Can use DCF and PCF at the same time
Requires wait periods or Interframe Spacing SIFS – Short Interframe Spacing PIFS – PCF Interframe Spacing DIFS – DCF Interframe Spacing EIFS – Extended Interframe Spacing
802.11 Wireless LANs802.11 Interframe Spacing
AfterSIFS – control frames or next fragmentsPIFS – PCF frames may be sentDIFS – DCF frames may be sentEIFS – bad frame recovery can be started
Diagram from Tanenbaum (2003), pg. 297
802.11 Wireless LANs
802.11 Frame Structure
From: ANSI/IEEE Std. 802.11 , 1999 edition (R2003)
Frame Control
802.11 Wireless LANs802.11 Frame Structure
Frame ControlProtocol version – allow multiple versions of protocol
Type – Data, Management, Control
Subtype – RTS, CTS
To DS/From DS – going to/coming from distribution system (i.e. ethernet)
MF – more fragments coming
Retry – frame is a retry of a previous frame
Pwr – controls power of receiving station
More – more frames to come
W – Frame encrypted with WEP algorithm
O – frames must be processed in order
From: ANSI/IEEE Std. 802.11 , 1999 edition (R2003)
802.11 Wireless LANs802.11 Frame Structure Data frame
Duration – how long the frame and ACK will use channel
Address 1/Address 2 – Source Address/Destination Address
Address 3/Address 4 – Base station (source/destination) addresses for intercell traffic
Sequence – fragment sequence number
Data – payload max length 2312 bytes
Checksum -
From: ANSI/IEEE Std. 802.11 , 1999 edition (R2003)
802.11 Wireless LANs802.11 Services Distributions Services
Assocation – allows stations to connect to access point
Disassociate – breaks relationship between station and access point (leave network)
Reassociation – handoff station to another access point
Distribution – routing local air or wired network
Integration – bridging/conversion to other addressing/framing formats
802.11 Wireless LANs802.11 Services Station Services
Authentication – authenicates station to access point
Deauthentication - - logs station out of network cell
Privacy – encryption/decryption
Data delivery – move data from station to station