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

Similar documents
Principles behind data link layer services:

Principles behind data link layer services:

Principles behind data link layer services

Principles behind data link layer services:

Summary of MAC protocols

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

Medium Access Protocols

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

CSC 4900 Computer Networks: Link Layer (2)

Link layer: introduction

The Link Layer and LANs: Ethernet and Swiches

Hubs. twisted pair. hub. 5: DataLink Layer 5-1

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

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

CS 3516: Advanced Computer Networks

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

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

Chapter 5 Link Layer and LANs

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

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

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

Chapter 6 The Link Layer and LANs

Chapter 5 Link Layer and LANs

INTRODUCTION, SERVICES. Data-link layer has responsibility of transferring datagram from one node to physically adjacent node over a link

LINK LAYER AND LANS 1

Chapter 5 part 2 LINK LAYER. Computer Networks Timothy Roscoe Summer Networks & Operating Systems Computer Networks

Master Course Computer Networks IN2097

Chapter 5: The Data Link Layer. Chapter 5 Link Layer and LANs. Ethernet. Link Layer. Star topology. Ethernet Frame Structure.

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 4 roadmap. CS555, Spring /14/2005. WMU-CS, Dr. Gupta 1. Multicast Routing: Problem Statement. Approaches for building mcast trees

Hubs, Bridges, and Switches (oh my) Hubs

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

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

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

Chapter 3 Part 2 Switching and Bridging. Networking CS 3470, Section 1

LAN Interconnection and Other Link Layer Protocols

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

Chapter 5: DataLink Layer

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

Chapter V: Link Layer

Link Layer and Ethernet

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

Chapter 5 Data Link Layer

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

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

Link Layer and LANs. Our Goals. Link Layer

Link Layer and Ethernet

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

Chapter 5 Data Link Layer

Computer Network Fundamentals Spring Week 3 MAC Layer Andreas Terzis

Good day. Today we will be talking about Local Internetworking What is Internetworking? Internetworking is the connection of different networks.

CSCD 330 Network Programming Spring 2017

Chapter V: Link Layer

Chapter 5: Link layer

More on Link Layer. Recap of Last Class. Interconnecting Nodes in LAN (Local-Area Network) Interconnecting with Hubs. Computer Networks 9/21/2009

CSCI Computer Networks Spring 2017

CSCI Computer Networks Fall 2016

Chapter 5 Link Layer and LANs

Lecture 9 Ethernet and other Link Layer protocols

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

Chapter 6 The Link Layer and LANs

CSC 401 Data and Computer Communications Networks

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

Reminder: Datalink Functions Computer Networking. Datalink Architectures

The Link Layer II: Ethernet

Underlying Technologies -Continued-

Chapter 5 Link Layer and LANs

CSCD 330 Network Programming Winter 2016

Module 4 Data Link Layer CS655! 4-1!

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

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

CSC 8560 Computer Networks: Link Layer

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

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

Lecture 20: Link Layer

Module 10 Data Link Layer CS655! 10-1!

CC451 Computer Networks

Chapter 6 The Link Layer and LANs

EE 122: Ethernet and

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. Link Layer 5-1

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

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

Link Layer: CSMA/CD, MAC addresses, ARP

CSC 401 Data and Computer Communications Networks

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

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

Chapter 5: Link layer

Hubs. Interconnecting LANs. Q: Why not just one big LAN?

Switching and Forwarding Reading: Chapter 3 1/30/14 1

Chapter 5: The Data Link Layer

Links Reading: Chapter 2

Chapter 6 Connecting Device

EPL606. Internetworking. Part 2a. 1Network Layer

Some portions courtesy Srini Seshan or David Wetherall

Chapter 5: The Data Link Layer

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

Transcription:

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

Outline Introduction and services LAN addresses and ARP Ethernet Hubs, bridges, and switches 2

Link Layer: Introduction Terminology: hosts and routers are nodes (bridges and switches too) communication channels that connect adjacent nodes along communication path are links wired links wireless links link Layer 2-PDU is a frame, encapsulating a datagram data-link layer has responsibility of transferring datagram from one node to adjacent node over a link 3

