0% found this document useful (0 votes)
33 views33 pages

Network Layer

Uploaded by

manasailla666
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views33 pages

Network Layer

Uploaded by

manasailla666
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 33

LEC -22

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 .

Function of Network Layer.


1. It is the third layer of OSI model and it is used for transfer the packet from source to
destination.
2. Network layer is used for the transmission of data from one host to the other located in
different networks.
It performs two main functions.
1. First is that is breaking up segments into network packets, and second is that reassembling
the packets on the receiving end.
2. Network layer also provides network addresses (typically Internet
Protocol addresses) to route packets to a destination node.
Network layer - IP address

 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.

Some other function of network layer


 Addressing - Maintains the address at the frame header of both source and destination and
performs addressing to detect various devices in network .
 Packeting: It is performed by Internet Protocol. The network layer converts the packets
from its upper layer.
 Routing: It is the most important functionality. The network layer chooses the most
relevant and best path for the data transmission from source to destination.
 Inter-networking: It works to deliver a logical connection across multiple devices.
Network Layer Design Issues.

• Store-and-Forward Packet Switching.


• Services Provided to the Transport Layer.
• Implementation of Connectionless Service,
• Implementation of Connection-Oriented Service.
• Comparison of Virtual-Circuit and Datagram Subnets
Design Issues of Network Layer.
 Store-and-Forward Packet Switching - The host sends the packet to the nearest router and packet is stored there
until it has fully arrived once the link is fully processed by verifying the checksum then it is forwarded to the
next router till it reaches the destination. A checksum is a value that represents the number of bits in a
transmission message .
 Store-and-forward Packet Switching means that the packet-switched network communications whereby
packet switches must receive a packet in its entirety before forwarding to the next switch in the network.
2. Services provided to Transport layer.

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.

These services are described below.


But before providing these services to the transfer layer following goals must be kept in mind :-

 It is Offering services must not depend on router technology.

 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.

 Based on the connections there are 2 types of services provided :-

• 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.

 It can be done in either two ways :

 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

 Packetizing: encapsulating the payload(data received from upper layer) at


source and decapsulating at the destination.

 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.

 Routing and Forwarding are related to each other.


Configuration and addresses in a sub-netted
network.
Lec – 23
Network layer Performance
NETWORK- LAYER PERFORMANCE .

The performance of a network can be measured in terms of:


 Delay
 Throughput
 Packet loss
Delay

The delays in a network can be divided into four types:


 Transmission delay
 Propagation delay
 Processing delay
 Queuing delay.
 Transmission Delay
Delay= (Packet length) / (Transmission rate).

 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

Total delay = (n + 1) (Delaytr + Delaypg + Delaypr) + (n) (Delayqu)


Throughput

 Throughput = minimum {TR1, TR2, . . . TRn}.


Packet Loss

 When a router receives a packet while processing another packet, the


received packet needs to be stored in the input buffer waiting for its turn.

 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

 Classless addressing is also know as Classless Inter-Domain Routing (CIDR). In the


classless addressing type helps to allocate IP addresses more efficiently. When the user
requires a particular number of IP addresses, this method assigns a block of IP addresses
concerning certain rules. And, this block is called a CIDR block and has the required number
of IP addresses.

 A classless addressing system or classless interdomain routing (CIDR) was developed to


alternative traditional subnetting. We can add the specification in the IP(Internet Protocol)
address itself as to the number of significant bits that make up the networking portion.
Example of classful IP and Classless IP.
Difference Between Classful and classless
addressing .
What is Packet Forwarding?

 Packet Forwarding means forwarding of incoming packets to their intended destination.

 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 .

You might also like