CE 443: Computer Networks

Similar documents
Computer Networks. Fall 2012 (M 6:15-9:00 in Jbarry 201B) Mirela Damian.

15-744: Computer Networking. L-1 Intro to Computer Networks

Outline : Computer Networking. Objectives. Who s Who? Administrivia. Layering. L-1 Intro to Computer Networks

416 Distributed Systems. Networks review; Day 1 of 2 Jan 5 + 8, 2018

CS 640: Introduction to Computer Networks. Today s Lecture. Page 1

Page 1. Goals for Today" What Is A Protocol?" CS162 Operating Systems and Systems Programming Lecture 10. Protocols, Layering and e2e Argument"

EE 122: Introduction To Communication Networks. Some Questions & Answers

Internet Design Principles

Goals for Today s Class. EE 122: Networks & Protocols. What Global (non-digital) Communication Network Do You Use Every Day?

COS 318: Internetworking

Lecture 2: Links and Signaling

Distributed Systems /640

u 1960s: ARPAnet - Defense Advanced Research Project l Research project into packet switching networks u 1970s: ARPA needed:

Introduction to Networks

Announcements Computer Networking. What is the Objective of the Internet? Today s Lecture

IP Packet Switching. Goals of Todayʼs Lecture. Simple Network: Nodes and a Link. Connectivity Links and nodes Circuit switching Packet switching

The Internet. Overview. Network building blocks

CS457 Transport Protocols. CS 457 Fall 2014

Page 1. CS162 Operating Systems and Systems Programming Lecture 22. Networking III. Automatic Repeat Request

Welcome to: Computer Science 457 Networking and the Internet. Fall 2014 Dr. Joseph Gersch

CSCI-GA Operating Systems. Networking. Hubertus Franke

Transport Protocols Reading: Sections 2.5, 5.1, and 5.2

Welcome to: Computer Science 457 Networking and the Internet. Fall 2016 Indrajit Ray

Networking Overview. CS Computer Security Profs. Vern Paxson & David Wagner

CPSC156a: The Internet Co-Evolution of Technology and Society. Lecture 4: September 16, 2003 Internet Layers and the Web

ICS 351: Networking Protocols

Goal of Today s Lecture. EE 122: Designing IP. The Internet Hourglass. Our Story So Far (Context) Our Story So Far (Context), Con t

Introduction to TCP/IP networking

IP - The Internet Protocol. Based on the slides of Dr. Jorg Liebeherr, University of Virginia

Lecture 2: Layering & End-to-End

cs144 Midterm Review Fall 2010

Need For Protocol Architecture

Announcements. No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6

Multiple unconnected networks

Network Layer (1) Networked Systems 3 Lecture 8

No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6

Internet. 1) Internet basic technology (overview) 3) Quality of Service (QoS) aspects

Network Architecture COS 461: Computer Networks

Layering and Addressing CS551. Bill Cheng. Layer Encapsulation. OSI Model: 7 Protocol Layers.

PLEASE READ CAREFULLY BEFORE YOU START

Need For Protocol Architecture

Lecture 3: Modulation & Layering"

Announcements. IP Forwarding & Transport Protocols. Goals of Today s Lecture. Are 32-bit Addresses Enough? Summary of IP Addressing.

The Internet Protocol (IP)

EE 122: IP Forwarding and Transport Protocols

CompSci 356: Computer Network Architectures. Lecture 8: Spanning Tree Algorithm and Basic Internetworking Ch & 3.2. Xiaowei Yang

CS 4390 Computer Networks. Transport Services and Protocols

L1: Introduction. Hui Chen, Ph.D. Dept. of Engineering & Computer Science Virginia State University Petersburg, VA 23806

CCNA 1 v3.11 Module 11 TCP/IP Transport and Application Layers

Midterm Review. EECS 489 Computer Networks Z. Morley Mao Monday Feb 19, 2007

Transport Protocols Reading: Sections 2.5, 5.1, and 5.2. Goals for Todayʼs Lecture. Role of Transport Layer

CSE/EE 461 Introduction to Computer Communication Networks. Why Study Networks?

Internet Applications and the Application Layer Material from Kurose and Ross, Chapter 2: The Application Layer

Lecture 3 Protocol Stacks and Layering

CIS 551 / TCOM 401 Computer and Network Security. Spring 2006 Lecture 16

User Datagram Protocol

Networking Basics. EC512 Spring /15/2015 EC512 - Prof. Thomas Skinner 1

Chapter 09 Network Protocols

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

Chapter 2 - Part 1. The TCP/IP Protocol: The Language of the Internet

CIS 551 / TCOM 401 Computer and Network Security

The Transmission Control Protocol (TCP)

Transport Protocols Reading: Sections 2.5, 5.1, and 5.2

Layered Architecture

User Datagram Protocol (UDP):

Lecture 16: Network Layer Overview, Internet Protocol

CS 43: Computer Networks. Layering & HTTP September 7, 2018

Internet Control Message Protocol (ICMP)

TCP/IP Networking. Training Details. About Training. About Training. What You'll Learn. Training Time : 9 Hours. Capacity : 12

PLEASE READ CAREFULLY BEFORE YOU START

UDP and TCP. Introduction. So far we have studied some data link layer protocols such as PPP which are responsible for getting data

CHAPTER-2 IP CONCEPTS

Computer Networks. More on Standards & Protocols Quality of Service. Week 10. College of Information Science and Engineering Ritsumeikan University

Announcements. Designing IP. Our Story So Far (Context) Goals of Today s Lecture. Our Story So Far (Context), Con t. The Internet Hourglass

