CSC 401 Data and Computer Communications Networks

Similar documents
Chapter 5: Link layer

Chapter 5 Link Layer and LANs

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

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

CSC 4900 Computer Networks: The Link Layer

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

Chapter 6 The Link Layer and LANs

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

Data Link Layer: Multi Access Protocols

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

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

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

CC451 Computer Networks

Chapter V: Link Layer

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

Chapter 4 Network Layer

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

ECE 4450:427/527 - Computer Networks Spring 2017

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

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

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

CMPE 150: Introduction to Computer Networks

Multiple Access Links and Protocols

Chapter V: Link Layer

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

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

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

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

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

Chapter 5 Link Layer and LANs

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

Master Course Computer Networks IN2097

Module 10 Data Link Layer CS655! 10-1!

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

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

CSCD 330 Network Programming

Links. CS125 - mylinks 1 1/22/14

Link Layer and LANs. Our Goals. Link Layer

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

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

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!

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

Master Course Computer Networks IN2097

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

Chapter 5: DataLink Layer

Computer Networks Medium Access Control. Mostafa Salehi Fall 2008

Chapter 6 The Link Layer and LANs

CSC 8560 Computer Networks: Link Layer

Data Link Layer: Overview, operations

Computer Networks LECTURE 10 ICMP, SNMP, Inside a Router, Link Layer Protocols. Assignments INTERNET CONTROL MESSAGE PROTOCOL

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

Chapter 5 Link Layer. Link Layer 5-1

Chapter 5 Link Layer and LANs

Data Link Layer Overview

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

Data Link Layer Overview

Chapter 6 The Link Layer and LANs

Chapter 6 The Link Layer and LANs

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

Data Link Layer Overview

Introduction to Computer Networks. 03 Data Link Layer Introduction

Data Link Layer Overview

MULTIPLE ACCESS PROTOCOLS 2. 1

CSCD 330 Network Programming Fall 2012

Chapter 5 Link Layer and LANs

Review. Some slides are in courtesy of J. Kurose and K. Ross

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

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

Chapter 6 The Link Layer and LANs

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

Chapter 5: The Data Link Layer

CSCI Computer Networks Fall 2016

Medium Access Control

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

CSCI Computer Networks Spring 2017

CS 3516: Computer Networks

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

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

Goals of Today s Lecture. Adaptors Communicating

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

Topic 2a. Ch 6: The Link Layer and LANs. Computer Networking: A Top Down Approach

Chapter 6 The Link Layer and LANs

Chapter 6 The Link Layer and LANs

Chapter 6 The Link Layer and LANs

Chapter 6 The Link Layer and LANs

COMP211 Chapter 6/7 Link Layer

Chapter 5: Link layer

Chapter 6. Link Layer and LANs 6-1. Computer Networking: A Top Down Approach 7th edition Jim Kurose, Keith Ross Pearson/Addison Wesley April 2016

Chapter 6 The Data Link layer

Architettura di Reti

LINK LAYER AND LANS 1

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

CS 43: Computer Networks The Link Layer. Kevin Webb Swarthmore College November 28, 2017

COMP 3331/9331: Computer Networks and Applications

Redes de Computadores. Medium Access Control

Transcription:

CSC 401 Data and Computer Communications Networks Link Layer: Intro, Errors, Multiple Access Sec 6.1, 6.2, 6.3 Prof. Lina Battestilli Fall 2017

Chapter 6: Link layer Goals: understand principles behind link layer services: error detection, correction sharing a broadcast channel: multiple access link layer addressing local area networks: Ethernet, VLANs instantiation, implementation of various link layer technologies

Chapter 6 Outline Link layer and LANs: 6.1 introduction, services 6.2 error detection, correction 6.3 multiple access protocols 6.4 Switched LANs 6.5 link virtualization: MPLS 6.6 data center networking 6.7 a day in the life of a web request

Link layer: introduction terminology: hosts and routers: nodes communication channels that connect adjacent nodes along communication path: links wired links wireless links LANs layer-2 packet: frame, encapsulates datagram global ISP data-link layer has responsibility of transferring datagram from one node to physically adjacent node over a link

