Data Link Control Medium Access Control Rudra Dutta

  • Slides: 54
Download presentation
Data Link Control - Medium Access Control Rudra Dutta ECE/CSC 570 - Fall 2010,

Data Link Control - Medium Access Control Rudra Dutta ECE/CSC 570 - Fall 2010, Section 001, 601

Positioning l Local Area Networks Small size; room, floor, building – Small number of

Positioning l Local Area Networks Small size; room, floor, building – Small number of computers, dozens, hundreds – Many different approaches, standards l Ethernet has become de facto standard for smaller size LANs l Copyright Rudra Dutta, NCSU, Fall, 2010 2

Standardization By IEEE 802 working group l Sub-layering of DLC l MAC – Regulate

Standardization By IEEE 802 working group l Sub-layering of DLC l MAC – Regulate access to media (possibly shared) (next) – LLC – error/flow control, frame multiplexing (read) – l 802. 1 – General concerns Copyright Rudra Dutta, NCSU, Fall, 2009 3

Characterization l l l Throughput and Efficiency Latency Wiring Type and Distances Topology Security

Characterization l l l Throughput and Efficiency Latency Wiring Type and Distances Topology Security Reliability Copyright Rudra Dutta, NCSU, Fall, 2009 4

MAC - The Channel Allocation Problem l There is only one channel No out-of-band

MAC - The Channel Allocation Problem l There is only one channel No out-of-band to control multiple access – How do you know if it is your turn? – l Static Channel Allocation – FDM-like – l Problem: not flexible, also not really one channel Dynamic allocation – In-band channel allocation methods l – Pseudo out-of-band l – Contention to decide allocaiton Scheduling, reservation Truly out-of-band may be available – control plane Copyright Rudra Dutta, NCSU, Fall, 2009 5

Categorization by Collision l Collision is what occurs when more than one station transmits

Categorization by Collision l 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 – l Collision must be detected – l Collision avoidance may be partial – l May or may not be avoided “Limited contention” Or complete – “Collision free” Copyright Rudra Dutta, NCSU, Fall, 2009 6

Modeling the Medium Station Model l Single Channel Assumption l Collision Assumption l Temporal

Modeling the Medium Station Model l Single Channel Assumption l Collision Assumption l Temporal sequence l Continuous Time – Slotted Time – l Idle medium Assumption Carrier Sense – No Carrier Sense – Copyright Rudra Dutta, NCSU, Fall, 2009 7

Examining a Protocol l Central problem – medium access control – l We shall

Examining a Protocol l Central problem – medium access control – l We shall examine control methods Other concerns – Protocol details Headers, formats, standardization, … l Ethernet, 802. 11, 802. 16, Bluetooth, … l – Familiarize from standards, references, etc. Copyright Rudra Dutta, NCSU, Fall, 2009 8

ALOHA Granddaddy of all shared MACs l Renewed interest in wireless field l Straightforward

ALOHA Granddaddy of all shared MACs l Renewed interest in wireless field l Straightforward and elementary l Transmit when you want – Collision may occur – conclude from no acknowledgement – Retransmit after delay – l Important observation Traffic offered to the medium is different from – Traffic offered to the stations, due to retransmission – Copyright Rudra Dutta, NCSU, Fall, 2009 9

Vulnerability Period • Period during which another transmission collision Copyright Rudra Dutta, NCSU, Fall,

Vulnerability Period • Period during which another transmission collision Copyright Rudra Dutta, NCSU, Fall, 2009 10

Slotted ALOHA Time is slotted l Can start transmitting only at beginning of next

Slotted ALOHA Time is slotted l Can start transmitting only at beginning of next slot, when frame arrives l Vulnerability period is halved l Efficiency goes up l – What is the tradeoff ? Copyright Rudra Dutta, NCSU, Fall, 2009 11

CSMA/CD l Sophistication added to ALOHA Test the water – carrier sense – Don’t

