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

Similar documents
CC451 Computer Networks

ECE 4450:427/527 - Computer Networks Spring 2017

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

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

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

Multiple Access Links and Protocols

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

Chapter 5 Link Layer and LANs

Chapter 5: Link layer

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

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

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

Data Link Layer: Multi Access Protocols

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

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

CSC 4900 Computer Networks: The Link Layer

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

MULTIPLE ACCESS PROTOCOLS 2. 1

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

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

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

Chapter 6 The Link Layer and LANs

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

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

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

Chapter V: Link Layer

Master Course Computer Networks IN2097

Chapter 5 Link Layer and LANs

Master Course Computer Networks IN2097

Computer Network Fundamentals Spring Week 3 MAC Layer Andreas Terzis

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

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

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

CSEN 503 Introduction to Communication Networks. Mervat AbuElkheir Hana Medhat Ayman Dayf. **Slides are attributed to J. F. Kurose

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

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

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

Chapter V: Link Layer

Redes de Computadores. Medium Access Control

CSC 401 Data and Computer Communications Networks

Module 10 Data Link Layer CS655! 10-1!

CMPE 150: Introduction to Computer Networks

Principles behind data link layer services

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

Principles behind data link layer services:

Principles behind data link layer services:

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

Principles behind data link layer services:

Chapter 5 Link Layer and LANs

Medium Access Control

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

Links. CS125 - mylinks 1 1/22/14

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

Chapter 5: DataLink Layer

Data Link Layer: Overview, operations

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

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

Summary of MAC protocols

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

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

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

CSCI Computer Networks Fall 2016

Chapter 4 Network Layer

CS 3516: Advanced Computer Networks

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

CSCI Computer Networks Spring 2017

Computer Networks Medium Access Control. Mostafa Salehi Fall 2008

Chapter 6 The Link Layer and LANs

Chapter 5: The Data Link Layer

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

Chapter 5 Link Layer. Link Layer 5-1

Module 4 Data Link Layer CS655! 4-1!

CSC 8560 Computer Networks: Link Layer

Chapter 6 The Link Layer and LANs

Link Layer and LANs. Our Goals. Link Layer

Chapter 6 The Data Link layer

Medium Access Protocols

The Link Layer and LANs: Ethernet and Swiches

CS 3516: Computer Networks

Link layer: introduction

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

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

CSC 4900 Computer Networks: Link Layer (2)

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

CSCD 330 Network Programming Fall 2012

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

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

Goals of Today s Lecture. Adaptors Communicating

Chapter 6 The Link Layer and LANs

Chapter 6 The Link Layer and LANs

Chapter 6 The Link Layer and LANs

Data Link Protocols. TCP/IP Suite and OSI Reference Model. The TCP/IP protocol stack does not define the lower layers of a complete protocol stack

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

CSCD 330 Network Programming

CSCD 330 Network Programming Spring 2017

Chapter 5: Link layer

Chapter 6 The Link Layer and LANs

COMP211 Chapter 6/7 Link Layer

Transcription:

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

Agenda Continue the Data Link Layer Multiple Access Links and Protocols Addressing Data Link Layer 1-2

Multiple Access Links and Protocols Two types of links : point-to-point (direct connection) point-to-point protocol (PPP) for dial-up access point-to-point link between Ethernet switch and host broadcast (shared wire or medium) old-fashioned Ethernet wired connections ring, bus,. downstream Hybrid Fiber-Coaxial (HFC) cable TV distribution 802.11 wireless LAN wireless connections shared wire (e.g., cabled Ethernet) shared RF (e.g., 802.11 WiFi) shared RF (satellite) humans at a cocktail party (shared air, acoustical) 5: DataLink Layer 5-3

Multiple Access protocols single shared broadcast channel air, cables two or more simultaneous transmissions by nodes: emerged problems: interference, QoS deterioration, security collision if node receives two or more signals at the same time multiple access protocol concept 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 (no another dedicated channel for management processes) 5: DataLink Layer 5-4

Ideal Multiple Access Protocol Broadcast channel of rate R bps 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 operation: no special node to coordinate transmissions no synchronization of clocks, slots 4. simple 5: DataLink Layer 5-5

Multiple Access Protocols: Taxonomy 5: DataLink Layer 5-6

