COS 140: Foundations of Computer Science

Similar documents
COS 140: Foundations of Computer Science

Ethernet. Introduction. CSE 3213 Fall 2011

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

ECE453 Introduction to Computer Networks. Broadcast vs. PPP. Delay. Lecture 7 Multiple Access Control (I)

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

ECEN 5032 Data Networks Medium Access Control Sublayer

Data Link Layer -2- Network Access

Data Link Layer -2- Network Access

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

Data and Computer Communications. Chapter 11 Local Area Network

Chapter 4. The Medium Access Control Sublayer. Points and Questions to Consider. Multiple Access Protocols. The Channel Allocation Problem.

Data and Computer Communications

EE 122: Ethernet and

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

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

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

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

Multiple Access Protocols

Contention Protocols and Networks

Chapter 4 (Week 7) The Medium Access Control Sublayer ANDREW S. TANENBAUM COMPUTER NETWORKS FOURTH EDITION PP CN&DC Dr.

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

LAN PROTOCOLS. Beulah A AP/CSE

Link Layer: Retransmissions

Redes de Computadores. Medium Access Control

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

COMPUTER NETWORKS - Local area networks

Local area networks. Copyright

ECE 4450:427/527 - Computer Networks Spring 2017

Chapter 12 Multiple Access 12.1

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

Computer Networks Medium Access Control. Mostafa Salehi Fall 2008

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

CS 123: Lecture 12, LANs, and Ethernet. George Varghese. October 24, 2006

Lecture 05 Chapter 16 High Speed LANs

Random Assignment Protocols

CSE 461: Multiple Access Networks. This Lecture

Data Communications. Automatic Repeat Request Medium Access Control

Data Link Layer, Part 3 Medium Access Control. Preface

MAC Sublayer(1) Principal service of the Medium Access Control Sublayer: Allocating a single broadcast channel (mostly a LAN) among competing users

CCM 4300 Lecture 5 Computer Networks, Wireless and Mobile Communications. Dr Shahedur Rahman. Room: T115

Computer Networks. Medium Access Sublayer (Part I)

Data Link Layer: Collisions

Data Link Layer, Part 5. Medium Access Control

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

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

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

Medium Access Control

Media Access Control. Networked Systems (H) Lecture 5

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

Markov Chains and Multiaccess Protocols: An. Introduction

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

Multiple Access Links and Protocols

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

LANs Local Area Networks LANs provide an efficient network solution : To support a large number of stations Over moderately high speed

EITF25 Internet- - Techniques and Applica8ons Stefan Höst. L5 Data link (part 2)

Medium Access Control Sublayer Chapter 4

CSE 461 Multiple Access. David Wetherall

Link Layer. (continued)

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

CMPE 257: Wireless and Mobile Networking

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

CSMA/CD (Collision Detection)

ISSN: (Online) Volume 2, Issue 6, June 2014 International Journal of Advance Research in Computer Science and Management Studies

Networking Technologies and Applications

Local Area Networks (LANs) SMU CSE 5344 /

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

Multiple Access. Data Communications and Networking

Chapter 6 Medium Access Control Protocols and Local Area Networks

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

COMP/ELEC 429/556 Introduction to Computer Networks

Computer Network Fundamentals Spring Week 3 MAC Layer Andreas Terzis

CSE 461: Multiple Access. Homework: Chapter 2, problems 1, 8, 12, 18, 23, 24, 35, 43, 46, and 58

Chapter 5: Link layer

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

COMMUNICATION NETWORKS NETW 501

Chapter 4. The Medium Access Control Sublayer

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

Reminder: Datalink Functions Computer Networking. Datalink Architectures

Networks Homework # 2

Aloha and slotted aloha

Medium Access Control

Lecture 6: Example LAN: Ethernet

Mobile Communications Chapter 3 : Media Access

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

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

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

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

MULTIPLE ACCESS PROTOCOLS 2. 1

Multiple-access protocols

Wireless Communications

Summary of MAC protocols

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

Data Link Layer: Multi Access Protocols

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

Media Access Control (MAC) Sub-layer and Ethernet

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

Physical and Link Layers. CS144 Review Session 6 November 6 th, 2008 Roger Liao Based on slides by Ben Nham

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

Chapter 4: The Medium Access Layer

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

Transcription:

