OSI MODEL

In this tutorial you will know all about OSI MODEL
What is OSI Model?
It is a conceptual model that describes the universal standard of communication function of telecommunication system or computing system, without any regards to the systems underlying without technology and specific protocol suites. The OSI model stand for “open system interconnection”. It has developed by standard organization ISO (international organization for standardization) in the year 1984.It is a conceptual framework used to describe the function of networking system. The OSI model is still used today as a means to describe the networking architecture. It has seven layer architecture were each layer has specific functionality. All these layer works together to transmit the data from one network to another network across the globe. Each layer has fixed layer no in each time either sending the data or receiving the data. The layers are namely application layer, presentation layer, session layer, transport layer, data link layer, physical layer. first three, layer is called massage layer or as software layer. And the last three layer is called hardware layer.

Needs of layer layered architecture in OSI model :

It needs because of the some following reason :-

  1. Modularity
  2. Flexibility
  3. Independent of Nature
  4. Specific implementation of its function can be modified or replaced.
  5. For abstract representation of data
  6. To reduce complexity in data communication.
  7. It provides standardization
  8. Task are categories into different sub-task from source to destination.
  9. Local distribution due to layered.
  10. Reliable approach.
  11. NOTE:- for the abstract representation of data communication process; so , we use layered architecture.


Layer of OSI Model :-

Application
Presentation
Session
Transport
Network
Data-link
Physical

Basic function of OSI model:-

Another factor along while data is transmitting:-


Data Sending Source to Destination

SOURCE DESTINATION
APPLICATION Intermediate Nodes APPLICATION
PRESENTATION PRESENTATION
SESSION SESSION
TRANSPORT TRANSPORT
NETWORK NETWORK NETWORK NETWORK
DATA-LINK DATA-LINK DATA-LINK DATA-LINK
PHYSICAL PHYSICAL PHYSICAL PHYSICAL
S... ...A... ...B... ...D

Note-->Moving in this table source to destination via intermediate Nodes


Major duties of all layers in OSI

APPLICSTION Message
SESSION
PRESENTATION
TRANSPORT User Datagra/Segment
NETWORK Datagram/Packet
DATA-LINK Frame/cell
PHYSICAL Bit Streams

APPLICATION LAYER:-
this layer provides suppotr for user and application tasks which are programs that actually implemented the function performed by user to accompolish various task over the network. It determine how the user will use the data network. It allows the user to use the network. for example, it provides the network-based service the end user. Example of network servics are distributed databases, electronic mail, resource sharing, file transfers, remote file access and network management. This layer defines the nature of the task to be performed.It provides user interface to communicate with the computer. In this layer message is preparing, file transfer, access and management being done. It changes the data format into machinery language, and decide in which format data are transfer to receiver that receiver understand. It provides to Mail service, also it allow to network resources. it works on data encryption & description for security purpose. It also works on the compression the data, after this the data is moving forward into session layer.

PRESENTATION:-
The presentation layer translate the data based on application layer. It also allow to compression service.The presentation layer concerned with presentation of data where supports special processing on the data from the time application attempts to send it till the time it is sent over network. Thus, it responsible for issues that may where data sent from system needs to be viewed in different way by other system. presentation layer performs functions related to syntax semantics of information transmitted. This includes formatting displaying received data terminals printers. It concerned differences in the syntax used communicating applications. This layer responsible remedying those differences resorting mechanisms transform the syntax (specific to platform question) common one for purpose of exchange. example, performs encoding of data in standard, agreed-upon way facilitates information exchange among heterogeneous systems using different codes strings, example, conversion between ASCII EBCDIC character codes. facilitates data compression reducing number of bits to transmitted encrypts data privacy authentication, necessary. Some of specific types of handling issues that presentation layer provides are follows:
  • Translation: Different types of computers like PCs, Macintoshes UNIX systems, AS/400 servers, etc., in an internetwork have many distinct characteristics and represent data in different ways. It is the responsibility of the presentation layer to hide these differences between different machines for seamless and easy exchange of data between two hosts working on different machines. The translation function is sometimes not needed.
  • Compression: Compression and decompression are also carried out a The presentation layer to improve the throughput of data. However, these functions are optional.
  • Encryption: Some types of encryption and decryption are performed the presentation layer to ensure the security of the data as it passes down the protocol stack. These are also optional.
  • Sometimes, the presentation layer functions are taken care of by the cation layer and the functions like translation, compression/decompression encryption/ decryption are not always required. Due to these facts, the presentation layer is often skipped in actual protocol stack implementations; and it possible for Layer 7 to directly talk to layer 5 in the OSI model.

