1 Lecture 2 Protocol Stacks David Andersen School of Computer Science Carnegie Mellon University 15-441 Networking, Spring 2005

Slides:



Advertisements
Similar presentations
Chapter 17 Networking Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E William.
Advertisements

1 CS 640: Introduction to Computer Networks Aditya Akella Lecture 2 Layering, Protocol Stacks, and Standards.
Data and Computer Communications Eighth Edition by William Stallings Lecture slides by Lawrie Brown Chapter 2 – Protocol Architecture, TCP/IP, and Internet-Based.
Data and Computer Communications Eighth Edition by William Stallings Lecture slides by Lawrie Brown Chapter 2 – Protocol Architecture, TCP/IP, and Internet-Based.
Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Application Layer – Lecture.
EEC-484/584 Computer Networks Lecture 3 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
EEC-484/584 Computer Networks Lecture 3 Wenbing Zhao
1 Lecture 2 Protocol Stacks and Layering David Andersen School of Computer Science Carnegie Mellon University Networking, Spring 2008
EE 4272Spring, 2003 EE4272: Computer Networks Instructor: Tricia Chigan Dept.: Elec. & Comp. Eng. Spring, 2003.
Introduction to the Application Layer Computer Networks Computer Networks Spring 2012 Spring 2012.
EEC-484/584 Computer Networks Lecture 3 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Introduction© Dr. Ayman Abdel-Hamid, CS4254 Spring CS4254 Computer Network Architecture and Programming Dr. Ayman A. Abdel-Hamid Computer Science.
ECS152BXin Liu 1 ECS 152B Computer Networks Fall 2003 Prof. Xin Liu
1 Computer Networks Transport Layer Protocols. 2 Application-layer Protocols Application-layer protocols –one “piece” of an app –define messages exchanged.
Dr. Philip Cannata 1 Principles of Network Applications.
Introduction 1 Lecture 5 Application Layer slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science & Engineering Department.
Chapter 2 Application Layer Computer Networking: A Top Down Approach, 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April A note on the use.
Protocols and the TCP/IP Suite Chapter 4. Multilayer communication. A series of layers, each built upon the one below it. The purpose of each layer is.
Process-to-Process Delivery:
Chapter 2, slide: 1 CS 372 – introduction to computer networks* Monday June 28 Announcements: r Lab 1 is due today r Lab 2 is posted today and is due next.
2: Application Layer1 Chapter 2 Application Layer These slides derived from Computer Networking: A Top Down Approach, 6 th edition. Jim Kurose, Keith Ross.
Chapter 17 Networking Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E William Stallings.
Data and Computer Communications Eighth Edition by William Stallings Lecture slides by Lawrie Brown Chapter 2 – Protocol Architecture, TCP/IP, and Internet-Based.
Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
OSI AND TCP/IP MODELS. Outline Introduction OSI Model TCP/IP Model IPv4 vs. IPv6.
Review: – computer networks – topology: pair-wise connection, point-to-point networks and broadcast networks – switching techniques packet switching and.
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.
1: Introduction1 Internet History r 1961: Kleinrock - queueing theory shows effectiveness of packet- switching r 1964: Baran - packet- switching in military.
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.
1 CS 640: Introduction to Computer Networks Aditya Akella Lecture 2 Layering, Protocol Stacks, and Standards.
Networks – Network Architecture Network architecture is specification of design principles (including data formats and procedures) for creating a network.
What makes a network good? Ch 2.1: Principles of Network Apps 2: Application Layer1.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Network Services Networking for Home and Small Businesses – Chapter 6.
© McLean HIGHER COMPUTER NETWORKING Lesson 1 – Protocols and OSI What is a network protocol Description of the OSI model.
Introduction to Networks CS587x Lecture 1 Department of Computer Science Iowa State University.
Data and Computer Communications Chapter 2 – Protocol Architecture, TCP/IP, and Internet-Based Applications.
Data Communications and Computer Networks Chapter 3 CS 3830 Lecture 12 Omar Meqdadi Department of Computer Science and Software Engineering University.
Fundamentals of Computer Networks ECE 478/578 Lecture #19: Transport Layer Instructor: Loukas Lazos Dept of Electrical and Computer Engineering University.
Sockets process sends/receives messages to/from its socket
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.
The Transport Layer application transport network data link physical application transport network data link physical application transport network data.
1 End-user Protocols, Services and QoS. 2 Layering: logical communication application transport network link physical application transport network link.
Computer Security Workshops Networking 101. Reasons To Know Networking In Regard to Computer Security To understand the flow of information on the Internet.
1 Lecture 3 Protocol Stacks and Layering Hui Zhang School of Computer Science Carnegie Mellon University Networking, Fall 2007
Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
William Stallings Data and Computer Communications
1 Chapters 2 & 3 Computer Networking Review – The TCP/IP Protocol Architecture.
Net 221D:Computer Networks Fundamentals
1 Protocol Layering Myungchul Kim Tel:
MULTIPLEXING/DEMULTIPLEXING, CONNECTIONLESS TRANSPORT.
Peter A. Steenkiste, SCS, CMU 1 Lecture 2 Protocol Stacks Peter Steenkiste David Eckhardt School of Computer Science Carnegie Mellon University
Advanced Higher Computing Computer Networking Topic 1: Network Protocols and Standards.
The OSI Model. Understanding the OSI Model In early 1980s, manufacturers began to standardize networking so that networks from different manufacturers.
1 Network Communications A Brief Introduction. 2 Network Communications.
Introduction 1-1 source application transport network link physical HtHt HnHn M segment HtHt datagram destination application transport network link physical.
Communication Networks NETW 501 Tutorial 2
2: Transport Layer 11 Transport Layer 1. 2: Transport Layer 12 Part 2: Transport Layer Chapter goals: r understand principles behind transport layer services:
CSEN 404 Transport Layer I Amr El Mougy Lamia Al Badrawy.
Data and Computer Communications Chapter 2 – Protocol Architecture, TCP/IP, and Internet-Based Applications.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Lecture 3 : Network Architectures 1.
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.
Networking Using the OSI Model.
Introduction to Networks
Introduction to Networks
Chapter 2 Introduction Application Requirements VS. Transport Services
Process-to-Process Delivery:
Network Architecture Models
Computer Networking A Top-Down Approach Featuring the Internet
Lecture 2 Protocol Stacks and Layering
Presentation transcript:

