Summary of MAC protocols - PowerPoint PPT Presentation

1 / 22
About This Presentation
Title:

Summary of MAC protocols

Description:

colliding transmissions aborted, reducing channel wastage ... network. link. physical. MAC protocol. and frame format. 100BASE-TX. 100BASE-T4. 100BASE-FX ... – PowerPoint PPT presentation

Number of Views:141
Avg rating:3.0/5.0
Slides: 23
Provided by: Kur459
Category:

less

Transcript and Presenter's Notes

Title: Summary of MAC protocols


1
Summary of MAC protocols
  • What do you do with a shared media?
  • Channel Partitioning, by time, frequency
  • Time Division, Frequency Division
  • Random partitioning (dynamic),
  • ALOHA, S-ALOHA, CSMA, CSMA/CD
  • carrier sensing easy in some technologies
    (wire), hard in others (wireless)
  • CSMA/CD used in Ethernet
  • Taking Turns
  • polling from a central site, token passing

2
Link Layer
  • 5.1 Introduction and services
  • 5.2 Error detection and correction
  • 5.3Multiple access protocols
  • 5.4 Link-Layer Addressing
  • 5.5 Ethernet
  • 5.6 Hubs and switches
  • 5.7 PPP
  • 5.8 Link Virtualization ATM

3
Ethernet
  • Connection topology
  • Frame structure
  • CSMA/CD (Exponential Backoff)
  • Link and physical layers

4
CSMA (Carrier Sense Multiple Access)
  • CSMA listen before transmit - Carrier Sensing.
  • If channel sensed idle transmit entire frame
  • If channel sensed busy, defer transmission
  • Human analogy dont interrupt others!

5
CSMA collisions
spatial layout of nodes
collisions can still occur propagation delay
means two nodes may not hear each others
transmission
d propagation delay
collision entire packet transmission time wasted
note distance propagation delay causes
possible collision
6
CSMA/CD (Collision Detection)
  • CSMA/CD
  • carrier sensing, deferral as in CSMA
  • collision detection during transmission
  • collisions could be detected within short time
  • colliding transmissions aborted, reducing channel
    wastage
  • human analogy the polite conversationalist

7
Exercise with Ethernet CSMA/CD
  • The protocol
  • Analyze the time sequence of events
  • Time is measured as
  • Bit time the time to send one bit
  • Calculation 0.1 microsec/bit for 10 Mbps
    Ethernet
  • What about 100Mbps Ethernet?

8
Ethernet uses CSMA/CD
  • No slots
  • adapter doesnt transmit if it senses that some
    other adapter is transmitting, that is, carrier
    sense
  • transmitting adapter aborts when it senses that
    another adapter is transmitting, that is,
    collision detection
  • Before attempting a retransmission, adapter waits
    a random time, that is, random access
  • Adapt the length of random time to reduce
    collisions, exponential backoff

9
  • Time is measured as
  • Bit time the time to send one bit
  • Calculation
  • 0.1 microsec/bit for 10 Mbps Ethernet
  • What about 100Mbps Ethernet?

10
Ethernet CSMA/CD algorithm
  • 1. Adaptor receives datagram from net layer
    creates frame
  • 2. If adapter senses channel idle (lasting for 96
    bit times), it starts to transmit frame. If it
    senses channel busy, waits until channel idle and
    then transmits
  • 3. If adapter transmits entire frame without
    detecting another transmission, the adapter is
    done with frame !
  • 4. If adapter detects another transmission while
    transmitting, aborts and sends jam signal.
  • Jam Signal make sure all other transmitters are
    aware of collision 48 bits
  • 5. After aborting, adapter enters a random defer
    period called exponential backoff.
  • exponential backoff after the mth
    collision, adapter chooses a K at random from
    0,1,2,,2m-1. Adapter waits K?512 bit times and
    returns to Step 2. The maximum, m can be 10.
  • Bit time 0.1 microsec/bitThe longest backoff
    time is at K1023, about 50 msec

11
More on Ethernets CSMA/CD
  • Exponential Backoff
  • first collision choose K from 0,1 delay is K?
    512 bit transmission times
  • after second collision choose K from 0,1,2,3
  • after ten collisions, choose K from
    0,1,2,3,4,,1023
  • heavy load random wait will be longer
  • advantage adapt retransmission attempts to
    estimated current load, and reduce collisions.

See/interact with Java applet on AWL Web
site highly recommended !
12
Exercise with Ethernet CSMA/CD
  • Events at one transmitting node.
  • given a K 10, how long the node wait?
  • Events at two transmitting nodes.
  • Examples, trace the protocol
  • Analyze the time sequence of events

13
Ethernet
  • Connection topology
  • Frame structure
  • CSMA/CD (Exponential Backoff)
  • Link and physical layers

14
Ethernet
  • dominant wired LAN technology
  • first widely used LAN technology
  • Simpler, cheaper than token LANs and ATM
  • Kept up with speed race 10 Mbps 10 Gbps

