COS 461: Computer Networks Spring 2009 (MW 1:30-2:50 in CS 105) Mike Freedman Teaching Assistants: Wyatt Lloyd and Jeff Terrace

Slides:



Advertisements
Similar presentations
COS 461: Computer Networks Spring 2011 Lectures: MW 10-10:50am in Bowen 222 Prof. Mike Freedman Precepts: F 10-10:50am, 11-11:50am Preceptors: Matvey Arye,
Advertisements

Copyright 1999, S.D. Personick. All Rights Reserved. Telecommunications Networking II Lecture 32 Transmission Control Protocol (TCP) Ref: Tanenbaum pp:
CPSC 441: Intro, UDP1 Transport Layer Instructor: Carey Williamson Office: ICT Class Location:
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 OSI Transport Layer Network Fundamentals – Chapter 4.
Network Layer Packet Forwarding IS250 Spring 2010
1 COS 461: Computer Networks Spring 2006 (MW 1:30-2:50 in Friend 109) Jennifer Rexford Teaching Assistant: Mike Wawrzoniak
CSE 486/586, Spring 2012 CSE 486/586 Distributed Systems The Internet in 2 Hours: The First Hour Steve Ko Computer Sciences and Engineering University.
1 COS 461: Computer Networks Spring 2008 (MW 1:30-2:50 in CS 105) Jennifer Rexford Teaching Assistants: Sunghwan Ihm and Yaping Zhu
COS 461: Computer Networks Jennifer Rexford Lectures: MW 10-10:50am in Architecture N101 Preceptors: Rob Kiefer, Xiaozhou Li, and Peng Sun Precepts: F.
CPSC 441: Intro, UDP1 Instructor: Anirban Mahanti Office: ICT Class Location: ICT 121 Lectures: MWF 12:00 – 12:50 Notes.
Internet Routing COS 598A Jennifer Rexford Tuesdays/Thursdays 11:00am-12:20pm.
ECS152BXin Liu 1 ECS 152B Computer Networks Fall 2003 Prof. Xin Liu
IP-UDP-RTP Computer Networking (In Chap 3, 4, 7) 건국대학교 인터넷미디어공학부 임 창 훈.
Gursharan Singh Tatla Transport Layer 16-May
What Can IP Do? Deliver datagrams to hosts – The IP address in a datagram header identify a host IP treats a computer as an endpoint of communication Best.
Process-to-Process Delivery:
Lect3..ppt - 09/12/04 CIS 4100 Systems Performance and Evaluation Lecture 3 by Zornitza Genova Prodanoff.
1 Transport Layer Computer Networks. 2 Where are we?
TCP/IP Essentials A Lab-Based Approach Shivendra Panwar, Shiwen Mao Jeong-dong Ryoo, and Yihan Li Chapter 0 TCP/IP Overview.
TELE202 Lecture 9 Internet Protocols (1) 1 Lecturer Dr Z. Huang Overview ¥Last Lecture »Congestion control »Source: chapter 12 ¥This Lecture »Internet.
What is a Protocol A set of definitions and rules defining the method by which data is transferred between two or more entities or systems. The key elements.
FTP (File Transfer Protocol) & Telnet
Network Technologies (TCP/IP Suite) Tahir Azim
Chapter 1: Introduction to Web Applications. This chapter gives an overview of the Internet, and where the World Wide Web fits in. It then outlines the.
1.1 What is the Internet What is the Internet? The Internet is a shared media (coaxial cable, copper wire, fiber optics, and radio spectrum) communication.
CSx760 Computer Networks1 Introduction to Network Protocols Kang Li.
COS 461: Computer Networks Mike Freedman Spring 2013 Lectures: MW 10-10:50am in Architecture N101 Preceptors: Aaron Blankstein, Scott Erickson, Naga Katta.
CSE 486/586, Spring 2014 CSE 486/586 Distributed Systems The Internet in 2 Hours: The First Hour Steve Ko Computer Sciences and Engineering University.
TCP/IP Essentials A Lab-Based Approach Shivendra Panwar, Shiwen Mao Jeong-dong Ryoo, and Yihan Li Chapter 5 UDP and Its Applications.
Introduction to Networks CS587x Lecture 1 Department of Computer Science Iowa State University.
1 Introduction. 2 Goals for Today’s Class Course overview –Goals of the course –Structure of the course –Learning the material –Course grading –Academic.
Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 17 This presentation © 2004, MacAvon Media Productions Multimedia and Networks.
TCOM 509 – Internet Protocols (TCP/IP) Lecture 04_a Transport Protocols - UDP Instructor: Dr. Li-Chuan Chen Date: 09/22/2003 Based in part upon slides.
Fall 2005Computer Networks20-1 Chapter 20. Network Layer Protocols: ARP, IPv4, ICMPv4, IPv6, and ICMPv ARP 20.2 IP 20.3 ICMP 20.4 IPv6.
Fundamentals of Computer Networks ECE 478/578 Lecture #19: Transport Layer Instructor: Loukas Lazos Dept of Electrical and Computer Engineering University.
TCP/IP Transport and Application (Topic 6)
Computer Networking. 2 Outline 3 Objectives Understand the state-of-the-art in network protocols, architectures and applications Understand how networking.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 2.5 Internetworking Chapter 25 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
1 The Internet and Networked Multimedia. 2 Layering  Internet protocols are designed to work in layers, with each layer building on the facilities provided.
Copyright 2002, S.D. Personick. All Rights Reserved.1 Telecommunications Networking II Topic 20 Transmission Control Protocol (TCP) Ref: Tanenbaum pp:
TCOM 509 – Internet Protocols (TCP/IP) Lecture 03_b Protocol Layering Instructor: Dr. Li-Chuan Chen Date: 09/15/2003 Based in part upon slides of Prof.
Dr. John P. Abraham Professor UTPA
Internet Protocol ECS 152B Ref: slides by J. Kurose and K. Ross.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
1 CS 4396 Computer Networks Lab TCP/IP Networking An Example.
Networking Basics CCNA 1 Chapter 11.
15-744: Computer Networking L-1 Intro to Computer Networks.
Transport Layer3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross Addison-Wesley,
CMSC 23300/33300 Computer Networks Spring 2006 (Tu, Th 1:30-2:50 in Ry 251) Lecturer: Ian Foster Teaching Assistants: George Kuan, Ido Rosen, Ioan Raicu,
Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 17 This presentation © 2004, MacAvon Media Productions Multimedia and Networks.
1 CDA 4527 Computer Communication Networking (not “analysis”) Prof. Cliff Zou School of Electrical Engineering and Computer Science University of Central.
1 CSE524: Lecture 2 Internet protocols in a nutshell (Protocols in practice)
Transport Protocols.
ECE 374: Computer Networks & Internet Introduction Spring 2015 Prof. Michael Zink.
1 CNT 4704 Analysis of Computer Communication Networks Cliff Zou Department of Electrical Engineering and Computer Science University of Central Florida.
ECE 374: Computer Networks & Internet Introduction Spring 2012 Prof. Michael Zink.
Computer Networks CNT5106C
1 Network Architecture Section Network Architecture Challenge –Fill the gap between hardware capabilities and application expectations, and to.
McGraw-Hill Chapter 23 Process-to-Process Delivery: UDP, TCP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
CSE 486/586, Spring 2013 CSE 486/586 Distributed Systems The Internet in 2 Hours: The First Hour Steve Ko Computer Sciences and Engineering University.
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
COS 461: Computer Networks Mike Freedman Spring 2014 Lectures: MW 10-10:50am in CS 104 Lead Preceptor: Dr. Sandra Batista Preceptors: Marcela Melara, Scott.
What is a Protocol A set of definitions and rules defining the method by which data is transferred between two or more entities or systems. The key elements.
Introduction to TCP/IP networking
Layered Architectures
Multimedia and Networks
Process-to-Process Delivery:
Process-to-Process Delivery: UDP, TCP
Presentation transcript:

