CS 5114 Network Programming Languages End Hosts. Nate Foster Cornell University Spring 2013

Similar documents
Internet Control Protocols Reading: Chapter 3

RARP: Reverse Address Resolution Protocol

Names & Addresses. Names & Addresses. Hop-by-Hop Packet Forwarding. Longest-Prefix-Match Forwarding. Longest-Prefix-Match Forwarding

Transport and Network Layer

Final for ECE374 05/06/13 Solution!!

Course Overview: Learn the essential skills needed to set up, configure, support, and troubleshoot your TCP/IP-based network.

Link Layer. 5.6 Hubs and switches 5.7 PPP 5.8 Link Virtualization: ATM and MPLS

Transport Layer Protocols

CSE331: Introduction to Networks and Security. Lecture 6 Fall 2006

Based on Computer Networking, 4 th Edition by Kurose and Ross

How do I get to

Networking Test 4 Study Guide

IP address format: Dotted decimal notation:

Ethernet. Ethernet. Network Devices

ESSENTIALS. Understanding Ethernet Switches and Routers. April 2011 VOLUME 3 ISSUE 1 A TECHNICAL SUPPLEMENT TO CONTROL NETWORK

Technical Support Information Belkin internal use only

Introduction to Network Operating Systems

Network Security TCP/IP Refresher

IP Network Layer. Datagram ID FLAG Fragment Offset. IP Datagrams. IP Addresses. IP Addresses. CSCE 515: Computer Network Programming TCP/IP

Network layer" 1DT066! Distributed Information Systems!! Chapter 4" Network Layer!! goals: "

Access Control: Firewalls (1)

IP - The Internet Protocol

Internet Packets. Forwarding Datagrams

Network-Oriented Software Development. Course: CSc4360/CSc6360 Instructor: Dr. Beyah Sessions: M-W, 3:00 4:40pm Lecture 2

Internet Protocol: IP packet headers. vendredi 18 octobre 13

IP addressing and forwarding Network layer

Interconnection of Heterogeneous Networks. Internetworking. Service model. Addressing Address mapping Automatic host configuration

Internet Architecture

HOST AUTO CONFIGURATION (BOOTP, DHCP)

TCP/IP Fundamentals. OSI Seven Layer Model & Seminar Outline

Introduction to TCP/IP

Lecture Computer Networks

8.2 The Internet Protocol

TCP/IP Protocol Suite. Marshal Miller Chris Chase

Outline. CSc 466/566. Computer Security. 18 : Network Security Introduction. Network Topology. Network Topology. Christian Collberg

Unix System Administration

Overview of Computer Networks

Guide to TCP/IP, Third Edition. Chapter 3: Data Link and Network Layer TCP/IP Protocols

Ethernet. Ethernet Frame Structure. Ethernet Frame Structure (more) Ethernet: uses CSMA/CD

Networks: IP and TCP. Internet Protocol

Chapter 3. TCP/IP Networks. 3.1 Internet Protocol version 4 (IPv4)

Architecture and Performance of the Internet

CS101 Lecture 19: Internetworking. What You ll Learn Today

Objectives of Lecture. Network Architecture. Protocols. Contents

IP Networking. Overview. Networks Impact Daily Life. IP Networking - Part 1. How Networks Impact Daily Life. How Networks Impact Daily Life

[Prof. Rupesh G Vaishnav] Page 1

architecture: what the pieces are and how they fit together names and addresses: what's your name and number?

EECS 122: Introduction to Computer Networks Multiaccess Protocols. ISO OSI Reference Model for Layers

CCNA R&S: Introduction to Networks. Chapter 5: Ethernet

Note! The problem set consists of two parts: Part I: The problem specifications pages Part II: The answer pages

The OSI model has seven layers. The principles that were applied to arrive at the seven layers can be briefly summarized as follows:

CS 5480/6480: Computer Networks Spring 2012 Homework 4 Solutions Due by 1:25 PM on April 11 th 2012

CS 457 Lecture 19 Global Internet - BGP. Fall 2011

Network Layer, Part 1 Internet Architecture. History

Internet Working 5 th lecture. Chair of Communication Systems Department of Applied Sciences University of Freiburg 2004

Asynchronous Transfer Mode: ATM. ATM architecture. ATM: network or link layer? ATM Adaptation Layer (AAL)

