CS 3640: Introduction to Networks and Their Applications

Similar documents
CS 3640: Introduction to Networks and Their Applications

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

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

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

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

EE 122: Ethernet and

ECE 4450:427/527 - Computer Networks Spring 2017

Data Link Layer: Overview, operations

Links. CS125 - mylinks 1 1/22/14

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

CSE 461 Multiple Access. David Wetherall

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

CSE 461: Multiple Access Networks. This Lecture

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

Multiple Access Links and Protocols

Message, Segment, Packet, and Frame Link-layer services Encoding, framing, error detection, transmission control Error correction and flow control

COMP/ELEC 429/556 Introduction to Computer Networks

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

CMPE 257: Wireless and Mobile Networking

CS 455/555 Intro to Networks and Communications. Link Layer

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

Computer Network Fundamentals Spring Week 3 MAC Layer Andreas Terzis

Link Layer: Retransmissions

Protocols for Multiaccess Networks

CSMA/CD (Collision Detection)

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

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

CMPE 257: Wireless and Mobile Networking

CSE/EE 461 Wireless and Contention-Free Protocols

Outline. Introduction to Networked Embedded Systems - Embedded systems Networked embedded systems Embedded Internet - Network properties

CSE/EE 461 Section 2

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

CSC 4900 Computer Networks: The Link Layer

Reminder: Datalink Functions Computer Networking. Datalink Architectures

CSCD 433 Network Programming Fall Lecture 7 Ethernet and Wireless

Goals of Today s Lecture. Adaptors Communicating

Multiple Access. Data Communications and Networking

Chapter 5 Link Layer and LANs

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

Chapter 5 Link Layer and LANs

ECEN 5032 Data Networks Medium Access Control Sublayer

Jaringan Komputer. Broadcast Network. Outline. MAC (Medium Access Control) Channel Allocation Problem. Dynamic Channel Allocation

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

Link Layer and Ethernet

Data Link Layer, Part 5. Medium Access Control

Data Link Layer: Multi Access Protocols

LECTURE PLAN. Script. Introduction about MAC Types o ALOHA o CSMA o CSMA/CD o CSMA/CA

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

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

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

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

COMP476 Networked Computer Systems. Polling. Sharing the Wire. LAN Technologies. COMP476 Networked Computer Systems 1

The Link Layer II: Ethernet

Lecture 12 December 04, Wireless Access. Graduate course in Communications Engineering. University of Rome La Sapienza. Rome, Italy

CS 640 Lecture 4: 09/11/2014

CS 3640: Introduction to Networks and Their Applications

Multiple Access Protocols

Computer Networks Medium Access Control. Mostafa Salehi Fall 2008

Multiple Access Channels

IEEE , Token Rings. 10/11/06 CS/ECE UIUC, Fall

Link Layer and LANs 안상현서울시립대학교컴퓨터 통계학과.

Lecture 8 Link Layer: functionality, error detection, media access algorithm

Final Review Fall 2017 Profs Peter Steenkiste & Justine Sherry

Aloha and slotted aloha

Chapter 5: Link layer

Chapter 12 Multiple Access 12.1

Link Layer and Ethernet

Link Layer. (continued)

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

Lecture 9: Bridging. CSE 123: Computer Networks Alex C. Snoeren

Data Link Layer. Goals of This Lecture. Engineering Questions. Outline of the Class

ECE 653: Computer Networks Mid Term Exam all

Ethernet. Introduction. CSE 3213 Fall 2011

Data Link Layer -2- Network Access

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

CSE 461: Wireless Networks

Chapter 6 Medium Access Control Protocols and Local Area Networks

Medium Access Control Sublayer Chapter 4

Wireless Medium Access Control Protocols

Medium Access Control. MAC protocols: design goals, challenges, contention-based and contention-free protocols

MULTIPLE ACCESS PROTOCOLS 2. 1

Data Link Layer, Part 3 Medium Access Control. Preface

Strengthening Unlicensed Band Wireless Backhaul

ECE 158A: Lecture 13. Fall 2015

ICE 1332/0715 Mobile Computing (Summer, 2008)

Media Access Control. Networked Systems (H) Lecture 5

Mohamed Khedr.

Data Link Layer -2- Network Access

Link layer, LANs: outline. Chapter 5-1 Link Layer. Link layer: introduction. Link layer services

Logical Link Control (LLC) Medium Access Control (MAC)

Lecture 4: Wireless MAC Overview. Hung-Yu Wei National Taiwan University

Unit 7 Media Access Control (MAC)

Outline. Lecture 16: Wireless Networking. Physical Layer (Layer 1) Ethernet: Wireless is Different. Attenuation Over Space

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

Medium Access Control

CC451 Computer Networks

Lecture 19. Principles behind data link layer services Framing Multiple access protocols

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

Physical Layer. Medium Access Links and Protocols. Point-to-Point protocols. Modems: Signaling. Modems Signaling. Srinidhi Varadarajan

