Network Layer:
Network layer is the third layer in the OSI model and here are some of the functionalities of the network layer:
Logical Addressing
In the internet world, there are two kinds of addressing, data link layer addressing and logical addressing at the network layer. While physical addressing at the data link layer is defined by the MAC address of a device, on the other hand, IP addressing is defined at the network layer of the OSI model. IP addressing is also known as logical addressing.
Routing
Routing is a method to route a data packet from source to destination. We can think of routing as follows:
- When you want to access some data from Facebook, you open your laptop, type Facebook’s URL and send an HTTP request to facebook.com for some data.
- Since Facebook’s server is situated outside your local area network, your request is forwarded to Facebook through the default gateway or router of your institution.
- This forwarding of a data request to the destined server or user is known as routing.
This functionality is done at the network layer of the OSI model.
Fragmentation and Reassembly
The network layer must send messages down to the data link layer for transmission. The data that network layer receives is in the form of a packet and the data that data link layer forwards is called a frame
Fragmentation and reassembly have to be done by the network layer because some data link layer technologies have limits on the length of any message that can be sent. If the packet that the network layer wants to send is too large, the network layer must split the packet up, send each piece to the data link layer, and then have pieces reassembled once they arrive at the network layer on the destination machine.
Path determination
Between two computers on the internet, thousands of path topology may exist to connect the one device to another. Some of the networks might be private networks; to use some of the networks to send your data you might have to pay; some of the networks en route might be very busy. But network layer is so smart to find out these things within milliseconds.
Some of the other functionalities of the network layer which can be regulated using different protocols working at the network layer are:
- ICMP (Internet Control Message Protocol): It is used by network devices, like routers, to send error messages indicating, for example, that a requested service is not available or that a host or router could not be reached.
- IGMP (Internet Group Management Protocol): IGMP protocol is used by hosts and adjacent routers on IPv4 networks to establish multicast group memberships
- IPsec (Internet Protocol Security): Internet Protocol Security is a protocol suite for secure Internet Protocol (IP) communications by authenticating and encrypting each IP packet of a communication session.
- RIP (Routing Information Protocol): The Routing Information Protocol (RIP) is a routing protocol which employs the hop count as a routing metric.