Network Layer: Network Layer and IP Protocol

Introduction to IP v6

Application Protocols for TCP/IP Administration

LAN Switching Computer Networking. Switched Network Advantages. Hubs (more) Hubs. Bridges/Switches, , PPP. Interconnecting LANs

EITF25 Internet Techniques and Applications L5: Wide Area Networks (WAN) Stefan Höst

High Performance VPN Solutions Over Satellite Networks

CS 43: Computer Networks IP. Kevin Webb Swarthmore College November 5, 2013

Dynamic Host Configuration Protocol (DHCP) 02 NAT and DHCP Tópicos Avançados de Redes

First Semester Examinations 2011/12 INTERNET PRINCIPLES

Note! The problem set consists of two parts: Part I: The problem specifications pages Part II: The answer pages

Internetworking. Problem: There is more than one network (heterogeneity & scale)

Address Resolution Protocol (ARP)

Introduction to IP networking

Network layer: Overview. Network layer functions IP Routing and forwarding

Protocols. Packets. What's in an IP packet

Indian Institute of Technology Kharagpur. TCP/IP Part I. Prof Indranil Sengupta Computer Science and Engineering Indian Institute of Technology

Introduction to LAN/WAN. Network Layer (part II)

Answer FIVE Questions only. Each carries 20 marks.

IP Address Classes (Some are Obsolete) Computer Networking. Important Concepts. Subnetting Lecture 8 IP Addressing & Packets

Computer Networks & Security 2014/2015

Final Exam. Route Computation: One reason why link state routing is preferable to distance vector style routing.

VLAN und MPLS, Firewall und NAT,

Efficient Addressing. Outline. Addressing Subnetting Supernetting CS 640 1

EECS 489 Winter 2010 Midterm Exam

CS 640: Introduction to Computer Networks. Goals of This Class. Goal of Networking. Page 1. Understand principles and practice of networking

Agenda. Distributed System Structures. Why Distributed Systems? Motivation

Internet Protocol Address

CPS221 Lecture: Layered Network Architecture

20. Switched Local Area Networks

The OSI & Internet layering models

BASIC ANALYSIS OF TCP/IP NETWORKS

ICOM : Computer Networks Chapter 6: The Transport Layer. By Dr Yi Qian Department of Electronic and Computer Engineering Fall 2006 UPRM

Network Measurement. Why Measure the Network? Types of Measurement. Traffic Measurement. Packet Monitoring. Monitoring a LAN Link. ScienLfic discovery

Data Communication Networks and Converged Networks

Computer Networks/DV2 Lab

Chapter 3: Review of Important Networking Concepts. Magda El Zarki Dept. of CS UC Irvine

Cape Girardeau Career Center CISCO Networking Academy Bill Link, Instructor. 2.,,,, and are key services that ISPs can provide to all customers.

Overview. Securing TCP/IP. Introduction to TCP/IP (cont d) Introduction to TCP/IP

COS 461: Computer Networks

Introduction to IPv6 and Benefits of IPv6

Lecture 1: Course Introduction" CSE 222A: Computer Communication Networks Alex C. Snoeren

Transcription:

CS 5114 Network Programming Languages End Hosts http://www.flickr.com/photos/rofi/2097239111/! Nate Foster Cornell University Spring 2013 Based on lecture notes by Jennifer Rexford and Michael Freedman

Announcements Signup Sheet: breakfast pickup and presentations Reviews: start next week! Only review one paper but please read them all! Structure: summary, strengths, weaknesses, discussion Aim to write about half a page to one page Submit by email or hand in at the start of class Projects Groups and initial proposal by Feb 19 th Full proposals due March 14 th Final reports and presentations due on May 2 nd

Next Few Classes: Overview Host Network discovery and bootstrapping Resource allocation and interface to applications Data plane Streaming algorithms and switch fabric Forward, filter, buffer, schedule, mark, monitor, Control plane Distributed algorithms for computing paths Disseminating the addresses of end hosts

Host-Network Division of Labor Network Best-effort packet delivery Between two (or more) end-point addresses Hosts Everything else host host network

IP Suite: End Hosts vs. Routers host HTTP HTTP message host HTTP TCP TCP segment TCP router router IP IP packet IP IP packet IP IP packet IP Ethernet interface Ethernet interface SONET interface SONET interface Ethernet interface Ethernet interface