Link layer: context Datagram transferred by different link protocols over different links: 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 reliable data transfer over link transportation analogy trip from Princeton to Lausanne limo: Princeton to JFK plane: JFK to Geneva train: Geneva to Lausanne tourist = datagram transport segment = communication link transportation mode = link layer protocol travel agent = routing algorithm 4

Link Layer Services Framing, link access: encapsulate datagram into frame, adding header, trailer channel access if shared medium physical addresses used in frame headers to identify source and destination different from IP address! Reliable delivery between adjacent nodes seldom used on low bit error link (fibre, twisted pair) wireless links: high error rates Q: why both link-level and end-end reliability? 5

Adaptors Communicating sending node datagram frame link layer protocol frame receiving node adapter adapter link layer implemented in adaptor (NIC) Ethernet card, PCMCI card, 802.11 card sending side: encapsulates datagram in a frame adds error checking bits, rdt, flow control, etc. receiving side looks for errors, rdt, flow control, etc extracts datagram, passes to receiving node adapter is semiautonomous link & physical layers 6

LAN Addresses and ARP 32-bit IP address: (Logical) network-layer address used to get datagram to destination IP network (recall IP network definition) 48-bit LAN (or MAC or Physical or Ethernet) address: used to get datagram from one interface to another physically-connected interface (same network) 48-bit MAC address (for most LANs) burned in the adapter ROM hence cannot be changed. 7

LAN Addresses and ARP Each adapter on LAN has unique LAN address 8

LAN Address MAC address allocation administered by IEEE manufacturer buys portion of MAC address space (to assure uniqueness) Analogy: (a) MAC address: like NIC 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 depends on IP network to which node is attached 9

Recall earlier routing discussion Starting at A, given IP datagram addressed to B: look up net. address of B, find B on same net. as A link layer send datagram to B inside link-layer frame A B 223.1.1.1 223.1.2.1 223.1.1.2 223.1.1.4 223.1.2.9 223.1.2.2 223.1.1.3 223.1.3.27 E frame source, dest address datagram source, dest address 223.1.3.1 223.1.3.2 B s MAC addr A s MAC addr A s IP addr B s IP addr IP payload datagram frame 10

ARP: Address Resolution Protocol Question: How to determine MAC address of B knowing B s IP address? 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) 11

ARP protocol A wants to send datagram to B, and A knows B s IP address. Suppose B s MAC address is not in A s ARP table. A broadcasts ARP query packet, containing B's IP address 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 12

Ethernet dominant LAN technology: cheap $20 for 100Mbps! first widely used LAN technology Simpler, cheaper than token LANs and ATM Kept up with speed race: 10,100,1000 Mbps, 10 Gbps Metcalfe s Ethernet sketch 13

Ethernet Frame Structure Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame Preamble: 7 bytes with pattern 10101010 followed by one byte with pattern 10101011 used to synchronize receiver, sender clock rates 14

Ethernet Frame Structure (more) Addresses: 6 bytes if adapter receives frame with matching destination address, or with broadcast address (e.g. ARP packet), it passes data in frame to network layer protocol otherwise, adapter discards frame Type: indicates the higher layer protocol, mostly IP but others may be supported such as Novell IPX and AppleTalk) CRC: checked at receiver, if error is detected, the frame is simply dropped 15

Unreliable, connectionless service Connectionless: No handshaking between sending and receiving adapter. Unreliable: receiving adapter doesn t send acks or nacks to sending adapter stream of datagrams passed to network layer can have gaps gaps will be filled if app is using TCP otherwise, app will see the gaps 16

Manchester Encoding Used in 10BaseT, 100BaseT, 1000 BaseT Each bit has a transition Allows clocks in sending and receiving nodes to synchronize to each other no need for a centralized, global clock among nodes! This is physical-layer stuff! 17