SESSION LAYER:-
In this layer dialog control(logical environment) and synchronizationis done. This layer controls the conversation between two computer .IT also include authentication and reconnection. That means after the connection is lost and some data are transferred it will reconnect andstart transfer the data continuously, after this the data moving forward to transport layer. The session layer is the lowest of the three upper layers and deals mainly software application issues only. It helps enable devices to establish and e sessions. Primarily, a session is a persistent logical linking of two software action processes to exchange data over a specified period of time. The session s responsible for establishing, maintaining, and arbitrating the dialogs n communicating applications. It also provides enhanced services useful in applications, for example, remote login, remote file transfer, etc. It is also responsible for orderly recovery from failures by implementing appropriate Dinting mechanisms. The applications on either side of the session can get data or send packets to another for as long as the session lasts. The session handles session message exchanges and terminates when session ends. It coordinates monitors session identification so that designated parties participate. It provides security services control access session information. session allows hosts establish session between them which ordinary transport allowed. session layer manages dialogue control.
Establish, Manage Terminate Sessions: primary task session layer protocols is provide necessary ways establish, manage terminate sessions. These session protocols are provided to layer protocols through command sets known as application program interfaces or APIs.
Some of common examples of APIs NetBIOS, TCP/IP sockets. Remote Procedure Calls (RPCs), etc. The enable application complete specified high-level communications over network successfully and easily the help of standardized set services

TRANSPORT LAYER:-
This layer is accept data from session layer, and split into smaller unit called segment. in this layer also checking the error and the flow of data. also it responsible for end-to-end communication over a network. This medium is also known as heart of this system, because it converted the data into small bundle which is known as segment. This layer works on TCP & UDP.If there is transfer data after establishing connection then use of TCP. it also alert that the data is transferred or not And Without Establish use UDP for fast transferring the data, but in this connection not any alert that the data will transfer or not. Some important functions of the transport layer are as follows:
  • Process-Level Addressing: Like Layers 2 and 3, the transport layer also deals with the addressing issue but quite differently in which it is used to differentiate between software programs or different applications. This function of the transport layer enables many different software programs or applications to use a network layer protocol simultaneously.
  • Multiplexing and Demultiplexing: It enables a sending device to multiplex the data received from many application programs for transport, and demultiplex the data received while acting as the receiving side.
  • Segmentation, Packaging and Reassembly: According to the specifie limiton the length of the data packet at the network layer, the transport layer (like network layer) segments the large amounts of data into small pieces on the source machine to transmit across the network and then reassemble them on the destination machine.
  • Connection Establishment, Management and Termination: The connection-oriented protocols at the transport layer establish a connection, maintain it as data is sent over it and then terminate the connection when it is no longer required for the series of communications.
  • Acknowledgments and Retransmissions: The transport layer ensures guaranteed delivery of data reliably which is accomplished by using a variety of techniques, most commonly the combination of acknowledgments and retransmission of data if data is not delivered successfully.
  • Flow Control: It refers to the process of specifying that the data rate of the sending device should not be prohibitively excessive so that the receiver could be saved from being bogged down with data. In other words, this function manages mismatches in speed between the receiver.
  1. Service-point Addressing
    • End-to-End delivery
    • process-to-process delivery
  2. Segmentation and Reassembling
  3. Connection Controls
    • Connection-Oriented (TCP)
    • Connection-less (UDP)
  4. Flow Control
  5. Error Control

