OSI Layers


How does the OSI model work?
                The OSI Model works by establishing a set of rules and standards for communication in and between the different layers. These rules ensure that different products can communicate between each other because they are developed around the same guidelines. As building automation systems move further into the information technology sector we are seeing the OSI model’s upper layers become even more vital. The picture below is a high level view of how messages are transferred between the different layers of the OSI model. For a more detailed understanding of how the OSI model works refer to this step by step analysis here.




OSI Layers:- 


Layer 1: physical layer:-
        The physical layer  is the lowest layer in the OSI reference Model. Its primary function is to move bits across a communications channel from one system to another. The basic unit of exchange at this layer is the binary digit, also known as a bit..It defines electrical and physical specifications for devices. In particular, it defines the relationship between a device and a transmission medium, such as a copper or fiber optical cable.This layer conveys the bit stream - electrical impulse, light or radio signal -- through the network at the electrical and mechanical level. It provides the hardware means of sending and receiving data on a carrier, including defining cables, cards and physical aspects.
The major functions and services performed by the physical layer are:

  • Establishment and termination of a connection to a communications medium.
  • Participation in the process whereby the communication resources are effectively shared among multiple users. For example, contention resolution and flow control.
  • Modulation or conversion between the representation of digital data in user equipment and the corresponding signals transmitted over a communications channel. These are signals operating over the physical cabling (such as copper and optical fiber) or over a radio link.

Layer 2: data link layer:-
            The data link layer provides the functional and procedural means to transfer data between network entities and to detect and possibly correct errors that may occur in the physical layer. Originally, this layer was intended for point-to-point and point-to-multipoint media, characteristic of wide area media in the telephone system. At this layer, data packets are encoded and decoded into bits. It furnishes transmission protocol knowledge and management and handles errors in the physical layer, flow control and frame synchronization. The data link layer is divided into two sublayers: The Media Access Control (MAC) layer and the Logical Link Control (LLC) layer. The MAC sublayer controls how a computer on the network gains access to the data and permission to transmit it. The LLC layer controls frame synchronization, flow control and error checking.

Layer 3: network layer:-
          The network layer provides the functional and procedural means of transferring variable length data sequences from a source host on one network to a destination host on a different, while maintaining the  quality of service requested by the transport layer. This layer provides switching and routing technologies, creating logical paths, known as virtual circuits, for transmitting data from node to node. Routing and forwarding are functions of this layer, as well as addressing, internetworking, error handling, congestion control and packet sequencing. Routers operate at this layer, sending data throughout the extended network and making the Internet possible. This is a logical addressing scheme – values are chosen by the network engineer. The addressing scheme is not hierarchical.
The network layer may be divided into three sublayers:
          1.Subnetwork access – that considers protocols that deal with the interface to networks, such as X.25;
          2.Subnetwork-dependent convergence – when it is necessary to bring the level of a transit network up
                                  to the level of networks on either side
          3.Subnetwork-independent convergence – handles transfer across multiple networks.

Layer 4: transport layer:-
                  The transport layer provides transparent transfer of data between end users, providing reliable data transfer services to the upper layers. . This layer provides transparent transfer of data between end systems, or hosts, and is responsible for end-to-end error recovery and flow control. It ensures complete data transfer. The transport layer controls the reliability of a given link through flow control, segmentation/desegmentation, and error control. Some protocols are state- and connection-oriented. This means that the transport layer can keep track of the segments and retransmit those that fail. The transport layer also provides the acknowledgement of the successful data transmission and sends the next data if no errors occurred


Layer 5: session layer:-
             The session layer controls the dialogues (connections) between computers. This layer establishes, manages and terminates connections between applications. The session layer sets up, coordinates, and terminates conversations, exchanges, and dialogues between the applications at each end. It deals with session and connection coordination. It establishes, manages and terminates the connections between the local and remote application. It provides for full-duplex, half-duplex, or simplex operation, and establishes checkpointing, adjournment, termination, and restart procedures. The OSI model made this layer responsible for graceful close of sessions, which is a property of the Transmission Control Protocol, and also for session checkpointing and recovery, which is not usually used in the Internet Protocol Suite. The session layer is commonly implemented explicitly in application environments that use remote procedure calls. On this level, Inter-Process communication happen (SIGHUP, SIGKILL, End Process, etc.).

Layer 6: presentation layer:-
                The presentation layer establishes context between application-layer entities, in which the higher-layer entities may use different syntax and semantics if the presentation service provides a mapping between them. If a mapping is available, presentation service data units are encapsulated into session protocol data units, and passed down the stack. ) This layer provides independence from differences in data representation (e.g., encryption) by translating from application to network format, and vice versa. This layer formats and encrypts data to be sent across a network, providing freedom from compatibility problems. It is sometimes called the syntax layer. This layer provides independence from data representation.

Layer 7: application layer:-
            The application layer is the OSI layer closest to the end user, which means that both the OSI application layer and the user interact directly with the software application. This layer supports application and end-user processes. Communication partners are identified, quality of service is identified, user authentication and privacy are considered, and any constraints on data syntax are identified. Everything at this layer is application-specific. This layer provides application services for file transfers, e-mail, and other network software services. This layer interacts with software applications that implement a communicating component. Such application programs fall outside the scope of the OSI model. Application-layer functions typically include identifying communication partners, determining resource availability, and synchronizing communication. When identifying communication partners, the application layer determines the identity and availability of communication partners for an application with data to transmit.