1 Lecture 2 Protocol Stacks David Andersen School of Computer Science Carnegie Mellon University Networking, Spring

2 Last Tuesday l The Big Picture »Goals: –Efficiency –“ilities” (scalability, manageability, availability), –Ease of creating applications »Challenges: –Scale –Geography –Heterogeneity (** today’s focus!) l A few specific details: »Circuits vs. packets »Little bit about routing »Service model and how to construct services (** today!)

3 Today’s Lecture l Last time: “Big picture” l Today: »General architectural principles for networks »Introduces a few concrete models & examples l Where we are going: »Thursday: Application examples (still high level) »After that: Burrowing into the details, ground up l Today’s specifics: »What is a protocol. »Protocol stacks. »Some history. »Standards organizations. »Application layer.

4 Protocols l Recall goals: »Interoperability »Reuse »Hiding underlying details

5 Protocols l An agreement between parties on who communication should take place. l Protocols may have to define many aspects of the communication. l Syntax: »Data encoding, language, etc. l Semantics: »Error handling, termination, ordering of requests, etc. l Protocols at hardware, software, all levels! l Example: Buying airline ticket by typing. l Syntax: English, ascii, lines delimited by “\n” Friendly greeting Muttered reply Destination? Pittsburgh Thank you

6 More on Protocols l Protocols are the key to interoperability. »Networks are very heterogenous: »The hardware/software of communicating parties are often not built by the same vendor »Yet they can communicate because they use the same protocol l Protocols exist at many levels. »Application level protocols, e.g. access to mail, distribution of bboards, web access,.. »Protocols at the hardware level allow two boxes to communicate over a link, e.g. the Ethernet protocol Computer: x86 Ethernet: 3com Routers: cisco, etc. App: Hardware Hardware/link Network Application

7 Interfaces l Each protocol offers an interface to its users, and expects one from the layers on which it builds »Syntax and semantics strike again –Data formats –Interface characteristics, e.g. IP service model l Protocols build upon each other »Add value –E.g., a reliable protocol running on top of IP »Reuse –E.g., OS provides TCP, so apps don’t have to rewrite

8 Too Many Network Components Application Operating System Protocol Software Computer Links Router Hardware Router Software (many protocols) Bridge HW/SW Application Operating System Computer Network Interface

9 Too many components 2 l Links: copper, fiber, air, carrier pidgeon l Running ethernet, token ring, SONET, FDDI l Routers speaking BGP, OSPF, RIP, … l Hosts running FreeBSD, Linux, Windows, MacOS, … l People using Mozilla, Explorer, Opera, … l and it changes all the time l Phew! l Protocols hide this stuff with simple abstractions.