CS 3516: Advanced Computer Networks

CS 204: Advanced Computer Networks

RMIT University. Data Communication and Net-Centric Computing COSC 1111/2061. Lecture 2. Internetworking IPv4, IPv6

IP - The Internet Protocol

Fundamental Questions to Answer About Computer Networking, Jan 2009 Prof. Ying-Dar Lin,

COMS3200/7201 Computer Networks 1 (Version 1.0)

CS 455: INTRODUCTION TO DISTRIBUTED SYSTEMS [NETWORKING] Frequently asked questions from the previous class surveys

CCNA 1 Chapter 7 v5.0 Exam Answers 2013

Transport Layer. Chapter 3: Transport Layer

EEC-484/584 Computer Networks. Lecture 16. Wenbing Zhao

Chapter 12 Network Protocols

Communication Networks ( ) / Fall 2013 The Blavatnik School of Computer Science, Tel-Aviv University. Allon Wagner

Introduction to Information Science and Technology 2017 Networking II. Sören Schwertfeger 师泽仁

TSIN02 - Internetworking

Outline. Inter-Process Communication. IPC across machines: Problems. CSCI 4061 Introduction to Operating Systems

Computer Networks. General Course Information. Addressing and Routing. Computer Networks 9/8/2009. Basic Building Blocks for Computer Networks

NETWORK PACKET ANALYSIS PROGRAM

ECE 158A: Lecture 7. Fall 2015

Advanced Network Design

14-740: Fundamentals of Computer and Telecommunication Networks

CSE 461: Protocols and Layering. This Lecture. 1. A top-down look at the Internet 2. Mechanics of protocols and layering 3. The OSI/Internet models

Where we are in the Course

Transport Layer (TCP/UDP)

UNIT IV -- TRANSPORT LAYER

Different Layers Lecture 20

PLEASE READ CAREFULLY BEFORE YOU START

Transcription:

CE 443: Computer Networks Acknowledgments: Lecture slides are from Computer networks course thought by Jennifer Rexford at Princeton University. When slides are obtained from other sources, a a reference will be noted on the bottom of that slide. A full list of references is provided on the last slide.

Goals for Todayʼs Class Overview Goals of the course Structure of the course Course grading Key concepts in data networking Protocols Layering Resource allocation Naming 3

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

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, wireless, ) 5

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 Web and content-distribution networks E-mail Peer-to-peer file sharing Multimedia streaming and voice-over-ip Other approaching to building networks Circuit switching (e.g., ATM, MPLS, ) More on wireless networks, multicast, 6

Learning the Material: Mailing List Mailing list E-mail ce443@lists.ce.sharif.edu Sign up instruction on course webpage Read often Good place to ask questions But please do not post your solutions Reply, too Good place to answer questions 7

Learning the Material: Books Required textbook Computer Networks: A Systems Approach (4th edition), by Peterson and Davie Optional textbooks 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 (Tentative) Quiz 10% Assignments 40% Midterm 20% Final 30% 9

Policies Late Homework One day late will cost you 25%, two days 50%, and three days 75%. No homework will be accepted after the third day. Cellphones Please turn them off before entering class. Cheating and Copying First time you are caught you will get a zero for the task at hand. Second time you are caught you will fail the course. Providing your assignment to someone else is considered cheating. 10

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

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, 12

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 at 1.5 hours starting at at 1:30pm 3:00pm on on 8, 8, 2006? 4:30pm on February 8, 2006? 2006? I can t. I can t. Yes! Specifying the messages that go back and forth And an understanding of what each party is doing 13

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

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. Student #2: Book me for 1.5 hours at 1:15pm on Feb 9. 15

Specifying the Details How to identify yourself? Name? Student ID? 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? 16

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

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 20-byte header 32-bit Source IP Address 32-bit Destination IP Address Options (if any) Payload 18

IP: Best-Effort Packet Delivery 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 19

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 TCP connection source network destination 20

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 http://www.ietf.org De facto standards: same folks writing the code P2P file sharing, Skype, <your protocol here> 21

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 Application Application-to-application channels Host-to-host connectivity Link hardware 22

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 23

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 24

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

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 26

Protocol Demultiplexing Multiple 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 27

Demultiplexing: Port Numbers Differentiate between multiple transfers Knowing source and destination host is not enough Need an id for each transfer between the hosts Specify a particular service running on a host E.g., HTTP server running on port 80 E.g., FTP server running on port 21 HTTP transfers FTP transfer 28

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 Headers start to get really big Sometimes more header bytes than actual content 29

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 30

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 31

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 32

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 33

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 congestion window slow start congestion avoidance time 34

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 www.cs.sharif.edu Server application Extract client IP address from socket Optionally invoke system call to translate into name E.g., gethostbyaddr() on 12.34.158.5 35

Domain Name System unnamed root com edu org ac uk zw sharif generic domains country domains ac west ce cam foo lists lists.ce.sharif.edu usr usr.cam.ac.uk

DNS Resolver and Local DNS Server 3 Root server 4 Application 1 10 DNS resolver 2 DNS query DNS response 9 DNS cache Local DNS server 8 5 6 7 Top-level domain server Second-level domain server Caching based on a time-to-live (TTL) assigned by the DNS server responsible for the host name to reduce latency in DNS translation. 37

Conclusions Course objectives How the Internet works, key concepts in networking, and Network programming Key concepts in networking Protocols, layers, resource allocation, and naming Next lecture: Read Chapter 1 of the Peterson/Davie book Skim the online reference material on sockets (Re)familiarize yourself with C programming 38