COS 461: Computer Networks



Similar documents
COS 461: Computer Networks

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

Networking Overview. (as usual, thanks to Dave Wagner and Vern Paxson)

Network Security TCP/IP Refresher

First Workshop on Open Source and Internet Technology for Scientific Environment: with case studies from Environmental Monitoring

Internet Control Protocols Reading: Chapter 3

How do I get to

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

Ethernet. Ethernet. Network Devices

Internet Protocol: IP packet headers. vendredi 18 octobre 13

Domain Name System DNS

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

Protocols. Packets. What's in an IP packet

Technical Support Information Belkin internal use only

Introduction to Computer Networks

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

We will give some overview of firewalls. Figure 1 explains the position of a firewall. Figure 1: A Firewall

You will work in groups of two on the labs. It is OK to talk to others and help each other in the lab.

Communications and Networking

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

Domain Name System (DNS) Reading: Section in Chapter 9

Lecture 28: Internet Protocols

Network Technologies

Objectives of Lecture. Network Architecture. Protocols. Contents

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

Introduction to IP networking

IP - The Internet Protocol

EECS 489 Winter 2010 Midterm Exam

CSE 3461 / 5461: Computer Networking & Internet Technologies

Today s Lecture : Introduction to Telecommunication Networks Lectures 2: Protocol Stack. Applications and Application Protocols

Computer Networks & Security 2014/2015

Gary Hecht Computer Networking (IP Addressing, Subnet Masks, and Packets)

Networks University of Stirling CSCU9B1 Essential Skills for the Information Age. Content

RARP: Reverse Address Resolution Protocol

Network Programming TDC 561

Raritan Valley Community College Academic Course Outline. CISY Advanced Computer Networking

CS640: Introduction to Computer Networks. Applications FTP: The File Transfer Protocol

Measurement of the Usage of Several Secure Internet Protocols from Internet Traces

How To Understand And Understand Network Theory

Agenda. Distributed System Structures. Why Distributed Systems? Motivation

File Transfer And Access (FTP, TFTP, NFS) Chapter 25 By: Sang Oh Spencer Kam Atsuya Takagi

Using IPM to Measure Network Performance

Middleboxes. Firewalls. Internet Ideal: Simple Network Model. Internet Reality. Middleboxes. Firewalls. Globally unique idenpfiers

Transport and Network Layer

Firewalls. Test your Firewall knowledge. Test your Firewall knowledge (cont) (March 4, 2015)

Overview of Computer Networks

Transport Layer Protocols

TCP/IP Networking An Example

20-CS X Network Security Spring, An Introduction To. Network Security. Week 1. January 7

Modern snoop lab lite version

Final exam review, Fall 2005 FSU (CIS-5357) Network Security

Understanding Slow Start

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

Linux MDS Firewall Supplement

Domain Name System (DNS)

Using MIS 3e Chapter 6A Appendix

Computer Networks and the Internet

CSIS CSIS 3230 Spring Networking, its all about the apps! Apps on the Edge. Application Architectures. Pure P2P Architecture

Firewalls, IDS and IPS

Introduction to Analyzer and the ARP protocol

TCP Performance Management for Dummies

Solution of Exercise Sheet 5

Networks: IP and TCP. Internet Protocol

Names vs. Addresses. Flat vs. Hierarchical Space. Domain Name System (DNS) Computer Networks. Lecture 5: Domain Name System

Internet Technologies. World Wide Web (WWW) Proxy Server Network Address Translator (NAT)

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

Chapter 8 Security Pt 2

CS5008: Internet Computing

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

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

8.2 The Internet Protocol

Applications and Services. DNS (Domain Name System)

Computer Networks/DV2 Lab

Application Layer. CMPT Application Layer 1. Required Reading: Chapter 2 of the text book. Outline of Chapter 2

Protocol Specification & Design. The Internet and its Protocols. Course Outline (trivia) Introduction to the Subject Teaching Methods

Understanding TCP/IP. Introduction. What is an Architectural Model? APPENDIX

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

OS/390 Firewall Technology Overview