CSMA/CD l Sophistication added to ALOHA Test the water – carrier sense – Don’t throw good money after bad – collision detect – Backoff algorithm – l l Reduce the chances of further collision Quantities involved – – – t – frame transmission time r – maximum propagation time Time slots of 2 r – not transmission time! l – Much smaller than transmission time Need to be careful about reconciling notation Copyright Rudra Dutta, NCSU, Fall, 2009 12

CSMA/CD l A station does not transmit on busy carrier – l Uninterrupted packet

CSMA/CD l A station does not transmit on busy carrier – l 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, 2009 13

Persistence – the Role of p Non-Persistence – come back any old time l

Persistence – the Role of p Non-Persistence – come back any old time l Persistence (1 -persistence) – very next slot l q-persistence – probably next slot l Ready Copyright Rudra Dutta, NCSU, Fall, 2009 14

ALOHA Characteristics Copyright Rudra Dutta, NCSU, Fall, 2009 15

ALOHA Characteristics Copyright Rudra Dutta, NCSU, Fall, 2009 15

Random Access Characteristics Copyright Rudra Dutta, NCSU, Fall, 2009 16

Random Access Characteristics Copyright Rudra Dutta, NCSU, Fall, 2009 16

Reservation ALOHA l Reservation and Transmission phases Reservation packets transmitted, using slotted ALOHA –

Reservation ALOHA l Reservation and Transmission phases Reservation packets transmitted, using slotted ALOHA – Transmission in order of reservation, no contention or collision – l Key – reservation packets can be much smaller Like contention period of CSMA/CD, but – Not per packet, rather a schedule – l Allows efficiency improvement – can be calculated Copyright Rudra Dutta, NCSU, Fall, 2009 17

Collision-Free Scheduling l Eliminates collision completely – l Not contention Based on numbering and

Collision-Free Scheduling l Eliminates collision completely – l 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 – l Could also be result of negotiation Copyright Rudra Dutta, NCSU, Fall, 2009 18

Bit-map Protocol Set of short reservation (contention) slots l Collision is eliminated in contention

Bit-map Protocol Set of short reservation (contention) slots l Collision is eliminated in contention period by allowing transmission by strict numbering l No collisions in data transmission phase l – Behavior in low load? High load? Copyright Rudra Dutta, NCSU, Fall, 2009 19

Binary Countdown l More scalable than bitmap – l Each station transmits address MSB

Binary Countdown l More scalable than bitmap – l Each station transmits address MSB first – l Now higher address is higher priority Possible for a low priority station to recognize when a higher order station also wants to transmit – l log n is much better than n ! Once this happens, low priority station drops out of bidding Low priority stations now may have to wait much longer For higher priority stations, not just once but potentially many times – Mok and Ward’s variation: rotate priorities – Copyright Rudra Dutta, NCSU, Fall, 2009 20

Binary Countdown Copyright Rudra Dutta, NCSU, Fall, 2009 21

Binary Countdown Copyright Rudra Dutta, NCSU, Fall, 2009 21

Limited Contention Protocols l Remember, contention and collision are different Collisions can be eliminated

Limited Contention Protocols l 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 l Contention may be reduced by forbidding some stations to contend, at any given time l Key idea: form contention groups l – Bitmap and ALOHA may be considered extremes Copyright Rudra Dutta, NCSU, Fall, 2009 22

Adaptive Tree Walk Consider each station a leaf of a binary tree l First

Adaptive Tree Walk Consider each station a leaf of a binary tree l First contention slot is a free for all l Every contention collision causes a downward traversal of tree – Upon successful transmission, continue DFS traversal – Returning straight to the root would be unfair – “Adaptive” – estimate of ready stations can be used – l Different refinements as in tree searches possible Copyright Rudra Dutta, NCSU, Fall, 2009 23

Optical LANs l Significant work in research context Comparatively less development/standardization – Now considered

