The Network Layer – TCP/IP Model

network layer and use in TCP model

The Network Layer is the most Typical and most important layer in TCP/IP or Internet stack. First of all,  I would like to tell you that, the Application and the Transport Layer doesn’t reside on the routers and switches. It’s the only Network Layer and the underlying Layers, that are there on the intermediate routers.

Characteristics of Network Layer:

1. Host Addressing:

Every end system or a host must have a specific address, so that its address could be known to the outer world. This address is known as IP address. IP addresses are of 32 bits. Such as For Example : You can be “Steve Bond” for the people of your house, “Steve Bond”, 54-Church Street for the people in USA, “Steve Bond”, 54-Church Street, USA, for the people of the whole world. In the same way, this IP address hierarchy works. 

2. Connection-less Service: 

 Since IP is the only protocol, working at Network Layer. Thus when a datagram is travelling from sender to receiver, the recipient doesn’t need to send any acknowledgement as, IP is connection-less.
  • The Network Layer is responsible for Packet Forwarding and Routing . 
 Forwarding: This is the phenomenon that includes when a packet arrives at a router, then to which next appropriate outgoing link , it should be sent.  For Example in the given figure, a packet from Host A arriving at router R1 must be forwarded to the next router on the way to Host B. 

Delivery of Packets



On one hand, where forwarding includes the functioning between two routers, the Routing includes the functioning of the whole network. Routing determines the whole path and the number of routers that the packet should go through during its flow from sender to receiver. The algorithms that calculate these paths are known as Routing Algorithms. 

There is a forwarding table in every router. Every router examines the header field in the arriving packet and based on the corresponding index to the header field, router forwards packet to the the outgoing link. For Example, in the given figure, the header field value of the incoming packet is 0101 and its corresponding outgoing link is 3. Thus the router examines its forwarding table and transfers that packet to the corresponding output link i.e 3.

Forwarding tables in routers and intermediate switches


               Figure: Values in Forwarding Table at Different Routers


Now a question must be arising in your mind, that how these forwarding tables are configured within a Router. This is a very important concept, that describes the relation between forwarding and routing. The Routing algorithm determines the values that should be inserted within the router forwarding table. A routing algorithm may be centralized or de-centralized.

i) Centralized Algorithm:

The Algorithm may be operating in a single router or the centralized router and updating the records of each of the other routers also.

The disadvantage of this technique is that on a single router a lot of burdens is there. And the other disadvantage is,  if the centralized router goes down, then the whole network will crash.

ii) De-Centralized Algorithm:

The Routing algorithm is running on every router.

In both the cases, the router receives a routing protocol message, and updates or configures its forwarding table.

  • You can assume that, this all forwarding and routing configuration is done by humans. That is, persons are physically present at every router. Thus every human operator has to interact with each other in order to update the forwarding table records so that the traveling packets reach the correct desired destination. But as you know, human configuration are more prone to errors and will be very slow, in comparison to a routing protocol. Therefore we have software and routing protocols in our networks to automate our work, in order to provide a much more efficient and fast delivery of packets to the end users.
  • There are numerous numbers of algorithms that run in the routers to provide fast and correct delivery of packets. For Example: Link State (LS) Routing Algorithm, Distance Vector (DV) Routing Algorithms etc. We will discuss each of these algorithms in detail in the coming posts.

IP Address:

As we all know, that humans understand the words and the letters very well. Thus domains name are very easy to remember by us. Like, etc. But what about routers and intermediate switches. These domains are of variable length. Thus they are very difficult to be understood by the routers. Therefore, there are fixed length IP addresses corresponding to every domain name, that are understand by routers.  These IP addresses are of 32 bits. For Example : corresponds to Every section separated by the decimal is of 8 bits. Thus every section can contain number from 0 to 255 (2^8) .

The mapping of these domain names with the corresponding IP address is done by a protocol known as Domain Name System (DNS).

Services Provided by the Network Layer :

1. Guarantee of Delivery of Packets :

This means the packet will definitely reach its destination.

2. Guaranteed Delivery with Bounded Delay :

This means not only delivery of packet to its destination, but also within the given period of time. For Example : Delivery of packet in 50 msec.

3. Delivery of Packet in-order : 

The packets will reach the destination in the same order as they were sent.

4. Minimal Jitter : 

Jitter is the difference in the delays of the two packets of the same message arriving at a destination. Thus network must provide Minimal Jitter.

  • Now you must always remember that, the Network Layer doesn’t provide any of these services. The Network Layer just provide a single service that is “Best Effort Service“. The Network Layer tries to provides the best of its effort to provide these above services to the communicating hosts. But it doesn’t guarantees anything. 
Thus you can say, Best Effort Service can be Alternatively be used for No Service at all also. A network providing no delivery of packets can also come under Best Effort Service.


Router Architecture:

Now let’s have a brief look at the parts of the Router or what is all there inside a router.  


Network Layer Sockets and Routing Processor

                                Figure: Architecture of a Router


1. Input Ports:

 The input port performs various functions inside a router. The incoming link is terminated at the left most box of the input port. At the right most box of the input port, it is the place where the forwarding table is consulted and the corresponding output link is determined.

2. Switching fabric:

 The Switching fabric connects the input ports of the router to its output ports and incorporates the processor.

3. Output Ports:

The output port transmits the packet to the correct outgoing link towards its destination.

4. Routing Processor: 

The Routing processor controls all the functions of consulting, updating and configuring the router and forwarding table. It executes the routing protocol. It also performs network management functions.


Thank You so much for reading the article. We hope you liked it.

This is all from us on the Network Layer. Do you have something to put spotlight on ?
Mandeep Kaur Bajaj

Mandeep Kaur Bajaj

Mandeep passion for blogging encouraged her to write at FitnyTech. She is a tech blogger and writes about Technology , Gadgets , various programming languages. In Blogging world , she is known as "Mandy". Mandeep is very good at cooking also , you can ask her for any cooking advice also.

More Posts

Leave a Reply

Your email address will not be published. Required fields are marked *