What is the OSI Model? What are the seven layers of this model?
OSI Reference Model is a standard approach to network design. It is developed by the International Standards Organization (ISO). The word “Open” signifies that the model deals with connecting open systems – that is, systems that are open for communication with other systems. In the OSI model, each layer performs a subset of the required communication functions. Each layer relies on the next lower layer to perform the required function.
Layers of the OSI Model:
- This layer is responsible for transmitting a bit stream over a physical medium such as a cable.
- It deals with the mechanical and electrical specifications of the interface (e.g., the RJ45 jack, ports, etc) and the transmission medium.
- It defines the procedures and functions that physical devices and interfaces have to perform for transmission to occur.
Functions of Physical Layer:
- Physical characteristics of interfaces and media – It defines the transmission medium, and the interface between the transmitting devices and the medium.
- Bit representation – The data in this layer is a stream of bits. These bits are encoded into electrical or optical signals. The physical layer defines the type of encoding, i.e., how bits 0 and 1 are changed into signals.
- Data transmission rate – The number of bits sent each second, the duration of a bit and how long it lasts on the medium are defined by the medium.
- Synchronizing the sender and receiver clocks: The sender and receiver must be synchronized at the bit level.
- Transmission mode – The physical layer defines the direction of transmission i.e., simplex, half-duplex, full duplex
- Physical Topology – how devices are connected – ring, star, mesh, bus topology
- Line configuration – The physical layer is concerned with connection of devices. Devices may be connected in a point-to-point configuration (through a dedicated link), or multipoint configuration (link shared between many devices).
Data Link Layer
- The physical layer is just transmitting the bits. The data link layer is responsible for delivery of data between two systems on the same network.
- It does this by breaking up the input data into data frames, each of 100 or 1000 bytes, and transmits the frames sequentially.
- This layer is responsible for moving frames from one node to another.
Main functions of this layer are:
- Framing – divide the stream of bits received into data units called frames.
- Physical Addressing – Add a header to the frame to define the physical address of the source and the destination machines.
- Flow control – Impose a flow control – control rate at which data is transmitted so as not to flood the receiver
- Error Control – Adds mechanisms to detect and retransmit damaged or lost frames; and prevent duplication of frames. This is achieved by adding a trailer to the end of a frame.
- Access control – When two or more devices are connected to the same link, this layer determines which device has control over the link at any given time.
- This layer is responsible for the delivery of an individual packet from source to destination. This delivery of packets may be across several networks or links.
Main functions of this layer are:
- Responsible for delivery of packets across multiple networks
- This layer does not recognize any relationship between these packets.
- If two systems are connected to the same link, there is no need for the network layer.
- But if the two systems are connected to different networks the network layer is needed for delivery of packets.
- Logical addressing – The data link layer handles the addresses at a local level by using a physical address. But since the data must pass across networks, the addressing mechanism is different. The network layer adds a header to the packet coming from the upper layer and this packet includes the logical addresses of the sender and the receiver.
- Routing – Provide mechanisms to transmit data over independent networks (internetworks) that are linked together through routers and switches. The network layer at source A sends a packet to the network layer at router B. When the packet arrives at B, the router makes a decision based on the destination F. The router uses its router table to decide that the next hop should be at router E. The network layer at E sends the packet to destination address F.
- Network layer is responsible only for delivery of individual packets and it does not recognize any relationship between those packets
- This layer is responsible for the process-to-process delivery of the entire message. A process is just an application program running on a host computer.
- The network layer is responsible for source to destination delivery of the packets. It treats each packet individually, even if they all belong to the same message.
- The transport layer ensures that the whole message arrives intact and in order.
Main functions of this layer are:
- Responsible for process-to-process delivery of the entire message
- Segmentation and reassembly – It divides the message into smaller segments, numbers them and transmits. It reassembles these messages at the receiving end using the sequence number.
- Connection control – The transport layer can be either connectionless or connection-oriented. A connectionless transport layer treats each segment as an independent packet and delivers it to the transport layer at the destination. A connection-oriented transport layer first establishes a connection with the transport layer at the destination computer before delivering the segments. The connection is then terminated once all the data is transferred.
- Error control – make sure that the entire message arrives without errors – else retransmit.
- Flow control – What if data arrives garbled or out of order or too fast? If a packet is missing or garbled, or arrives out-of-order, or too soon, the protocol at this layer will attempt to correct.
- Service-point addressing – Computers may be running many programs simultaneously. Hence source-to- destination means not only transmitting data from one computer to another but also from a specific process on one computer to a specific process on another computer. Therefore the transport layer header must include a service-point address (or port address).
- Thus, the responsibility of the transport layer is to get an entire message to the correct process on the destination computer.
- The session layer is the dialog controller. It establishes, maintains and synchronizes the interaction between computers.
- Main functions of this layer are:
- Dialog control – allows two systems to enter into a dialog, keep a track of whose turn it is to transmit Transmission mode may be half-duplex or full-duplex.
- Synchronization – adds check points (synchronization points) into stream of data. These check points enable the system to know which unit has to be retransmitted in case there is a crash.
- The session layer answers the need for individual hosts to support more than one active connection at a time.
- This layer is concerned with the syntax and semantics of the information exchanged between the two computers.
- The main tasks of this layer are: translation, compression, and encryption
- Different computers use different encoding systems (bit order translation)
- Convert data into a common format before transmitting. The data received at the destination is then converted from the common format into the receiver-dependent format.
- Syntax represents info such as character codes, data types, and file formats (how many bits to represent data – 8 or 7 bits
- Compression – reduce number of bits to be transmitted. This is more important for transmission of video and audio data.
- Encryption – Encryption of data is required to ensure privacy of data. This layer transforms data into an unintelligible format at the sending end. At the receiving end, decryption takes place.
- This is the top layer of the OSI reference model.
- This layer enables the user to access the network.
- It provides user interfaces for services like: email, browser, file transfer, shared database management.
- It deals with issues such as: How can two applications communicate in a meaningful way?
- It contains protocols that allow users to access the network (FTP, HTTP, SMTP), etc
- Services provided by the Application layer are:
- Network virtual terminal – This allows a user to log on to a remote host. The application creates a software emulation of a terminal at the remote host. The user’s computer communicates with the software terminal which in turn talks to the host.
- File transfer, access and management: This application allows a user to access files on a remote host, retrieve files from the remote host, and also to manage files on a remote host.
- Mail – this application provides basic services for email forwarding and storing.
What is the difference between network layer delivery and transport layer delivery?
The transport layer is responsible for source-to-destination delivery of the entire message, whereas the network layer oversees delivery of individual packets of data irrespective of their relationship to each other and to the entire message.
Group the OSI layers by function.
The OSI layers can be grouped into:
a. network support layers: physical, data link, network
b. user support layers: session, presentation, application
c. transport layer: functions as a agent (liaison) between the two groups of layers
What is the difference between a port address, a logical address and a physical address?
- The physical address (or link address) is the local address of a node.
- It is used by the data link layer and physical layer to deliver data from one node to another within the same network.
- It is included in the frame used by the data link layer.
- It is the lowest-level address.
- The size and format of the physical address depends on the network. E.g., the Ethernet uses a 48 bit address which is included in every network interface card (NIC).
- The logical address defines the sender and receiver at the network layer and is used to deliver messages across multiple networks.
- This address is used by the network layer.
- This address is independent of the underlying physical networks.
- Since different networks have different addressing formats, the physical addresses cannot be used when networks are interconnected.
- A universal addressing system is used in which the computers can be identified uniquely.
- The logical address used on the Internet is a 32-bit address which can uniquely define a computer on the Internet.
- The end objective of Internet communication is a process communication with another process.
- It is not sufficient to just transfer data from one computer to another.
- E.g., computer A can communicate with computer B using the TELNET protocol At the same time, A may be communicating with another computer C using the File Transfer Protocol (FTP).
- For these two processes to receive data simultaneously, we need a method by which the processes can be given different labels. These labels are the addresses. A label assigned to a process is called a port address.
What is the Network Model?
- A model is a hypothetical description of a complex entity or process. The process of data communication along a network is very complex involving hardware and software.
- The Network model is a method of describing and analyzing data communications networks by breaking the entire set of communications process into a number of layers.
What is a Protocol?
It is a formal description of message formats and the rules that two computers must follow in order to exchange messages. This set of rules describes how data is transmitted over a network. OSI is not a protocol. Protocols are needed for the following reasons:
- In what format will the messages be transmitted?
- At what speed should messages be transmitted?
- What to do if errors take place?
- What to do if parts of a message are lost?
What is meant by Layered Approach To Networking?
- Divide the complex task into a number of simpler sub-tasks. A layer performs that simple sub-task.
- Each layer builds upon the layer below it, adding new functionality.
- The entities comprising the corresponding layers on different machines are called peers.
- It is the peers that communicate by using the protocols.
- Actually, data is not transferred from layer n on one machine to layer n on another machine.
- Each layer passes data and control information to the layer immediately below it, until the lowest layer is reached.
- Actual data communication takes place through the lowest layer – the physical layer.
Explain the concept of Services and Protocols
- A service is a set of operations that a layer provides to the layer above it.
- Service defines what operations the layer is prepared to perform.
- A service relates to the interface between two layers – the lower layer is service provider and the upper layer is service user.
- A protocol is a set of rules governing the format and meaning of the packets.
- Protocols relate to packets sent between peer entities on different machines.
- Entities use protocols.
- Protocols can be changed provided the services visible to the user do not change. Thus services and protocols are not joined or dependent.
- Protocol relates to the implementation of the service – how it is done
- Analogy with programming languages:
- A service is like an object in an object-oriented language
- What operations can be performed on this object is defined
- How these operations are to be performed is not defined
Explain the features of connectionless service and connection-oriented services.
Layers can offer two types of services to the layers above them: connection-oriented and connectionless.
- Connection-oriented service is modelled after the telephone system. To talk to someone, we pick up a phone, dial the number, talk and disconnect. Similarly, in a network, the service user will
- Establish a connection
- Use the connection
- Release the connection
- The sender, receiver and the network may conduct a negotiation about data transfer speed, maximum message size, etc.
When a connection is established, the sender and receiver may conduct a negotiation about parameters to be used such as maximum message size, data transfer speed, etc.
Connection-oriented service is used when reliability is important. Only a single path is established for the call, and all the data follows that path.
- Connectionless service is modelled after the post office system. Each message (letter) carries the full address of the destination system. Each message is routed through the network system independent of the other messages. If two messages are sent to the same destination, normally the first one to be sent should arrive first. But it is possible that the second message arrives first. Since each message (packet) is routed independently, the network cannot guarantee that all the messages will arrive at the destination in the transmitting order. Different parts of a message may travel along different routes.
What is the difference between flow control and error control?
Flow control: adjust and confirm data flow rate for successful transmission.
Error Control: a way to recover corrupted data
YouTube video on this topic: https://youtu.be/b-JU9aWdoP8
(C) Mukesh N Tekwani, 2021
Categories: Blog, Computer Science, Data Communications & Networking
Leave a Reply