Link layer: context datagram transferred by different link protocols over different links: (802.11, Ethernet, etc) each link protocol provides different services e.g., may or may not provide rdt over link transportation analogy: Trip from Princeton to Lausanne limo: Princeton to JFK plane: JFK to Geneva train: Geneva to Lausanne tourist = datagram transportation mode = link layer protocol travel agent = routing algorithm

Link layer services framing, link access: encapsulate datagram into frame, adding header, trailer link access: channel access if shared medium MAC addresses used in frame headers to identify source, dest different from IP address! Q: why two addresses for the same interface? reliable delivery between adjacent nodes we learned how to do this already (chapter 3)! seldom used on low bit-error link (fiber, some twisted pair) wireless links: high error rates Q: why both link-level and end-end reliability? Let s look at my laptop s interfaces

Link layer services (more) flow control: pacing between adjacent sending and receiving nodes error detection: errors caused by signal attenuation, noise. receiver detects presence of errors tells the sender for retransmission or drops frame error correction: 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 12

Where is the link layer implemented? in each and every host link layer implemented in adaptor (aka network interface card NIC) or on a chip Ethernet card, 802.11 card; Ethernet chipset application transport network link cpu memory Implements link & physical layer attaches into host s system buses combination of hardware, software, firmware link physical controller physical transmission host bus (e.g., PCI) network adapter card 13

Adaptors communicating datagram datagram controller controller sending side: sending host frame encapsulates datagram in frame adds error checking bits, rdt, flow control, etc. datagram receiving host receiving side looks for errors, rdt, flow control, etc extracts datagram, passes to upper layer at receiving side 14

Chapter 6 Outline Link layer and LANs: 6.1 introduction, services 6.2 error detection, correction 6.3 multiple access protocols 6.4 Switched LANs 6.5 link virtualization: MPLS 6.6 data center networking 6.7 a day in the life of a web request

Error detection EDC = Error Detection and Correction bits (redundancy) D = Data protected by error checking, may include header fields Error detection not 100% reliable! protocol may miss some errors, but rarely larger EDC field yields better detection and correction otherwise 1. parity checks 2. checksum 3. CRC 16

Parity Checking single bit parity: detect single bit errors At receiver even number of 1s received means that some odd number of errors have occurred. even number of bit errors could result in undetected errors odd parity: number of 1s in the d+1 bits is odd At sender The parity bit is set to 0 to keep the 1s odd Internet measurements show that errors are usually clustered in bursts Undetected errors with single-parity can approach 50% 17

Parity Checking Error Correction two-dimensional bit parity: detect and correct single bit errors D bits split into (i by j ) array i+j+1 parity bits Example: even parity 0 0 9 bits of parity for 15 bits of data FEC: forward error correction typically used in audio storage 18

Internet Checksum (review) goal: detect errors (e.g., flipped bits) in transmitted packet (note: used at transport layer only) sender: treat data as sequence of 16-bit integers checksum: addition (1 s complement sum) of the contents sender puts checksum value into checksum field receiver: compute checksum of received segment check if computed checksum equals checksum field value: NO - error detected YES - no error detected. But maybe errors nonetheless? Checksum transport layer done in software so it must be simple and fast CRC link layer done in hardware so it could be more complex

Cyclic Redundancy Check (CRC) more powerful error-detection coding than checksum view data bits, D, as a binary number choose r+1 bit pattern (generator), G goal: choose r CRC bits, R, such that <D,R> is exactly divisible by G ( using modulo 2 arithmetic) receiver knows G, divides <D,R> by G. If non-zero remainder: error detected! can detect all burst errors less than r+1 bits widely used in practice (Ethernet, 802.11 WiFi, ATM) 20

CRC Calculations Addition/Subtraction done with Modulo-2 Arithmetic without carries/borrows thus they are identical equivalent to XOR 1 1 = 0 1 0 = 1 0 1 = 1 e.g. 1011 0101 = 1110 0 0 = 0 Multiplication/Division done with Base-2 arithmetic without carries/borrows Multiplication by 2^k left shifts by k bits e.g. decimal binary 13 * 2^3 = 104 1101 * 1000 = 1101000 21

