Protocol_LayeringSupp - Protocol Layering Wing C. Lau...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Protocol Layering Wing C. Lau Spring , 2009 Another way to view a protocol As providing a service As service The previous example protocol provides a reliable file transfer The reliable service “Peer” entities use a protocol to provide a service to a higherlevel peer entity for example, postal workers use a protocol to present customers for with the abstraction of an unreliable letter transfer service unreliable Customer A and B are peers Customer peers Postal worker A and B are peers Postal peers Protocol layering A network that provides many services needs many protocols network Turns out that some services are independent Turns But others depend on each other But Protocol A may use protocol B as a step in its execution Protocol step in for example, the reliable transfer of a file is one step in downloading a for webpage which may involve reliable transfer of multiple files another example, sending a packet from the source to the destination another host is one step in the execution of the example reliable file transfer protocol Yet another example, to a send packet along a multiple-hop path from a Yet source and a destination requires packet transfer between directly connected neighbors along that path. This form of dependency is called layering This layering reliable file transfer is layered above packet transfer protocol reliable layered above network-wide packet delivery is layered above packet transfer over a network-wide layered above direct link between neighboring nodes it is like calling a subroutine within a program it Protocol stack A set of protocol layers set Each layer uses the layer below and provides a service to the Each layer above Key idea Key once we define a service provided by a layer, we need know once nothing more about the details of how the layer actually implements how the the service information hiding information decouples changes decouples Internet protocol stack application: supporting network applications application: FTP, SMTP, HTTP FTP, transport: process-process data transfer transport: TCP, UDP TCP, application transport network link physical network: routing of datagrams from source to network: destination IP, routing protocols IP, link: data transfer between neighboring network link: elements PPP, Ethernet PPP, physical: bits “on the wire” physical: Layering: logical communication Each layer: distributed distributed “entities” implement layer functions at each node entities perform entities actions, exchange messages with peers application transport network link physical application transport network link physical network link physical application transport network link physical application transport network link physical Layering: logical communication E.g.: transport take data from app take add addressing, add reliability check info to form a “packet” send packet to peer send wait for peer to ack wait receipt analogy: post office analogy: data application transport transport network link physical application transport network link physical ack data network link physical data application transport transport network link physical application transport network link physical Layering: the actual physical communication data application transport network link physical application transport network link physical network link physical data application transport network link physical application transport network link physical source datagram Hn Ht message segment Ht M M M M frame Hl Hn Ht application transport network link physical Encapsulation link physical switch destination M Ht Hn Ht Hl Hn Ht M M M application transport network link physical Hn Ht Hl Hn Ht M M network link physical Hn Ht M router Protocol layering and data Each layer takes data from above adds header information to create new data unit adds passes new data unit to layer below passes source M Ht M Hn Ht M Hl Hn Ht M destination application Ht transport Hn Ht network link Hl Hn Ht physical M M M M message segment datagram frame application transport network link physical The importance of being layered Breaks up a complex problem into smaller manageable pieces Breaks can compose simple service to provide complex ones can for example, WWW (HTTP) is layered over TCP over IP (and uses for DNS, ARP, DHCP, RIP, OSPF, BGP, PPP, ICMP) Abstraction of implementation details Abstraction separation of implementation and specification separation can change implementation as long as service interface is can maintained Can reuse functionality, allow mix-and-match Can upper layers can share lower layer functionality. Example: Both upper TCP and UDP (transport layer protocols) can share the service of IP (network layer protocol) Same upper layer protocol can run over different lower layer Same protocols. Example: IP can run over different link technologies such as ethernet, fiber, telephone lines or even wireless link. How many versions of “networking software” do we need to support How all the functions supported by the current set of Internet protocols? Problems with layering Layering hides information Layering if it didn t then changes to one layer could require changes if then everywhere layering violation layering But sometimes hidden information can be used to improve But performance for example, flow control protocol may think packet loss is always for because of network congestion if it is, instead, due to a lossy link, the flow control breaks if this is because we hid information about reason of packet loss from this flow control protocol Layering There is a tension between information-hiding (abstraction) and There achieving good performance Art of protocol design is to leak enough information to allow Art good performance but not so much that small changes in one layer need changes to but other layers ISO OSI 7-Layer Model No very successful in practice (why?), more of a theoretical No interest only But have helped to shape the design of “real” protocol stacks But How is it different from the Internet protocol stack ? How Some terminology Service access point (SAP) Service interface between an upper layer and a lower layer interface Protocol data units (PDUs) Protocol packets exchanged between peer entities packets Service data units (SDUs) Service packets handed to a lower layer by an upper layer packets PDU = SDU + optional header or trailer PDU Example Example letter transfer service letter protocol data unit between customers = letter protocol service data unit for postal service = letter service protocol data unit = mailbag (aggregation of letters) protocol (what is the SDU header?) (what Physical layer Moves bits between physically connected end-systems Moves Standard prescribes Standard coding scheme to represent a bit coding shapes and sizes of connectors shapes bit-level synchronization bit-level Postal network Postal technology for moving letters from one point to another (trains, technology planes, vans, bicycles, ships…) Internet Internet technology to move bits on a wire, wireless link, satellite channel technology etc. Datalink layer Introduces the notion of a frame Introduces frame set of bits that belong together set Idle markers tell us that a link is not carrying a frame Idle markers Begin and end markers delimit a frame Begin and end markers On a broadcast link (such as Ethernet) On end-system must receive only bits meant for it end-system need datalink-layer address need also need to decide who gets to speak next also these functions are provided by Medium Access sublayer (MAC) these Medium Some data links also retransmit corrupted packets and pace the Some rate at which frames are placed on a link part of logical link control sublayer part logical layered over MAC sublayer layered Datalink layer (contd.) Datalink layer protocols are the first layer of software Datalink Very dependent on underlying physical link properties Very Usually bundle both physical and datalink layer on host adaptor Usually host card example: Ethernet example: Postal service Postal mail bag frames letters mail frames letters Internet Internet a variety of datalink layer protocols variety most common is Ethernet and PPP most others are FDDI, SONET, HDLC others Network layer Logically concatenates a set of links to form the abstraction of Logically an end-to-end link Allows an end-system to communicate with any other endAllows system by computing a route between them Hides idiosyncrasies of datalink layer Hides Provides unique network-wide addresses Provides Found both in end-systems and in intermediate systems Found At end-systems primarily hides details of datalink layer At segmentation and reassembly: max. size of packet carried by a segmentation network layer protocol may be bigger than that of a data link layer. error detection error Network layer (contd.) At intermediate systems, e.g. routers or switches, At participates in routing protocol to create routing or VCI tables participates responsible for forwarding packets responsible scheduling the transmission order of packets scheduling choosing which packets to drop choosing Two types of network layers In datagram (or connectionless) networks, e.g. the current In Internet provides both routing and data forwarding provides In connection-oriented network In we distinguish between data plane and control plane we data plane only forwards and schedules data (touches every byte) data control plane responsible for routing, call-establishment, callcontrol teardown (doesn t touch data bytes) touch Network layer (cont d) Postal network Postal set up internal routing tables set forward letters from source to destination forward static routing static multiple qualities of service multiple Internet Internet network layer is provided by Internet Protocol network found in all end-systems and intermediate systems found provides abstraction of end-to-end link provides segmentation and reassembly segmentation packet-forwarding, routing, scheduling packet-forwarding, unique IP addresses unique can be layered over anything, but only best-effort service can Asynchronous Transfer Mode (ATM) networks Asynchronous Virtual circuit based packet (or cell) networks Virtual Transport layer Network provides a raw end-to-end service Network raw end-to-end Transport layer creates the abstraction of an error-controlled, Transport error-controlled flow-controlled and multiplexed end-to-end link and multiplexed end-to-end Error control Error message will reach destination despite packet loss, corruption and message duplication retransmit lost packets; detect, discard, and retransmit corrupted retransmit packets; detect and discard duplicated packets Flow control Flow match transmission rat to rate currently sustainable on the path to match destination, and at the destination itself Like the Network Layer, the Transport Layer can also support Like connection-oriented or connectionless services or connectionless services Transport layer (contd.) Multiplexes multiple applications to the same end-to-end Multiplexes connection adds an application-specific identifier (port number) so that adds so receiving end-system can hand in incoming packet to the correct application Some transport layers provide fewer services Some e.g. simple error detection, no flow control, and no retransmission e.g. lightweight transport layer lightweight Transport layer (contd.) Postal system Postal doesn t have a transport layer doesn have implemented, if at all, by customers implemented, detect lost letters (how?) and retransmit them detect Internet Internet two popular protocols are TCP and UDP two TCP provides error control, flow control, multiplexing TCP UDP provides only multiplexing UDP Session layer Not common in practice Not Provides full-duplex service, expedited data delivery, and session Provides full-duplex and session synchronization Grouping together and Coordinating between Multiple Related Transport Grouping connections of a “Call” : e.g. For your MSN communication session, you may have: A connection for text messaging A connection for VoIP A connection for Video Conference s picture picture Another data connection for shared Whiteboard Duplex Duplex if transport layer is simplex, concatenates two transport endpoints together if Expedited data delivery Expedited allows some messages to skip ahead in end-system queues, by using a separate allows low-delay transport layer endpoint Synchronization Synchronization allows users to place marks in data stream and to roll back to a pre-specified allows mark Example Postal network Postal suppose a company has separate shipping and receiving clerks suppose chief clerk can manage both to provide abstraction of a duplex chief service chief clerk may also send some messages using a courier chief (expedited service) chief clerk can arrange to have a set of messages either delivered chief all at once, or not at all Internet Internet doesn t have a standard session layer doesn have Presentation layer Unlike other layers which deal with headers presentation layer Unlike headers presentation touches the application data Hides data representation differences between applications Hides e.g. endian-ness e.g. endian-ness Can also encrypt data Can Usually ad hoc Usually ad Postal network Postal translator translates contents before giving it to chief clerk translator Internet Internet no standard presentation layer no only defines network byte order for 2- and 4-byte integers only Application layer The set of applications that use the network The Doesn t provide services to any other layer Doesn provide Postal network Postal the person who uses the postal system the suppose manager wants to send a set of recall letters suppose translator translates letters going abroad translator chief clerk sends some priority mail, and some by regular mail chief mail clerk sends a message, retransmits if not acked mail postal system computes a route and forwards the letters postal datalink layer: letters carried by planes, trains, automobiles datalink physical layer: the letter itself physical ISO/OSI reference model presentation: allow applications to presentation: interpret meaning of data, e.g., encryption, compression, machinespecific conventions session: synchronization, session: synchronization, checkpointing, recovery of data exchange Internet stack “missing” these layers! Internet these services, if needed, must be these if must implemented in application needed? needed? application presentation session transport network link physical Why seven layers? Need a top and a bottom -- 2 Need Need to hide physical link, so need datalink -- 3 Need Need both end-to-end and hop-by-hop actions; so need at least Need the network and transport layers -- 5 Session and presentation layers are not so important, and are Session often ignored So, we need at least 5, and 7 seems to be excessive So, Note that we can place functions in different layers Note Summary for Protocol Layering We have broken a complex problem into smaller, simpler pieces We Provides the application with sophisticated services Provides sophisticated services Each layer provides a clean abstraction to the layer above Each ...
View Full Document

Ask a homework question - tutors are online