Data Link Layer: Multi Access Protocols

Similar documents
Chapter 5 Link Layer and LANs

Chapter 5: Link layer

CSC 4900 Computer Networks: The Link Layer

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

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

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

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

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

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

ECE 4450:427/527 - Computer Networks Spring 2017

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

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

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

CSC 401 Data and Computer Communications Networks

CC451 Computer Networks

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

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

SC250 Computer Networking I. Link Layer. Prof. Matthias Grossglauser LCA/I&C.

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

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

CMPE 150: Introduction to Computer Networks

Broadcast Links, Addressing and Media Access Control. Link Layer B. Link and Physical Layers. MAC Addresses

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

Chapter 5 Link Layer and LANs

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

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

MULTIPLE ACCESS PROTOCOLS 2. 1

Chapter V: Link Layer

Links. CS125 - mylinks 1 1/22/14

Multiple Access Links and Protocols

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

Chapter 4 Network Layer

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

Link Layer and LANs. CMPS 4750/6750: Computer Networks

Chapter 6 The Link Layer and LANs

Data Link Layer: Overview, operations

Chapter 5 Link Layer and LANs

Master Course Computer Networks IN2097

Chapter V: Link Layer

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

CSCD 330 Network Programming

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

Link Layer and LANs. Our Goals. Link Layer

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

Medium Access Control

Module 10 Data Link Layer CS655! 10-1!

transferring datagram from one node data-link layer has responsibility of to adjacent node over a link 5-1 TDTS06 Computer networks

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

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

Master Course Computer Networks IN2097

CS 3516: Computer Networks

Goals of Today s Lecture. Adaptors Communicating

Computer Networks Medium Access Control. Mostafa Salehi Fall 2008

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

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

CSCD 330 Network Programming Fall 2012

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

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

Chapter 5: DataLink Layer

CSC 8560 Computer Networks: Link Layer

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

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

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

Link Layer and Ethernet

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

CSCI Computer Networks Fall 2016

Link Layer and Ethernet

Lecture 6 - Link layer. Lecture 5 Review. Link Layer. Introduction, Services. Notes. Notes. Notes. Notes. Networks and Security. Jacob Aae Mikkelsen

Module 4 Data Link Layer CS655! 4-1!

CSCI Computer Networks Spring 2017

EE 122: Ethernet and

Redes de Computadores. Medium Access Control

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

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

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

Chapter 5 Link Layer and LANs

Links Reading: Chapter 2

Links. COS 461: Computer Networks Spring Mike Freedman h?p://

Computer Network Fundamentals Spring Week 3 MAC Layer Andreas Terzis

Internet protocol stack

Chapter 6 The Link Layer and LANs

Chapter 4 roadmap. CS555, Spring /14/2005. WMU-CS, Dr. Gupta 1. Multicast Routing: Problem Statement. Approaches for building mcast trees

Chapter 5: The Data Link Layer

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

Chapter 6 Wireless and Mobile Networks

Chapter 6 The Link Layer and LANs

Chapter 6 The Link Layer and LANs

Chapter 6 The Link Layer and LANs

Chapter 5 Link Layer. Link Layer 5-1

Principles behind data link layer services:

Chapter 6 The Link Layer and LANs

Chapter 6 The Data Link layer

Principles behind data link layer services

Chapter 5: Link layer

COMP211 Chapter 6/7 Link Layer

Multiple Access Protocols

Chapter 6 The Link Layer and LANs

Chapter 6 Wireless and Mobile Networks. Chapter 6 outline. Chapter 6: Wireless and Mobile Networks. Elements of a wireless network.

Multiple Access Links and Protocols

COMP 3331/9331: Computer Networks and Applications. Data Link layer. Link layer, LANs: outline. Data Link Layer

Transcription:

Digital Communication in the Modern World Data Link Layer: Multi Access Protocols http://www.cs.huji.ac.il/~com1 com1@cs.huji.ac.il Some of the slides have been borrowed from: Computer Networking: A Top Down Approach Featuring the Internet, 3 nd edition. Jim Kurose, Keith Ross Addison-Wesley, July 2004. Intro to the Data Link Layer Travel analogy University sends you to a conference in India taxi: Jerusalem to Ben-Gurion plane: Ben-Gurion to Mumbai plane: Mumbai to Chennai rickshaw: Chennai to conference center student = datagram university = sending node (application layer) travel agent = routing algorithm (network layer) transportation mode = data link layer protocol, i.e. running an airline is different than a rickshaw travel segment = communication link (physical layer) DataLink Layer 2 Link Layer Introduction and services Error detection and correction Multiple access protocols Link-Layer Addressing Ethernet Hubs and switches PPP Link Layer Some terminology: hosts and routers are nodes communication channels that connect adjacent nodes along communication path are links wired links wireless links LANs layer-2 packet is a frame, encapsulates datagram link DataLink Layer 3 data-link layer has responsibility of transferring datagram from one node to adjacent node over a single link DataLink Layer 4

