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

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

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

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

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

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

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

The Link Layer and LANs: Ethernet and Swiches

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

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

Master Course Computer Networks IN2097

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: The Data Link Layer. Chapter 5 Link Layer and LANs. Ethernet. Link Layer. Star topology. Ethernet Frame Structure.

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

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

Chapter 5 Link Layer and LANs

Chapter V: Link Layer

Principles behind data link layer services

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

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

Master Course Computer Networks IN2097

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

Chapter 5 Link Layer and LANs

Chapter 5: Link layer

CSC 4900 Computer Networks: Link Layer (2)

CC451 Computer Networks

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

Chapter V: Link Layer

Principles behind data link layer services:

Principles behind data link layer services:

ECE 4450:427/527 - Computer Networks Spring 2017

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

Announcements. CS 5565 Network Architecture and Protocols. Ethernet. Ethernet. Ethernet Model. Ideal Multiple Access Protocol

Chapter 5 Link Layer and LANs

Module 10 Data Link Layer CS655! 10-1!

Link Layer and LANs. Our Goals. Link Layer

Principles behind data link layer services:

Summary of MAC protocols

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

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

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

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

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

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

Redes de Computadores. Medium Access Control

Medium Access Protocols

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

Data Link Layer: Multi Access Protocols

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

Computer Network Fundamentals Spring Week 3 MAC Layer Andreas Terzis

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

Data Link Layer. Our goals: understand principles behind data link layer services: instantiation and implementation of various link layer technologies

Chapter 5: DataLink Layer

Medium Access Control

Link Layer and Ethernet

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

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

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

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

Link Layer and Ethernet

CS 3516: Advanced Computer Networks

Multiple Access Links and Protocols

Review. Error Detection: CRC Multiple access protocols. LAN addresses and ARP Ethernet. Slotted ALOHA CSMA/CD

Discussions. What are the main service. Ch06 Link Layer. The Data Link Layer. Link Layer. Link Layer: Teminology. What are the services

CSMA/CD (Collision Detection)

Links. CS125 - mylinks 1 1/22/14

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

CS 455/555 Intro to Networks and Communications. Link Layer Addressing, Ethernet, and a Day in the Life of a Web Request

CSCI Computer Networks Fall 2016

Module 4 Data Link Layer CS655! 4-1!

Data Link Layer: Overview, operations

MULTIPLE ACCESS PROTOCOLS 2. 1

CSCI Computer Networks Spring 2017

Chapter 6 The Link Layer and LANs

CSC 8560 Computer Networks: Link Layer

EE 122: Ethernet and

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

Lecture 8 The Data Link Layer part I. 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

CMPE 150: Introduction to Computer Networks

Chapter 5: The Data Link Layer

Chapter 6 The Data Link layer

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

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

Link layer, LANs: outline. Chapter 5-2 Link Layer. MAC addresses (more) MAC addresses

Reminder: Datalink Functions Computer Networking. Datalink Architectures

CSC 401 Data and Computer Communications Networks

Chapter 5 Link Layer. Link Layer 5-1

Chapter 5 Data Link Layer

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

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

The Link Layer II: Ethernet

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

Chapter 5 Data Link Layer

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

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

Chapter 6 The Link Layer and LANs

Chapter 6 The Link Layer and LANs

Chapter 5: Link layer

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

Transcription:

Link Layer: Introduction daptors ommunicating hosts and routers are nodes links connect nodes wired links wireless links layer-2 packet is a frame, encapsulates datagram datagram controller sending host frame datagram controller receiving host datagram data-link layer transfers datagram from one node to physically adjacent node over a link sender: puts datagram in frame adds error checking, addresses etc. receiver looks for errors, etc. extracts datagram, to upper layer Data Link Layer 5-1 Data Link Layer 5-2 Error Detection Parity hecking ED= Error Detection and orrection bits (redundancy) D = Data protected by error checking, may include header fields Not 100% reliable! protocol may miss some errors, but rarely larger ED field yields better detection and correction Single it Parity: Two Dimensional it Parity: Detect and correct single bit errors otherwise 0 0 Data Link Layer 5-3 Data Link Layer 5-4 hecksumming: yclic Redundancy heck an detect many errors More about this on the exercise next week! Multiple ccess Links and Protocols Two types of links : point-to-point point-to-point link broadcast (shared wire or medium) old-fashioned Ethernet 802.11 wireless LN shared wire (e.g., cabled Ethernet) shared RF (e.g., 802.11 WiFi) shared RF (satellite) humans at a cocktail party (shared air, acoustical) Data Link Layer 5-5 Data Link Layer 5-1