Overview of TCP/IP. TCP/IP and Internet

Computer Networks CS321

Application layer Protocols application transport

NET0183 Networks and Communications

IP address format: Dotted decimal notation:

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

Guideline for setting up a functional VPN

Lecture Computer Networks

CONTENT of this CHAPTER

Distributed Systems. 2. Application Layer

1. The Web: HTTP; file transfer: FTP; remote login: Telnet; Network News: NNTP; SMTP.

First Midterm for ECE374 03/09/12 Solution!!

UIP1868P User Interface Guide

Network Applications

Proxy Server, Network Address Translator, Firewall. Proxy Server

Protocols and Architecture. Protocol Architecture.

Introduction to TCP/IP

Data Communication I

TCP/IP Protocol Suite. Marshal Miller Chris Chase

IP addressing and forwarding Network layer

Architecture and Performance of the Internet

Network Simulation Traffic, Paths and Impairment

Transcription:

COS 461: Computer Networks Spring 2010 (MW 3:00 4:20pm in CS 105) Prof. Mike Freedman Teaching Assistants: Muneeb Ali and David Shue hnp://www.cs.princeton.edu/courses/archive/spr10/cos461/ 1

Goals for Today s Class COS 461 overview Goals of the course Structure of the course Learning the material Programming assignments Course grading Academic policies Key concepts in data networking Protocols Layering Resource allocavon Naming 2

What You Learn in This Course Skill: network programming Socket programming Designing and implemenvng protocols Knowledge: how the Internet works IP protocol suite Internet architecture ApplicaVons (Web, DNS, P2P, ) Insight: key concepts in networking Protocols Layering Resource allocavon Naming 3

Structure of the Course (1 st Half) Start at the top Sockets: how applicavons view the Internet Protocols: essenval elements of a protocol Then study the narrow waist of IP IP best effort packet delivery service IP addressing and packet forwarding And how to build on top of the narrow waist Transport protocols (TCP, UDP) Domain Name System (DNS) Glue (ARP, DHCP, ICMP) End system security and privacy (NAT, firewalls) Looking underneath IP Link technologies (Ethernet) 4

Structure of the Course (2 nd Half) And how to get the traffic from here to there Internet rouvng architecture (the inter in Internet) Intradomain and interdomain rouvng protocols Special networking topics MulVcast, Over/Underlay networking Datacenter networks Wireless and mobility Building applicavons MulVcast, Over/Underlay networking HTTP and Content DistribuVon Networks Peer to peer, DHTs, BitTorrent Distributed systems: Consistency and agreement Network and communicavon security 5

Learning the Material: People Lecture (Prof. Mike Freedman) When: MW 3:00 4:20 in Computer Science 105 Slides available online at course Web site Office hours (room 308) on Mon, 4:20 5:00 (or by appt) Email: mfreed+cos461 at cs.princeton.edu Teaching Assistants Muneeb Ali E mail: muneeb+cos461 at cs.princeton.edu David Shue E mail: dshue+cos461 at cs.princeton.edu Main email: cos461 staff at lists.cs.princeton.edu 6

Learning the Material: Mailing List Mailing list If you re enrolled, you should be on it E mail: cos461 at lists.cs.princeton.edu Sign up: hnps://lists.cs.princeton.edu/mailman/lisvnfo/cos461 Read ofen Good place to ask quesvons But do not post your code Reply, too Good place to answer quesvons (parvcipavon!) 7

Learning the Material: Books Required textbook Computer Networks: A Systems Approach (4th edi:on), by Peterson and Davie [Okay to use the 3 rd edivon] Mostly covers the material in the first half of the class Books on reserve Networking text books Computer Networking: A Top Down Approach Featuring the Internet (3rd edi:on), by Kurose and Ross Computer Networks (4th edi:on), by Tanenbaum Network programming references TCP/IP Illustrated, Volume 1: The Protocols, by Stevens Unix Network Programming, Volume 1: The Sockets Networking API (3rd Edi:on), by Stevens, Fenner, & Rudolf Online resources E.g. on socket programming 8