Link layer In the Link layer there are different link types and they have different protocols Frame transferred by different link protocols over different links (decided by the network layer): e.g., Ethernet on first link, frame relay on intermediate links, 802.11 on last link Each link protocol provides different services e.g., may or may not provide rdt over link; flow control; etc. Link types are grouped into: point-to-point (e.g. between routers, host to ISP, etc.) Broadcast (LAN, wireless) Link Layer Services Framing, link access: encapsulate datagram into frame, adding header, trailer channel access if shared medium MAC addresses used in frame headers to identify source, dest different from IP address! Reliable delivery between adjacent nodes similar service as in the transport layer seldom used on low bit-error link (fiber, some twisted pair) wireless links: high error rates Q: why both link-level and end-to-end reliability? DataLink Layer 5 DataLink Layer 6 Link Layer Services (more) Flow Control: pacing between adjacent sending and receiving nodes Error Detection: (e.g. parity check, CRC) errors caused by signal attenuation, noise. receiver detects presence of errors: signals sender for retransmission or drops frame Error Correction: (e.g. two Dimensional Bit Parity) receiver identifies and corrects bit error(s) without resorting to retransmission Half-duplex and full-duplex with half duplex, nodes at both ends of link can transmit, but not at same time DataLink Layer 7 Adaptors (aka NICs) sending node datagram frame adapter link layer implemented in adaptor Ethernet card, PCMCI card, 802.11 card sending side: encapsulates datagram in a frame adds error checking bits, rdt, flow control, etc. link layer protocol frame adapter receiving side rcving node looks for errors, rdt, flow control, etc extracts datagram, passes to rcving node DataLink Layer 8

Multiple Access Links and Protocols Two types of links : point-to-point <= Single access PPP for dial-up access (between host and ISP) point-to-point link between Ethernet switch and host broadcast (shared wire or medium) <= Multiple Access traditional Ethernet 802.11 wireless LAN Multiple Access protocols single shared broadcast channel two or more simultaneous transmissions by nodes: interference collision if node receives two or more signals at the same time Cocktail Party effect ( popolitika behavior ) multiple access protocol distributed algorithm that determines how nodes share channel, i.e., determine when node can transmit communication about channel sharing must use channel itself! no out-of-band channel for coordination DataLink Layer 9 DataLink Layer 10 Ideal Multiple Access Protocol Broadcast channel of bandwidth R bps 1. When one node wants to transmit, it can send at rate R bps. 2. When M nodes want to transmit, each can send at average rate R/M bps 3. Fully decentralized: no special node to coordinate transmissions no synchronization of clocks or slots 4. Simple MAC Protocols: a taxonomy Three broad classes: Channel Partitioning divide channel into smaller pieces (time slots, frequency, code) allocate piece to node for exclusive use Random Access channel not divided, allow collisions try to maximize probability that everything will be ok Taking turns Nodes take turns, but nodes with more to send can take longer turns DataLink Layer 11 DataLink Layer 12

Channel Partitioning MAC protocols: TDMA TDMA: time division multiple access access to channel in "rounds" each station gets fixed length slot (length = pkt trans time) in each round unused slots go idle example: 6-station LAN, 1,3,4 have pkt, slots 2,5,6 idle Channel Partitioning MAC protocols: FDMA FDMA: frequency division multiple access channel spectrum divided into frequency bands each station assigned fixed frequency band unused transmission time in frequency bands go idle example: 6-station LAN, 1,3,4 have pkt, frequency bands 2,5,6 idle frequency bands time DataLink Layer 13 DataLink Layer 14 Code Division Multiple Access (CDMA) Code Division Multiple Access (CDMA) used in several wireless broadcast channels standards (cellular, satellite, etc) unique code assigned to each user; i.e., code set partitioning all users share same frequency, but each user has own chipping sequence (i.e., code) to encode data encoded signal = (original data) X (chipping sequence) decoding: inner-product of encoded signal and chipping sequence allows multiple users to coexist and transmit simultaneously with minimal interference (if codes are orthogonal ) Code vector C = (c 1, c 2,, c m,, c M ); c i {1,} Let d i denote bit i and c m code bit m, Let Z i := d i. c m Then: d i = M 1 M m= 1 Z i, m c m Data Link Layer 15 Data Link Layer 16