Layer Encapsulation User A User B Get index.html Connection ID Source/Destination Link Address 6

The Narrow Waist of the Internet FTP HTTP NV TFTP Applications TCP UDP UDP TCP IP Waist NET 1 NET 2 NET n Data Link Physical The Hourglass Model The narrow waist facilitates interoperability

The Role of the End Host Network discovery and bootstrapping How does the host join the network? How does the host get an address? Interface to networked applications What interface to higher-level applications? How does the host realize that abstraction? Distributed resource sharing What roles does the host play in network resource allocation decisions?

Network Discovery and Bootstrapping

Three Kinds of Identifiers Host Name IP Address MAC Address Example www.cs.cornell.edu 132.236.204.10 00-15-C5-49-04-A9 Size Hierarchical, human readable, variable length Hierarchical, machine readable, 32 bits Flat, machine readable, 48 bits Read by Humans, hosts IP routers Switches in LAN Allocation, top-level Domain, assigned by registrar (e.g., for.edu) Variable-length prefixes, assigned by ICANN, RIR, or ISP Fixed-sized blocks, assigned by IEEE to vendors (e.g., Dell) Allocation, low-level Host name, local administrator Interface, by admin or DHCP Interface, by vendor

Mapping Between Identifiers Dynamic Host Configuration Protocol (DHCP) Given a MAC address, assigns a unique IP address and gives host other information about the local network (e.g., gateway) Automates the boot-strapping process Address Resolution Protocol (ARP) Given an IP address, provides the MAC address Enables communication within the local network Domain Name System (DNS) Given a host name, provides the IP address Given an IP address, provides the host name

Learning a Host s Address me adapter adapter you Who am I? Hard-wired: MAC address Static configuration: IP interface configuration Dynamically learned: IP address configured by DHCP Who are you? Hard-wired: IP address in a URL, or in the code Dynamically looked up: ARP or DNS

Dynamic Host Configuration Protocol DHCP discover (broadcast) new client Host learns IP address, Subnet mask, Gateway address, DNS server(s), and a lease time. DHCP offer DHCP request (broadcast) DHCP ACK DHCP server

Address Resolution Protocol (ARP) Every host maintains an ARP table (IP address, MAC address) pair Consult the table when sending a packet Map destination IP address to destination MAC address Encapsulate and transmit the data packet But, what if the IP address is not in the table? Sender broadcasts: Who has IP address 1.2.3.156? Receiver responds: MAC address 58-23-D7-FA-20-B0 Sender caches the result in its ARP table

Domain Name System Host at cs.cornell.edu wants IP address for gaia.cs.umass.edu local DNS server dns.cs.cornell.edu 2 root DNS server 3 TLD DNS server 4 5 1 8 7 6 Recursive query: #1 Iterative queries: #2, 4, 6 requesting host cs.cornell.edu authoritative DNS server dns.cs.umass.edu gaia.cs.umass.edu

Questions Should addresses correspond to the interface (point of attachment) or to the host? Why have three identifiers? Do we need them all? What should be done to prevent address spoofing?

Interface to Applications

Socket Abstraction Best-effort packet delivery is a clumsy abstraction Applications typically want higher-level abstractions Messages, uncorrupted data, reliable in-order delivery User process socket Operating System User process socket Operating System Applications communicate using sockets Stream socket: reliable stream of bytes (like a file) Message socket: unreliable message delivery

Two Basic Transport Features Demultiplexing: port numbers Client host Client Service request for 128.2.194.242:80 (i.e., the Web server) Server host 128.2.194.242 OS Web server (port 80) Echo server (port 7) Error detection: checksums IP payload detect corruption

Two Main Transport Layers User Datagram Protocol (UDP) Just provides demultiplexing and error detection Header fields: port numbers, checksum, and length Low overhead, good for query/response and multimedia Transmission Control Protocol (TCP) Provides a stream of bytes abstraction Retransmits lost or corrupted data Puts out-of-order data back in order Adapts the sending rate to alleviate congestion Higher overhead, good for most stateful applications

Questions Is a socket between IP addresses the right abstraction? Mobile hosts? Replicated services? What does the network know about the traffic? Inferring the application from the port numbers? Is end-to-end error detection/correction the right model? High loss environments? Expense of retransmitting over the entire path?