frequency bands Multiple ccess protocols single shared channel collisions possible Multiple access protocol determine when node can transmit communication about channel sharing must use channel itself! M Protocols hannel Partitioning divide channel into smaller pieces (time slots, frequency) allocate piece to node for exclusive use Random ccess channel not divided, allow collisions recover from collisions Taking turns nodes take turns, nodes with more to send can take longer turns Data Link Layer 5-7 Data Link Layer 5-8 hannel Partitioning M protocols: TDM TDM: time division multiple access access to channel in "rounds" each sender gets fixed length slot in each round unused slots go idle hannel Partitioning M protocols: FDM FDM: frequency division multiple access spectrum divided into frequency bands each sender assigned fixed frequency band unused transmission time in frequency bands go idle -slot frame 1 3 4 1 3 4 FDM cable Data Link Layer 5-9 Data Link Layer 5-10 Random ccess Protocols When node has packet to send transmit at full channel data rate no coordination among nodes two or more transmitting nodes collision, random access M protocol specifies: how to detect collisions how to recover from collisions Examples of random access M protocols: slotted LOH LOH SM, SM/D, SM/ Slotted LOH ssumptions: all frames same size time divided into equal size slots (time to transmit 1 frame) nodes start to transmit only slot beginning if 2 or more nodes transmit in slot, all nodes detect collision Operation: when node obtains fresh frame, 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 Data Link Layer 5-11 Data Link Layer 5-12 2

Slotted LOH Pros single active node can continuously transmit decentralized: only slots need to be in sync simple ons collisions, wasting slots idle slots nodes may be able to detect collision in less than time to transmit packet clock synchronization Pure (unslotted) LOH unslotted loha: 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] Data Link Layer 5-13 Data Link Layer 5-14 SM (arrier Sense Multiple ccess) SM: listen before transmit: hannel idle: transmit hannel busy: wait Human analogy: don t interrupt others! SM collisions collisions can occur: caused by propagation delay collision: entire packet transmission time wasted Data Link Layer 5-15 Data Link Layer 5-1 SM/D (ollision Detection) SM/D collision detection if collision detected stop transmission collision detection: easy in wired LNs: compare transmitted and received signals difficult in wireless LNs: received signal overwhelmed by local transmission strength human analogy: the polite conversationalist Data Link Layer 5-17 Data Link Layer 5-18 3

Taking Turns M protocols Taking Turns M protocols channel partitioning M 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 M protocols efficient at low load: single node can fully utilize channel high load: collisions taking turns protocols look for best of both worlds! Polling: master node invites slave nodes to transmit in turn disadvantages: polling overhead latency single point of failure (master) slaves data data poll master Data Link Layer 5-19 Data Link Layer 5-20 Taking Turns M protocols Summary of M protocols Token passing: control token passed from one node to next disadvantages: token overhead latency single point of failure (token) (nothing to send) T T channel partitioning, by time, frequency or code Time Division, Frequency Division random access (dynamic), LOH, S-LOH, SM, SM/D carrier sensing: easy in wired, hard in wireless SM/D used in Ethernet SM/ used in 802.11 (WiFi) taking turns polling from central site, token passing luetooth, IM Token Ring data Data Link Layer 5-21 Data Link Layer 5-22 M ddresses and RP 32-bit IP address: network-layer address used to get datagram to destination IP subnet M (or LN or physical or Ethernet) address: function: get frame from one interface to the next (same network) 48 bit M address (for most LNs) burned in NI ROM, also sometimes software settable LN ddresses and RP Each adapter on LN has unique LN address 71-5-F7-2-08-53 LN (wired or wireless) 1-2F--7-09-D 58-23-D7-F-20-0 0-4-11-F-E3-98 roadcast address = FF-FF-FF-FF-FF-FF = adapter Data Link Layer 5-23 Data Link Layer 5-24 4