Grading and Schedule Assignments (10% each) 95% 3 hours, 70% 2 days late, 50% > 3 days late One free late day during semester Must complete all assignments to pass Two exams (45% total) Midterm exam before spring break(20%) Final exam during exam period (25%) Class parvcipavon (5%) In lecture On the listserv Will grade 0 5 9

Programming Assignments Five assignments IntroducVon to sockets (Sun Feb 14) Simple HTTP proxy Advanced HTTP proxy Reliable transport IP router (Sun Apr 12) no late accepted 10

FaciliVes for Programming Computer cluster in Friend Center 010 Friend Center 010 computers Machines: labpc XX.cs.princeton.edu for XX of 01 to 30 Why: common environment, and access to lab TAs Accessing your account If you are enrolled, you have a labpc account Using your OIT login and password Logging in to the machines remotely SSH to portal.cs.princeton.edu, and then to FC 010 Need a CS account, if you don t have one already hnps://csguide.cs.princeton.edu/requests/account Request a class account 11

FaciliVes for Programming Other opvon: your own PC (not recommended) Running GNU tools on Linux, or Running GNU tools on Windows, or Running a standard C development environment Development environment not supported by TAs SuggesVon: test access this week Logging in to the FC 010 cluster WriVng and running Hello World in C Submirng assignments Using Blackboard More details coming soon! 12

Graduate Students: Two Choices Pick one of two opvons Do the five programming assignments Or, first two assignments, plus research project Research projects Networking related research problem Must have a systems programming component Write up of project due on Dean s Date Talk to me about a project before spring break 13

Policies: Write Your Own Code Programming in an individual creavve process much like composivon. You must reach your own understanding of the problem and discover a path to its soluvon. During this Vme, discussions with friends are encouraged. However, when the Vme comes to write code that solves the problem, such discussions are no longer appropriate the program must be your own work. If you have a quesvon about how to use some feature of C, UNIX, etc., you can certainly ask your friends or the TA, but do not, under any circumstances, copy another person's program. Lerng someone copy your program or using someone else's code in any form is a viola7on of academic regula7ons. "Using someone else's code" includes using soluvons or parval soluvons to assignments provided by commercial web sites, instructors, preceptors, teaching assistants, friends, or students from any previous offering of this course or any other course. 14

Okay, so let s get started with a crash course in data networking 15

Key Concepts in Networking Protocols Speaking the same language Syntax and semanvcs Layering Standing on the shoulders of giants A key to managing complexity Resource allocavon Dividing scare resources among compevng parves Memory, link bandwidth, wireless spectrum, paths, Distributed vs. centralized algorithms Naming What to call computers, services, protocols, Architectural principles: End to end, etc. 16

Protocols: Calendar Service Making an appointment with your advisor Please meet with me for Please meet meet with with me me for for 1.5 1.5 hours hours starting at 1.5 hours starting at at 1:30pm 3:00pm on on February 8, 8, 200? 4:30pm on February 8, 2009? 2009? I can t. Yes! Specifying the messages that go back and forth And an understanding of what each party is doing 17

Okay, So This is Gerng Tedious You: When are you free to meet for 1.5 hours during the next two weeks? Advisor: 10:30am on Feb 8 and 1:15pm on Feb 9. You: Book me for 1.5 hours at 10:30am on Feb 8. Advisor: Yes. 18

Well, Not Quite Enough Student #1: When can you meet for 1.5 hours during the next two weeks? Advisor: 10:30am on Feb 8 and 1:15pm on Feb 9. Student #2: When can you meet for 1.5 hours during the next two weeks? Advisor: 10:30am on Feb 8 and 1:15pm on Feb 9. Student #1: Book me for 1.5 hours at 10:30am on Feb 8. Advisor: Yes. Student #2: Book me for 1.5 hours at 10:30am on Feb 8. Advisor: Uh well I can no longer can meet then. I m free at 1:15pm on Feb 9. Book me for 1.5 hours at 1:15pm on Feb 9. Advisor: Yes. Advisor: Wait am I talking to Student 1 or 2? 19