COS 140: Foundations of Computer Science ALOHA Network Protocol Family Fall 2017 Homework 2 Introduction 3 Network Protocols.......................................................... 3 Problem................................................................. 4 Ethernet................................................................ 5 ALOHA Protocols.......................................................... 6 ALOHA Basics 7 Stations................................................................. 7 Channels................................................................ 8 Time................................................................... 9 Carrier sense.............................................................. 10 Channel allocation.......................................................... 11 ALOHA 13 The system.............................................................. 13 Collision detection.......................................................... 14 Pure Aloha 15 The protocol............................................................. 15 Random backoff........................................................... 16 Efficiency................................................................ 17 Slotted ALOHA 18 Carrier Sense Protocols 19 Propagation delay.......................................................... 20 1-Persistent CSMA......................................................... 21 p-persistent CSMA......................................................... 22 Nonpersistent CSMA........................................................ 23 CSMA with Collision Detection (CSMA/CD)........................................ 24 Ethernet................................................................ 25 1

Homework 2 / 25 Homework Slides, book Chapter 24 on line Homework: All exercises at end of chapter Due: 11/27 (Don t wait till the last minute, though these can be tricky.) Copyright c 2002 2017 UMaine Computer Science Department 2 / 25 Introduction 3 / 25 Network Protocols Protocol: Set of rules that are followed to achieve some goal or to govern some interaction Network protocols: Followed by computers to allow intercommunication ALOHA protocols: one of the earliest network protocols Descendants include the Ethernet protocol Copyright c 2002 2017 UMaine Computer Science Department 3 / 25 2

The Problem For local area networks (LANs), how do we connect the computers so that: it is simple; the communication channel is utilized efficiently; necessary equipment is kept to a minimum; and it is easy to add new computers without disrupting the LAN. Copyright c 2002 2017 UMaine Computer Science Department 4 / 25 A solution: The Ethernet Most modern LANs use a bus architecture to solve the problem Benefits: Little or no equipment other than the network cards themselves Easy to add/delete computers High speed Ethernet is the most commonly-used LAN protocol Invented by Bob Metcalfe Relatively simple Capable of very high speeds (up to 100 Gbps) Copyright c 2002 2017 UMaine Computer Science Department 5 / 25 3

ALOHA Protocols Ethernet is a descendant of one of the earliest LAN-like protocols, ALOHA One of the earliest, most successful dynamic channel allocation methods: Addressed problem of allocating communication channel among set of transmitters/receivers Also called medium access control (MAC) techniques Also: multiple access (broadcast), rather than a point-to-point link Originally from packet radio; works well for satellite transmissions. Simpler than Ethernet so a good place to start Copyright c 2002 2017 UMaine Computer Science Department 6 / 25 ALOHA Basics 7 / 25 ALOHA station model Stations are independent computers (or terminals) used by users (now: hosts or nodes) Software on the stations generate frames (packets) for transmission The station sends the frame and blocks until it has been successfully transmitted Copyright c 2002 2017 UMaine Computer Science Department 7 / 25 4

ALOHA channel model There is only one channel all stations use this channel More than one frame is transmitted at the same time collision All stations can detect collisions (some variants of model) In broadcast systems: listen to channel output if not the same as sent collision Also, if detect signal other than yours on the channel during frame transmission collision Assume no additional channel available for arbitration Assume the channel is error-free, except for collisions Copyright c 2002 2017 UMaine Computer Science Department 8 / 25 ALOHA time models Continuous time: transmission can begin at any time Slotted time: time is divided into discrete slots, and transmissions begin at the start of a slot Copyright c 2002 2017 UMaine Computer Science Department 9 / 25 5

Sensing the carrier In telecommunications, a basic waveform, the carrier, is modulated to encode the information Carrier sense: stations check to see if the channel is being used don t attempt to use it until it becomes idle No carrier sense: stations do not check if the channel is busy before using it Copyright c 2002 2017 UMaine Computer Science Department 10 / 25 Static vs. dynamic channel allocation Static channel allocation: make a decision on how to allocate the channel and stick with it Dynamic channel allocation: channel allocation can change as needed Static is simpler, but dynamic is more responsive to changing needs Copyright c 2002 2017 UMaine Computer Science Department 11 / 25 6

Example: Static allocation methods Frequency-division multiplexing (FDM): Used (e.g.) for allocating telephone trunk lines If have n nodes, give each its own 1/n section of the frequency bandwidth Time-division multiplexing (TDM): Also used for some telephone trunks, some network mechanisms (slotted ALOHA, e.g.) Divide time into frames, divide frames into slots Within each frame, a node has a slot it can use Node has entire bandwidth during its slot Problems for computer networks: have bursty traffic and a changing number of users Copyright c 2002 2017 UMaine Computer Science Department 12 / 25 ALOHA 13 / 25 The ALOHA System Created to link campuses of the University of Hawaii on different islands Central computer also connected to ARPANET and PACNET Not truly a broadcast system communication from a station to a central computer or from the central computer to a station but shared spectrum, so same problems as broadcast Not truly a LAN (clearly not in the same building) but used LAN technology to create a metropolitan area network (MAN) Computers connected by radio - two bands in UHF part of spectrum. Copyright c 2002 2017 UMaine Computer Science Department 13 / 25 7

