Docsity

CS 5114 Network Programming Languages End Hosts, Lecture notes of Network Technologies and TCP/IP

Partial preview of the text

Download CS 5114 Network Programming Languages End Hosts and more Lecture notes Network Technologies and TCP/IP in PDF only on Docsity!

http://www.flickr.com/photos/rofi/2097239111/!

Nate Foster

Cornell University

Spring 2013

Based on lecture notes by Jennifer Rexford and Michael Freedman

CS 5114

Network Programming Languages

End Hosts

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

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 HTTP TCP IP Ethernet interface HTTP TCP IP Ethernet interface IP IP Ethernet interface Ethernet interface SONET interface SONET interface host host router (^) router HTTP message TCP segment IP packet (^) IP packet IP packet

The “Narrow Waist” of the Internet UDP TCP Data Link Physical Applications

The Hourglass Model

Waist

The narrow waist facilitates interoperability

FTP HTTP NV TFTP
TCP UDP
IP

NET 1 NET 2 … NETn

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?

Three Kinds of Identifiers Host Name IP Address MAC Address Example www.cs.cornell.edu 132.236.204.10 00-15-C5-49-04-A 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

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

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

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

Two Basic Transport Features

Demultiplexing: port numbers

Error detection: checksums

Web server (port 80) Client host Server host 128.2.194. Echo server (port 7) Service request for 128.2.194.242: 80 (i.e., the Web server) Client OS 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