Local Area Networks (LANs) SMU CSE 5344 /

Transcription:

CS 3640: Introduction to Networks and Their Applications Fall 2018, Lecture 7: The Link Layer II Medium Access Control Protocols Instructor: Rishab Nithyanand Teaching Assistant: Md. Kowsar Hossain 1

You should Be checking Piazza regularly for announcements. Have nearly completed assignment 1. Know and understand: The three Internet design principles. Encapsulation. The components of the Internet. Circuit- vs. packet- switched networks. Components of end-to-end delay. Functions of the link layer. 2

This week in class 1. Recap: Error detection in the link layer 2. 3. Link layer principles: Medium access Thursday: Addressing in the link layer 3

Recap: Error detection in the link layer What approaches have been used to detect errors in frames? Send multiple copies 1-d parity bits 2-d parity bits Compute mathematical functions of the frame payload. Checksums and Cyclic Redundancy Checks (CRC) How does a receiver communicate that a frame was errorfree? The ACK frame. How is it sent? Stop and wait. Sliding windows.

This week in class 1. Recap: Error detection in the link layer 2. 3. Link layer principles: Medium access Thursday: Addressing in the link layer 5

The link layer: Medium access protocols What is a medium access control (MAC) protocol? A transmission medium can be shared by many devices. If everyone talks at the same time, we have collisions and unintelligible data. MAC: Rules for sharing a common transmission medium.

The link layer: Medium access protocols General strategies for MAC protocols Idea 1: Partition the transmission channel so each host has its share. We briefly saw this Time and Frequency division. Each host has a fixed share (time or frequency band) in the medium. What if a host has nothing to send? Idea 2: Pass a transmit now token to hosts. Like me asking a question in class and selecting one person (from many ) to answer. What if multiple people really want to give an answer? Problem: Transmission channel utilization isn t great.

The link layer: Medium access protocols General strategies for MAC protocols Idea 3: Allow collisions, we ll figure out how to recover data. Allows much higher utilization. Now we have new problems: How to identify when a collision has occurred. How to recover from a collision. This strategy is called Random access MAC or Contention-based MAC. Used by Ethernet, mobile transmission protocols, and others.

The link layer: The ALOHA MAC protocol (1970s) Idea: Send a frame as soon as you need to. If you receive a frame while transmitting, a collision has occurred. Wait for some time and transmit again. Eventually, a frame will get transmitted without collisions. Assumptions: All frames are equally sized. Errors (collisions) are detectable. Problem: For successful transmissions, no other frame from any other host should start within T time before or after you. Sensitive transmission period: 2T for each frame. Scales terribly. (Theoretical maximum throughput for large number of hosts: 18%).

The link layer: The Slotted ALOHA MAC protocol (1970s) Idea: If we allow transmissions only at certain time points, the sensitive period for transmissions reduces. Transmissions on the channel can occur only every T seconds. The channel is divided into slots, but anyone can send in any slot. Sensitive transmission period: T for each frame. If a collision occurs, wait some number of time slots and retransmit. Assumptions: All frames are equally sized. All host clocks are synchronized (!!!) Errors (collisions) are detectable. Sensitive period reduced from 2T to T. Theoretical maximum throughput is doubled to 36%. Still not great.

The link layer: The CSMA MAC protocol (1990s) Carrier Sense Multiple Access (CSMA). Idea: Check to see if the medium is being used by someone else before you try to use it. Start transmission only if the medium is idle. Basically, be polite and don t try to talk over someone else. If someone is talking, wait for some time and check again. Removes the need for synchronized clocks. Collisions can still occur. The propagation delay may mean you don t know that someone was talking until after you started talking.

The link layer: The CSMA/CD MAC protocol (1990s) Carrier Sense Multiple Access with Collision Detection (CSMA/CD). Currently used in Ethernet (802.3) and other wired networks. Why wired? Carrier sensing is much easier than in wireless networks. Idea: While sending a frame, sense the medium for a collision. If a collision occurs, then abort immediately and notify the others. Retry after some time. Why keep sending when you know its corrupted. Collisions can occur, but we can reduce the cost of one by quickly detecting it and stopping transmission.

Time The link layer: The CSMA/CD MAC protocol (1990s) Collisions can occur Collisions are quickly detected, aborted, and reported (using a Jam sequence). Note the role of distance, propagation delay, and frame length A B C D t 0 t 1 Detect Collision and Abort

The link layer: Deterministic and randomized back-off I ve been saying wait for some time before trying again. What is some time? Two general approaches: Deterministic: I ll always wait t seconds. Randomized: I ll wait for some random time between 0 and t seconds. Discuss: Which is better? Randomized is better. Usually, if you re trying again it means a collision was detected. If it was detected by you, it was also detected by everyone else. If two hosts have the same t and collide once then they will always collide.

