Media Access Schemes

  1. ALOHA
    1. Build by UofHawaii in early 70s.
    2. They used transmission over radio waves at 9,600 bps
    3. Central node acks all correct packets and forwards them on a different frequency.
    4. If two stations stransmit at same time, packets become garbeled.  They are said to collide.
    5. Central station cannot ack garbeled packets.  Senders timeout and retransmit after random delay.
      1. Why RANDOM delay????
    6. Three types of ALOHA, slotted and oure.
      1. Pure can transmit at any time.
        1. Effeciency is 18%.
        2. Any transmitter can go ahead at any time.  Minimizes latency on unloaded net.
      2. Slotted can transmit only on slot boundries.
        1. Effeciency is 36%.
        2. Must have good clock synchonization.
        3. Protocol latency of unloaded net is on average 1/2 slot time.
        4. Latency of loaded net lower than pure aloha.
      3. Reservation Aloha
        1. Uses slots like slotted aloha.
        2. Protocol has two phases.
          1. Reservation phase has each station that wants to transmit sending a claim as per standard ALOHA.  Just needs to send a few bytes so the slot size in the reservation phase can be very small.
          2. Once last station has made reservation, each station can transmit in it's slot in reservation order.
          3. If duration of reservation slot is 1/20 of data slot, effeciency is 88%.
          4. Protocol latency is longest of ALOHA schemes of unloaded net, and best for loaded nets.
      4. Calculations Assume there are MANY nodes transmitting at random intervals.
        1. Fewer nodes improve effeciency.
        2. "Dialogs" improve effeciency.
  2. Ethernet and the IEE 802.3 Protocols
    1. Most widely used.
    2. Prototcols determine both physical and data link and network layers.
    3. Really is a family of protocols
    4. Use a bus network with CSMA-CD type protocols.
      1. Can only transmit when bus is quiet.
      1. Must notice when transmission is jammed (unlike ALOHA).
        1. Remember that a collision can happen at one site but not at all sites on same transmissions (speed of light is not THAT fast).
      2. 10Base5 and 10Base2 notice large currents on wire.
      3. 1Base5 and 10BaseT when there is data on both transmit and receive lines.
      4. Max distance is set so that maximally distant units hear collsion before packet end.
      5. During collion, station must send 32 to 48 bits of JAM, which can just be random data (which wont pass CRC).
    5. Algorithm for sending
      1. Wait for bus to be quiet
      2. When chanel is idle, start transmitting data
      3. If collision not detected, go back to #1
      4. Stop sending data
      5. Send JAM
      6. Wait random delay
      7. Go back to #1 with old data
    6. Random Delay computation (assuming there have been N consecutive collisions)
      1. Idea: have minimal delays for a few collsions, and many delays for many collisions.
      2. If N >= 16, stop and fail.
      3. Pick M = min(N, 10)
      4. Pick random number K from set { 0,1,2,3,...(2^M)-1}.
      5. Compute delay K*512 bits
      6. Example after 1 collsion delay is 0 or 512 bits.
      7. Example after 2 collsions delay is 0, 512, 1024, or 1536 bits.
      8. Largest possible delay is 2^10-1 bits.  For ethernet this is 523,776 bits or 1/20th of a second.
    7. Maximum collsion detecion time
      1. suppose A starts at time T0
      2. B starts to transmit because it has not heard A.  Can start any time less than T0+PROP
      3. B hears collions at T0+PROP, starts to JAM
      4. A hears collsion at time T0+PROP+PROP.
      5. Minimum packet size must exceed collision detection time, or transmitter might not realize a collsion until after it has stopped transmitting.
    8. Comparisions with ALOHA
      1. Similarities
        1. Allow multiple access and collisions
        2. Uses collision detection
        3. Uses random backoff delays
      2. Differences
        1. Uses JAMMING to allow others to detect collsions. (ALOHA only cares if central hub sees collision; collsions at other hubs are unimportant and unnoticed.)
        2. ALOHA keeps sending even if collision (since cannot tell immediately if colliding).
    9. Packet format.
      1. All ethernet cards have a hardware built in unchangeable 6byte address that is NOT an IP address.
      2. Format: (page 216)
        1. 7 bytes of preable to sychonize receiver
        2. 1 byte that frame
        3. 6 bytes of dest addr
        4. 6 bytes of sorce addr
        5. 2 bytes of packet kength
        6. MANY bytes of Logical link control field
          1. 1 byte destination device access point (like a socket number)
          2. 1 byte src device access point (same)
          3. 2 byte type (CONT) (tells wether datagram, ack connectionless, connection-oriented, etc)
          4. PAD out to 64 bytes total length (for collsion handling)
        7. 4 bytes CRC
  3. Token Ring
    1. Developed by IBM in early 80's.
    2. Does NOT use colisions.  Designed to have theoretical effeciencies way above ethernet, and known fixed latencies.
    3. Was costly ($700 vs $300).
    4. Could transmit at 4Mbps and 16Mbps interleaved
    5. Basic Idea
      1. If a station is dead or broken, it passes signals anyway!!!!!
      2. There exists a token, that circulates around the net.
        1. token is 24 bits long.
        2. Ring must be at least 24 bits long so that the token always lives.
        3. The MASTER STATION ensures this with a hardare buffer
      3. When a station wants to send,
        1. it waits for the token
        2. send
        3. sends token on (cannot hog token).
      4. Exists way to regenerate the token.
        1. STATION MASTER keeps track of token.
        2. All stations have timer that resets when station master sends a I AM MASTER token
        3. If a timer goes off, then station sends a CLAIM TOKEN, followed by PURGE RING, followed by a well formed token.
    6. Packet Transmission
      1. Each node talks to NEXT NODE ONLY.
      2. Each packet stops and starts with a special bit pattern.
      3. Each node starts retransmitting as soon as it's ELASTISICTY BUFFER is full.
        1. Since nodes transmit at slightly different rates, elasticity buffer provides cushuning.
        2. Too small means it might empty during transmissions, killing packet.
        3. Too big increases latency and wastes RAM.
      4. If a simple token (not a packet) goes by and you want to transmit and the priority of token less than your priority
        1. Transmit packets
      5. If token priority is too high but RESERVATION is lower than your desire
        1. change reservation bits,
        2. pass on token
      6. When it finishes transmitting packet, there are two choices...
        1. release token immediately (RAT 16Mb)
          1. Eff = 1/(1+(prop/n*THT)
          2. Max Media access time = PROP * N*TRANST + TRANSP + (N-1)*THT
          3. Remember, for ethernet this is infinite.
          4. Effeciency is better if you release the token quickely
        2. Wait for packet to circle around (RAR 4Mb)
          1. Eff=1/(1+PROP/THT)
          2. MaxMedia access time = (N+1)*PROP+N*TRANST + TRANSP + (N-1)*THT
          3. Can send ACK by just toggeling a bit in the packet as it circles (better be a late bit)
        3. Variant:  Let a node hold the token for more time, namely THT.
          1. Each node can now transmit more packets per token transfer, increasing effeciency.
          2. Increases MaxMedia access Time.  Default is 10ms.
    7. Adding self to ring
      1. Wait for token
      2. Send "Duplicate address test" token with proposed address.
      3. If come back bad, try again.
  4. Token Bus
    1. Basic Idea -- use a ethernet like bus and token ring like software
    2. What you'd get if you had ethernet hardware and a hate for violent events (like collsions).
    3. MAP (manufacturing automation protocol) by GM was this
      1. Also came with very electricaly rugged hardware for factory floors (radio interfeerence tolerent).
      2. Had known and happy maxlatencies
      3. Failed in commercial sense
    4. Transmitting.
      1. Wait for token.
      2. Send data directly to destination
      3. Send token on.
    5. Adding a new node.
      1. Each node must know the successor.
        1. Needed to forward the token.
        2. Not important for token ring, because the physical rings tells all for this.
      2. Occasionally, each nodes sends a "solicit a successor" packet durings its token holding phase.
      3. If someone answers ...
        1. Add them after the SAS sender.
        2. If collsions, CSMA-CD
      4. Successor knows his successor, because SAS told him
      5. SAS sender knows his successor (node that answered the SAS).
      6. No one else changes
    6. If removal,
      1. Wait for token
      2. Send I WANT OUT packet which includes the SUCCESSOR and PREDESSOR
      3. Both nodes can adjust.
      4. Note:  Cannot leave any time you want.  That would break the ring ...
    7. If node fails
      1. A send to B, which does not respond.
      2. A sends "WHO SUCCEEDS B"?
      3. That node becomes successor of A.
    8. If token lost
      1. Each node has timer, waits for traffic.
      2. If no traffic after a long time, send "I CLAIM TOKEN" message.
      3. Just starts talking.
  5. Comparision of token ring and CSMA-CD
    1. CSMA-CD can have small latencies, but they are unbounded.
    2. Really, true max latencies muct take into accound token losses.
    3. CSMA-CD is MUCH SIMPLER
    4. token protocols can have VERY NICE EFFECIENCIES