OSI Layering

Embed Size (px)

Citation preview

  • 1. PRESENTED BY-PANKAJYADAVBABA SAHEB BHIM RAOAMBEDKAR CENTRALUNIVERSITY LUCKNOW

2. Layering in Networked computing OSI Model TCP/IP Model Protocols at each layer 3. Learning outcomes Understand the need of layering iinn NNeettwwoorrkkeedd ccoommppuuttiinngg UUnnddeerrssttaanndd tthhee OOSSII mmooddeell aanndd tthhee ttccpp//iipp mmooddeell UUnnddeerrssttaanndd tthhee ffuunnccttiioonn pprroottooccoollss aanndd tthheeiirr rroollee aatt eeaacchhllaayyeerr..TTCCPP pprroottooccoollUUDDPP pprroottooccooll UUnnddeerrssttaanndd tthhee rroollee ooff hheeaaddeerr iinn ccoommmmuunniiccaattiioonn bbeettwweeeennllaayyeerrss UUnnddeerrssttaanndd hhooww ddaattaa sseenntt ffrroomm oonnee hhoosstt aarrrriivvee ttoo tthhee ttaarrggeetthhoosstt.. 4. What is layering in Networkedcomputing? Breaks down communication into smaller, simpler parts. 5. Why a layered model? Easier to teach communication process. Speeds development, changes in one layer does notaffect how the other levels works. Standardization across manufactures. Allows different hardware and software to work together. Reduces complexity 6. The OSI Reference Model 7. The OSI Model OSI Open Systems Interconnection". OSI model was first introduced in 1984 by the InternationalOrganization for Standardization (ISO). Outlines WHAT needs to be done to send data from one computerto another. Not HOW it should be done. Protocols stacks handle how data is prepared for transmittal (to betransmitted) In the OSI model, The specification needed are contained in 7 different layers that interact with each other. 8. What is THE MODEL? Commonly referred to as the OSI reference model. The OSI model is a theoretical blueprint that helps us understand how data getsfrom one users computer to another. It is also a model that helps develop standards so that all of ourhardware and software talks nicely to each other. It aids standardization of networking technologies by providingan organized structure for hardware and software developers tofollow, to insure there products are compatible with current andfuture technologies. 9. 7 Layer OSI Model Why use a reference model? Serves as an outline of rules for how protocols can be used to allowcommunication between computers. Each layer has its own function and provides support to other layers. Other reference models are in use. Most well known is the TCP/IP reference model. We will compare OSI and TCP/IP models As computing requirements increased, the network modeling had toevolve to meet ever increasing demands of larger networks andmultiple venders. Problems and technology advances also added to the demands forchanges in network modeling. 10. Evolution of the 7-Layers Single Layer Model - First Communication Between Computer Devices Dedicated copper wire or radio link Hardware & software inextricably intertwined Single specification for all aspects of communicationHardware&SoftwareHardware&SoftwareDEVICE A DEVICE Bwww.howtheosimodelworks.com1 11. Evolution of the 7-Layers (1)ApplicationTechnicalStandards Two Layer ModelApplicationTechnicalStandards Problem: Applications were being developed to run over ever-increasingnumber of media/signaling systems. Solution: Separate application aspects from technical (signaling and routing)aspects Application Layer: Concerned with user interface, file access and file transferwww.howtheosimodelworks.com 1 12. Evolution of the 7-Layers (3)ApplicationNetworkPhysicalData-LinkApplication Four Layer Model - Network connectivity inherently requires travel overintermediate devices (nodes) Technical Standards Level divided into Network, Data-link and PhysicalLayersNetworkPhysicalData-Linkhttp://www.howtheosimodelworks.com/ 1 13. Evolution of the 7-Layers (3) cont. Physical LayerDescribes physical aspects of network: cards, wires, etcSpecifies interconnect topologies and devices Network LayerDefines a standard method for operating between nodesAddress scheme is defined (IP)Accounts for varying topologies Data-LinkWorks with Network Layer to translate logical addresses (IP) into hardwareaddresses (MAC) for transmissionDefines a single link protocol for transfer between two nodes 14. Evolution of the 7-Layers (4)ApplicationTransportNetworkPhysicalData-LinkApplicationTransportNetworkPhysicalData-Link1 Five Layer Model Increase Quality of Service (QOS)Variable levels of data integrity in networkAdditional data exchanges to ensure connectivity over worst conditionsBecame the Transport Layerhttp://www.howtheosimodelworks.com 15. Evolution of the 7-Layers (5)ApplicationSessionTransportNetworkPhysicalData-LinkApplicationSessionTransportNetworkPhysicalData-Link Six Layer Model - Dialogue Control and Dialogue Separation Means of synchronizing transfer of data packets Allows for checkpointing to see if data arrives (at nodes and endstations) Became Session Layer1http://www.howtheosimodelworks.com/ 16. Evolution of the 7-Layers (6)ApplicationPresentationSessionTransportNetworkData-LinkPhysicalApplicationPresentationSessionTransportNetworkData-LinkPhysical The Seven Layer OSI Model - Addition of Management and Security Standardizing notation or syntax for application messages (abstract syntax) 1Set of encoding rules (transfer syntax) Became the Presentation Layerhttp://www.howtheosimodelworks.com/ 17. What Each Layer Does2 18. Gives end-user applications accessto network resources Where is it on my computer? Workstation or Server Service inMS Windows3 19. Presentation Layer3 20. Session Layer Allows applications tomaintain an ongoing session Where is it on my computer? Workstation and ServerService (MS) Windows Client forNetWare (NetWare)3 21. Transport Layer Provides reliable datadelivery Its the TCP in TCP/IP Receives info from upperlayers and segments it intopackets Can provide error detectionand correction 3 22. Figure 2.9 Transport layerThe transport layer is responsible forthe delivery of a message from oneprocess to another. 23. Network Layer Provides network-wide addressingand a mechanism to move packetsbetween networks (routing) Responsibilities: Network addressing Routing Example: IP from TCP/IP 3 24. Network layerThe network layer is responsible forthe delivery of individual packets fromthe source host to the destination host. 25. Network Addresses Network-wide addresses Used to transfer data across subnets Used by routers for packet forwarding Example: IP Address Where is it on my computer? TCP/IP Software 26. Data Link Layer Places data and retrieves itfrom the physical layer andprovides error detectioncapabilities3 27. Data link layerThe data link layer is responsible formoving frames from one hop (node) tothe next. 28. Sub-layers of the Data Link Layer MAC (Media Access Control) Gives data to the NIC Controls access to the media through:CSMA/CD Carrier Sense Multiple Access/CollisionDetectionToken passing LLC (Logical Link Layer) Manages the data link interface (or Service Access Points(SAPs)) Can detect some transmission errors using a CyclicRedundancy Check (CRC). If the packet is bad the LLC willrequest the sender to resend that particular packet. 29. Physical Layer Determines the specs forall physical components Cabling Interconnect methods(topology / devices) Data encoding (bits to waves) Electrical properties Examples: Ethernet (IEEE 802.3) Token Ring (IEEE 802.5) Wireless (IEEE 802.11b)3 30. Physical layerThe physical layer is responsiblefor the movement of individual bitsfrom one hop (node) to the next. 31. Physical Layer (contd) What are the Physical Layer components on mycomputer? NIC Network Interface Card Has a unique 12 character Hexadecimal numberpermanently burned into it at the manufacturer. The number is the MAC Address/Physical address of acomputer Cabling Twister Pair Fiber Optic Coax Cable 32. How Does It All Work Together Each layer contains a Protocol Data Unit(PDU) PDUs are used for peer-to-peer contactbetween corresponding layers. Data is handled by the top three layers, thenSegmented by the Transport layer. The Network layer places it into packets andthe Data Link frames the packets fortransmission. Physical layer converts it to bits and sends itout over the media. The receiving computer reverses the processusing the information contained in the PDU.2 33. Figure 2.2 OSI layers 34. Data Encapsulation In TCP/IP At each layer in the TCP/IP protocol stack Outgoing data is packaged and identified for delivery to the layerunderneath PDU Packet Data Unit the envelop information attached to apacket at a particular TCP/IP protocol e.g. header and trailer Header PDUs own particular opening component Identifies the protocol in use, the sender and intended recipient Trailer (or packet trailer) Provides data integrity checks for the payload 35. Encapsulation example: E-mail 36. Encapsulation 37. Figure 2.3 An exchange using the OSI model 38. Figure 2.14 Summary of layers 39. The Postal AnalogyHow would the OSI compare to the regular Post Office A- Write a 20 page letter to a foreign country. P- Translate the letter so the receiver can read it. S- Insure the intended recipient can receive letter. T- Separate and number pages. Like registered mail,tracks delivery and requests another package if one islost or damaged in the mail. N- Postal Center sorting letters by zip code to routethem closer to destination. D- Local Post Office determining which vehicles todeliver letters. P- Physical Trucks, Planes, Rail, autos, etc whichcarry letter between stations.ApplicationPresentationSessionTransportNetworkData-LinkPhysical 40. Remembering the 7 Layers7 - Application All6 - Presentation People5 - Session Seem4 - Transport To3 - Network Need2 - Data Link Data1 - Physical Processing 41. TCP/IP model development The late-60s The Defense Advance ResearchProjects Agency (DARPA) originally developedTransmission Control Protocol/Internet Protocol(TCP/IP) to interconnect various defensedepartment computer networks. The Internet, an International Wide Area Network,uses TCP/IP to connect networks across the world. 42. 4 layers of the TCP/IP model Layer 4: Application Layer 3: Transport Layer 2: Internet Layer 1: Network accessIt is important ttoo nnoottee tthhaatt ssoommee ooff tthheellaayyeerrss iinn tthhee TTCCPP//IIPP mmooddeell hhaavvee tthhee ssaammeennaammee aass llaayyeerrss iinn tthhee OOSSII mmooddeell..DDoo nnoott ccoonnffuussee tthhee llaayyeerrss ooff tthhee ttwwoo mmooddeellss.. 43. The network access layer Concerned with all of the issues that an IP packetrequires to actually make the physical link. All thedetails in the OSI physical and data link layers. Electrical, mechanical, procedural and functionalspecifications. Data rate, Distances, Physical connector. Frames, physical addressing. Synchronization, flow control, error control. 44. The internet layer Send source packets from any network on theinternetwork and have them arrive at thedestination independent of the path and networksthey took to get there. Packets, Logical addressing. Internet Protocol (IP). Route , routing table, routing protocol. 45. The transport layer The transport layer deals with the quality-of-serviceissues of reliability, flow control, and errorcorrection. Segments, data stream, datagram. Connection oriented and connectionless. Transmission control protocol (TCP). User datagram protocol (UDP). End-to-end flow control. Error detection and recovery. 46. TCP/IP Reference Model (cont) 3. Transport layer (layer 3) Allows end-to-end communication Connection establishment, error control, flow control Two main protocols at this level Transmission control protocol (TCP), Connection oriented Connection established before sending data Reliable user datagram protocol (UDP) Connectionless Sending data without establishing connection Fast but unreliable 47. The application layer Handles high-level protocols, issues ofrepresentation, encoding, and dialog control. The TCP/IP combines all application-relatedissues into one layer, and assures this data isproperly packaged for the next layer. FTP, HTTP, SMNP, DNS ... Format of data, data structure, encode Dialog control, session management 48. TCP/IP protocol stack 49. TCP/IP Reference ModelLayerApplicationTransportInternetNetwork Access(Host-to-network)ProtocolsHTTP TELNET FTP SMTP SNMPTCP UDPIP ICMPETHERNET PACKET RADIO 50. Protocols at the application layer HTTP: browser and web server communicatin FTP : file transfer protocol TELNET: remote login protocol POP3: Retrieve email POP3 is designed to delete mail on the server as soon as the user hasdownloaded it IMAP (Internet Message Access Protocol ) Retrieve emails, retaining e-mail on the server and for organizing it in folders on the serve 51. Protocols at the transport layerTransmission control protocol (TCP), Connection oriented Connection established before sending data Reliableuser datagram protocol (UDP) Connectionless Sending data without establishing connection Fast but unreliable 52. Protocol at the network layer IP Path selection , routing and addressing ICMP (Internet Control Message Protocol ) sends error messages relying on IPa requested service is not availablea host or router could not be reached 53. Protocols at the link layer Ethernet Uses CSMA/CD Token Ring 54. Data FormatsApplication datadata TCPheader data TCPheader data TCPheaderdata TCPheaderIPheaderdata TCPheaderIPheaderEthernetheaderEthernettrailerapplicationlayertransportlayernetworklayerdata linklayermessagesegmentpacketframe 55. Packet Encapsulation (TCP/IP) The data is sent down the protocol stack Each layer adds to the data by prepending headers22Bytes 20Bytes 20Bytes 4Bytes64 to 1500 Bytes 56. Comparing TCP/IP with OSIOSI Model TCP/IP Hierarchy Protocols7thApplication Layer6thPresentation Layer5thSession Layer4thTransport Layer3rdNetwork Layer2ndLink Layer1stPhysical LayerApplicationLayerTransport LayerNetwork LayerLink LayerLink Layer : includes device driver and network interface cardNetwork Layer : handles the movement of packets, i.e. RoutingTransport Layer : provides a reliable flow of data between two hostsApplication Layer : handles the details of the particular application 57. How the OSI and TCP/IP Models Relate in a Networking EnvironmentData ProtocolsLayer 7 Application All Browsers ApplicationLayer 6 Presentation People Common DataFormatApplicationLayer 5 Session Seem NFS, SQL,RPC, X-WinDialogues andConversationsApplicationLayer 4 Transport To Computer Segment TCP and UDPQuality ofService, andReliabilityTransportLayer 3 Network Need RouterSegment Networkinto SmallerBroadcastDomainsPacketRoutableProtocols.(IP, IPX,AppleTalk)Path Selection,Routing, andAddressingInternetWords toRememberTCP/IPModelOSIModelLayerPneumonic Equipment EquipmentPurposeOSI ModelNameFrameNDIS, ODI,MAC Address,Ether TalkNetworkAccessLayer 1 Physical ProcessingRepeater,Hub (Multi-port),CablingBit PhysicalSignals andMediaNetworkAccessLayer 2Regular Computeror A SpecialGateway. Used tocombine networksusing differentcommunicationprotocolsData Link-MAC-LLCOne Collision ANDOne BroadcastDomainFrames andMedia AccessControl (MAC)Computer DataRedirector,FTP, Telnet,SMTP,SNMP,NetwareCoreDataBridge (2Ports) orSwitch andNICSegment Networkinto SmallerCollision Domains 58. Internet applications TCP/IP takes care of the hard problems Location of the destination host Making sure the data is received in the correct order anderror free Coding Internet applications Turns out to be straightforward. The key concept of Internet programming is The client-server model 59. Client-Server model Client and server processes operate on machines which are able to communicate througha network: The Server waits for requests from client When a request is received The server lookup for the requested data And send a response the client Sockets and ports A socket is and end-point of way communication link between two programs A port number bound to a socket specifies the protocol need the be used at the receiving end Example of servers File servers Web servers Example of client applications Browsers Email clients 60. What is a socket? An interface between application andnetwork. Create a socket Socket(Protocolfamily, type-of-communicatio, specific- protocol); The application creates a socket The socket type dictates the style ofcommunicationreliable vs. best effortconnection-oriented vs. connectionless 61. to send data to/from thenetwork through a port