CSMA/CD (Collision Detection)

Similar documents
High Level View. EE 122: Ethernet and Random Access protocols. Medium Access Protocols

Topics. Link Layer Services (more) Link Layer Services LECTURE 5 MULTIPLE ACCESS AND LOCAL AREA NETWORKS. flow control: error detection:

EE 122: Ethernet and

The Link Layer II: Ethernet

Review. Error Detection: CRC Multiple access protocols. LAN addresses and ARP Ethernet. Slotted ALOHA CSMA/CD

Link Layer and Ethernet

Link Layer and Ethernet

Ethernet. Introduction. CSE 3213 Fall 2011

CS 716: Introduction to communication networks. - 9 th class; 19 th Aug Instructor: Sridhar Iyer IIT Bombay

Module 10 Data Link Layer CS655! 10-1!

Data Link Layer, Part 3 Medium Access Control. Preface

Adaptors Communicating. Link Layer: Introduction. Parity Checking. Error Detection. Multiple Access Links and Protocols

Computer Networks. Today. Principles of datalink layer services Multiple access links Adresavimas, ARP LANs Wireless LANs VU MIF CS 1/48 2/48

Medium Access Control

Data and Computer Communications. Chapter 11 Local Area Network

Master Course Computer Networks IN2097

Links Reading: Chapter 2. Goals of Todayʼs Lecture. Message, Segment, Packet, and Frame

Random Access. 1. Aloha. 2. Slotted Aloha 3. CSMA 4. CSMA/CD

Adaptors Communicating. Link Layer: Introduction. Parity Checking. Error Detection. Multiple Access Links and Protocols

CHAPTER 7 MAC LAYER PROTOCOLS. Dr. Bhargavi Goswami Associate Professor & Head Department of Computer Science Garden City College

Data Link Layer, Part 5. Medium Access Control

Data Link Layer -2- Network Access

CARRIER SENSE MULTIPLE ACCESS (CSMA):

Data Link Layer -2- Network Access

Lecture 5 The Data Link Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

CSC 4900 Computer Networks: Link Layer (2)

Link Layer and LANs. Our Goals. Link Layer

Chapter 6 Medium Access Control Protocols and Local Area Networks

LAN PROTOCOLS. Beulah A AP/CSE

CS 43: Computer Networks. 27: Media Access Contd. December 3, 2018

Chapter 5: The Data Link Layer. Chapter 5 Link Layer and LANs. Ethernet. Link Layer. Star topology. Ethernet Frame Structure.

Computer Network Fundamentals Spring Week 3 MAC Layer Andreas Terzis

Chapter 4. DataLink Layer. Reference: Computer Networking: A Top Down Approach 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.

Protocols for Multiaccess Networks

Chapter 12 Multiple Access 12.1

Local Area Networks (LANs) SMU CSE 5344 /

Introduction to Computer Networks. IEEE Ethernet

Links. Error Detection. Link Layer. Multiple access protocols. Nodes Links Frame. Shared channel Problem: collisions How nodes share a channel

CS 43: Computer Networks Switches and LANs. Kevin Webb Swarthmore College December 5, 2017

CS 43: Computer Networks Media Access. Kevin Webb Swarthmore College November 30, 2017

Lecture 6 The Data Link Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Chapter 5 Link Layer and LANs

EITF25 Internet Techniques and Applications L4: Network Access. Stefan Höst

Module 4 Data Link Layer CS655! 4-1!

CPSC 441 Tutorial-19. Department of Computer Science University of Calgary

CS 455/555 Intro to Networks and Communications. Link Layer Addressing, Ethernet, and a Day in the Life of a Web Request

Reminder: Datalink Functions Computer Networking. Datalink Architectures

Principles behind data link layer services

Master Course Computer Networks IN2097

Lecture 6. Data Link Layer (cont d) Data Link Layer 1-1

ECE 4450:427/527 - Computer Networks Spring 2017

COMMUNICATION NETWORKS NETW 501

CMPE 257: Wireless and Mobile Networking

ECE 4450:427/527 - Computer Networks Spring 2017

1-1. Switching Networks (Fall 2010) EE 586 Communication and. November 8, Lecture 30

Chapter 5 Link Layer and LANs

Local Area Networks. Aloha Slotted Aloha CSMA (non-persistent, 1-persistent, p-persistent) CSMA/CD Ethernet Token Ring

The Link Layer and LANs. Chapter 6: Link layer and LANs

LANs. Local Area Networks. via the Media Access Control (MAC) SubLayer. Networks: Local Area Networks

Getting Connected (Chapter 2 Part 4) Networking CS 3470, Section 1 Sarah Diesburg

Unit 7 Media Access Control (MAC)

Chapter V: Link Layer

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 18

Data and Computer Communications

COS 140: Foundations of Computer Science

Multiple Access Protocols

Aloha and slotted aloha

Midterm Review EECS 122. University of California Berkeley

Lecture 8 The Data Link Layer part I. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Chapter 5: DataLink Layer

Link Layer: Introduction. Chapter 5 Link Layer & LANS. Link layer: context. Link Layer Services

CS 3640: Introduction to Networks and Their Applications

Summary of MAC protocols

Chapter 6: Link layer and LANs. Link layer, LANs: outline. Link layer: introduction. Link layer: context. Link layer services (more)

RMIT University. Data Communication and Net-Centric Computing COSC 1111/2061/1110. Lecture 8. Medium Access Control Methods & LAN

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 16

Goals. Fundamentals of Network Media. More topics. Topics. Multiple access communication. Multiple access solutions

Principles behind data link layer services:

CSE 461: Multiple Access Networks. This Lecture

Chapter 5: Link layer