Metcalfes Ethernet sketch
15
Star topology
  • bus topology popular through mid 90s
  • all nodes in same collision domain (can collide
    with each other)
  • today star topology prevails
  • active switch in center
  • each spoke runs a (separate) Ethernet protocol
    (nodes do not collide with each other)
  • switch
  • bus coaxial cable
  • star

16
Not an atypical LAN (IP network)
Dedicated
Shared
17
Ethernet Frame Structure
  • Sending adapter encapsulates IP datagram (or
    other network layer protocol packet) in Ethernet
    frame
  • Preamble
  • 7 bytes with pattern 10101010 followed by one
    byte with pattern 10101011
  • used to synchronize receiver, sender clock rates

18
Ethernet Frame Structure (more)
  • Addresses 6 bytes
  • if adapter receives frame with matching
    destination address, or with broadcast address
    (eg ARP packet), it passes data in frame to
    net-layer protocol
  • otherwise, adapter discards frame
  • Type indicates the higher layer protocol (mostly
    IP but others may be supported such as Novell IPX
    and AppleTalk)
  • CRC checked at receiver, if error is detected,
    the frame is simply dropped

19
Unreliable, connectionless service
  • Connectionless No handshaking between sending
    and receiving adapter.
  • Unreliable receiving adapter doesnt send acks
    or nacks to sending adapter
  • stream of datagrams passed to network layer can
    have gaps (missing datagrams)
  • gaps will be filled if app is using TCP
  • otherwise, app will see the gaps
  • Ethernets MAC protocol unslotted CSMA/CD

20
Ethernet uses CSMA/CD
  • No slots
  • adapter doesnt transmit if it senses that some
    other adapter is transmitting, that is, carrier
    sense
  • transmitting adapter aborts when it senses that
    another adapter is transmitting, that is,
    collision detection
  • Before attempting a retransmission, adapter waits
    a random time, that is, random access

21
Ethernet CSMA/CD algorithm
  • Adaptor receives datagram from net layer
    creates frame
  • 2. If adapter senses channel idle (lasting for 96
    bit times), it starts to transmit frame. If it
    senses channel busy, waits until channel idle and
    then transmits
  • 3. If adapter transmits entire frame without
    detecting another transmission, the adapter is
    done with frame !
  • 4. If adapter detects another transmission while
    transmitting, aborts and sends jam signal
  • Jam Signal make sure all other transmitters are
    aware of collision 48 bits
  • 5. After aborting, adapter enters exponential
    backoff after the mth collision, adapter chooses
    a K at random from 0,1,2,,2m-1. Adapter waits
    K?512 bit times and returns to Step 2
  • Bit time 0.1 microsec for 10 Mbps Ethernet
    for K1023, wait time is about 50 msec

22
Ethernets CSMA/CD (more)
  • Jam Signal make sure all other transmitters are
    aware of collision 48 bits
  • Bit time .1 microsec for 10 Mbps Ethernet for
    K1023, wait time is about 50 msec
  • Exponential Backoff
  • Goal adapt retransmission attempts to estimated
    current load
  • heavy load random wait will be longer
  • first collision choose K from 0,1 delay is K?
    512 bit transmission times
  • after second collision choose K from 0,1,2,3
  • after ten collisions, choose K from
    0,1,2,3,4,,1023
  • See/interact with Java
  • applet on AWL Web site
  • highly recommended !

23
CSMA/CD efficiency
  • Tprop max propagation delay between 2 nodes in
    LAN (e.g 400m)
  • ttrans time to transmit max-size frame
  • Efficiency goes to 1 as tprop goes to 0
  • Goes to 1 as ttrans goes to infinity
  • Much better than ALOHA, but still decentralized,
    simple, and cheap

24
802.3 Ethernet Standards Link Physical Layers
  • many different Ethernet standards
  • common MAC protocol and frame format
  • different speeds 2 Mbps, 10 Mbps, 100 Mbps,
    1Gbps, 10G bps
  • different physical layer media fiber, cable
  • MAC protocol
  • and frame format
  • 100BASE-TX
  • 100BASE-FX
  • 100BASE-T2
  • 100BASE-T4
  • 100BASE-SX
  • 100BASE-BX

25
Manchester encoding
  • Used in 10BaseT
  • Each bit has a transition
  • Allows clocks in sending and receiving nodes to
    synchronize to each other
  • no need for a centralized, global clock among
    nodes!
  • Hey, this is physical-layer stuff!

26
Gbit Ethernet
  • uses standard Ethernet frame format
  • allows for point-to-point links and shared
    broadcast channels
  • in shared mode, CSMA/CD is used short distances
    between nodes required for efficiency
  • uses hubs, called here Buffered Distributors
  • Full-Duplex at 1 Gbps for point-to-point links
  • 10 Gbps now !
Write a Comment
User Comments (0)
About PowerShow.com