Gigabit Ethernet use standard Ethernet frame format allows for point-to-point links and shared broadcast channels in shared mode, CSMA/CD is used; short distances between nodes to be efficient uses hubs, called here Buffered Distributors Full-Duplex at 1 Gbps for point-to-point links 10, 40, 100 Gbps now!!! 18

Interconnecting LAN segments Hubs Bridges Switches Remark: switches are essentially multi-port bridges. What we say about bridges also holds for switches! 19

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large collision domain if a node in CS and a node EE transmit at same time: collision Can t interconnect 10BaseT & 100BaseT 20

Bridges Link layer device stores and forwards Ethernet frames examines frame header and selectively forwards frame based on MAC destination address when frame is to be forwarded on segment, uses CSMA/ CD to access segment transparent hosts are unaware of presence of bridges plug-and-play, self-learning bridges do not need to be configured 21

Bridges: traffic isolation Bridge installation breaks LAN into LAN segments bridges filter packets: same-lan-segment frames not usually forwarded onto other LAN segments segments become separate collision domains collision domain bridge collision domain = hub = host LAN segment LAN segment LAN (IP network) 22

Self learning A bridge has a bridge or forwarding table entry in bridge table: (Node LAN Address, Bridge Interface, Time Stamp) stale entries in table dropped (TTL can be 60 min) bridges learn which hosts can be reached through which interfaces when frame received, bridge learns location of sender: incoming LAN segment records sender/location pair in forwarding table 23

Filtering / Forwarding When bridge receives a frame: index bridge table using MAC dest address if entry found for destination then{ if dest on segment from which frame arrived then drop the frame } else forward the frame on interface indicated else flood forward on all but the interface on which the frame arrived 24

Bridge Learning: example Suppose C sends frame to D and D replies back with frame to C. add: C reachable via port 1 Bridge receives frame from C Insert entry in bridge table that C is on interface 1 because D is not in table, bridge sends frame into interfaces 2 and 3 (flooding) frame received by D C 1 25

Bridge Learning: example add: D reachable via port 2 lookup: C reachable via port 1 D generates frame for C, sends bridge receives frame C 1 D 2 Insert entry in bridge table that D is on interface 2 bridge knows C is on interface 1, so selectively forwards frame to interface 1 26

Interconnection without backbone Not recommended for two reasons: - single point of failure at Computer Science hub - all traffic between EE and SE must pass through the CS segment 27

Backbone configuration Recommended! 28

Some Bridge features Isolates collision domains resulting in higher total maximum throughput limitless number of nodes and geographical coverage Can connect different Ethernet types Transparent ( plug-and-play ): no configuration necessary 29

Bridges vs. Routers Both store-and-forward devices routers: network layer devices (examine network layer headers) bridges are link layer devices Routers maintain routing tables, implement routing algorithms Bridges maintain bridge tables, implement filtering, learning and spanning tree algorithms 30

Routers vs. Bridges Bridges + and - + Bridge operation is simpler requiring less packet processing + Bridge tables are self learning - All traffic confined to spanning tree, even when alternative bandwidth is available - Bridges do not offer protection from broadcast storms 31

Routers vs. Bridges Routers + and - + arbitrary topologies can be supported, cycling is limited by TTL counters (and good routing protocols) + provide protection against broadcast storms - require IP address configuration (not plug and play) - require higher packet processing bridges do well in small (few hundred hosts) while routers used in large networks (thousands of hosts) 32

Ethernet Switches Essentially a multi-interface bridge layer 2 (frame) forwarding, filtering using LAN addresses Switching: A-to-A and B-to-B simultaneously, no collisions large number of interfaces often: individual hosts, starconnected into switch Ethernet, but no collisions! 33

Ethernet Switches cut-through switching: frame forwarded from input to output port without awaiting for assembly of entire frame slight reduction in latency Store-N-Forward switching: frame buffered completely and error-checked (via CRC) before being forwarded. 34

A typical LAN (IP network) Dedicated Shared 35

Summary comparison hubs bridges routers switches traffic isolation no yes yes yes plug & play yes yes no yes optimal routing cut through no no yes no yes no no yes 36