Your SlideShare is downloading. ×
5.2 ppt
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

5.2 ppt

808
views

Published on


0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
808
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
18
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 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: don’t interrupt others!
  • 5. CSMA collisions collisions can still occur: propagation delay means two nodes may not hear each other’s transmission collision: entire packet transmission time wasted spatial layout of nodes note: distance & propagation delay causes possible collision d: propagation delay
  • 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 doesn’t 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,…,2 m -1}. Adapter waits K · 512 bit times and returns to Step 2. The maximum, m can be 10.
    • Bit time: 0.1 microsec/bit; The longest backoff time is: at K=1023, about 50 msec
  • 11. More on Ethernet’s 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
    Metcalfe’s 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)
    5: DataLink Layer 5-
    • 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 doesn’t 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
    • Ethernet’s MAC protocol: unslotted CSMA/CD
  • 20. Ethernet uses CSMA/CD
    • No slots
    • adapter doesn’t 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,…,2 m -1}. Adapter waits K · 512 bit times and returns to Step 2
    • Bit time: 0.1 microsec for 10 Mbps Ethernet ; for K=1023, wait time is about 50 msec
  • 22. Ethernet’s 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 K=1023, 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}
    5: DataLink Layer 5-
    • See/interact with Java
    • applet on AWL Web site:
    • highly recommended !
  • 23. CSMA/CD efficiency
    • T prop = max propagation delay between 2 nodes in LAN (e.g 400m)
    • t trans = time to transmit max-size frame
    • Efficiency goes to 1 as t prop goes to 0
    • Goes to 1 as t trans 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
    5: DataLink Layer 5-
    • MAC protocol
    • and frame format
    • 100BASE-TX
    • 100BASE-T4
    • 100BASE-FX
    • 100BASE-T2
    • 100BASE-SX
    • 100BASE-BX
    • application
    • transport
    • network
    • link
    • physical
    • fiber physical layer
    • copper (twister
    • pair) physical layer
  • 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 !