10 Looking at protocols l Hop by hop / link protocols »Ethernet l End-to-end protocols »TCP, apps, etc. l Management / “control plane” protocols »Routing, etc. –Can be either link or e2e themselves –Definition somewhat vague. l Standards »File formats, etc. l E.g., JPEG, MPEG, MP3, … Categories not solid / religious, just a way to view things.

11 Protocol and Service Levels Application End-to-end Core Network

12 A Layered Network Model The Open Systems Interconnection (OSI) Model. Application Presentation Session Transport Network Data link Physical Network Data link Physical Application Presentation Session Transport Network Data link Physical

13 OSI Motivation l Standard way of breaking up a system in a set of components, but the components are organized as a set of layers. »Only horizontal and vertical communication »Components/layers can be implemented and modified in isolation l Each layer offers a service to the higher layer, using the services of the lower layer. l “Peer” layers on different systems communicate via a protocol. »higher level protocols (e.g. TCP/IP, Appletalk) can run on multiple lower layers »multiple higher level protocols can share a single physical network l “It’s only a model!” - TCP/IP has been crazy successful, and it’s not based on a rigid OSI model. But the OSI model has been very successful at shaping thought.

14 OSI Functions l (1) Physical: transmission of a bit stream. l (2) Data link: flow control, framing, error detection. l (3) Network: switching and routing. l (4) Transport: reliable end to end delivery. l (5) Session: managing logical connections. l (6) Presentation: data transformations. l (7) Application: specific uses, e.g. mail, file transfer, telnet, network management. Multiplexing takes place in multiple layers

15 Example: Sending a Web Page Http hdr Web page TCP header TCP header... Application payload Application payload Application Presentation Session Transport Network Data link Physical

16 Ethernet preamble A TCP / IP / Packet MAC header LLC / SNAP header IP header TCP header Data Application Presentation Session Transport Network Data link Physical Homework explores tradeoffs in header sizes, etc., with different applications

17 Multiplexing and Demultiplexing l There may be multiple implementations of each layer. »How does the receiver know what version of a layer to use? l Each header includes a demultiplexing field that is used to identify the next layer. »Filled in by the sender »Used by the receiver l Multiplexing ooccurs at multiple layers. E.g., IP, TCP, … IP TCP IP TCP V/HL TOS Length ID Flags/Offset TTL Prot. H. Checksum Source IP address Destination IP address Options..

18 Different Sources of Components l Application: web server/browser, mail, distributed game,.. l Presentation/session. »Often part of application »Sometimes a library l Transport/network. »Typically part of the operating system l Datalink. »Often written by vendor of the network interface hardware l Physical. »Hardware: card and link Application Presentation Session Transport Network Data link Physical

19 Limitations of the Layered Model l Some layers are not always cleanly separated. »Inter-layer dependencies in implementations for performance reasons »Some dependencies in the standards (header checksums) l Higher layers not always well defined. »Session, presentation, application layers l Lower layers have “sublayers”. »Usually very well defined (e.g., SONET protocol) l Interfaces are not really standardized. »It would be hard to mix and match layers from independent implementations, e.g., windows network apps on unix (w/out compatability library) »Many cross-layer assumptions, e.g. buffer management

20 The TCP/IP Model Application (plus libraries) Application (plus libraries) TCP/UDP IP/ICMP TCP/UDP IP/ICMP Data link Physical Application Presentation Session Transport Network Data link Physical

21 Local Area Network Protocols IEEE 802 standards “refine” the OSI data link layer. Application Presentation Session Transport Network Data link Physical LLC MAC Physical Upper Layer Protocols link service access points

Internetworking Options repeaterbridge (e.g. 802 MAC) router physical data link network gateway

23 The Internet Protocol Suite Application Presentation Session Transport Network Data link Physical UDPTCP Data Link Physical Applications Presentation Session The Hourglass Model Waist The waist facilitates Interoperability.

24 Some History: The Early Days l Early packet switching networks (61-72). »Definition of packet switching »Early DARPA net: up to tens of nodes –single network –discovery of “interesting” applications l Internetworking (72-80). »Multiple networks with inter-networking: networks are independent, but need some rules for interoperability »Key concepts: best effort service, “stateless” routers, decentralized control (very different from telephones!) »Basis for Internet: TCP, IP, congestion control, DNS, … »Rapid growth: 10 to hosts in 10 years –Driven by NSF net, research communigy

25 Recent History: Commercialization l Industry interest in networking encourages first commercial network deployment. »In part also encouraged by NSFNET policies l Introduction of the Web makes networks more accessible. »Killer application »Good user interface that is accessible to anybody »Network access on every desktop and in every home »Shockingly recent , caught on in ‘92 or so