The link layer: Randomized back-off Randomized back-offs If you need to retransmit, select a random time t in [0, T]. Retry after waiting for t (milli/micro) seconds. Discuss: How should you change t when you have collisions occurring even on the retries? Exponential randomized back-off Key idea: If collisions keep occurring, it means that the channel is really busy. Trying again only makes the problem worse. Let s back-off exponentially. Keep doubling T for each successive collision. If you try to send a frame the first time and it collides, select t from [0, T]. If you wait t seconds and have another collision on the retry, select t from [0, T, 2T, 3T]. If you have c successive collisions on your retries, select t from [0, T,, (2 c -1)T].

The link layer: Challenges with the wireless medium C is transmitting to D. Discuss: What happens when C tries to sense for collisions? Its own transmission dominates any signal it can sense. This means it cannot sense the carrier while transmitting. A B C D

The link layer: Challenges with the wireless medium C is transmitting to D. Discuss: What happens when A senses the carrier? A B C D

The link layer: The CSMA/CA MAC protocol (1990s) Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA). Currently used in wireless transmission protocols (WiFi 802.11). In wireless networks: Carrier sensing while transmitting is not feasible, so collisions can only be detected at the receiver. Why? Detecting collisions is harder because accurately sensing the medium is tough wireless signals may not carry to far away hosts. Connectivity is not transitive: If A can reach B and B can reach C, it doesn t mean that A can reach C. Instead, wireless networks just try to avoid collisions instead of detecting and retransmitting. They use the CSMA/CA protocol.

The link layer: The CSMA/CA protocol B wants to transmit to C. Sense the carrier. Is another node transmitting? Yes. So do an exponential back-off before trying again. A B C D

The link layer: The CSMA/CA protocol B wants to transmit to C. Sense the carrier. Is another node transmitting? No. Send frames. If I don t get an ACK in reasonable time, start again. A B C D

The link layer: The CSMA/CA MAC protocol Step 1: Sense the carrier. Is another node transmitting? Step 2: If the carrier is not busy: Send the frames. If the carrier is busy: Do an exponential back-off and go to step 1. Step 3: Wait for an acknowledgement. If it doesn t arrive after timeout seconds, go to step 1 and try again. Problem: Collisions can still occur and utilization can be low! Why? Hidden nodes and exposed terminals.

The link layer: The CSMA/CA MAC protocol Hidden terminals Step 1: Sense the carrier. Is another node transmitting? Hidden nodes can increase false-negatives. Collision! A B C A cannot hear C C cannot hear A

The link layer: The CSMA/CA MAC protocol Hidden terminals Discuss: Would asking for permission from the receiver help? Collision! A B C A cannot hear C C cannot hear A

The link layer: The CSMA/CA MAC protocol (with RTS/CTS) A B C

The link layer: The CSMA/CA MAC protocol (with RTS/CTS) Step 1: Sense the carrier. Is another node transmitting? Step 2: If the carrier is not busy: Tell the receiver you have something to send via a Request To Send (RTS) message. Wait for timeout seconds for a Clear To Send (CTS) message from the receiver. If CTS arrives: send the frames. If CTS doesn t arrive: do an exponential back-off and go to step 1. If the carrier is busy: Do an exponential back-off and go to step 1. Step 3: Wait for an acknowledgement. If it doesn t arrive after timeout seconds, go to step 1 and try again. Solves the hidden terminal problem, doesn t help with exposed terminals.

The link layer: The CSMA/CA MAC protocol Exposed terminals Step 1: Sense the carrier. Is another node transmitting? Exposed terminals can increase false-positives. No collision Carrier sense detects a busy channel No collision A B C D

The link layer: The CSMA/CA MAC protocol Exposed terminals Discuss: Why doesn t RTS/CTS messaging work here? RTS/CTS helps reduce false-negatives (thinking that the medium is free when it isn t) but doesn t prevent false-positives (thinking the medium is busy when it isn t) because we never actually reach the RTS stage when we have a false-positive. A B C D

The link layer: The CSMA/CA MAC protocol Exposed terminals Discuss: Why not skip sensing and just start with an RTS message if it solves the exposed terminal problem? Overhead! RTS/CTS packets don t have any useful data in them. As your network gets faster, you send more RTS/CTS packets per second because you can handle more transmissions per second. RTS/CTS overhead on a 1Mbps WiFi connection: 4% RTS/CTS overhead on a 11Mbps WiFi connection: 25% Sending RTS/CTS packets when you don t need to will only make this worse. Lesson: Everything is a trade-off! Researchers and engineers decided that the overhead from this approach was too high to be a feasible solution to the exposed terminal problem.

Now: CLASSI (Classroom Assessment by Student Interviews) This is my first time teaching. I ve tried to put together the type of networking class I d have liked to have had as a student, but it can always be better. Feedback is always important: for you and for me. In research, I use peer-review and early drafts to improve my work. In teaching, I plan to use your feedback to improve my work. I want to know what you like and what can be better. Everything is anonymous, so be honest. Dr. Anna Flaming (Center for Teaching @ UIowa) has been kind enough to offer her services to help me improve my teaching throughout the year.