Sie sind auf Seite 1von 55

Topologies Token Ring CSMA Contention

Telecommunications
Multiple Access, LAN Basics, CSMA

Andrew Hamilton-Wright

Department of Computing and Information Science


University of Guelph

21st March 2005


Topologies Token Ring CSMA Contention

Multiple Access Links and Protocols

Three types of links:


Point-to-Point single-wire e.g.; null-modem w PPP, SLIP
Broadcast shared medium
• shared wire - Simple Ethernet (w hubs)
• shared wireless - WaveLAN
• shared satellite etc
Switched medium linkage changes over times
• switched Ethernet
• ATM
• etc
Topologies Token Ring CSMA Contention

Multiple Access Protocols

• single shared communications channel


• two or more simultaneous transmissions by nodes:
• only one can send at a time successfully
• interference
• multiple access protocol
• distributed algorithm that determines how stations share
channel i.e.; determine when stations can transmit
• communications about channel sharing must use channel
itself!
• what to look for in multiple access protocols:
• synchronous/asynchronous
• information needed about other stations
• robustness (wrt channel errors)
• performance
Topologies Token Ring CSMA Contention

LAN Topologies : Bus/Ring

Bus Ring

All stations are equal and must compete for control of the
medium
“Medium Access Control” (MAC)
Topologies Token Ring CSMA Contention

LAN Topologies : Star




 
hub 

 


“Star”
Topologies Token Ring CSMA Contention

LAN Topologies : Bus



 

  
 
 
Tap  terminating

   
  
  


 
    
  resistor
  


 
 
flow of information




 
 
 




  

  

Topologies Token Ring CSMA Contention

Bus LAN Frame Transmission

A A

A B C D

A A

A B C D

A B C D
Topologies Token Ring CSMA Contention

LAN Topologies : Ring


Topologies Token Ring CSMA Contention

LAN Topologies : Joining LANs together





  





 

 
repeater

 




 
 
 




 
 
hub 

 
 
 


  




  
  


  
 
 

repeater

Bus “Star”
Topologies Token Ring CSMA Contention

LAN Topologies : Joining LANs together . . .



 

  
 
hub 
  
 
 


    




 
 
  
 
 

 
   


 
 
 



  


Hierarchy of Hubs
Topologies Token Ring CSMA Contention

LAN Topologies : Joining LANs together . . .

 
 

headend
  
   

“Tree” (usually broadband)


Topologies Token Ring CSMA Contention

MAC Protocols

Three broad classes:


Channel Partitioning
• divide channel into smaller “pieces” (time
slots, frequency)
• allocate pieces to node for exclusive use
Taking Turns
• tightly co-ordinate shared access to avoid
collisions
Random Access
• allow collisions
• detect and “recover” from collisions
Goal: efficient, fair, simple, decentralized
Topologies Token Ring CSMA Contention

Channel Partitioning MAC Protocols : FDMA


FDMA : frequency division multiple access
• channel spectrum divided into frequency bands
• each station assigned fixed frequency band
• unused transmission time in frequency bands goes idle


  Time
      
 
 
 
 
 
  1  
 2  
frequency bands
  3                  
   
 4       
 
 
 
 
 
Example: 6 station LAN












with data from machines


 5



1, 3, 4     6  
Topologies Token Ring CSMA Contention

Channel Partitioning MAC Protocols : TDMA

TDMA : time division multiple access


• access to channel in “rounds”
• each station gets fixed length slot (length = pkt tran time) in
each round
• unused slots go idle

Example: 6 station LAN with data from machines 1, 3, 4


 
     
   

  
  
   
    





      

 
  1     
3 

  4  
  1    


 3



  
  

  2 
    5 6   2



    4   5 6
Topologies Token Ring CSMA Contention

Channel Partitioning MAC Protocols : CDMA


CDMA : code division multiple access
• unique “code” assigned to each user; i.e.; code set
partitioning
• used mostly in wireless broadcast channels (cellular,
satellite etc)
• all users share the same frequency, but each user has own
“chipping” sequence (or code) to encode data
• encoded signal = data × chipping sequence
• decoding is the inner-product of encoded signal and
chipping sequence
• allows multiple users to co-exist and transmit
simultaneously with minimal interference (if codes are
orthogonal)
• there are a limited number of orthogonal “chipping”
sequences
Topologies Token Ring CSMA Contention

Taking Turns: Token Ring Arbitration

A B

C
Topologies Token Ring CSMA Contention

Taking Turns: Token Ring Arbitration

A B

C
Topologies Token Ring CSMA Contention

Taking Turns: Token Ring Arbitration

A B

C
Topologies Token Ring CSMA Contention

Taking Turns: Token Ring Arbitration

A B

C
Topologies Token Ring CSMA Contention

Taking Turns: Token Ring Arbitration

A B

C
Topologies Token Ring CSMA Contention

Taking Turns: Token Ring Arbitration

A B

C
Topologies Token Ring CSMA Contention

Taking Turns: Token Ring Arbitration

C
A B

C
Topologies Token Ring CSMA Contention

Taking Turns: Token Ring Arbitration

C
A B

C
Topologies Token Ring CSMA Contention

Taking Turns: Token Ring Arbitration

C
A B

C
Topologies Token Ring CSMA Contention

Taking Turns: Token Ring Arbitration

A B
C

C
Topologies Token Ring CSMA Contention

Taking Turns: Token Ring Arbitration

A B

C
C
Topologies Token Ring CSMA Contention