Multiple Access Protocols: Taxonomy Three broad classes: Channel Partitioning divide channel into smaller pieces (time slots TDMA, frequency slots FDMA, uncorrelated codes CDMA ) allocate piece to node for exclusive use FDM, TDM Random Access channel not divided, allow collisions recover from collisions Controlled Access: Taking turns nodes take turns, but nodes with more to send can take longer turns 5: DataLink Layer 5-7

Channel Partitioning MAC protocols: TDMA TDMA: time division multiple access access to channel in "rounds" each station gets fixed length slot (length = packet or data unit transmission time) in each round unused slots go idle example shown below: 6-station LAN, 1,3,4 have packets, slots 2,5,6 idle 6-slot frame 1 3 4 1 3 4 5: DataLink Layer 5-8

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 packets, frequency bands 2,5,6 idle FDM cable 5: DataLink Layer 5-9

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: ALOHA ( Areal Locations of Hazardous Atmospheres) slotted ALOHA CSMA, CSMA/CD, CSMA/CA 5: DataLink Layer 5-10

Slotted ALOHA Assumptions: all frames same size L bits channel rate R bits/s time divided into equal size slots L/R (time to transmit 1 frame) nodes start to transmit only at slot beginning 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 if no collision: node can send new frame in next slot if collision: node retransmits frame in each subsequent slot with prob. p until success p value between 0 and 1 5: DataLink Layer 5-11

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 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!! 5: DataLink Layer 5-12

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] 5: DataLink Layer 5-13