26 Standardization l Key to network interoperability. l A priori standards. »Standards are defined first by a standards committee »Risk of defining standards that are untested or unnecessary »Standard may be available before there is serious use of the technology l De facto standards. »Standards is based on an existing systems »Gives the company that developed the base system a big advantage »Often results in competing “standards” before the official standard is established

27 Relevant Standardization Bodies l ITU-TS - Telecommunications Sector of the International Telecommunications Union. »government representatives (PTTs/State Department) »responsible for international “recommendations” l T1 - telecom committee reporting to American National Standards Institute. »T1/ANSI formulate US positions »interpret/adapt ITU standards for US use, represents US in ISO l IEEE - Institute of Electrical and Electronics Engineers. »responsible for many physical layer and datalink layer standards l ISO - International Standards Organization. »covers a broad area

28 The Internet Engineering Task Force l The Internet society. »Oversees the operations of the Internet l Internet Engineering Task Force. »decides what technology will be used in the Internet »based on working groups that focus on specific issues »encourages wide participation l Request for Comments. »document that provides information or defines standard »requests feedback from the community »can be “promoted” to standard under certain conditions –consensus in the committee –interoperating implementations »Project 1 will look at the Internet Relay Chat (IRC) RFC

29 Higher Level Standards l Many session/application level operations are relevant to networks. »encoding: MPEG, encryption,... »services: electronic mail, newsgroups, HTTP,... »electronic commerce,.... l Standards are as important as for “lower- level” networks: interoperability. »defined by some of the same bodies as the low-level standards, e.g. IETF

30 How do you select protocols? l Application layer »Client-server »Application requirements l Application level communication »TCP vs. UDP »Addressing l Application examples (Lecture 4). »ftp, http »End-to-end argument discussion

31 Applications and Application-Layer Protocols l Application: communicating, distributed processes »Running in network hosts in “user space” »Exchange messages to implement app »e.g., , file transfer, the Web l Application-layer protocols »One “piece” of an app »Define messages exchanged by apps and actions taken »Use services provided by lower layer protocols l Saw sockets API last time application transport network data link physical application transport network data link physical application transport network data link physical

32 Client-Server Paradigm Typical network app has two pieces: client and server application transport network data link physical application transport network data link physical Client: l Initiates contact with server (“speaks first”) l Typically requests service from server, l For Web, client is implemented in browser; for , in mail reader Server: l Provides requested service to client l e.g., Web server sends requested Web page, mail server delivers e- mail l (We’ll cover p2p at semester end) request reply

33 What Transport Service Does an Application Need? Data loss l Some applications (e.g., audio) can tolerate some loss l Other applications (e.g., file transfer, telnet) require 100% reliable data transfer Timing l Some applications (e.g., Internet telephony, interactive games) require low delay to be “effective” Bandwidth l Some applications (e.g., multimedia) require a minimum amount of bandwidth to be “effective” l Other applications (“elastic apps”) will make use of whatever bandwidth they get

34 User Datagram Protocol(UDP): An Analogy Example UDP applications Multimedia, voice over IP UDP l Single socket to receive messages l No guarantee of delivery l Not necessarily in-order delivery l Datagram – independent packets l Must address each packet Postal Mail l Single mailbox to receive letters l Unreliable l Not necessarily in-order delivery l Letters sent independently l Must address each reply

35 Transmission Control Protocol (TCP): An Analogy TCP l Reliable – guarantee delivery l Byte stream – in-order delivery l Connection-oriented – single socket per connection l Setup connection followed by data transfer Telephone Call l Guaranteed delivery l In-order delivery l Connection-oriented l Setup connection followed by conversation Example TCP applications Web, , Telnet

36 Transport Service Requirements of Common Applications no loss loss-tolerant no loss elastic audio: 5Kb-1Mb video:10Kb-5Mb same as above few Kbps elastic no yes, 100’s msec yes, few secs yes, 100’s msec yes and no file transfer web documents real-time audio/ video stored audio/video interactive games financial apps Application Data loss Bandwidth Time Sensitive l Interactions between layers are important. »persistent HTTP »encryption and compression »MPEG frame types. Loss & real-time video.

37 Server and Client TCP/UDP IP Ethernet Adapter Server TCP/UDP IP Ethernet Adapter Clients Server and Client exchange messages over the network through a common Socket API Socket API hardware kernel space user space ports

38 Readings l Read two papers on the motivations for the Internet architecture: »“End-to-end arguments in system design”, Saltzer, Reed, and Clark, ACM Transactions on Computer Systems, November »“The design philosophy of the DARPA Internet Protocols”, Dave Clark, SIGCOMM 88. l In-class discussion: »Briefly next Thursday »Revisit the topic in the second half of the semester