Optical LANs l Significant work in research context Comparatively less development/standardization – Now considered more suited to WANs – l Specific characteristic – t/r ratio Collision detection impractical – Scheduling is necessary – l Specific characteristic – several shared media in one From scheduling to multi-scheduling – Out-of-band control channel is natural – Copyright Rudra Dutta, NCSU, Fall, 2009 24

Wireless LANs l Significant work in development context Standardization has followed, but divergent standards

Wireless LANs l Significant work in development context Standardization has followed, but divergent standards – Active research area as well – Seems to be well suited for LAN context – l Specific characteristic – medium is shared, but not completely or predictably – Typically sender is unable to draw strong conclusions about collision or successful transmission Copyright Rudra Dutta, NCSU, Fall, 2009 25

Wireless Problems l Range of station may be much less than area covered by

Wireless Problems l Range of station may be much less than area covered by LAN – Complicated by changing radio characteristics Copyright Rudra Dutta, NCSU, Fall, 2009 26

The MACA Solution Basic idea: ask the receiver to resolve collision l Timed waits

The MACA Solution Basic idea: ask the receiver to resolve collision l Timed waits based on RTS and CTS l Minimizes collisions – MACAW: refinements such as MAC layer ACK – Copyright Rudra Dutta, NCSU, Fall, 2009 27

Translating to Real Protocol B and C (but not D) can hear A l

Translating to Real Protocol B and C (but not D) can hear A l D can hear B l Timed waits on the part of C and D enable A and B to communicate l Copyright Rudra Dutta, NCSU, Fall, 2009 28

Variations l CSMA – l Only detect empty medium CSMA/CD - looked at this

Variations l CSMA – l Only detect empty medium CSMA/CD - looked at this before Detect collisions and stop – Reliably possible only in wired media – l CSMA/CA – l 575, 775 Wait a little on empty medium RTS/CTS Improves on CSMA/CA – Sometimes called CSMA/Collision Prevention - nomenclature not clear – l CSMA/Bitwise Arbitration or Collision Resolution – Essentially bitmapped protocol preceded by CSMA Copyright Rudra Dutta, NCSU, Fall, 2009 29

Bridging l Interconnecting LANs – l Possibly running different protocols Is this really DLC

Bridging l Interconnecting LANs – l Possibly running different protocols Is this really DLC layer? Historical reasons – Nevertheless, not clear in which layer – Issues in interconnecting different DLCs l Issues in interconnecting multiple same DLCs l Taxonomy l Further issues – VLANs , … l – Need to read reference material Copyright Rudra Dutta, NCSU, Fall, 2009 30

Interconnecting Different DLCs May need to connect for developmental reasons l Main problem –

Interconnecting Different DLCs May need to connect for developmental reasons l Main problem – frames have different formats l Decapsulation and reencapsulation is required l Copyright Rudra Dutta, NCSU, Fall, 2009 31

Interconnecting Different DLCs Other issues l Some header information may not be available l

Interconnecting Different DLCs Other issues l Some header information may not be available l Data rate may be different l – Buffering may or may not be a good option Allowed frame lengths may be different l Security may also be an issue l Copyright Rudra Dutta, NCSU, Fall, 2009 32

Interconnecting Same DLCs l Bridges should not flood frames unnecessarily Need to store some

Interconnecting Same DLCs l Bridges should not flood frames unnecessarily Need to store some mappings – Looks more like internetworking – l Bridges detect which destination on which LAN Store in tables – Persist for short time – Copyright Rudra Dutta, NCSU, Fall, 2009 33

Spanning Tree Bridges l Multiple bridges may improve reliability – l Will also introduce

Spanning Tree Bridges l Multiple bridges may improve reliability – l 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, 2009 34

Spanning Tree – A Sample Copyright Rudra Dutta, NCSU, Fall, 2009 35

Spanning Tree – A Sample Copyright Rudra Dutta, NCSU, Fall, 2009 35

Loose Taxonomy Hubs and repeaters are more like wires l Bridges and switches connect