LN ddress (more) M address allocation administered by IEEE manufacturer buys portion of M address space analogy: (a) M address: like Social Security Number (b) IP address: like postal address M address does not change IP hierarchical address NOT portable address depends on IP subnet to which node is attached RP: ddress Resolution Protocol Question: how to determine M address of knowing s IP address? 137.19.7.23 71-5-F7-2-08-53 LN 137.19.7.78 1-2F--7-09-D 137.19.7.14 58-23-D7-F-20-0 Each IP node (host, router) on LN has RP table RP table: IP/M address mappings for some LN nodes < IP address; M address; TTL> TTL (Time To Live): time after which address mapping will be forgotten (typically 20 min) 137.19.7.88 0-4-11-F-E3-98 Data Link Layer 5-25 Data Link Layer 5-2 ddressing: routing to another LN send datagram from to via R. assume knows s IP address assume knows IP address of first hop router, R (how?) Ethernet Dominant wired LN technology: cheap first widely used LN technology simpler, cheaper than token rings 111.111.111.111 74-29-9-E8-FF-55 R 222.222.222.220 1-23-F9-D-0-9 222.222.222.222 49-D-D2-7-5-2 Metcalfe s Ethernet sketch 111.111.111.112-49-DE-D0--7D 111.111.111.110 E-E9-00-17--4 222.222.222.221 88-2-2F-54-1-0F Data Link Layer 5-27 Data Link Layer 5-28 Star topology bus topology popular through mid 90s all nodes can collide with each other today: star topology active switch in center Ethernet Frame Structure Sending adapter encapsulates IP datagram in Ethernet frame Preamble: 7 bytes with pattern 10101010 followed by one byte with pattern 10101011 synchronizes receiver and sender clock rates switch bus: coaxial cable star Data Link Layer 5-29 Data Link Layer 5-30 5

Ethernet Frame Structure (more) ddresses: bytes if adapter receives frame with matching destination address, or with broadcast address (e.g. RP packet), it passes data in frame to network layer protocol otherwise, adapter discards frame Type: indicates higher layer protocol (mostly IP) R: checked at receiver, if error is detected, frame is dropped Ethernet: Unreliable, connectionless connectionless: No handshaking between sending and receiving NIs unreliable: receiving NI doesn t send acks or nacks to sending NI stream of datagrams passed to network layer can have gaps gaps will be filled if app is using TP otherwise, app will see gaps Ethernet s M protocol: SM/D Data Link Layer 5-31 Data Link Layer 5-32 Ethernet SM/D algorithm 1. NI receives datagram 4. If NI detects another from network layer, transmission while creates frame transmitting, aborts and 2. If NI senses channel idle, sends jam signal starts frame transmission 5. fter aborting, NI If NI senses channel enters exponential busy, waits until channel backoff: wait random time, idle, then transmits after that return to 2. 3. If NI transmits entire frame without detecting another transmission, NI is done with frame! Ethernet s SM/D (more) Jam Signal: make sure all other transmitters are aware of collision; 48 bits it time:.1 microsec for 10 Mbps Ethernet Exponential ackoff: first collision: choose K from {0,1}; delay is K 512 bit transmission times after second collision: choose K from {0,1,2,3} after ten collisions, choose K from {0,1,2,3,4,,1023} Data Link Layer 5-33 Data Link Layer 5-34 Switch: allows multiple simultaneous transmissions hosts have dedicated, direct connection to switch switches buffer packets Ethernet protocol used on each incoming link, but no collisions switching: -to- and - to- simultaneously, without collisions 5 1 2 3 4 switch with six interfaces (1,2,3,4,5,) Switch Table Q: how does switch know that reachable via interface 4? : each switch has a switch table looks like a routing table! Q: how are entries created, maintained in switch table? 1 2 3 5 4 switch with six interfaces (1,2,3,4,5,) Data Link Layer 5-37 Data Link Layer 5-38

Switch: self-learning switch learns which hosts can be reached through which interfaces when frame received, switch learns location of sender: incoming LN segment records sender/location pair in switch table M addr interface TTL 1 0 5 1 2 3 4 Source: Dest: Switch table (initially empty) Interconnecting switches switches can be connected together S 1 S 2 D E Sending from to G - how does S 1 know to forward frame destined to F via S 4 and S 3? S 4 F G S 3 H I Data Link Layer 5-39 Data Link Layer 5-40 7