Collision detection in the ALOHA system One radio band used for communication from stations there can be collisions on this band One band is used for communication from the central computer The central computer sends an ACK for messages it correctly receives If an ACK is not received by the station in some period of time, it assumes a collision has occurred Stations do not sense channel for communication to the central computer. Researchers later thought one channel would be better. Copyright c 2002 2017 UMaine Computer Science Department 14 / 25 Pure Aloha 15 / 25 Pure ALOHA protocol A station sends a message whenever it has one to send If the transmission was successful, done If there is no ACK after some period of time, assume collision and retransmit Propagation delay How long to wait? When to retransmit? Copyright c 2002 2017 UMaine Computer Science Department 15 / 25 8

Random backoff Backoff: time to wait before retransmitting ALOHA used random backoff why? Which probability distribution to use? Binary exponential backoff: retransmit, but each time there s a collision, double the average time of the delay Copyright c 2002 2017 UMaine Computer Science Department 16 / 25 Efficiency of pure ALOHA If even one bit of overlap retransmit frame Assume frames are all the same size and take the same amount of time t to send. A frame can cause collisions for time a little under 3t: frame begins leaving transmitter wasted bandwidth due to collision frame ends being received at receiver If rate of sending is same for all users, the best channel utilization is about 18%. If users have different rates of use, throughput higher because communication can be bursty all users not trying to send at the same time. t Copyright c 2002 2017 UMaine Computer Science Department 17 / 25 9

Slotted ALOHA 18 / 25 Slotted ALOHA Attempt to improve pure ALOHA. Divide channel into uniform slots, each of which is size of frame transmission time Frames can only be sent at the beginning of a slot need clock sync Now, when there s a collision, frames completely overlap wasted channel time = t, not 3t Better throughput than pure ALOHA: 37% Copyright c 2002 2017 UMaine Computer Science Department 18 / 25 Carrier Sense Protocols 19 / 25 Carrier sense protocols Problem with pure ALOHA: poor channel utilization Can do better if can sense the medium to determine if busy Carrier sense protocols: like pure ALOHA, but can detect if carrier in use before transmitting E.g., carrier sense multiple access (CSMA) Copyright c 2002 2017 UMaine Computer Science Department 19 / 25 10

Propagation delay (again) Takes a finite amount of time to send signal from one place to another: the propagation delay Propagation in most media roughly the speed of light (approx. 3 10 8 m/s) Propagation delay roughly 1 ns/foot Negligible for most LANs (order of 1 µs) For WAN, can be considerable: ms to tenths of seconds Determines how long from time a station begins transmitting until another detects it Longer propagation delay increased probability of collisions Copyright c 2002 2017 UMaine Computer Science Department 20 / 25 1-Persistent CSMA The 1 refers to probability that station will transmit when channel is free, so: If channel free, transmit If channel busy, wait transmit as soon as sense the channel free Collisions can occur: due to propagation delays when several stations, which are waiting, all transmit when channel becomes free Copyright c 2002 2017 UMaine Computer Science Department 21 / 25 11

p-persistent CSMA Channel Busy? y n p Select 1-p Probabilistically Transmit Wait one time unit Copyright c 2002 2017 UMaine Computer Science Department 22 / 25 Nonpersistent CSMA If channel is busy: wait a random time before trying again. Reduces collisions because reduce likelihood that waiting stations will collide when channel becomes idle. Copyright c 2002 2017 UMaine Computer Science Department 23 / 25 12

CSMA with Collision Detection (CSMA/CD) Medium Busy? y n Transmit Collision y Transmit "jamming Wait random Detected? signal" interval n done Stop transmitting as soon collision detected Increases useful bandwidth by reducing the time wasted sending pieces of frames that have been ruined by collisions. Efficiency depends on propagation time (must wait for information about collision to propagate back to sender). Copyright c 2002 2017 UMaine Computer Science Department 24 / 25 Ethernet CSMA/CD, IEEE 802.3 Comprises bottom layers of OSI reference model: Data link: MAC-client, Media Access (MAC) layers Physical: Physical (media-specific) Many forms: 10Base-T 100Base-T2 (Fast Ethernet), 1000Base-LX (Gigabit Ethernet),... Frame: Preamble Start-of-frame Dest. Source Length/Type Data+Pad Check codes Clock synchronization via pattern of bits in frame s preamble Star topology (with switches) vs bus topology (with bridges) Full-duplex vs. half-duplex Copyright c 2002 2017 UMaine Computer Science Department 25 / 25 13