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

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

Chapter 5: Link layer

Chapter 6 The Link Layer and LANs

CC451 Computer Networks

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

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

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. Computer Networking: A Top Down Approach. 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012

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

The Link Layer and LANs. Chapter 6: 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

CSC 401 Data and Computer Communications Networks

Chapter 5 Link Layer and LANs

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

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

CSC 4900 Computer Networks: The Link Layer

Data Link Layer: Multi Access Protocols

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

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

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

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

CSCI Computer Networks Fall 2016

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

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

Principles behind data link layer services:

CSCI Computer Networks Spring 2017

Chapter 6 The Link Layer and LANs

ECE 4450:427/527 - Computer Networks Spring 2017

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

Chapter 6 The Link Layer and LANs

Chapter 5 Link Layer. Link Layer 5-1

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

Multiple Access Links and Protocols

Master Course Computer Networks IN2097

Master Course Computer Networks IN2097

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

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

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

Chapter 5: Link layer

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

Link layer: introduction

Principles behind data link layer services

Chapter 6 The Link Layer and LANs

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

Module 10 Data Link Layer CS655! 10-1!

Chapter V: Link Layer

Principles behind data link layer services:

Principles behind data link layer services:

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

Internet protocol stack

The Link Layer and LANs: Ethernet and Swiches

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

CS 3516: Advanced Computer Networks

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

CS/ECE 438: Communication Networks Fall Link Layer

Chapter 5 Link Layer and LANs

CS118 Discussion 1A, Week 9. Zengwen Yuan Dodd Hall 78, Friday 10:00 11:50 a.m.

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

Lecture 9 Ethernet and other Link Layer protocols

ECE 4450:427/527 - Computer Networks Spring 2017

CMPE 150: Introduction to Computer Networks

Chapter 5 Link Layer and LANs

COMP211 Chapter 6/7 Link Layer

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

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

Computer Communication Networks Link

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

Lecture 20: 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 5: DataLink Layer

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

Architettura di Reti

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

CSC 4900 Computer Networks: Link Layer (3)

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

Computer Network Fundamentals Spring Week 3 MAC Layer Andreas Terzis

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

Chapter 5: Link layer

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

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

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

Computer Networks Medium Access Control. Mostafa Salehi Fall 2008

COMP 3331/9331: Computer Networks and Applications

Module 4 Data Link Layer CS655! 4-1!

CSC 8560 Computer Networks: Link Layer

Chapter 4 Network Layer

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

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

TDTS06: Computer Networks

Chapter 5 Link Layer. Networking: A Top. Computer. Down Approach 蒋力计算机科学与工程系上海交通大学. 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012

CSC 4900 Computer Networks: Link Layer (2)

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

Transcription:

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

Outline overview (6.1) multiple access (6.3) link addressing: ARP (6.4.1) a day in the life of a web request (6.7) 2

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

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 ernet card, 802.11 card; implements link, physical layer application transport network link cpu memory attaches into host s system buses combination of hardware, software, firmware link physical controller physical transmission host bus (e.g., PCI) network adapter card 4

Link layer services framing encapsulate datagram into frame, adding header, trailer link access channel access if shared medium MAC addresses used in frame headers to identify source, destination different from IP address! 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? error detection and correction 5

Outline overview multiple access link addressing: ARP a day in the life of a web request 6

Multiple access links, protocols two types of links : point-to-point point-to-point link for dial-up access point-to-point link between ernet switch, host broadcast (shared wire or medium) shared wire (e.g., cabled ernet) shared RF (e.g., 802.11 WiFi) shared RF (satellite) humans at a cocktail party (shared air, acoustical) 7

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 (MAC) 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 8

An ideal multiple access protocol given: broadcast channel of rate R bps desiderata: 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 9

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 10

Channel partitioning MAC protocols: TDMA TDMA: time division multiple access access to channel in "rounds" each station gets fixed length slot (length = packet transmission time) in each round unused slots go idle example: 6-station LAN, 1,3,4 have packets to send, slots 2,5,6 idle 6-slot frame 6-slot frame 1 3 4 1 3 4 11

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 packet to send, frequency bands 2,5,6 idle time FDM cable frequency bands 12

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 examples: slotted ALOHA, ALOHA CSMA, CSMA/CD, CSMA/CA 13

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 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 14