Taking Turns: Token Ring Arbitration

A B

C C
Topologies Token Ring CSMA Contention

Taking Turns: Token Ring Arbitration

A B

C
Topologies Token Ring CSMA Contention

Taking Turns: Token Ring Arbitration

A B

C
Topologies Token Ring CSMA Contention

Taking Turns: Token Ring Arbitration

A
A B

C
Topologies Token Ring CSMA Contention

Taking Turns: Token Ring Arbitration


 



 

AC
A B

C
Topologies Token Ring CSMA Contention

Taking Turns: Token Ring Arbitration






 
 
          




 
 

 

        

 
   B A C
A B

C
Topologies Token Ring CSMA Contention

Taking Turns: Token Ring Arbitration

 
        

 
      
 
 
  
  
  
  

  
  
  
 


B C
A B
A

C
Topologies Token Ring CSMA Contention

Taking Turns: Token Ring Arbitration






 
 
          




 
 

 

        

 
   B
C
A B

A
C
Topologies Token Ring CSMA Contention

Taking Turns: Token Ring Arbitration






 
 
          




 
 

 

        

 
   B
C
A B

A C
Topologies Token Ring CSMA Contention

Taking Turns: Token Ring Arbitration






 
 
          




 
 

 

        

 
   B
C
A B

C
Topologies Token Ring CSMA Contention

Taking Turns: Token Ring Arbitration

 

 
 



C
A  

 

 
B

 


 

 

 

B

C
Topologies Token Ring CSMA Contention

Random Access Protocols

• when node has packet to send


• transmit at full channel data rate
• no a priori coordination among nodes
• two or more transmitting nodes → “collision”
• random access MAC protocol specifies:
• how to detect collisions
• how to recover from collisions (e.g.; via delayed
retransmissions)
• Examples of random access MAC protocols:
• ALOHA, slotted ALOHA
• CSMA and CSMA/CD
Topologies Token Ring CSMA Contention

CSMA : Carrier Sense Multiple Access

CSMA: Listen before transmit:


• if a channel sensed idle: transmit entire packet
• if channel sensed busy, defer transmission
Persistent CSMA : retry immediately with probability p
when channel becomes idle (but this may
cause instability)
non-persistent CSMA : retry after a random interval
• Human analogy: Don’t interrupt others!
• CSMA/CD : Carrier Sense Multiple Access with Collision
Detection
Topologies Token Ring CSMA Contention

FDMA Control Contention : OK

1
frequency
bands

2


CTRL 

Time
Topologies Token Ring CSMA Contention

FDMA Control Contention : OK

      


1      
frequency
bands

2
 
CTRL  
Time
Topologies Token Ring CSMA Contention

FDMA Control Contention : OK

      


1  

 
 
 
 
 

frequency


bands

2
        
   
CTRL  
Time
Topologies Token Ring CSMA Contention

FDMA Control Contention : OK

 
           

            

1              
frequency

     
bands


    
2 





 


 


CTRL  


Time
Topologies Token Ring CSMA Contention

FDMA Control Contention : Collision

1
frequency
bands

2


CTRL 

Time
Topologies Token Ring CSMA Contention

FDMA Control Contention : Collision

1
frequency
bands

2 

CTRL


Time
Topologies Token Ring CSMA Contention

FDMA Control Contention : Collision

1
frequency
bands

2 



 

CTRL



 

Time
Topologies Token Ring CSMA Contention

FDMA Control Contention : Collision

1














frequency

 



 










bands

2
   
CTRL   
Time
Topologies Token Ring CSMA Contention

FDMA Control Contention : Collision


1














frequency

   

 

 



bands

2

 

 



     
CTRL   
Time
Topologies Token Ring CSMA Contention

Channel Contention : General Case w Arbiter

request request
expect expect
reply reply
backoff collision backoff
time b1 time b2
request
reissue
request 
  reply
reply      
 cted
nected 
co nne

con   
Topologies Token Ring CSMA Contention

Channel Contention : General Case w Arbiter

Collision occurs because of concurrent requests:


• devices infer collision from lack of response from
arbiter/controller (base)
• each chooses a random backoff time bi
• each unique value of bi has chance for reissued request to
be received by base, but duplicate bi = bj will cause
devices i, j to reissue requests concurrently and collide
again
• each station chooses new backoff time after each
successive collision until contention is resolved or
attempt limit is reached
Topologies Token Ring CSMA Contention

Examples of Contention For a Sub-Channel

wireless
• new device in cell (uplink)
cable modem
• slot reservation request (on uplink) by active
device
• new arrival announcement (uplink) on cable
modem
satellite
• slot reservation request (uplink)
Topologies Token Ring CSMA Contention

Examples of Contention For a Sub-Channel

Examples: wireless cable modem satellite


Notes:
1. all the above are devices asking a controller for permission
to connect or transmit, i.e.; compete for attention of an
arbitrator
2. systems infer collision from lack of response
3. wireless (and satellite) systems cannot assume devices
could even “hear” each other:
• due to:
3.1 near-far problem
3.2 line-of-sight problem
• thus arbiter is necessary
Topologies Token Ring CSMA Contention

“Near-Far” Problem
Topologies Token Ring CSMA Contention

“Line-of-Sight” Problem
Topologies Token Ring CSMA Contention

References

William Stallings.
Data and Computer Communications.
Prentice Hall, 7th edition, 2004.

Das könnte Ihnen auch gefallen