NETWORK LAYER:-
In this layer the segment of data is converted into packet. It contain the address of data where the data is coming from and where to go. Together It also decided in what format and which path, data will send to the receiver that in fast. That means all the work of router complete in this layer. The key functions of the network layer are as follows:
  • Logical Addressing: The devices communicating across a network have logical addresses which are known as layer three addresses. Internet Protocol (IP) is an example of Layer 3 addressing. Unlike, data link addressing that deals only with local physical devices, the logical addresses at Layer 3 are independent of particular hardware and unique across an entire internetwork.
  • Routing: It is the key function of Layer 3 in which data is routed across interconnected networks to deliver finally at the host destination. This is accomplished with the help of devices like routers and software routines that function at the network layer to handle incoming packets from various sources and determine routes for their final destination so that they could be delivered reliably there.
  • Datagram Encapsulation: The network layer functions to encapsulate messages received from higher layers by placing them into datagrams with a network layer header. Datagrams are also referred to as packets.
  • Fragmentation and Reassembly: The network layer passes down messages to the data link layer for transmission through the physical layer over the transmission media to other networks or the local network. The network layer also splits large packets into smaller packets according to the limits imposed on the length of the packet by the data link layer. This process is called fragmentation. Thus, the fragmented pieces are put together at the network layer of the destination machine. This process is called the reassembly of packets.
  • The function of the network layer may be summarized as follows: The main role of the network layer is to accept packets from a source and deliver them to a destination machine. The network layer provides services that should be independent of router technology. It shields the transport layer from the router details and facilities consistent network addressing-across network. It also shields the above layers from details about the underlying network (the network topology and road map) and the routing technology that might have been deployed to connect different networks together.

following task are performed in this layer

  1. Packetization
  2. Routing
  3. Conjection Control
  4. logical Addressing
  5. Accounting and Billing
  6. Address Transform Technique
    • Logical --> to --> Physical(ARP :- Addressing Resolution Proctocol)
    • Physical --> to --> logical (RAPR :- Reverse Addressing Resolution Proctocol)


DATA-LINK LAYER:-
The data which is in packet form, it convert into frame. the data link layer also correct the error that occurred at physical layer, and logical address(IP) of source or destination are add in this layer. and moves toward to physical layer. it maintain the speed of transferring data of both side either sender or receiver. Some of example of data link layer are HDLC and Ethernet. The key function of data link layer data link layer summarized follows:
  • Logical Link Control (LLC): LLC refers to one of sublayers of datalink layer and deals with functions enable control establishment of logical between devices on computer network. LLC has also been given responsibility provide services to the network layer above it and hides the rest of the details of the link layer to allow technologies to seamlessly with higher layers. Most of the local networking technologies use IEEE 802.2 LLC
  • Media Access Control (MAC): MAC refers to one of sublayers the data link layer and specifies procedures used by devices to access the network medium. Its role to control and manage medium to avoid conflicts because the design computer network based the shared medium that may composed of single cable or series of cables that electrically connected to virtual medium. Some the examples of MAC CSMA/CD Ethernet and token passing the Token Ring
  • Data Framing: Messages of higher layer encapsulated at this frames that they may be sent across the network at the
  • Addressing: The data link layer also deals with the issue which is popularly known as hardware address or address the labelled with destination location. device on a network provided with unique called hardware address MAC address, which used the link layer protocol ensure that data intended for specific machine gets properly.
  • Error Handling: data also that occur the lower levels of the network stack. For example, Cyclic Redundancy used to allow the receiving data detect if was received correctly.

following task are perform in this layer :-

  1. Farming
  2. Flow-Control
  3. Error-Control
  4. Node-to-Node delivery
  5. Physical Addressing
  6. Access Control
    • Single Station Model (Point-to-Point)
    • Multiple-access Model (Multipoint)

PHYSICAL LAYER:-
In this layer the data is coming with its logical address. And it convert into form of bits that means in form of binary no(0,1). At physical layer, one might find “physical” resource such as network hubs, repeater ,network adapters, or modems. It decided the data will send wireless or through wire. And this process is only for sending. For receiving follow same step vice versa. That means first physical layer and at last application layer. The physical layer functions are as follows:
  • Describing Hardware Specifications: It includes specifications of cables, connectors, radio transceivers, network interface cards, etc..
  • Encoding and Signalling: The physical layer supports various encoding and signalling functions to convert data, from bit stream to frame and vice versa, to send across the network.
  • Data Transmission and Reception: It is responsible for transmitting and receiving data over the physical media.

The physical layer accept data from data link layer in bit Streams for the subsequent transmission over the physical medium. At the machanical (connector types), electrical (voltage level), functional (ping assignments), and procedural(handshake) characteristic are defined. RS-232C/D is an example of physical layer defination.