Slotted ALOHA node 1 1 1 1 1 node 2 2 2 2 node 3 3 3 3 C E C S E C E S S 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 15

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

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] 17

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] = " 1 " %&' 1 " %&' = " 1 " ((%&') choosing optimum p and then letting + = 1/(20) =.18 even worse than slotted Aloha! 18

Outline overview multiple access link addressing: ARP a day in the life of a web request 19

MAC addresses 32-bit IP address: network-layer address for interface used for layer 3 (network layer) forwarding MAC (or LAN or physical or ernet) address: function: used locally to get frame from one interface to another physicallyconnected interface (same network, in IP-addressing sense) 48 bit MAC address (for most LANs) burned in NIC ROM, also sometimes software settable, e.g.: 1A-2F-BB-76-09-AD hexadecimal (base 16) notation (each numeral represents 4 bits) 20

MAC addresses each adapter has unique MAC address 1A-2F-BB-76-09-AD 71-65-F7-2B-08-53 LAN (wired or wireless) 58-23-D7-FA-20-B0 adapter 0C-C4-11-6F-E3-98 21

MAC addresses (more) MAC address allocation administered by IEEE manufacturer buys portion of MAC address space (to assure uniqueness) 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 analogy: MAC address: like Social Security Number IP address: like postal address 22

ARP: address resolution protocol Question: how to determine interface s MAC address, knowing its 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 ARP table: each IP node (host, router) on LAN has 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 23

ARP protocol: same LAN A wants to send datagram to B suppose B s MAC address not in A s ARP table A broadcasts ARP query packet, containing B's IP address destination MAC address = FF-FF-FF-FF-FF-FF all nodes 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) ARP is plug-and-play : nodes create their ARP tables without intervention from net administrator 24

Addressing: routing to another LAN walkthrough: send datagram from A to B via R focus on addressing at IP (datagram) and MAC layer (frame) assume A knows B s IP address assume A knows IP address of first hop router, R (how?) assume A knows R s MAC address (how?) A 111.111.111.111 74-29-9C-E8-FF-55 111.111.111.112 CC-49-DE-D0-AB-7D R 111.111.111.110 E6-E9-00-17-BB-4B 222.222.222.220 1A-23-F9-CD-06-9B B 222.222.222.222 49-BD-D2-C7-56-2A 222.222.222.221 88-B2-2F-54-1A-0F 25

Addressing: routing to another LAN A creates IP datagram with IP source A, destination B IP MAC src: 74-29-9C-E8-FF-55 MAC dest: E6-E9-00-17-BB-4B IP src: 111.111.111.111 IP dest: 222.222.222.222 A creates link-layer frame with R's MAC address as destination address, frame contains A-to-B IP datagram A R B 111.111.111.111 74-29-9C-E8-FF-55 222.222.222.220 1A-23-F9-CD-06-9B 222.222.222.222 49-BD-D2-C7-56-2A 111.111.111.112 CC-49-DE-D0-AB-7D 111.111.111.110 E6-E9-00-17-BB-4B 222.222.222.221 88-B2-2F-54-1A-0F 26

Addressing: routing to another LAN MAC src: 74-29-9C-E8-FF-55 MAC dest: E6-E9-00-17-BB-4B IP src: 111.111.111.111 IP src: 111.111.111.111 IP dest: 222.222.222.222 IP dest: 222.222.222.222 frame sent from A to R frame received at R, datagram removed, passed up to IP IP A 111.111.111.111 74-29-9C-E8-FF-55 IP R 222.222.222.220 1A-23-F9-CD-06-9B B 222.222.222.222 49-BD-D2-C7-56-2A 111.111.111.112 CC-49-DE-D0-AB-7D 111.111.111.110 E6-E9-00-17-BB-4B 222.222.222.221 88-B2-2F-54-1A-0F 27

Addressing: routing to another LAN R forwards datagram with IP source A, destination B R creates link-layer frame with B's MAC address as destination address, frame contains A-to-B IP datagram A 111.111.111.111 74-29-9C-E8-FF-55 IP R 222.222.222.220 1A-23-F9-CD-06-9B MAC src: 1A-23-F9-CD-06-9B MAC dest: 49-BD-D2-C7-56-2A IP src: 111.111.111.111 IP dest: 222.222.222.222 IP B 222.222.222.222 49-BD-D2-C7-56-2A 111.111.111.112 CC-49-DE-D0-AB-7D 111.111.111.110 E6-E9-00-17-BB-4B 222.222.222.221 88-B2-2F-54-1A-0F 28

Addressing: routing to another LAN R forwards datagram with IP source A, destination B R creates link-layer frame with B's MAC address as destination address, frame contains A-to-B IP datagram A 111.111.111.111 74-29-9C-E8-FF-55 IP R 222.222.222.220 1A-23-F9-CD-06-9B MAC src: 1A-23-F9-CD-06-9B MAC dest: 49-BD-D2-C7-56-2A IP src: 111.111.111.111 IP dest: 222.222.222.222 IP B 222.222.222.222 49-BD-D2-C7-56-2A 111.111.111.112 CC-49-DE-D0-AB-7D 111.111.111.110 E6-E9-00-17-BB-4B 222.222.222.221 88-B2-2F-54-1A-0F 29

Addressing: routing to another LAN R forwards datagram with IP source A, destination B R creates link-layer frame with B's MAC address as destination address, frame contains A-to-B IP datagram MAC src: 1A-23-F9-CD-06-9B MAC dest: 49-BD-D2-C7-56-2A IP src: 111.111.111.111 IP dest: 222.222.222.222 IP A 111.111.111.111 74-29-9C-E8-FF-55 R 222.222.222.220 1A-23-F9-CD-06-9B B 222.222.222.222 49-BD-D2-C7-56-2A 111.111.111.112 CC-49-DE-D0-AB-7D 111.111.111.110 E6-E9-00-17-BB-4B 222.222.222.221 88-B2-2F-54-1A-0F 30

Outline overview multiple access link addressing: ARP a day in the life of a web request 31

Synthesis: a day in the life of a web request journey down protocol stack complete! application, transport, network, link putting-it-all-together: synthesis! goal: identify, review, understand protocols (at all layers) involved in seemingly simple scenario: requesting www page scenario: student attaches laptop to campus network, requests/receives www.google.com 32

A day in the life: scenario browser DNS server Comcast network 68.80.0.0/13 school network 68.80.2.0/24 web page web server 64.233.169.105 Google s network 64.233.160.0/19 33

A day in the life connecting to the Internet UDP IP UDP IP router (runs ) connecting laptop needs to get its own IP address, addr of first-hop router, addr of DNS server: use request encapsulated in UDP, encapsulated in IP, encapsulated in 802.3 ernet ernet frame broadcast (dest: FFFFFFFFFFFF) on LAN, received at router running server ernet demuxed to IP demuxed, UDP demuxed to 34

A day in the life connecting to the Internet UDP IP UDP IP router (runs ) server formulates ACK containing client s IP address, IP address of first-hop router for client, name & IP address of DNS server encapsulation at server, frame forwarded (switch learning) through LAN, demultiplexing at client client receives ACK reply Client now has IP address, knows name & addr of DNS server, IP address of its first-hop router 35

A day in the life ARP (before DNS, before HTTP) DNS DNS DNS ARP query ARP DNS UDP IP ARP reply ARP router (runs ) before sending HTTP request, need IP address of www.google.com: DNS DNS query created, encapsulated in UDP, encapsulated in IP, encapsulated in. To send frame to router, need MAC address of router interface: ARP ARP query broadcast, received by router, which replies with ARP reply giving MAC address of router interface client now knows MAC address of first hop router, so can now send frame containing DNS query 36

A day in the life using DNS DNS DNS DNS DNS DNS UDP IP DNS DNS DNS DNS DNS UDP IP DNS server DNS Comcast network 68.80.0.0/13 router (runs ) IP datagram containing DNS query forwarded via LAN switch from client to 1 st hop router IP datagram forwarded from campus network into Comcast network, routed (tables created by RIP, OSPF, IS-IS and/or BGP routing protocols) to DNS server demuxed to DNS server DNS server replies to client with IP address of www.google.com 37

A day in the life TCP connection carrying HTTP HTTP SYNACK SYNACK SYNACK HTTP TCP IP SYNACK SYNACK SYNACK TCP IP web server 64.233.169.105 router (runs ) to send HTTP request, client first opens TCP socket to web server TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server web server responds with TCP SYNACK (step 2 in 3-way handshake) 38

A day in the life HTTP request/reply HTTP HTTP HTTP HTTP HTTP HTTP TCP IP web page finally (!!!) displayed HTTP request sent into TCP socket HTTP HTTP HTTP HTTP HTTP TCP IP router (runs ) IP datagram containing HTTP request routed to www.google.com web server responds with HTTP reply (containing web page) web server 64.233.169.105 IP datagram containing HTTP reply routed back to client 39