1Lecture 2Protocol Stacks and LayeringDavid AndersenSchool of Computer ScienceCarnegie Mellon University15-441 Networking, Spring 2008http://www.cs.cmu.edu/~dga/15-441/S08/2Last Time! The Big Picture» Goals:– Efficiency– “ilities” (scalability, manageability, availability),– Ease of creating applications» Challenges:– Scale– Geography– Heterogeneity (** today’s focus!)! A few specific details:» Circuits vs. packets» Little bit about routing» Service model and how to construct services (** today!)3Today’s Lecture! Last time: “Big picture”! Today:» General architectural principles for networks» Introduces a few concrete models & examples! Where we are going:» Tuesday: Socket programming review++ (for project)» Thursday: Application examples (still high level)» After that: Burrowing into the details, ground up! Today’s specifics:» What is a protocol.» Protocol stacks.» Some history.» Standards organizations.» Application layer.4Why protocols and layering?! Interoperability! Reuse! Hiding underlying details5What is a Protocol! An agreement betweenparties on howcommunication should takeplace.! Protocols may have todefine many aspects of thecommunication.! Syntax:» Data encoding, language, etc.! Semantics:» Error handling, termination,ordering of requests, etc.! Protocols at hardware,software, all levels!! Example: Buying airlineticket by typing.! Syntax: English, ascii,lines delimited by “\n”Friendly greetingMuttered replyDestination?PittsburghThank you6Interfaces! Each protocol offers an interface to its users,and expects one from the layers on which itbuilds» Syntax and semantics strike again– Data formats– Interface characteristics, e.g. IP service model! 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 rewrite7Protocol andService LevelsApplicationEnd-to-endCoreNetwork8A Layered Network ModelThe Open Systems Interconnection (OSI) Model.ApplicationPresentationSessionTransportNetworkData linkPhysical1234567NetworkData linkPhysicalApplicationPresentationSessionTransportNetworkData linkPhysical9OSI Motivation! Standard way of breaking up a system in a set ofcomponents, but the components are organized as a set oflayers.» Only horizontal and vertical communication» Components/layers can be implemented and modified in isolation! Each layer offers a service to the higher layer, using theservices of the lower layer.! “Peer” layers on different systems communicate via aprotocol.» higher level protocols (e.g. TCP/IP, Appletalk) can run on multiplelower layers» multiple higher level protocols can share a single physical network! “It’s only a model!” - TCP/IP has been crazy successful,and it’s not based on a rigid OSI model. But the OSI modelhas been very successful at shaping thought.10OSI Functions! (1) Physical: transmission of a bit stream.! (2) Data link: flow control, framing, errordetection.! (3) Network: switching and routing.! (4) Transport: reliable end to end delivery.! (5) Session: managing logical connections.! (6) Presentation: data transformations.! (7) Application: specific uses, e.g. mail, filetransfer, telnet, network management.Multiplexing takes place in multiple layers11Looking at protocols! Hop by hop / link protocols» Ethernet! End-to-end protocols» TCP, apps, etc.! Management / “control plane” protocols» Routing, etc.– Can be either link or e2e themselves– Definition somewhat vague.! Standards» File formats, etc.! E.g., JPEG, MPEG, MP3, …Categories not solid / religious, just a way to view things.12Heterogenous Sources ofComponents! Application: web server/browser,mail, distributed game,..! Presentation/session.» Often part of application» Sometimes a library! Transport/network.» Typically part of the operating system! Datalink.» Often written by vendor of the networkinterface hardware! Physical.» Hardware: card and linkApplicationPresentationSessionTransportNetworkData linkPhysical13Motivation: Many manyNetwork ComponentsApplicationOperating SystemProtocol SoftwareComputerLinksRouter HardwareRouter Software(many protocols)Bridge HW/SWApplicationOperating SystemComputerNetwork Interface14Protocols for Interoperability! Many implementations of many technologies:! Hosts running FreeBSD, Linux, Windows, MacOS, …! People using Mozilla, Explorer, Opera, …! Routers made by cisco, juniper, …! Hardware made by IBM, Dell, Apple, …! And it changes all the time.! Phew!! But they can all talk together because they use thesame protocol(s)» Application level protocols: HTTP, SMTP, POP, IMAP, etc.» Hardware protocols (ethernet, etc)15Protocols for Abstraction &Reuse! Multiple choices of protocol at many layers» Physical: copper, fiber, air, carrier pigeon» Link: ethernet, token ring, SONET, FDDI» Transport: TCP, UDP, SCTP! But we don’t want to have to write “a web(HTTP) browser for TCP networks running IPover Ethernet on Copper” and another for thefiber version…» Reuse! Abstraction!» Protocols provide a standard interface to write to» Layers hide the details of the protocols below16Multiplexing andDemultiplexing! There may be multipleimplementations of eachlayer.» How does the receiverknow what version of alayer to use?! Each header includes ademultiplexing field thatis used to identify thenext layer.» Filled in by the sender» Used by the receiver! Multiplexing ooccurs atmultiple layers. E.g., IP,TCP, …IPTCPIPTCPV/HL TOS LengthID Flags/OffsetTTL Prot. H. ChecksumSource IP addressDestination IP addressOptions..17Example: Sending a Web PageHttp hdr Web pageTCP header. . .ApplicationpayloadApplicationPresentationSessionTransportNetworkData linkPhysical18Limitations of theLayered Model! Some layers are not always cleanly separated.» Inter-layer dependencies in implementations for performancereasons» Some dependencies in the standards (header checksums)! Higher layers not always well defined.» Session, presentation, application layers! Lower layers have “sublayers”.» Usually very well defined (e.g., SONET protocol)! Interfaces are not always well standardized.» It would be hard to mix and match layers from independentimplementations, e.g., windows network apps on unix (w/outcompatability library)» Many cross-layer assumptions, e.g. buffer management19The TCP/IP ModelApplication(pluslibraries)TCP/UDPIP/ICMPData
View Full Document