Medium Access Protocols

CSCI Computer Networks Fall 2016

6th Slide Set Computer Networks

ECEN 5032 Data Networks Medium Access Control Sublayer

Chapter V: Link Layer

Link Layer: Retransmissions

EECS Introduction to Computer Networking. Local Area Networks / Ethernet. Hub

Medium Access Control. CSCI370 Lecture 5 Michael Hutt New York Institute of Technology

Problem Set Name the 7 OSI layers and give the corresponding functionalities for each layer.

Chapter 5 Link Layer. Computer Networking: A Top Down Approach. 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012

ICE 1332/0715 Mobile Computing (Summer, 2008)

Direct Link Networks (II)

CSCD 433 Network Programming Fall Lecture 7 Ethernet and Wireless

Contention Protocols and Networks

CSCI Computer Networks Spring 2017

Lecture 6: Example LAN: Ethernet

Redes de Computadores. Medium Access Control

Outline: Connecting Many Computers

Ethernet. Networks: Ethernet 1

Computer Networks Principles LAN - Ethernet

Transcription:

CSMA/CD (Collision Detection) CD (collision detection): easy in wired LANs: measure signal strengths, compare transmitted, received signals difficult in wireless LANs: received signal strength overwhelmed by local transmission strength CSMA/CD: (CSMA w/ Collision Detection) collisions detectable colliding transmissions aborted reducing channel wastage Chapter 6, slide: 1

CSMA/CD collision detection Chapter 6, slide: 2

Link Layer 1 Error detection and correction 2 Link-layer addressing 3 Multiple access protocols 4 Ethernet Chapter 6, slide: 3

Ethernet 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 Chapter 6, slide: 4

Ethernet: Unreliable, connectionless connectionless: No handshaking between sending and receiving NICs unreliable: receiving NIC doesn t send acks or nacks to sending NIC 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 gaps Ethernet s MAC protocol: CSMA/CD (more on this next ) Chapter 6, slide: 5

CSMA/CD vs. slotted ALOHA CSMA/CD 1. Unsychronized: NIC (adapater) may transmit at anytime; no notion of timeslots 2. Carrier-sense: Never transmit if others are transmitting 3. Collision detection: stop transmitting as soon as collision is detected 4. Random backoff: Slotted ALOHA 1. Sychronized: transmit at beginning of a timeslot only 2. No carrier-sense: No check for whether others transmit or not 3. No collision detection: no stop during collision 4. No random backoff wait a random time before retransmitting (more later) Chapter 6, slide: 6

Notion of bit time Before describing CSMA/CD, let s introduce: bit time = time to transmit one bit on a Ethernet link Example: consider a 10 Mbps Ethernet link Q1: what is a bit time A1: 1/(10x10^6) second = 0.1 microsecond Q2: how much time is 96 bit time A2: 96 x 0.1 = 9.6 microsecond Chapter 6, slide: 7

Ethernet CSMA/CD algorithm 1. adapter receives datagram from network layer, creates frame 2. If adapter senses channel idle for 96 bit time, starts frame transmission (gap to allow interface recovery) 3. If adapter senses channel busy, waits until channel idle (plus 96 bit time), then transmits 4. If adapter transmits entire frame without detecting another transmission, adapter is done with frame! 5. If adapter detects another transmission while transmitting, aborts and sends a 48-bit jam signal (to make sure all nodes are aware of collision) 6. After aborting (after sending jam signal), adapter enters exponential backoff: adapter chooses K at random (next slide is explained how) adapter waits K 512 bit times, returns to Step 2 Chapter 6, slide: 8

Ethernet s CSMA/CD (more) Jam Signal: make sure all other transmitters are aware of collision; 48 bits Exponential Backoff: Goal: adapt retrans. attempts to estimate current load heavy load: random wait will be longer Light load: random wait will be shorter first collision: choose K from {0,1} after 2 nd collision: choose K from {0,1,2,3} after 3 rd collision: choose K from {0,1,2,3,4,5,6,7} after 10 th collision, choose K from {0,1,2,3,4,,1023} after m th collision, choose K from {0,1,2,,2 m -1} Then, delay transmission until K 512 bit times Chapter 6, slide: 9

Example A 10Mbps B A and B are connected via an Ethernet link of 10 Mbps Propagation delay between them = 224 bit time At time t=0, both transmit which results in collision After collision, A chooses K=0 and B chooses K=1 Q1: how much is bit time : =1/10 = 0.1 microsecond Q2: at what time does collision occur? =(224/2) x 0.1 = 11.2 microsecond Q3: at what time does bus become idle? =224 (both A & B detect collision) + 48 (A & B finish sending jam signals) + 224 (last bit of B s jam signal arrives at A) = 496 bit time =496x0.1 (bit time)= 49.6 microseccond Q4: at what time does A begin retransmission? [496 (bus becomes idle) + 96]x0.1 (bit time)= 59.2 microsecond Chapter 6, slide: 10

Distance L (bits) A R (bps) d (m), s (m/s) B A and B are connected via an Ethernet link of R bps A and B are separated by distance d meters Speed of propagation is s meter/second Length of each frame is L bits Suppose A starts transmitting a frame, and before it finishes, B starts also Q1: can A finish transmitting before it detects that B starts transmitting? Basically, is it possible for A not to detect collision? Answer: yes- if frame is not long enough, A can t detect collision Q1: find relationship between L, R, s, and d, so A can detect collision? Hints: 1. B can t send if medium is busy: listen-before-talk policy 2. Think of worst case, when just before the first bit coming from A arrives to B, B starts sending 3. Solution is in hw4solution, problem A. Chapter 6, slide: 11