Specifying the Details How to idenvfy yourself? Name? Social security number? How to represent dates and Vme? Time, day, month, year? In what Vme zone? Number of seconds since Jan 1, 1970? What granularives of Vmes to use? Any possible start Vme and meevng duravon? MulVples of five minutes? How to represent the messages? Strings? Record with name, start Vme, and duravon? What do you do if you don t get a response? Ask again? Reply again? 20

Example: HyperText Transfer Protocol GET /courses/archive/spr09/cos461/ HTTP/1.1 Host: www.cs.princeton.edu User-Agent: Mozilla/4.03 CRLF Request Response HTTP/1.1 200 OK Date: Mon, 2 Feb 2009 13:09:03 GMT Server: Netscape-Enterprise/3.5.1 Last-Modified: Mon, 42 Feb 2009 11:12:23 GMT Content-Length: 21 CRLF Site under construction 21

Example: IP Packet 4-bit 4-bit Header Version Length 8-bit Type of Service (TOS) 16-bit Total Length (Bytes) 16-bit Identification 3-bit Flags 13-bit Fragment Offset 8-bit Time to Live (TTL) 8-bit Protocol 16-bit Header Checksum 32-bit Source IP Address 32-bit Destination IP Address Options (if any) Payload 22

IP: Best Effort Packet Delivery Packet switching Send data in packets Header with source & desvnavon address Best effort delivery Packets may be lost Packets may be corrupted Packets may be delivered out of order source destination IP network 23

Example: Transmission Control Protocol CommunicaVon service (socket) Ordered, reliable byte stream Simultaneous transmission in both direcvons Key mechanisms at end hosts Retransmit lost and corrupted packets Discard duplicate packets and put packets in order Flow control to avoid overloading the receiver buffer CongesVon control to adapt sending rate to network load TCP connection source network destination 24

Protocol StandardizaVon CommunicaVng hosts speaking the same protocol StandardizaVon to enable mulvple implementavons Or, the same folks have to write all the sofware StandardizaVon: Internet Engineering Task Force Based on working groups that focus on specific issues Produces Request For Comments (RFCs) Promoted to standards via rough consensus and running code E.g., RFC 1945 on HyperText Transfer Protocol HTTP/1.0 IETF Web site is hnp://www.ie.org De facto standards: same folks wrivng the code P2P file sharing, BitTorrent, Skype, Flash videos (RTMP) 25 <your protocol here>

Key Concepts in Networking Protocols Speaking the same language Syntax and semanvcs Layering Standing on the shoulders of giants A key to managing complexity 26

Layering: A Modular Approach Sub divide the problem Each layer relies on services from layer below Each layer exports services to layer above Interface between layers defines interacvon Hides implementavon details Layers can change without disturbing other layers Application Application-to-application channels Host-to-host connectivity Link hardware 27

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 28

The Internet Protocol Suite FTP HTTP NV TFTP Applications TCP IP UDP Waist UDP TCP NET 1 NET 2 NET n Data Link Physical The waist facilitates interoperability The Hourglass Model 29

Layer EncapsulaVon User A User B Get index.html Connection ID Source/Destination Link Address 30

What if the Data Doesn t Fit? Problem: Packet size On Ethernet, max IP packet is 1500 bytes Typical Web page is 10 kbytes Solution: Split the data across multiple packets ml x.ht inde GET GET index.html 31

Protocol DemulVplexing MulVple choices at each layer FTP HTTP NV TFTP TCP UDP IP Network IP TCP/UDP NET 1 NET 2 NET n Type Field Protocol Field Port Number 32

DemulVplexing: Port Numbers DifferenVate between mulvple transfers Knowing source and desvnavon host is not enough Need an id for each transfer between the hosts Use well known ports to discover a parvcular service E.g., HTTP server running on port 80 E.g., FTP server running on port 21 But how differenvate if server always port 80? HTTP transfers FTP transfer 33

