The Network Layer

Network Layer

The Network Layer mainly provides the services of sending, routing (routing) and congestion control of data (data packets) from one node to another in the network, this is the lowest layer in terms of handling point-to-point transmissions. point.
The purpose of this layer is to form an interface between the users of a machine and the network, that is, the network is controlled by this layer and the first 2.
The services provided must be independent of the support technology.
The layer design should not avoid connecting two networks with different technologies.
The Transport layer must be protected from the number, type and different topologies used in the subnet.
All this layer cares about is a communication path and not how it is built.
An addressing scheme for network addresses needs to be presented.

Interaction with the Transport layer and the Data layer

The interaction between the Transport layer and the Network layer is given based on the service that is given to the transport layer.
This service is based on a series of primitives.
The communication between these layers occurs as follows, the TCP module (Transport layer) will call the IP module (network layer) to take a segment (including the TCP header and data) as the portion of a data packet, it will also provide the source and destination address as well as other parameters in the TCP header. The Internet (IP) module will then create a series of data packets and call the local network interface to forward the packets. (this endpoint being how the Network layer interacts with the Data layer). The routing of information that is passed to the Data layer is controlled by the Network layer to establish a transparent path between source and destination. Having defined the interaction protocol between these layers, it is necessary to establish the IP protocol which adds a header to the segment passed through the transport layer (TCP).

IP Protocol

The main goal of this protocol is to provide an interconnection of subnets to form an internet, in which information can be controlled.
Main functions

  • Basic unit for data transfer
  • Addressing
  • Routing
  • Fragmentation

Communication with the Transport layer

  • IP must receive the data frame generated by TCP
  • TCP must report the address of the destination node to IP

IP Interests

  • You need to find a route for the data frame and send it to the destination. In order for the message to be sent through gateways or other intermediate systems, IP must add its own header to the data frame. This header should contain the following:
  • The source and destination address (8-bit addresses)
  • The protocol number and a header verification counter (checksum) The protocol number informs the destination IP to send the packet to TCP. Since the TCP protocol is going to be used for the Transport layer, you can consider omitting this information from the data frame and having it default to TCP. The header checksum is responsible for ensuring that the header is not damaged on the way to its destination.

routing. (routing) It is necessary to define the paths individually for each packet generated in the Network layer, for which optimal algorithms must be generated. These algorithms are usually classified into two types:

adaptive
Optimized for changing networks and bursty traffic, they make calculations based on current traffic and topology.
Non Adaptive
Optimal for topologies and stable traffic flow, which allows nodes not to verify (monitor) changes and not to recalculate routes.