COS 461: Computer Networks Spring 2009 (MW 1:30-2:50 in CS 105) Mike Freedman Teaching Assistants: Wyatt Lloyd and Jeff Terrace 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 allocation – Naming 2

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

Structure of the Course (1 st Half) Start at the top – Sockets: how applications view the Internet – Protocols: essential 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 routing architecture (the “inter” in Internet) – Intradomain and interdomain routing protocols Building applications – DNS and HTTP – Content-distribution networks – Peer-to-peer and distributed hash tables – P2P Applications: BitTorrent, etc. – Multimedia streaming Other approaching to building networks – Delay /disruption tolerant networks – Multicast, anycast, … 5

Learning the Material: People Lecture (Prof. Mike Freedman) – When: MW 1:30-2:50 in Computer Science 105 – Slides available online at course Web site – Office hours (room 208) by appointment – mfreed+cos461 at cs.princeton.edu Teaching Assistants – Wyatt Lloyd Office hours: Mon 3-4pm, Tue 4-5pm (CS 003) wlloyd+cos461 at cs.princeton.edu – Jeff Terrace Office hours: Wed 3-4pm, Thu 1-2pm (CS 001B) jterrace+cos461 at cs.princeton.edu Main cos461-staff at lists.cs.princeton.edu 6

Learning the Material: Mailing List Mailing list – If you’re enrolled, you should be on it – cos461 at lists.cs.princeton.edu – Sign up: Read often – Good place to ask questions – But do not post your code Reply, too – Good place to answer questions (participation!) 7

Learning the Material: Books Required textbook – Computer Networks: A Systems Approach (4th edition), by Peterson and Davie [Okay to use the 3 rd edition] – 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 edition), by Kurose and Ross Computer Networks (4th edition), by Tanenbaum – Network programming references TCP/IP Illustrated, Volume 1: The Protocols, by Stevens Unix Network Programming, Volume 1: The Sockets Networking API (3rd Edition), by Stevens, Fenner, & Rudolf Online resources – E.g. on socket programming 8

Grading and Schedule Assignments (10% each) – 95% 3 hours, 75% two day late, 50% two days late – One free late day during semester Two exams (40% total) – Midterm exam in week six (20%) – Final exam during exam period (20%) Class participation (10%) – In lecture – On the listserv 9

