Network Layer
Network Layer
Network Layer
What is Network layer ?
It is the 3th Layer of the OSI model and from the top and the 3rd layer from the Bottom
of the OSI Model.
It is one of the most important layers which plays a key role in data transmission.
The main job of this layer is to maintain the quality of the data and pass and transmit it
from its source to its destination.
It also handles routing, which means that it chooses the best path to transmit the data from
the source to its destination, not just transmitting the packet.
The main function of network layer .
Every device which is assign on the network has an IP address by which it can be
uniquely identified and addressed.
An IP address is Layer-3 (Network Layer) logical address. This address may change every
time a computer restarts.
A computer can have one IP at one instance of time and another IP at some different time.
Example of devices which is assign on
network uses different IP.
Network Layer Functions.
The services need to be carefully designed with the following goals in mind:-
1. It provides network/transport layer interface which means network layer transfers it’s services to the transport layer.
The transport layer needs to be protected from the type, number and topology of the available router.
The network addresses for the transport layer should use uniform numbering pattern also at LAN and WAN connections.
• Connectionless – The routing and insertion of packets into subnet is done individually. No added setup is required.
• Connection-Oriented – Subnet must offer reliable service and all the packets must be transmitted over a single route.
3. Implementation of Connectionless Service
Packet are termed as “datagrams” and corresponding subnet as “datagram subnets”. When the message size that has
to be transmitted is 4 times the size of the packet, then the network layer divides into 4 packets and transmits each
packet to router via. a few protocol.
Each data packet has destination address and is routed independently irrespective of the packets.
4.Implementation of Connection-Oriented Service
To use a connection-oriented service, first we establishes a connection, use it and then release it. In
connection-oriented services, the data packets are delivered to the receiver in the same order in which they
have been sent by the sender.
Circuit Switched Connection – A dedicated physical path or a circuit is established between the
communicating nodes and then data stream is transferred.
Virtual Circuit Switched Connection – The data stream is transferred over a packet switched network, in
such a way that it seems to the user that there is a dedicated path from the sender to the receiver. A virtual
path is established here. While, other connections may also be using the same path.
5. Comparison of Virtual-Circuit and Datagram
Subnets.
Network Layer Services
Routing: To find the best path from source to destination using routing
protocols.
Forwarding: Action applied by each router when packet arrives at one of its
interface using routing or forwarding table.
Propagation Delay
Delay = (Distance) / (Propagation speed).
Processing Delay
Delay = Time required to process a packet in a router or a
destination host
Queuing Delay
Delay = The time a packet waits in input and output queues in a router
Total Delay
A router, however, has an input buffer with a limited size. A time may
come when the buffer is full and the next packet needs to be dropped.
The effect of packet loss on the Internet network layer is that the packet
needs to be resent, which in turn may create overflow and cause more
packet loss.
Addressing perform in network layer both
classful and classless .
Classful Addressing - In the IPv4 addressing the concept of classes is used for giving IP
addressing . This architecture is known as classful addressing.
In the classful addressing, there are 5 classes in which the address space is divided: A, B, C, D,
and E. There are five types of classes .
Class A
Class B
Class C
Class D
Class E
Different IP Classes Ranges.
Three-level hierarchy in an IPv4 address.
What is network ID and host ID?
The class of IP address is used to determine the bits used for network ID and host ID and
the number of total networks and hosts possible in that particular class. Each ISP or
network administrator assigns an IP address to each device that is connected to its network.
Classless Addressing
In the packet Forwarding same network is associated with as the source host or may belong to a
destination host in a different network.
In the packet forwarding router is responsible for the process of forwarding the packet . It accepts the
packet from the origin host or another router in the packet’s path and places it on the route leading to the
target host.
Example of packet Forwarding .
In the packet forwarding routers are used to forward the packet from the local network to the remote
network. So, the process of routing involves the packet forwarding from an entry interface out to an exit
interface.
Message is send from source router to
destination router .