Pure Aloha efficiency P(success by given node) = P(node transmits). P(no other node transmits in [t 0-1,t 0 ]. P(no other node 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 -> infinity... = 1/(2e) =.18 even worse than slotted Aloha! Note: In both slotted and pure ALOHA, a node s decision to transmit is made independently of the activity of the other nodes attached to the broadcast channel 5: DataLink Layer 5-14

Efficiency of ALOHA vs. Slotted ALOHA Data Link Layer 1-15

CSMA (Carrier Sense Multiple Access) CSMA Protocol: listen before transmit: If channel sensed idle: transmit entire frame If channel sensed busy, defer transmission Listen while transmitting: If detecting other transferred frames stops transmitting and waits a random amount of time before repeating the sense-and-transmit-when-idle cycle human analogy: don t interrupt others! Listen before speaking (carrier sensing) If someone else begins talking at the same time, stop talking (collision detection) 5: DataLink Layer 5-16

CSMA/CD (Collision Detection) CSMA/CD Protocol: 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: received signal strength overwhelmed by local transmission strength human analogy: the polite conversationalist 5: DataLink Layer 5-17

CSMA/CD Operation Flow Diagram Data Link Layer 1-18

IEEE 802.11 MAC Protocol: CSMA/CA (Collision Avoidance) 802.11 sender 1 if sense channel idle for DIFS then transmit entire frame (no CD) 2 if sense channel busy then start random backoff time timer counts down while channel idle transmit when timer expires if no ACK, increase random backoff interval, repeat 2 802.11 receiver - if frame received OK return ACK after SIFS (ACK needed due to hidden terminal problem) DIFS sender data ACK receiver SIFS 5: DataLink Layer 5-19

CSMA/CA Operation Flow Diagram Data Link Layer 1-20

Avoiding Collisions (more) idea: allow sender to reserve channel rather than random access of data frames: avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets to Base Station (BS) using CSMA RTSs may still collide with each other (but they re short) BS broadcasts clear-to-send (CTS) in response to RTS CTS heard by all nodes sender transmits data frame other stations defer transmissions avoid data frame collisions completely using small reservation packets! 5: DataLink Layer 5-21

Collision Avoidance: RTS-CTS exchange Hidden Station Problem A AP B reservation collision DATA (A) defer time 5: DataLink Layer 5-22

Taking Turns Multiple Access 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 Controlled access protocols: taking turns protocols look for best of both worlds! 5: DataLink Layer 5-23

Taking Turns MAC protocols Polling: master node invites slave nodes to transmit in turn typically used with dumb slave devices concerns: polling overhead latency single point of failure (master) slaves data data poll master 5: DataLink Layer 5-24

Taking Turns MAC protocols Token passing: control token passed from one node to next sequentially. token message concerns: token overhead latency single point of failure (token) (nothing to send) T T data 5: DataLink Layer 5-25

MAC Addresses and ARP 32-bit or 128-bit IP address: network-layer (logical) address used to get datagram to destination IP subnet MAC (or LAN or physical or Ethernet) address: function: get frame from one interface to another physically-connected interface (same network) 48 bit MAC address (for most Ethernet LANs) burned in NIC ROM, also sometimes software settable 5: DataLink Layer 5-26

Network Switch vs. Router router switch Switches create a networks, Routers connect networks. A router links computers to the Internet, so users can share the connection. 5: DataLink Layer 5-27

Network Switch vs. Router 5: DataLink Layer 5-28

LAN Addresses and ARP Each adapter on LAN has unique physical address 1A-2F-BB-76-09-AD Broadcast address = FF-FF-FF-FF-FF-FF 71-65-F7-2B-08-53 LAN (wired or wireless) 58-23-D7-FA-20-B0 = adapter 0C-C4-11-6F-E3-98 5: DataLink Layer 5-29

LAN Address (more) MAC address allocation administered by IEEE manufacturer buys portion of MAC address space (to assure uniqueness) analogy: (a) MAC address: like Social Security Number (b) IP address: like postal address MAC flat address portability can move LAN card from one LAN to another IP hierarchical address NOT portable address depends on IP subnet to which node is attached 5: DataLink Layer 5-30

ARP: Address Resolution Protocol Question: how to determine MAC address of B knowing B s IP address? 137.196.7.23 71-65-F7-2B-08-53 LAN 137.196.7.78 1A-2F-BB-76-09-AD 137.196.7.14 58-23-D7-FA-20-B0 Each IP node (host, router) on LAN has ARP table ARP table: IP/MAC address mappings for some LAN nodes < IP address; MAC address; TTL> TTL (Time To Live): time after which address mapping will be forgotten (typically 20 min) 137.196.7.88 0C-C4-11-6F-E3-98 5: DataLink Layer 5-31

ARP protocol: Same LAN (network) A wants to send datagram to B, and B s MAC address not in A s ARP table. A broadcasts ARP query packet, containing B's IP address dest MAC address = FF- FF-FF-FF-FF-FF all machines on LAN receive ARP query B receives ARP packet, replies to A with its (B's) MAC address frame sent to A s MAC address (unicast) A caches (saves) IP-to- MAC address pair in its ARP table until information becomes old (times out) soft state: information that times out (goes away) unless refreshed ARP is plug-and-play : nodes create their ARP tables without intervention from net administrator 5: DataLink Layer 5-32

Addressing: routing to another LAN walkthrough: send datagram from A to B via R assume A knows B s IP address 74-29-9C-E8-FF-55 A 111.111.111.111 E6-E9-00-17-BB-4B 1A-23-F9-CD-06-9B 88-B2-2F-54-1A-0F 222.222.222.221 111.111.111.112 CC-49-DE-D0-AB-7D 222.222.222.220 111.111.111.110 R 222.222.222.222 B 49-BD-D2-C7-56-2A two ARP tables in router R, one for each IP network (LAN) 5: DataLink Layer 5-33

A creates IP datagram with source A, destination B A uses ARP to get R s MAC address for 111.111.111.110 A creates link-layer frame with R's MAC address as dest, frame contains A-to-B IP datagram A s NIC sends frame R s NIC receives frame R removes IP datagram from Ethernet frame, sees its destined to B R uses ARP to get B s MAC address This is a really important example make sure you understand! R creates frame containing A-to-B IP datagram sends to B 74-29-9C-E8-FF-55 A 111.111.111.111 E6-E9-00-17-BB-4B 1A-23-F9-CD-06-9B 88-B2-2F-54-1A-0F 222.222.222.221 111.111.111.112 CC-49-DE-D0-AB-7D 111.111.111.110 222.222.222.220 R 222.222.222.222 B 49-BD-D2-C7-56-2A 5: DataLink Layer 5-34

Lecture-related Questions Differentiate between logical and physical (MAC) addresses? Why is there a need to ARP protocol? 5: DataLink Layer 5-35

Lecture Summary Covered material Continue the Data Link Layer Multiple Access Links and Protocols Addressing Material to be covered next lecture Introduction to the Network Layer Data Link Layer 1-36