CDMA Encode/Decode CDMA: two-sender interference sender data bits code d 1 = d 0 = 1 1 1 1 1 1 1 1 1 slot 1 slot 0 Z i,m = d i. cm channel output Z i,m 1 1 1 1 1 1 1 1 slot 1 channel output slot 0 channel output received input code receiver 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 slot 1 slot 0 M D i = Σ Z. i,m cm m=1 M d 1 = slot 1 channel output d 0 = 1 slot 0 channel output Data Link Layer 17 Data Link Layer 18 Random Access Protocols Slotted ALOHA When node has packet to send transmit at full channel data rate R. no a priori coordination among nodes two or more transmitting nodes collision, random access MAC protocol specifies: how to detect collisions how to recover from collisions (e.g., via delayed retransmissions) Examples of random access MAC protocols: slotted ALOHA ALOHA CSMA, CSMA/CD, CSMA/CA DataLink Layer 19 Assumptions all frames same size time is divided into equal size slots, time to transmit 1 frame nodes start to transmit frames only at beginning of slots nodes are synchronized if 2 or more nodes transmit in slot, all nodes detect collision Operation when node obtains fresh frame, it transmits in next slot no collision, node can send new frame in next slot if collision, node retransmits frame in each subsequent slot with prob. p until success DataLink Layer 20

Slotted ALOHA Slotted Aloha efficiency Pros single active node can continuously transmit at full rate of channel highly decentralized: only slots in nodes need to be in sync simple Cons collisions, wasting slots idle slots nodes may be able to detect collision in less than time to transmit packet clock synchronization DataLink Layer 21 Efficiency is the long-run fraction of successful slots when there are many nodes, each with many frames to send Suppose N nodes with many frames to send, each transmits in slot with probability p prob that node #1 has success in a slot = p(1-p) N prob that any node has a success = Np(1-p) N For max efficiency with N nodes, find p* that maximizes Np(1-p) N For many nodes, take limit of Np*(1-p*) N as N goes to infinity, gives 1/e = 0.37 At best: channel used for useful transmissions 37% of time! DataLink Layer 22 Pure (unslotted) ALOHA unslotted Aloha: simpler, no synchronization when frame first arrives transmit immediately collision probability increases: frame sent at t 0 collides with other frames sent in [t 0,t 0 +1] Pure Aloha efficiency P(success by given node) = P(node transmits). P(no other node transmits in [t 0,t 0 ]. P(no other node transmits in [t 0,t 0 +1] = p. (1-p) N. (1-p) N = p. (1-p) 2(N) choosing optimum p and then letting n -> infinity... Even worse! = 1/(2e) =.18 DataLink Layer 23 DataLink Layer 24

CSMA (Carrier Sense Multiple Access) CSMA collisions spatial layout of nodes CSMA: listen before transmit: If channel sensed idle: transmit entire frame If channel sensed busy, defer transmission Human analogy: don t interrupt others! collisions can still occur: propagation delay means two nodes may not hear each other s transmission collision: entire packet transmission time wasted note: role of distance & propagation delay in determining collision probability DataLink Layer 25 DataLink Layer 26 CSMA/CD (Collision Detection) CSMA/CD collision detection CSMA/CD: carrier sensing, deferral as in CSMA collisions detected within short time colliding transmissions aborted, reducing channel wastage collision detection: easy in wired LANs: measure signal strengths, compare transmitted, received signals difficult in wireless LANs: receiver shut off while transmitting human analogy: the polite conversationalist DataLink Layer 27 DataLink Layer 28

Taking Turns MAC protocols Taking Turns MAC protocols channel partitioning MAC protocols: share channel efficiently and fairly at high load inefficient at low load: delay in channel access, 1/N bandwidth allocated even if only 1 active node! Random access MAC protocols efficient at low load: single node can fully utilize channel high load: collision overhead taking turns protocols look for best of both worlds! Polling: master node invites slave nodes to transmit in turn concerns: polling overhead latency single point of failure (master) Token passing: control token passed from one node to next sequentially. token message concerns: token overhead latency single point of failure (token) DataLink Layer 29 DataLink Layer 30 Summary of MAC protocols What do you do with a shared media? Channel Partitioning, by time, frequency or code 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 CSMA/CA used in 802.11 Taking Turns polling from a central site, token passing DataLink Layer 31