Loose Taxonomy Hubs and repeaters are more like wires l Bridges and switches connect collision domains l With switches usually collision domain is single computer – Not clearly in DLC layer – l Higher layer forwarding – clearly not DLC Copyright Rudra Dutta, NCSU, Fall, 2009 36

ALOHA – Throughput Study l Metric – efficiency (fraction of time spent transmitting packets

ALOHA – Throughput Study l Metric – efficiency (fraction of time spent transmitting packets successfully) – l More sensible metric than success rate (why? ) Model – unified queue, Poisson arrivals – P (k, T) = (GT)k e-GT / k! Arrival and departure rates same at equilibrium l S = G a where a is the success probability of a frame l Copyright Rudra Dutta, NCSU, Fall, 2009 37

Vulnerable Period Hence a = P (0, 2) = e-2 G, S = Ge-2

Vulnerable Period Hence a = P (0, 2) = e-2 G, S = Ge-2 G l Differentiate to find that l S 1/2 e, or 18% – At G = 0. 5, a = 1/e – Copyright Rudra Dutta, NCSU, Fall, 2009 P (k, T) = (GT)k e-GT / k! 38

Slotted ALOHA Remember : l Vulnerability period is halved l By same logic, a

Slotted ALOHA Remember : l Vulnerability period is halved l By same logic, a = e-G, S = Ge-G – Or consider P (1, 1) , to obtain same thing – l Efficiency goes straight up to 36% Copyright Rudra Dutta, NCSU, Fall, 2009 39

CSMA/CD Let p = probability of a station transmitting l Probability of a successful

CSMA/CD Let p = probability of a station transmitting l Probability of a successful transmission in next N p (1 - p)N-1 slot = a = ? l Exactly one station must transmit – Hence a _______ binomial distribution – l This is maximum when p = 1? / N Value = (1 ? - 1 / N)N-1 Argue from binomial nature of the variable – In the limit, should approach slotted ALOHA – l Ideally, backoff should result in this p – Not practically attainable Copyright Rudra Dutta, NCSU, Fall, 2009 40

Successful Transmission l Average time slots for a successful transmission A = a -1

Successful Transmission l Average time slots for a successful transmission A = a -1 - 1 Regeneration: first slot is either successful or not – If not, consider situation for second slot – l Successful transmission requires t time for transmission – A (2 r) time wastage (reservation) – t l Hence, efficiency = ----? t + 2 Ar Copyright Rudra Dutta, NCSU, Fall, 2009 41

More Rigorous Analysis l l Slotted ALOHA Premises 1. 2. 3. 4. 5. 6.

More Rigorous Analysis l l Slotted ALOHA Premises 1. 2. 3. 4. 5. 6. – Slotted system Rate l Poisson arrivals, m independent processes Collision or perfect reception Immediate feedback Retransmission No buffering (backlog of 1) Bertsekas & Gallagher Copyright Rudra Dutta, NCSU, Fall, 2009 42

Markov Models (General Description) l Markov = memoryless (therefore geometric/exponential) (Simplification) – Only current

Markov Models (General Description) l Markov = memoryless (therefore geometric/exponential) (Simplification) – Only current state of system affects next state – l Capture state of system in some number/tuple – l 579 E. g. number of packets a sender is buffering At every state, there is a set of events that can happen next For each, there is a probability – As a consequence, each state will have an “occupancy probability” - can be obtained by analysis – l Markov Model is like an FSM, but transitions are labeled with flow of occupancy probabilities Working Copyright Rudra Dutta, NCSU, Fall, 2009 Failed 43

Markov Model l Geometric retransmission time Backlogged node retransmits with probability qr i-1 –

Markov Model l Geometric retransmission time Backlogged node retransmits with probability qr i-1 – Probability of i slots till retransmission attempt = ? qr(1 - qr) – Unbacklogged node transmits with probability qa = ? 1 - e-l/m l State of the system = n l – l Number of backlogged nodes Qa(i, n) = probability that i unbacklogged nodes transmit their packets at next slot = ? m-n. Ci (1 -qa)m-n-i qai Qr(i, n) = probability that i backlogged nodes transmit packets at next slot = ? n. Ci (1 -qr)n-i qri l Hence a Markov chain l Copyright Rudra Dutta, NCSU, Fall, 2009 44

Markov Chain 0 l 1 2 3 4 5 6 Pn, n+i for following

Markov Chain 0 l 1 2 3 4 5 6 Pn, n+i for following cases of i = ? 2 <= i <= (m-n) i=1 i=0 i = -1 Copyright Rudra Dutta, NCSU, Fall, 2009 : with i new arrivals, regardless of retransmissions : 1 arrival, not successful : 1 arrival, successful; OR retransmit collision; OR no retransmission : no arrivals, one successful retransmission 45

Dynamic Properties Steady state probabilities may be found l However, we are interested in

Dynamic Properties Steady state probabilities may be found l However, we are interested in dynamics l Drift – expected change of state in one slot l – – – Difference between arrivals and departures D(n) = (m-n)qa – Psucc Attempt rate G(n) = (m-n)qa + nqr Psucc = Qa(1, n) Qr(0, n) + Qa(0, n) Qr(1, n) G(n) e-G(n) if qa and qr are small Hence a stability curve Copyright Rudra Dutta, NCSU, Fall, 2009 46

Stability Curve D(n) = (m-n)qa – G(n) e-G(n) mqa G=0 G = mqa Copyright

Stability Curve D(n) = (m-n)qa – G(n) e-G(n) mqa G=0 G = mqa Copyright Rudra Dutta, NCSU, Fall, 2009 G = (m-n)qa + nqr G = mqr 47

A Pause. . . l Transmission medium may be shared – l Usually works

A Pause. . . l Transmission medium may be shared – l Usually works for small, local-area networks Access to the medium must be controlled In-band or out-of-band methods, or mix – Concepts of contention and collision – l Performance of the protocol may be characterized – l Some theoretical modeling is possible – usually stochastic Extensions Different media etc. have different characteristics – Basic approaches must be examined for suitability – Algorithm must be designed for peculiarities of media etc. – Several specific protocols in text – need to read – Copyright Rudra Dutta, NCSU, Fall, 2009 48

Token Ring Networks l Tokens – another approach to contention resolution Successful use in

Token Ring Networks l Tokens – another approach to contention resolution Successful use in ring networks – Other approaches possible – l Transmit Opportunity – l What goes around must come around – l When is it my turn? Who purges the packet? Number of packets on the ring – Bit length of ring, also access strategies Copyright Rudra Dutta, NCSU, Fall, 2009 49

Token Ring Network • Not purely shared medium • But need to share forwarding

Token Ring Network • Not purely shared medium • But need to share forwarding service of nodes as well as medium Copyright Rudra Dutta, NCSU, Fall, 2009 50

Ring Node Repeater States Copyright Rudra Dutta, NCSU, Fall, 2009 51

Ring Node Repeater States Copyright Rudra Dutta, NCSU, Fall, 2009 51

Token Ring Operation Copyright Rudra Dutta, NCSU, Fall, 2009 52

Token Ring Operation Copyright Rudra Dutta, NCSU, Fall, 2009 52

Token Ring Operation l l l Limit on the number of packets that a

Token Ring Operation l l l Limit on the number of packets that a station with a token can transmit Transmitter purges packet Token is released when purging is complete Fair/guaranteed access Priority can be implemented Copyright Rudra Dutta, NCSU, Fall, 2009 53

Summary l DLC may serve the function of arbitrating shared medium access – l

Summary l DLC may serve the function of arbitrating shared medium access – l Wireless medium - overlapping but not identical collision domains – l Collision, Contention, Reservation, Token passing Hidden and Exposed Stations, RTS/CTS Bridging Interconnects DLCs – May translate protocols – Verges into Network layer in some cases – Copyright Rudra Dutta, NCSU, Fall, 2009 54