The N/w layer is concerned with getting packets from source and makes many hops at intermediate routers along the way to the destination.
i.e, N/w layer is the lowest layer that deals with end-to-end transmission.
To achieve goals of N/w Layer (NL), NL must know the topology of communication subnet and to choose appropriate paths through it.
Network Layer Design issues:-
The design issues of NL are
Services provided to the Transport Layer at the N/w -Transport layer interface while providing services we must keep the following factors in mind.
the services should be independent of the router technology .
the Transport layer should be shielded from the number, type and topology of the routers present.
The N/w addresses made available to the Transport layer should use a uniform numbering plan even across LAN’s and WAN’s.
depending on above goals , the designers of N/w layer have more freedom and has assuming that the N/w layer should provide ‘2’ types of services.
- Connection-oriented Service(COS)
- Connection-Less Service(CLS).
Implementation of Connection-Less N/w layer service:-
In this type of N/w layer service packets are injected into subnet individually and are routed independently.
Packets are called datagrams and subnet as datagram subnet. Here no advanced setup is required.
Suppose in Transport Layer, a Process in Host wants to send a long message to process in Host it then adds a TL header to the message and handed over to N/w layer.
Now in the N/w layer, the packet size is small compared to this message so it breaks the message into 4 packets 1, 2, 3 and 4 and gives the packets to router A.
Each router in the datagram subnet will maintain a Table (Routing Table), which gives the information about where to send the packets.
So Router A has a table, each table consists of ‘2’ columns Destination (where to go) and line (for outgoing) for that Destination.
i.e. from A to reach Destination A, No line is used, from A to reach Destination D, B Router is used.
Now packets 1, 2, 3 and 4 (from ) Host are given to Router A then Router A stores all these packets and forwards them depending on the Routing Table of ‘A’.
Initially packets 1, 2, and 3 are forwarded using C to later on it uses a new Router B to forward 4 to depending on traffic.
Implementation of Connection-Oriented N/w layer service:-
In this service the subnet is called Virtual Circuit subnet.
A path from Source Router to Destination Router is established before sending any packets. That Router is use for all traffic flowing over that connection.
Ex: – a telephone system.
When the connection is released, the Virtual Circuit is also terminated.
Let us see an example.
In this Host wants to send packets to Host 1,2,3 and 4.
Now will establishes a connection 1 with Host.
Whenever packet comes from Host , we use connection 1 with identifier as 1.
i.e, from Routing Table of A, a packet is coming from and its identifier is ‘1’ and uses the outgoing Router C with identifier ‘1’
Similarly for use identifier as ‘2’. This is called label switching. The comparison between these Connection-Oriented and Connection Less Services (or) Virtual Circuit (or) Datagram sub nets is given in the table.