Organizing Network Functionality Many kinds of networking functionality e g encoding framing routing addressing reliability etc EE 122 Layering and the Internet Architecture Kevin Lai September 4 2002 How should they be organized How should they interact Layering is one answer to these questions laik cs berkeley edu Layering A technique to organize a network system into a succession of logically distinct entities such that the service provided by one entity is solely based on the service provided by the previous lower level entity Advantages No Layering Application Transmission Media no layering violations Abstraction lower layers can be changed without affecting the upper layers Modularity protocols easier to manage and maintain Reuse upper layers can reuse the functionality provided by lower layers SMTP SSH Coaxial cable NFS Fiber optic HTTP Packet radio new application has to interface to all existing media new media requires all existing applications be modified total work in system O ma eventually too much work to add apps media adding new application requires O m work m number of media adding new media requires O a work a number of applications Disadvantages Information hiding inefficient implementations laik cs berkeley edu 2 3 laik cs berkeley edu 4 1 3 Layers ISO OSI Reference Model Solution introduce an intermediate layer that provides a single abstraction for various network technologies O 1 work to add app media variation on add another level of indirection Application SMTP SSH NFS ISO International Standard Organization OSI Open System Interconnection Started to 1978 first standard 1979 ARPANET started in 1969 TCP IP protocols ready by 1974 HTTP Goal a general open standard allow vendors to enter the market by using their own implementation and protocols Intermediate layer Transmission Media Coaxial cable Fiber optic Packet radio laik cs berkeley edu 5 laik cs berkeley edu ISO OSI Reference Model 6 Encapsulation Seven layers Lower three layers are peer to peer Next four layers are end to end A layer can use only the service provided by the layer immediate below it Each layer may change and add a header to data packet higher layer s header is treated as payload Application Presentation Application Presentation Session Transport Network Session Transport Network Datalink Physical Network Datalink Physical Physical medium laik cs berkeley edu data data data data Datalink Physical 7 data data data data data data data data data data laik cs berkeley edu 8 2 OSI Model Concepts Physical Layer 1 Service says what a layer does Interface says how to access the service Protocol says how is the service implemented a set of rules and formats that govern the communication between two peers laik cs berkeley edu Service move the information between two systems connected by a physical link Interface specifies how to send a bit Protocols coding scheme used to represent a bit voltage levels duration of a bit Examples coaxial cable optical fiber links transmitters receivers 9 laik cs berkeley edu Datalink Layer 2 Network Layer 3 Service framing i e attach frame separators send data frames between peers others arbitrate the access to common physical media ensure reliable transmission provide flow control Service deliver a packet to specified destination perform segmentation reassemble others packet scheduling buffer management Interface send a data unit packet to a machine connected to the same physical media Protocols layer addresses implement Medium Access Control MAC e g CSMA CD laik cs berkeley edu 10 11 Interface send a packet to a specified destination Protocols define global unique addresses construct routing tables laik cs berkeley edu 12 3 Transport Layer 4 Session Layer 5 Services provide an error free and flow controlled end to end connection multiplex multiple transport connections to one network connection split one transport connection in multiple network connections full duplex access management e g token control synchronization e g provide check points for long transfers Interface send a packet to specify destination Protocols implement reliability and flow control Examples TCP and UDP laik cs berkeley edu 13 14 Application Layer 7 Service convert data between various representations Interface depends on service Protocol define data formats and rules to convert from one format to another laik cs berkeley edu Interface depends on service Protocols token management insert checkpoints implement roll back functions laik cs berkeley edu Presentation Layer 6 Service 15 Service any service provided to the end user Interface depends on the application Protocol depends on the application Examples Kazaa SMTP ssh NFS WWW browser laik cs berkeley edu 16 4 OSI vs TCP IP Layer Violations and Not OSI conceptually define services interfaces protocols Internet provide a successful implementation more layers less efficient Higher layer interacts with layer below previous layer e g application has special behavior when running on wireless link sometimes provides useful performance enhancement Lower layer interacts with higher layer e g router network layer device routes based on transport or application data in packet usually a very bad idea see end to end argument don t need so many layers in practice Application Presentation Session Application Transport Network Transport Internet Datalink Physical Host tonetwork OSI SMTP SSH DNS TCP UDP IP LAN Packet radio 17 laik cs berkeley edu End to End Argument 18 Example Reliable File Transfer Host A How do you divide functionality across layers One answer the end to end argument Push as much functionality to higher layers as possible while still maintaining correctness and performance OS J H Saltzer D P Reed D D Clark End to End Arguments in System Design ACM Transactions on Computer Systems Vol 2 No 4 1984 pp 277 288 19 Host B Appl laik cs berkeley edu Not violations Reducing copying of packets TCP IP laik cs berkeley edu Types of violations Appl OK OS Problem transfer a file composed of blocks Solution 1 transfer each block and retry if necessary and then concatenate them Solution 2 transfer the blocks verify the entire file and retry the entire file if necessary laik cs berkeley edu 20 5 Discussion Intuitive Justification Solution 1 not complete e g disk fills up after block is verified but before block is written to disk The receiver has to check the entire file anyway Thus full functionality can be entirely implemented at application layer
View Full Document