A layer is a collection of conceptually similar functions that provide services to the layer above it and receives service from the layer below it. For example, a layer that provides error-free communications across a network provides the path needed by applications above it, while it calls the next lower layer to send and receive packets that make up the contents of the path.
Even though it has been largely superseded by newer IETF, IEEE, and indeed OSI protocol developments (subsequent to the publication of the original architectural standards), the basic OSI model is considered an excellent place to begin the study of network architecture. Not understanding that the pure seven-layer model is more historic than current, many beginners make the mistake of trying to fit every protocol under study into one of the seven basic layers. Especially the attempts of cross-layer optimization break the boundaries of the original layer scheme. Describing the actual layer concept with implemented systems is not always easy to do as most of the protocols in use on the Internet were designed as part of the TCP/IP model, and may not fit cleanly into the OSI Model.
Note: The standard documents that describe the OSI model can be freely downloaded from the ITU-T as the X.200-series of recommendations . A number of the protocol specifications are also available as part of the ITU-T X series. The equivalent ISO and ISO/IEC standards for the OSI model are available from the ISO, but only some of the ISO/IEC standards are available as cost-free downloads.
all aspects of OSI design evolved from experiences with the CYCLADES network, which also influenced Internet design. The new design was documented in ISO 7498 and its various addenda. In this model, a networking system is divided into layers. Within each layer, one or more entities implement its functionality. Each entity interacts directly only with the layer immediately beneath it, and provides facilities for use by the layer above it.
Protocols enable an entity in one host to interact with a corresponding entity at the same layer in another host. Service definitions abstractly describe the functionality provided to an (N)-layer by an (N-1) layer, where N is one of the seven layers of protocols operating in the local host.
|Data||7. Application||Network process to application|
|6. Presentation||Data representation and encryption|
|5. Session||Interhost communication|
|Segment/Datagram||4. Transport||End-to-end connections and reliability|
|Packet||3. Network||Path determination and logical addressing|
|Frame||2. Data Link||Physical addressing (MAC & LLC)|
|Bit||1. Physical||Media, signal and binary transmission|
The original presentation structure used the Basic Encoding Rules of Abstract Syntax Notation One (ASN.1), with capabilities such as converting an EBCDIC-coded text file to an ASCII-coded file, or serializing objects and other data structures into and out of XML. ASN.1 has a set of cryptographic encoding rules that allows end-to-end encryption between application entities.
Although not developed under the OSI Reference Model and not strictly conforming to the OSI definition of the Transport Layer, the best known examples of a Layer 4 protocol are the Transmission Control Protocol (TCP) and User Datagram Protocol (UDP).
Of the actual OSI protocols, there are five classes of transport protocols ranging from class 0 (which is also known as TP0 and provides the least error recovery) to class 4 (which is also known as TP4 and is designed for less reliable networks, similar to the Internet). Class 0 is closest to UDP. Class 4 is closest to TCP, although TCP contains functions, such as the graceful close, which OSI assigns to the Session Layer. Detailed characteristics of TP0-4 classes are shown in the following table:
|Reinitiate connection (if an excessive number of PDUs are unacknowledged)|
|multiplexing and demultiplexing over a single virtual circuit|
|Reliable Transport Service|
Perhaps an easy way to visualize the Transport Layer is to compare it with a Post Office, which deals with the dispatch and classification of mail and parcels sent. Do remember, however, that a post office manages the outer envelope of mail. Higher layers may have the equivalent of double envelopes, such as cryptographic presentation services that can be read by the addressee only. Roughly speaking, tunneling protocols operate at the Transport Layer, such as carrying non-IP protocols such as IBM's SNA or Novell's IPX over an IP network, or end-to-end encryption with IPsec. While Generic Routing Encapsulation (GRE) might seem to be a Network Layer protocol, if the encapsulation of the payload takes place only at endpoint, GRE becomes closer to a transport protocol that uses IP headers but contains complete frames or packets to deliver to an endpoint. L2TP carries PPP frames inside transport packet.
The best-known example of a Layer 3 protocol is the Internet Protocol (IP). It manages the connectionless transfer of data one hop at a time, from end system to ingress router, router to router, and from egress router to destination end system. It is not responsible for reliable delivery to a next hop, but only for the detection of errored packets so they may be discarded. When the medium of the next hop cannot accept a packet in its current length, IP is responsible for fragmenting into sufficiently small packets that the medium can accept it.
A number of layer management protocols, a function defined in the Management Annex, ISO 7498/4, belong to the Network Layer. These include routing protocols, multicast group management, Network Layer information and error, and Network Layer address assignment. It is the function of the payload that makes these belong to the Network Layer, not the protocol that carries them.
Both WAN and LAN services arrange bits, from the Physical Layer, into logical sequences called frames. Not all Physical Layer bits necessarily go into frames, as some of these bits are purely intended for Physical Layer functions. For example, every fifth bit of the FDDI bit stream is not used by the Data Link Layer.
While IEEE 802.3 is the dominant wired LAN protocol and IEEE 802.11 the wireless LAN protocol, obsolescent MAC layers include Token Ring and FDDI. The MAC sublayer detects but does not correct errors.
To understand the function of the Physical Layer in contrast to the functions of the Data Link Layer, think of the Physical Layer as concerned primarily with the interaction of a single device with a medium, where the Data Link Layer is concerned more with the interactions of multiple devices (i.e., at least two) with a shared medium. The Physical Layer will tell one device how to transmit to the medium, and another device how to receive from it (in most cases it does not tell the device how to connect to the medium). Obsolescent Physical Layer standards such as RS-232 do use physical wires to control access to the medium.
The major functions and services performed by the Physical Layer are:
Parallel SCSI buses operate in this layer, although it must be remembered that the logical SCSI protocol is a Transport Layer protocol that runs over this bus. Various Physical Layer Ethernet standards are also in this layer; Ethernet incorporates both this layer and the Data Link Layer. The same applies to other local-area networks, such as Token ring, FDDI, and IEEE 802.11, as well as personal area networks such as Bluetooth and IEEE 802.15.4.
Physical layer is the first or the bottom layer of the OSI model. This layer is used to establish to terminate a connection to a communication medium. It also defines the electrical and mechanical specifications like cables and The Physical Layer defines the means of transmitting raw bits rather than logical data packets over a physical link connecting network nodes. The bit stream may be grouped into code words or symbols and converted to a physical signal that is transmitted over a hardware transmission medium. The Physical Layer provides an electrical, mechanical, and procedural interface to the transmission medium. The shapes of the electrical connectors, which frequencies to broadcast on, which modulation scheme to use and similar low-level parameters are specified here.
For example, Microsoft Windows' Winsock, and Unix's Berkeley sockets and System V Transport Layer Interface, are interfaces between applications (Layer 5 and above) and the transport (Layer 4). NDIS and ODI are interfaces between the media (Layer 2) and the network protocol (Layer 3).
Interface standards, except for the Physical Layer to media, are approximate implementations of OSI Service Specifications.
|Layer||Misc. examples||TCP/IP suite||SS7||AppleTalk suite||OSI suite||IPX suite||SNA||UMTS|
|7||Application||HL7, Modbus||NNTP, SIP, SSI, DNS, FTP, [(protocol)>Gopher], , NFS, NTP, DHCP, SMPP, SMTP, SNMP, ||INAP, MAP, TCAP, ISUP, TUP||AFP, ZIP, RTMP, NBP||FTAM, X.400, X.500, DAP, ROSE, RTSE, ACSE||RIP, SAP||APPC|
|6||Presentation||TDI, ASCII, EBCDIC, MIDI, MPEG||MIME, XDR, SSL, TLS (Not a separate layer)||AFP||ISO/IEC 8823, X.226, ISO/IEC 9576-1, X.236|
|5||Session||Named Pipes, NetBIOS, SAP, Half Duplex, Full Duplex, Simplex, SDP||Sockets. Session establishment in TCP. SIP. (Not a separate layer with standardized API.)||ASP, ADSP, PAP||ISO/IEC 8327, X.225, ISO/IEC 9548-1, X.235||NWLink||DLC?|
|4||Transport||NBF, nanoTCP, nanoUDP||TCP, UDP, PPTP, L2TP, SCTP, RTP||DDP||ISO/IEC 8073, TP0, TP1, TP2, TP3, TP4 (X.224), ISO/IEC 8602, X.234||SPX|
|3||Network||NBF, Q.931||IP, IPsec, ARP, ICMP, RIP, OSPF, BGP, IGMP, IS-IS||SCCP, MTP||ATP (TokenTalk or EtherTalk)||ISO/IEC 8208, X.25 (PLP), ISO/IEC 8878, X.223, ISO/IEC 8473-1, CLNP X.233.||IPX||RRC (Radio Resource Control) Packet Data Convergence Protocol (PDCP) and BMC (Broadcast/Multicast Control)|
|2||Data Link||802.3 (Ethernet), 802.11a/b/g/n MAC/LLC, 802.1Q (VLAN), ATM, HDP, FDDI, Fibre Channel, Frame Relay, HDLC, ISL, PPP, Q.921, Token Ring, CDP||PPP, SLIP||MTP, Q.710||LocalTalk, AppleTalk Remote Access, PPP||ISO/IEC 7666, X.25 (LAPB), Token Bus, X.222, ISO/IEC 8802-2 LLC Type 1 and 2||IEEE 802.3 framing, Ethernet II framing||SDLC||LLC (Logical Link Control), MAC (Media Access Control)|
|1||Physical||RS-232, V.35, V.34, I.430, I.431, T1, E1, 10BASE-T, 100BASE-TX, POTS, SONET, SDH, DSL, 802.11a/b/g/n PHY||MTP, Q.710||RS-232, RS-422, STP, PhoneNet||X.25 (X.21bis, EIA/TIA-232, EIA/TIA-449, EIA-530, G.703)||Twinax||UMTS L1 (UMTS Physical Layer)|
Even though the concept is different than in OSI, these layers are nevertheless often compared with the OSI layering scheme in the following way: The Internet Application Layer includes the OSI Application Layer, Presentation Layer, and most of the Session Layer. Its end-to-end Transport Layer includes the graceful close function of the OSI Session Layer as well as the OSI Transport Layer. The internetworking layer (Internet Layer) is a subset of the OSI Network Layer, while the Link Layer includes the OSI Data Link and Physical Layers, as well as parts of OSI's Network Layer. These comparisons are based on the original seven-layer protocol model as defined in ISO 7498, rather than refinements in such things as the internal organization of the Network Layer document.
The presumably strict consumer/producer layering of OSI as it is usually described does not present contradictions in TCP/IP, as it is permissible that protocol usage does not follow the hierarchy implied in a layered model. Such examples exist in some routing protocols (e.g., OSPF), or in the description of tunneling protocols, which provide a Link Layer for an application, although the tunnel host protocol may well be a Transport or even an Application Layer protocol in its own right.
The TCP/IP design generally favors decisions based on simplicity, efficiency and ease of implementation.