Data Link Control - Medium Access Control Rudra Dutta CSC 401- Fall 2011, Section 001.
Transcript of Data Link Control - Medium Access Control Rudra Dutta CSC 401- Fall 2011, Section 001.
Data Link Control - Medium Data Link Control - Medium Access ControlAccess Control
Rudra DuttaCSC 401- Fall 2011, Section 001
Copyright Rudra Dutta, NCSU, Fall, 2011
PositioningPositioning Local Area Networks
– Small size; room, floor, building– Small number of computers, dozens, hundreds
Many different approaches, standards Ethernet has become de facto standard for
smaller size LANs
Copyright Rudra Dutta, NCSU, Fall, 2011
StandardizationStandardization By IEEE 802 working group Sub-layering of DLC
– MAC – Regulate access to media (possibly shared) (next)
– LLC – error/flow control, frame multiplexing (read)
802.1 – General concerns
Throughput and Efficiency Latency Wiring Type and Distances Topology Security Reliability
Copyright Rudra Dutta, NCSU, Fall, 2011
CharacterizationCharacterization
Copyright Rudra Dutta, NCSU, Fall, 2011
MAC - The Channel Allocation ProblemMAC - The Channel Allocation Problem There is only one channel
– No out-of-band to control multiple access– How do you know if it is your turn?
Static Channel Allocation – FDM-like– Problem: not flexible, also not really one channel
Dynamic allocation– In-band channel allocation methods
Contention to decide allocaiton
– Pseudo out-of-band Scheduling, reservation
– Truly out-of-band may be available – control plane
Copyright Rudra Dutta, NCSU, Fall, 2011
Categorization by CollisionCategorization by Collision Collision is what occurs when more than one
station transmits on the same medium– Here we assume data cannot be used after collision– May not be true in some cases, CDMA etc. useful
Collision must be detected– May or may not be avoided
Collision avoidance may be partial– “Limited contention”
Or complete– “Collision free”
Copyright Rudra Dutta, NCSU, Fall, 2011
Modeling the MediumModeling the Medium Station Model Single Channel Assumption Collision Assumption Temporal sequence
– Continuous Time– Slotted Time
Idle medium Assumption– Carrier Sense– No Carrier Sense
Copyright Rudra Dutta, NCSU, Fall, 2011
Examining a ProtocolExamining a Protocol
Central problem – medium access control– We shall examine control methods
Other concerns– Protocol details
Headers, formats, standardizationEthernet (various), 802.11, 802.16
– Familiarize from standards, references, etc.
Copyright Rudra Dutta, NCSU, Fall, 2011
ALOHAALOHA Granddaddy of all shared MACs Renewed interest in wireless field Straightforward and elementary
– Transmit when you want– Collision may occur – conclude from no
acknowledgement– Retransmit after delay
Important observation– Traffic offered to the medium is different from– Traffic offered to the stations, due to retransmission
Copyright Rudra Dutta, NCSU, Fall, 2011
Vulnerability PeriodVulnerability Period• Period during which another transmission collision
Copyright Rudra Dutta, NCSU, Fall, 2011
Slotted ALOHASlotted ALOHA
Time is slotted Can start transmitting only at beginning of next
slot, when frame arrives Vulnerability period is halved Efficiency goes up
– What is the tradeoff ?
Copyright Rudra Dutta, NCSU, Fall, 2011
CSMA/CDCSMA/CD Sophistication added to ALOHA
– Test the water – carrier sense– Don’t throw good money after bad – collision detect– Backoff algorithm
Reduce the chances of further collision
Quantities involved– τ – frame transmission time– ρ – maximum propagation time– Time slots of 2ρ – not transmission time!
Much smaller than transmission time
– Need to be careful about reconciling notation
Copyright Rudra Dutta, NCSU, Fall, 2011
CSMA/CDCSMA/CD A station does not transmit on busy carrier
– Uninterrupted packet transmissions can occur, even with high traffic arrival rate
A station stops transmission on sensing collision– Time wasted in contention is reduced
Copyright Rudra Dutta, NCSU, Fall, 2011
Persistence – the Role of Persistence – the Role of pp Non-Persistence
– If channel busy, wait random time before re-testing– Otherwise transmit
Persistence (1-persistence)– If channel busy, re-test very next slot– p-persistence: On idle channel, probably transmit
Ready
EthernetEthernet
Classic Ethernet Type/Length duality OUI in addresses Maximum and minimum wire lengths Binary exponential backoff Reception by noting destination address
Copyright Rudra Dutta, NCSU, Fall, 2011
Source address
Dest. address
Type
...
Payload
FCS
SFD
Preamble
10101011
10101010 (7 times)
Switched EthernetSwitched Ethernet
“Hub” contracted long wire into a box “Switch” replaces short wire in box with a
switchable network– No collisions – no MAC!
Supports simultaneous transmissions– But needs buffering
Copyright Rudra Dutta, NCSU, Fall, 2011
Fast EthernetFast Ethernet 100Base With Cat5 cables or multimode fiber, full duplex
100 Mbps– 100m for Cat5, 2km for fiber
Auto-negotiation of speed in protocol Fiber can only connect to switch
– Otherwise collision detection not possible– Sender would not still be sending when collision finds
its way back to it
Copyright Rudra Dutta, NCSU, Fall, 2011
Gigabit EthernetGigabit Ethernet
Hubs still allowed – but impractical– Needs half-duplex mode– Frame padded to 512 bytes by hardware– Bursts can be formed by hardware to help
Fiber or STP – later UTP Signaling and symbol translation complex 10GBase-T uses low-density parity check Faster ones on drawing board
Copyright Rudra Dutta, NCSU, Fall, 2011
Copyright Rudra Dutta, NCSU, Fall, 2011
Collision-Free SchedulingCollision-Free Scheduling
Eliminates collision completely– Not contention
Based on numbering and synchronization– Synchronization is required for slotting anyway– It is assumed that numbering is available
out-of-band– Number and address may be related, or same– May be hardware
Could also be result of negotiation
Copyright Rudra Dutta, NCSU, Fall, 2011
Bit-map ProtocolBit-map Protocol Set of short reservation (contention) slots Collision is eliminated in contention period by
allowing transmission by strict numbering No collisions in data transmission phase
– Behavior in low load? High load?
Copyright Rudra Dutta, NCSU, Fall, 2011
Limited Contention ProtocolsLimited Contention Protocols Remember, contention and collision are
different– Collisions can be eliminated– Contention cannot be eliminated on shared medium
Maximum contention will arise when all stations are always allowed to contend
Contention may be reduced by forbidding some stations to contend, at any given time
Key idea: form contention groups– Bitmap and ALOHA may be considered extremes
Copyright Rudra Dutta, NCSU, Fall, 2011
Optical Optical LANsLANs Significant work in research context
– Comparatively less development/standardization– Now considered more suited to WANs
Specific characteristic – τ/ρ ratio– Collision detection impractical– Scheduling is necessary
Specific characteristic – several shared media in one– From scheduling to multi-scheduling– Out-of-band control channel is natural
Copyright Rudra Dutta, NCSU, Fall, 2011
Wireless LANsWireless LANs Significant work in development context
– Standardization has followed, but divergent standards
– Active research area as well– Seems to be well suited for LAN context
Specific characteristic – medium is shared, but not completely or predictably– Typically sender is unable to draw strong conclusions
about collision or successful transmission
Copyright Fall 2011, Rudra Dutta, NCSU 26
CDMA – No MACCDMA – No MAC Use “chips” for each bit Each transmitter has
unique chip sequence Chip sequences are
orthogonal– Total power received by
mismatched Tx/Rx is zero– Other chip sequences sound like
noise
Frequency of bits transmitted is much less than frequency of symbols
Any user takes up whole band, but uses only a part of its information capacity
– Spread spectrum
“Asynchronous” CDMA – chip sequences (nearly) orthogonal even if they are offset
Power equalization at receiver
Copyright Rudra Dutta, NCSU, Fall, 2011
Wireless ProblemsWireless Problems Range of station may be much less than area
covered by LAN– Complicated by changing radio characteristics
Copyright Rudra Dutta, NCSU, Fall, 2011
The MACA SolutionThe MACA Solution Basic idea: ask the receiver to resolve collision Timed waits based on RTS and CTS
– Minimizes collisions– MACAW: refinements such as MAC layer ACK
CSMA / CACSMA / CA
Like CSMA/CD, but sender starts with a backoff– Backoff countdown is frozen during other transmission
Collision (no ACK) doubles backoff for retry
Copyright Rudra Dutta, NCSU, Fall, 2011
Copyright Rudra Dutta, NCSU, Fall, 2011
RTS / CTSRTS / CTS B and C (but not D) can hear A D can hear B Timed waits on the part of C and D enable A
and B to communicate
Copyright Rudra Dutta, NCSU, Fall, 2011
BridgingBridging Interconnecting LANs
– Possibly running different protocols
Is this really DLC layer?– Historical reasons– Nevertheless, not clear in which layer
Issues in interconnecting different DLCs Issues in interconnecting multiple same DLCs Taxonomy
Copyright Rudra Dutta, NCSU, Fall, 2011
Interconnecting Different DLCsInterconnecting Different DLCs May need to connect for developmental reasons Main problem – frames have different formats Decapsulation and reencapsulation is required
Copyright Rudra Dutta, NCSU, Fall, 2011
Interconnecting Different DLCsInterconnecting Different DLCs
Other issues Some header information may not be available Data rate may be different
– Buffering may or may not be a good option
Allowed frame lengths may be different Security may also be an issue
Copyright Rudra Dutta, NCSU, Fall, 2011
Interconnecting Same DLCsInterconnecting Same DLCs Bridges should not flood frames unnecessarily
– Need to store some mappings– Looks more like internetworking
Bridges detect which destination on which LAN– Store in tables– Persist for short time – periodically old entries are purged
For Ethernet – “switches”
Copyright Rudra Dutta, NCSU, Fall, 2011
Backward Learning BridgesBackward Learning Bridges Initially, each bridges repeats all frames on all interfaces (other than
incoming one) As frames are sent, bridges remember incoming LAN using A sends frame to D
– B1: “A LAN1”, B2: “A LAN2”
D sends frame to A– B2: “D LAN3”, B1: “D LAN2”
Consider A sending frame to B
Copyright Rudra Dutta, NCSU, Fall, 2011
Spanning Tree BridgesSpanning Tree Bridges Above method works well with tree topology
– Path (sequence of bridges) between each node pair is unique– Also prone to complete disconnection due to any one bridge
failure
Multiple bridges may improve reliability– Will also introduce loops !
Bridges must intelligently decide to operate or not– Inoperative bridges “remove” themselves from network– Results in a tree (loop-free) topology– Must be spanning tree to avoid disconnecting the topology
Copyright Rudra Dutta, NCSU, Fall, 2011
Loose TaxonomyLoose Taxonomy Hubs and repeaters are more like wires Bridges and switches connect collision domains
– With switches usually collision domain is single computer– Not clearly in DLC layer
Higher layer forwarding – clearly not DLC
VLAN – IEEE 802.1QVLAN – IEEE 802.1Q
Sometimes reverse can be useful– Making multiple logical LANs out of a single one – or multiple
ones connected by switches
VLAN tags identify which stations are “on the same LAN” (logically)
Switches must know what ports belong to which VLAN ID or IDs, and limit forwarding accordingly
Copyright Rudra Dutta, NCSU, Fall, 2011
VLAN TagsVLAN Tags Need new tags
– VLAN-aware switches only
Switch by VLAN tags
– Can use learning
Introduce tag in frame without one
– Use default, or configuration
Remove tag when delivering to VLAN-unaware port
Copyright Rudra Dutta, NCSU, Fall, 2011
Copyright Rudra Dutta, NCSU, Fall, 2011
SummarySummary DLC may serve the function of arbitrating
shared medium access– Collision, Contention, Reservation, Token passing
Wireless medium - overlapping but not identical collision domains– Hidden and Exposed Stations, RTS/CTS
Bridging– Interconnects DLCs– May translate protocols– Verges into Network layer in some cases