Programming Assignments Five assignments (with target due dates) – Introduction to sockets (Sun Feb 15) – HTTP proxy (Sun Mar 8) – IP router (Sun Apr 12) – Firewall (Sun Apr 26) – Reliable transport (Tue May 12) – no late accepted Last three: Stanford Virtual Network System – Constructs virtual network topologies that integrate directly into physical networks – Traffic forwarded to your program, running in user space – 10

Facilities 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 – – Request a “class account” 11

Facilities for Programming Other option: 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 Suggestion: test access this week – Logging in to the FC 010 cluster – Writing and running “Hello World” in C Submitting assignments – Using Blackboard – More details coming soon! 12

Graduate Students: Two Choices Pick one of two options – 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 creative process much like composition. You must reach your own understanding of the problem and discover a path to its solution. During this time, discussions with friends are encouraged. However, when the time 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 question 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. Letting someone copy your program or using someone else's code in any form is a violation of academic regulations. "Using someone else's code" includes using solutions or partial solutions 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 semantics Layering – Standing on the shoulders of giants – A key to managing complexity Resource allocation – Dividing scare resources among competing parties – Memory, link bandwidth, wireless spectrum, paths, … – Distributed vs. centralized algorithms Naming – What to call computers, services, protocols, … 16

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

Okay, So This is Getting 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 identify yourself? – Name? Social security number? How to represent dates and time? – Time, day, month, year? In what time zone? – Number of seconds since Jan 1, 1970? What granularities of times to use? – Any possible start time and meeting duration? – Multiples of five minutes? How to represent the messages? – Strings? Record with name, start time, and duration? What do you do if you don’t get a response? – Ask again? Reply again? 20

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

Example: IP Packet 22 4-bit Version 4-bit Header 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 20-byteheader

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

Example: Transmission Control Protocol Communication service (socket) – Ordered, reliable byte stream – Simultaneous transmission in both directions 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 – Congestion control to adapt sending rate to network load 24 sourcenetworkdestination TCP connection

Protocol Standardization Communicating hosts speaking the same protocol – Standardization to enable multiple implementations – Or, the same folks have to write all the software Standardization: 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 De facto standards: same folks writing the code – P2P file sharing, BitTorrent, Skype, Flash videos (RTMP) – … 25

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 interaction – Hides implementation details – Layers can change without disturbing other layers 26 Link hardware Host-to-host connectivity Application-to-application channels Application

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

The Internet Protocol Suite 28 UDPTCP Data Link Physical Applications The Hourglass Model Waist The waist facilitates interoperability FTPHTTPTFTPNV TCPUDP IP NET 1 NET 2 NET n …

Layer Encapsulation 29 Get index.html Connection ID Source/Destination Link Address User AUser B

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

Protocol Demultiplexing Multiple choices at each layer 31 FTPHTTPTFTPNV TCPUDP IP NET 1 NET 2 NET n … TCP/UDPIP Port Number Network Protocol Field Type Field

Demultiplexing: Port Numbers Differentiate between multiple transfers – Knowing source and destination host is not enough – Need an id for each transfer between the hosts Use well-known ports to discover a particular service – E.g., HTTP server running on port 80 – E.g., FTP server running on port 21 – But how differentiate if server always port 80? 32 HTTP transfers FTP transfer

Is Layering Harmful? Layer N may duplicate lower level functionality – E.g., error recovery to retransmit lost data Layers may need same information – E.g., timestamps, 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 – Sometimes more header bytes than actual content 33

Resource Allocation: 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”? 34

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

What if the Data is Out of Order? 36 Solution: Add Sequence Numbers Problem: Out of Order GETx.htindeml GET x.htindeml GET index.html ml4inde2x.ht3GET1

Resource Allocation: Congestion Control What if too many folks are sending data? – Senders agree to slow down their sending rates – … in response to their packets getting dropped The essence of TCP congestion control – Key to preventing congestion collapse of the Internet 37

Transmission Control Protocol Flow control: window-based – Sender limits number of outstanding bytes (window size) – Receiver window ensures data does not overflow receiver Congestion control: adapting to packet losses – Congestion window tries to avoid overloading the network (increase with successful delivery, decrease with loss) – TCP connection starts with small initial congestion window time congestion window slow start congestion avoidance

Naming: Domain Name System (DNS) Properties of DNS – Hierarchical name space divided into zones – Translation of names to/from IP addresses – Distributed over a collection of DNS servers Client application – Extract server name (e.g., from the URL) – Invoke system call to trigger DNS resolver code E.g., gethostbyname() on Server application – Extract client IP address from socket – Optionally invoke system call to translate into name E.g., gethostbyaddr() on “ ” 39

Domain Name System comeduorgac uk zw arpa unnamed root bar westeast foomy ac cam usr in- addr generic domainscountry domains my.east.bar.edu usr.cam.ac.uk /24

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

Conclusions Course objectives – Network programming, how the Internet works, and key concepts in networking Key concepts in networking – Protocols, layers, resource allocation, and naming Next lecture: network programming – Socket abstraction (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 42