This layer is completely hardware based. In this layer various task is performed.

  1. Representation of List
  2. Signalling
  3. Physical characteristic Transmission Media Interface
  4. Transmission Mode
    • Simplex
    • Half Duplex
    • Full Duplex
  5. Bit Synchronization
  6. Transmission Rate
  7. Line configuration
    • Point-to-Point
    • Multi-Point
  8. Physical topology
  9. Multiplexing
  10. Transmission Type
    • Serial (Synchronous , Asynchronous)
    • Parallel

LAYER GROUPINGS:
   The seven layers of the OSI Model are categorized into two-layer groupings. The lower layers are Layers 1, 2, 3, and 4 and the upper layers are Layers 5, 6 and 7. The physical, data link, network and transport layers, which are the lower layers of the OSI model primarily deal with the formatting, encoding and transmission of data over the network without caring to know much about the data, its usage, etc They define how data is transferred through a physical wire or through switches and routers and how to rebuild a data stream from a transmitting host to a destination host's application. The lower layers are implemented using both hardware and software with the incidence of hardware reducing to software from Layer I to Layer 4.
   The top three layers define the way the applications within the end stations will communicate with each other and with users while the bottom four layers define how data is transmitted end-to-end. The higher layers of the model-the session, presentation and application layers primarily deal with user interface and implement the applications that run over the network irrespective of knowing how data is delivered from one place to another by the low-level layers. These layers are almost always implemented using software running on a computer or other hardware devices like routers, gateways, etc. The application layer along with other upper layers provides the user interface and applications communicating between hosts. The upper layers are not expected to know anything about networking or network addresses. The bottom four layers take the responsibility of networking and network addresses.
UPPER 3 LAYERS BOTTOM 4 LAYERS
APPLICATION TRANSPORT
PRESENTATION NETWORK
SESSION DATA-LINK
<--> PHYSICAL

  Some layers, like data and physical layers, are further divided into sublayers. These sublayers precisely define the internal details of technologies and protocols at those layers. Some OSI layers are related to each other. The data and physical link layers are considered closely related, and so are the network and transport layers, within the lower-level grouping. In case of the upper layers, the line dividing each layer from the other is so blurred that many technologies implement two or even all three of these layers.

INTERACTION BETWEEN OSI LAYERS

In this section, we will discuss the about the interaction between OSI layers.

  For example, a protocol running at Layer 6 in the sending host machine passes down to Layer I of the same machine and is then transmitted over the transmission media to the Layer I of the receiving host machine. It is then pushed up to Layer 6 of the receiving host machine where a logical connection is established between Layer 6 of the sending host machine and Layer 6 of the receiving host machine. Thus, a protocol running at a particular layer in a host machine establishes a logical connection with a similar layer in another host machine. In fact, they have no physical connection at that layer. This is the horizontal connection that enables a protocol at a particular layer to perform its assigned job by creating a logical communication with the corresponding layer at the other side of the communicating host machine. However, the horizontal communication between similar layers also requires vertical communication, except in case of communication between Layers 6 and 1.

  Protocol Data Units (PDUs): Protocols describe the rules to control horizontal communication for exchanging data between processes running at corresponding layers within the OSI model. Except Layer 1, all layers include their data in the message that is exchanged between corresponding software elements on two or more than two devices in the network. This additional data appended at each layer, except Layer 1, is mechanism for communicating information between protocols and is known as PDUS or Protocol Data Units. Each PDU is specified by a specific format that implements the requirements and features of the protocol.

  Service Data Units (SDUs): The communication between corresponding layer except Layer 1 is logical communication. Here, a protocol communicates by passing down its PDU to the next lower layer for transmission. On the other hand, the lower layers provide services to the layers immediately above them. One example of such a service is to manage and handle data received from the layer above. A PDU is considered in itself as a complete message at a particular layer. say N. When this layer N PDU is passed down to layer N-1, it becomes the data for the layer N-1 and the protocol for layer N-1 is expected to provide service. Thus, the layer N PDU becomes the Service Data Unit (SDU) for the layer N-1. Sometimes, SDU is also called or the message body or payload.

  Data Encapsulation: N PDU, when transported to the N-1 layer, becomes N SDU for the N-1 layer. The layer N-1 transports N SDU to the next lower layer by placing the layer N SDU into its own PDU format. This process is known as data encapsulation in which the entire message including SDUS of higher layers are encapsulated as the data payload of the message at the lower layer. This process continues till the message reaches the physical layer.