Located at Layer 3 of the Open Systems Interconnection (OSI) communications model, the primary function of the network layer is to move data into and through other networks. Network layer protocols accomplish this goal by packaging data with correct network address information, selecting the appropriate network routes and forwarding the packaged data up the stack to the transport layer (Layer 4). Show
Existing protocols that generally map to the OSI network layer include the IP portion of the Transmission Control Protocol/Internet Protocol (TCP/IP) model -- both IPv4 and IPv6 -- as well as NetWare Internetwork Packet Exchange/Sequenced Packet Exchange (IPX/SPX). Nearly all enterprise networks use the TCP/IP stack, as well as cellular data networks, including 3G, 4G LTE and most recently, 5G networks. The routing information contained within a packet includes the source address of the sending host and the eventual destination host address of the remote host. This information is contained within the network layer header that encapsulates network frames at the data link layer (Layer 2). The key difference -- and importance -- between transport information contained at Layer 2 when compared to transport information contained at the network layer is that the information can move beyond the local network to reach hosts in remote network locations or different network segments. The following network topology diagram depicts devices in one IP subnet using Layer 3 routing to communicate with devices in a second IP subnet. How Layer 3 of the OSI model worksFunctions of the network layerThe primary function of the network layer is to enable different networks to be interconnected. It does this by forwarding packets to network routers, which rely on algorithms to determine the best paths for the data to travel. These paths are known as "virtual circuits." The network layer relies on the Internet Control Message Protocol (ICMP) for error control handling and diagnostics to ensure packets are sent correctly. Quality of Service (QoS) is also available to permit certain traffic to be prioritized over other traffic. The network layer can support either connection-oriented or connectionless networks, but such a network data transmission can only be of one type and not both. What is the OSI model and its 7 layers?OSI is a communications reference model to help conceptualize how data can be transmitted and received on a network. The model consists of seven distinct layers forming a stack. Each layer in the stack is performed in a step-by-step manner: first, moving up the stack during data transmissions and then from the top of the stack down once the data reaches its destination. The layers of the OSI model, including the network layer, are shown below: The network layer of the OSI modelProtocols at the network layerWhile IP is the most popular and widely used protocol at the network layer today, there are plenty of other protocol examples to note. Network protocols at Layer 3 include those used for dynamic routing of networks, secure communications, network translations and network redundancy. Here are a few examples: OSI Reference Model stands for Open system interconnection reference model which is used for communication in various networks. The ISO (International organization for standardization) has developed this reference model for communication to be followed worldwide on a given set of a platform. What You Will Learn:
What Is OSI Model?Open system interconnection (OSI) reference model consists of seven layers or seven steps which concludes the overall communication system. In this tutorial, we will take an in-depth look at the functionality of each layer. As a software tester, it is important to understand this OSI model as each of the software applications works based on one of the layers in this model. As we dive deep in this tutorial, we will explore which layer it is. Architecture Of The OSI Reference ModelRelationship Between Each LayerLet’s see how each layer in the OSI reference model communicates with one another with the help of the below diagram. Enlisted below is the expansion of each Protocol unit exchanged between the layers:
Roles & Protocols Used At Each LayerFeatures Of The OSI ModelThe various features of the OSI Model are enlisted below:
7 Layers Of The OSI ModelBefore exploring the details about the functions of all 7 layers, the problem generally faced by first-timers is, How to memorize the hierarchy of the seven OSI Reference layers in sequence? Here is the solution which I personally use to memorize it. Try to remember it as A- PSTN- DP. Starting from top to bottom A-PSTN-DP stands for Application-Presentation-Session-Transport-Network-Data-link-Physical. Here are the 7 Layers of the OSI Model: #1) Layer 1 – Physical layer
#2) Layer 2 – Data-link Layer
The structure of MAC address representing the various fields and bit length can be seen below.
There are two types of flow control process: Stop and Wait for flow control: In this mechanism, it pushes the sender after the data is transmitted to stop and wait from the receiver’s end to get the acknowledgment of the frame received at the receiver end. The second data frame is sent over the medium, only after the first acknowledgment is received, and the process will go on. Sliding window: In this process, both the sender and the receiver will decide the number of frames after which the acknowledgment should be exchanged. This process is time-saving as fewer resources are used in the flow control process.
#3) Layer 3 – Network LayerThe network layer is the third layer from the bottom. This layer has the accountability to accomplish the routing of data packets from the source to destination host between the inter and intra networks operating on the same or different protocols. Apart from the technicalities, if we try to understand what it really does? The answer is very simple that it finds out the easy, shortest, and time-efficient way out between the sender and the receiver to exchange data using routing protocols, switching, error detection and addressing techniques.
Subnet Mask: The network address and the host address defined in the IP address is not solely efficient to determine that the destination host is of the same sub-network or remote network. The subnet mask is a 32-bit logical address that is used along with the IP address by the routers to determine the location of the destination host to route the packet data. Example for combined usage of IP address & subnet mask is shown below: For the above Example, by using a subnet mask 255.255.255.0, we get to know that the network ID is 192.168.1.0 and the host address is 0.0.0.64. When a packet arrives from 192.168.1.0 subnet and has a destination address as 192.168.1.64, then the PC will receive it from the network and process it further to the next level. Thus by using subnetting, the layer-3 will provide an inter-networking between the two different subnets as well. The IP addressing is a connectionless service, thus the layer -3 provides a connectionless service. The data packets are sent over the medium without waiting for the recipient to send the acknowledgment. If the data packets which are big in size are received from the lower level to transmit, then it splits it into small packets and forwards it. At the receiving end, it again reassembles them to the original size, thus becoming space efficient as a medium less load. #4) Layer 4 – Transport LayerThe fourth layer from the bottom is called the transport layer of the OSI Reference model. (i) This layer guarantees an end to end error-free connection between the two different hosts or devices of networks. This is the first one which takes the data from the upper layer i.e. the application layer, and then splits it into smaller packets called the segments and dispenses it to the network layer for further delivery to the destination host. It ensures that the data received at host end will be in the same order in which it was transmitted. It provides an end to end supply of the data segments of both inter and intra sub-networks. For an end to end communication over the networks, all devices are equipped with a Transport service access point (TSAP) and are also branded as port numbers. A host will recognize its peer host at the remote network by its port number. (ii) The two transport layer protocols include:
TCP is a connection-oriented and reliable protocol. In this protocol, firstly the connection is established between the two hosts of the remote end, only then the data is sent over the network for communication. The receiver always sends an acknowledgment of the data received or not received by the sender once the first data packet is transmitted. After receiving the acknowledgment from the receiver, the second data packet is sent over the medium. It also checks the order in which the data is to be received otherwise data is re-transmitted. This layer provides an error correction mechanism and flow control. It also supports client/server model for communication. UDP is a connectionless and unreliable protocol. Once data is transmitted between two hosts, the receiver host doesn’t send any acknowledgment of receiving the data packets. Thus the sender will keep on sending data without waiting for an acknowledgment. This makes it very easy to process any network requirement as no time is wasted in waiting for acknowledgment. The end host will be any machine like a computer, phone or tablet. This type of protocol is widely used in video streaming, online games, video calls, voice over IP where when some data packets of video are lost then it doesn’t have much significance, and can be ignored as it doesn’t make much impact on the information it carries and doesn’t have much relevance. (iii) Error Detection & Control: Error checking is provided in this layer because of the following two reasons: Even if no errors are introduced when a segment is moving over a link, it can be possible for errors to be introduced when a segment is stored in the router’s memory (for queuing). The data link layer is not able to detect an error in this scenario. There is no assurance that all the links between the source and destination will provide error scrutiny. One of the links may be using a link layer protocol which doesn’t offer the desired outcomes. The methods used for error check and control are CRC (cyclic redundancy check) and checksum. CRC: The concept of CRC (Cyclic Redundancy Check) grounds on the binary division of the data component, as the remainder of which (CRC) is appended to the data component and sent to the receiver. The recipient divides data component by an identical divisor. If the remainder comes up to zero then the data component is allowed to pass to forward the protocol, else, it is assumed that the data unit has been distorted in transmission and the packet is discarded. Checksum Generator & checker: In this method, the sender uses the checksum generator mechanism in which initially the data component is split into equal segments of n bits. Then, all the segments are added together by employing 1’s complement. Later, it complements once again, and now it turns into checksum and then is sent along with the data component. Example: If 16 bits is to be sent to the receiver and bits are 10000010 00101011, then the checksum that will be transmitted to the receiver will be 10000010 00101011 01010000. Upon receiving the data unit, the receiver divides it into n equal size segments. All the segments are added using 1’s complement. The result is complemented once more and If the result is zero, the data is accepted, else discarded. This error detection & control method permits a receiver to rebuild the original data whenever it is found corrupted in transit. #5) Layer 5 – Session LayerThis layer permits the users of different platforms to set up an active communication session between themselves. The main function of this layer is to provide sync in the dialogue between the two distinctive applications. The synchronization is necessary for efficient delivery of data without any loss at the receiver end. Let’s understand this with the help of an Example. Assume that a sender is sending a big data file of more than 2000 pages. This layer will add some checkpoints while sending the big data file. After sending a small sequence of 40 pages, it ensures the sequence & successful acknowledgment of data. If verification is OK, it will keep repeating it further till the end otherwise it will re-synchronize and re-transmit. This will help in keeping the data safe and the whole data host will never completely get lost if some crash happens. Also, token management, will not allow two networks of heavy data and of the same type to transmit at the same time. #6) Layer 6 – Presentation LayerAs suggested by the name itself, the presentation layer will present the data to its end users in the form in which it can easily be understood. Hence, this layer takes care of the syntax, as the mode of communication used by the sender and receiver may be different. It plays the role of a translator so that the two systems come on the same platform for communication and will easily understand each other. The data which is in the form of characters and numbers are split into bits before transmission by the layer. It translates the data for networks in the form in which they require it and for devices like phones, PC, etc in the format they require it. The layer also performs data encryption at the sender’s end and data decryption at the receiver’s end. It also performs data compression for multimedia data before transmitting, as the length of multimedia data is very big and much bandwidth will be required to transmit it over media, this data is compressed into small packets and at the receiver’s end, it will be decompressed to get the original length of data in its own format. #7) Top Layer – Application LayerThis is the topmost and seventh layer of the OSI reference model. This layer will communicate with the end users & user applications. This layer grants a direct interface and access to the users with the network. The users can directly access the network at this layer. Few Examples of services provided by this layer include e-mail, sharing data files, FTP GUI based software like Netnumen, Filezilla (used for file sharing), telnet network devices etc. There is vagueness in this layer as is not all user-based information and the software can be planted into this layer. For Example, any designing software can’t be put directly at this layer while on the other hand when we access any application through a web browser, it can be planted at this layer as a web browser is using HTTP (hypertext transfer protocol) which is an application layer protocol. Therefore irrespective of the software used, it is the protocol used by the software that is considered at this layer. Software testing programs will work on this layer as the application layer provides an interface to its end users to test the services and their uses. The HTTP protocol is mostly used for testing at this layer but FTP, DNS, TELNET can also be used as per the requirement of the system and network in which they are operating. ConclusionFrom this tutorial, we learned about the functionalities, roles, inter-connection, and relationship between each layer of the OSI reference model. The bottom four layers (from physical to transport) are used for data transmission between the networks and the top three layers (session, presentation & application) are for data transmission between hosts. Which layer is responsible for routing the packets through possible routes Mcq?3. Network layer: Handles the routing and sending of data between different networks. The most important protocols at this layer are IP and ICMP.
Which layer is responsible for transferring the packets to the network?Logical Link Control Layer
It is responsible for transferring the packets to the Network layer of the receiver that is receiving. It identifies the address of the network layer protocol from the header. It also provides flow control.
Which layer is responsible for addressing routing and packaging data packets?The Internet layer is responsible for packaging, addressing, and routing the data.
|