Cyclic Redundancy Check (CRC) sender <D, R> exactly divisible by G receiver receiver knows G, divides <D,R> by G. If non-zero remainder error detected Example: Suppose that G is 3 bits long r=2 bits d bits 101110000 * 2 2 10111000000 R XOR 10 D 2 r left shift by r bits 10111000010 the (d+r) bits sent How does the sender compute R? 22

Calculating CRC Example want: D. 2 r R = ng equivalently: D. 2 r = ng R thus: if we divide D. 2 r by G, the remainder is R D R. 2 r = remainder[ ] G G * Check out the online interactive exercises for more examples: http://gaia.cs.umass.edu/kurose_ross/interactive/ Modulo 2 Division -- no carries, r = 3 D 101011 1001 101110000 1001 101 000 1010 1001 110 000 1100 1001 1010 1001 011 R 23

Calculating CRC a Simpler Way G 1001 D 101110000 1001 001010000 1001 0011000 1001 01010 1001 start 101110000 figure out [D R] 101110011 0011 IEEE Standards CRC 8, 12, 16, 32 bit generators G. G CRC 32 =100000100110000010001110110110111 24

Chapter 6 Outline Link layer and LANs: 6.1 introduction, services 6.2 error detection, correction 6.3 multiple access protocols 6.4 Switched LANs 6.5 link virtualization: MPLS 6.6 data center networking 6.7 a day in the life of a web request

Multiple access links, protocols two types of links : point-to-point PPP for dial-up access point-to-point link between Ethernet switch, host broadcast (shared wire or medium) old-fashioned Ethernet upstream HFC 802.11 wireless LAN shared wire (e.g., cabled Ethernet) shared RF (e.g., 802.11 WiFi) shared RF (satellite) humans at a cocktail party (shared air, acoustical) 26

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 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 Lots of research still in this area, esp because of wireless

An ideal multiple access protocol given: broadcast channel of rate R bps goal: 1. when one node wants to transmit, it can send at rate R. 2. when M nodes want to transmit, each can send at average rate R/M 3. fully decentralized: no special node to coordinate transmissions no synchronization of clocks, slots 4. simple Q: What are your ideas?

MAC protocols: 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 recover from collisions taking turns nodes take turns, but nodes with more to send can take longer turns

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 6-slot frame 6-slot frame 1 3 4 1 3 4 30

frequency bands 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 FDM cable 31

Random access protocols 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 32

Slotted ALOHA assumptions: all frames same size time divided into equal size slots (time to transmit 1 frame) nodes start to transmit only slot beginning nodes are synchronized if 2 or more nodes transmit in slot, all nodes detect collision operation: when node obtains a frame, it transmits it in next slot if NO collision: node can send new frame in next slot if collision: node retransmits frame in each subsequent slot with probability p until success 33

Slotted ALOHA node 1 1 1 1 1 node 2 2 2 2 node 3 3 3 3 Pros: single active node can continuously transmit at full rate of channel highly decentralized: only slots in nodes need to be in sync simple C E C S E C E S S Cons: collisions, wasting slots idle slots nodes may be able to detect collision in less than time to transmit packet clock synchronization 34

Slotted ALOHA: efficiency efficiency: long-run fraction of successful slots (many nodes, all with many frames to send) suppose: N nodes with many frames to send, each transmits in slot with probability p prob that given node has success in a slot = p(1-p) N-1 prob that any node has a success = Np(1-p) N-1 efficiency max efficiency: find p* that maximizes Np(1-p) N-1 for many nodes, take limit of Np*(1-p*) N-1 as N goes to infinity, gives: max efficiency = 1/e =.37 at best: channel used for useful transmissions 37% of time!! 35

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-1,t 0 +1] 36

5-37 Pure ALOHA efficiency P(success by given node) = P(node transmits). P(no other node starts to transmits in [t 0-1,t 0 ]. P(no other node starts to transmits in [t 0,t 0 +1] = p. (1-p) N-1. (1-p) N-1 = p. (1-p) 2(N-1) choosing optimum p and then letting n = 1/(2e) =.18 even worse than slotted Aloha!

References Some of the slides are identical or derived from 1. Slides for the 7 th edition of the book Kurose & Ross, Computer Networking: A Top-Down Approach, 2. Computer Networking, Nick McKeown and Philip Levis, 2014 Stanford University