Is Layering Harmful? Layer N may duplicate lower level funcvonality E.g., error recovery to retransmit lost data Layers may need same informavon E.g., Vmestamps, maximum transmission unit size Strict adherence to layering may hurt performance E.g., hiding details about what is really going on Some layers are not always cleanly separated Inter layer dependencies for performance reasons Some dependencies in standards (header checksums) Headers start to get really big SomeVmes more header bytes than actual content 34

Key Concepts in Networking Protocols Speaking the same language Syntax and semanvcs Layering Standing on the shoulders of giants A key to managing complexity Resource allocavon Dividing scare resources among compevng parves Memory, link bandwidth, wireless spectrum, paths, Distributed vs. centralized algorithms 35

Resource AllocaVon: Queues Sharing access to limited resources E.g., a link with fixed service rate Simplest case: first in first out queue Serve packets in the order they arrive When busy, store arriving packets in a buffer Drop packets when the queue is full Anybody hear of Network Neutrality? 36

What if the Data gets Dropped? Problem: Lost Data GET index.html Internet Solution: Timeout and Retransmit GET index.html GET index.html Internet GET index.html 37

What if the Data is Out of Order? Problem: Out of Order ml inde x.ht GET GET x.htindeml Solution: Add Sequence Numbers ml 4 inde 2 x.ht 3 GET 1 GET index.html 38

Resource AllocaVon: CongesVon Control What if too many folks are sending data? Senders agree to slow down their sending rates in response to their packets gerng dropped The essence of TCP congesvon control Key to prevenvng congesvon collapse of the Internet 39

Transmission Control Protocol Flow control: window based Sender limits number of outstanding bytes (window size) Receiver window ensures data does not overflow receiver CongesVon control: adapvng to packet losses Conges:on window tries to avoid overloading the network (increase with successful delivery, decrease with loss) TCP connecvon starts with small inival congesvon window congestion window slow start congestion avoidance time

Key Concepts in Networking Protocols Speaking the same language Syntax and semanvcs Layering Standing on the shoulders of giants A key to managing complexity Resource allocavon Dividing scare resources among compevng parves Memory, link bandwidth, wireless spectrum, paths, Distributed vs. centralized algorithms Naming What to call computers, services, protocols, 41

Naming: Domain Name System (DNS) ProperVes of DNS Hierarchical name space divided into zones TranslaVon of names to/from IP addresses Distributed over a collecvon of DNS servers Client applicavon Extract server name (e.g., from the URL) Invoke system call to trigger DNS resolver code E.g., gethostbyname() on www.cs.princeton.edu Server applicavon Extract client IP address from socket OpVonally invoke system call to translate into name E.g., gethostbyaddr() on 12.34.158.5 42

Domain Name System unnamed root com edu org ac uk zw arpa bar generic domains country domains ac inaddr west east cam 12 foo my usr 34 my.east.bar.edu usr.cam.ac.uk 56 12.34.56.0/24

DNS Resolver and Local DNS Server 3 Root server Application DNS cache 4 1 10 DNS resolver 2 DNS query DNS response 9 Local DNS server 8 5 6 7 Top-level domain server Second-level domain server Caching based on Vme to live (TTL) specified by authorita:ve DNS server, i.e., one responsible for domain name Reduces latency in DNS translavon Reduces load on authoritavve DNS servers

Key Concepts in Networking Protocols Speaking the same language Syntax and semanvcs Layering Standing on the shoulders of giants A key to managing complexity Resource allocavon Dividing scare resources among compevng parves Memory, link bandwidth, wireless spectrum, paths, Distributed vs. centralized algorithms Naming What to call computers, services, protocols, Architectural principles: End to end, etc. 45

TOCS, 1981 Reliability (TCP vs. IP Security (SSL vs. IPSec) 46

Course objecvves Conclusions Network programming, how the Internet works, and key concepts in networking Key concepts in networking Protocols, layers, resource allocavon, and naming Next lecture: network programming Socket abstracvon (important for assignment #1) Read Chapter 1 of the Peterson/Davie book Skim the online reference material on sockets (Re)familiarize yourself with C programming 47