Distributed Resource Sharing

Resource Allocation Challenges Best-effort network easily becomes overloaded No mechanism to block excess calls Instead excess packets are simply dropped Examples Shared Ethernet medium: frame collisions Ethernet switches and IP routers: full packet buffers Quickly leads to congestion collapse Goodput Load congestion collapse Increase in load that results in a decrease in useful work done.

End Hosts Adjusting to Congestion End hosts adapt their sending rates In response to network conditions Learning that the network is congested Shared Ethernet: carrier sense multiple access Seeing your own frame collide with others IP network: observing your end-to-end performance Packet delay or loss over the end-to-end path Adapting to congestion Slowing down the sending rate, for the greater good But, host doesn t know how bad things might be

Ethernet Back-off Mechanism Carrier sense: wait for link to be idle If idle, start sending; if not, wait until idle Collision detection: listen while transmitting If collision: abort transmission, and send jam signal Exponential back-off: wait before retransmitting Wait random time, exponentially larger on each retry

TCP Congestion Control Additive increase, multiplicative decrease On packet loss, divide congestion window in half On success for last window, increase window linearly Window Loss halved Other mechanisms: slow start, fast retransmit vs. timeout loss, etc. t

Questions What role should the network play in resource allocation? Explicit feedback to the end hosts? Enforcing an explicit rate allocation? What is a good definition of fairness? What about hosts who cheat to hog resources? How to detect cheating? How to prevent/punish? What about wireless networks? Difficulty of detecting collisions (due to fading) Loss caused by interference, not just congestion

A Protocol for Packet Network Intercommunication (IEEE Trans. on Communications, May 1974) Vint Cerf and Bob Kahn

Life in the 1970s Multiple unconnected networks ARPAnet, data-over-cable, packet satellite (Aloha), packet radio, Heterogeneous designs Addressing, max packet size, handling of lost/ corrupted data, fault detection, routing, ARPAnet satellite net

Handling Heterogeneity Where to handle heterogeneity? Application process? End hosts? Packet switches? Compatible process and host conventions Obviate the need to support all combinations Retain the unique features of each network Avoid changing the local network components Introduce the notion of a gateway

Internetwork Layer and Gateways Internetwork Layer Internetwork appears as a single, uniform entity Despite the heterogeneity of the local networks Network of networks Gateway Embed internetwork packets in local packet format or extract them Route (at internetwork level) to next gateway gateway ARPAnet satellite net

Internetwork Packet Format internetwork header local header source address dest. address seq. # byte count flag field data checksum Internetwork header in standard format Interpreted by the gateways and end hosts Source and destination addresses Uniformly and uniquely identify every host Ensure proper sequencing of the data Include a sequence number and byte count Enable detection of corrupted text Checksum for an end-to-end check on the text

Process-Level Communication Enable pairs of processes to communicate Full duplex Unbounded but finite-length messages E.g., keystrokes or a file Key ideas Port numbers to (de)multiplex packets Breaking messages into segments Sequence numbers and reassembly Retransmission and duplicate detection Window-based flow control

Discussion What did they get right? Which ideas were key to the Internet s success? Which decisions still seem right today? What did they miss? Which ideas had to be added later? Which decisions seem wrong in hindsight? What would you do in a clean-slate design? If your goal wasn t to support communication between disparate packet-switched networks Would you do anything differently?

End-to-End Arguments in System Design (ACM Trans. on Computer Systems, November 1984) J. Saltzer, D. Reed, and D. Clark

End-to-End Argument Operations should occur only at the end points unless needed for performance optimization 2 4 1 3 5 Many things can go wrong: disk errors, software errors, hardware errors, communication errors,

Trade-Offs Put functionality at each hop All applications pay the price End systems still need to check for errors Place functionality only at the ends Slower error detection End-to-end retransmission wastes bandwidth Compromise solution? Reliable end-to-end transport protocol (TCP) Plus file checksums to detect file-system errors

Discussion When should the network support a function? What about link-layer retransmission in a wireless network? Whose interests are served by the end-to-end argument? How does a network operator influence the network without violating the end-to-end argument? Does the design of IP and TCP make it hard to violate the end-to-end argument? For example: middleboxes like NATs, firewalls, proxies. Should the end-to-end argument apply to routing?