You are on page 1of 20

Course : BCA

Semester : IV

Subject Code : BC 0048

Subject Name : Computer Networks

Unit number :8

Unit Title : Network Layer

o n f i d e NEXT
CHOME ntial
Unit-8 Network Layer

Network Layer

Objectives

After going through the presentation, you should be able to:

•Describe Design issues of Network layer .

•Discuss Principles of Routing

•Discuss Routing algorithms

•Explain congestion control

PREVIOUS i d e n t i a NEXT
C o n f HOME l
Unit-8 Network Layer

Network Layer
Lecture outline

• Introduction

• Design issues of Network layer

• Principles of Routing

• Routing algorithms

• Congestion

• IP protocol (IPV4)

• Summary

PREVIOUS
C o n f i d e nNEXT
tial
Unit-8 Network Layer

Introduction
The network layer is one of the most important layers in OSI seven layered
architectural model and in TCP/IP reference model.

It is responsible for end to end (source to destination) packet delivery,


whereas the data link layer is responsible for node to node (hop to hop) packet

delivery.

The Network layer performs network routing, flow control, network


segmentation/de-segmentation, and error control functions.

The network layer deals with transmitting information all the way from its
source to its destination - transmitting from anywhere, to anywhere.

PREVIOUS i d e n t i a NEXT
C o n f HOME l
Unit-8 Network Layer

Design issues of Network layer

The important design issues pertaining to the network layer are as follows :

1 Nature of the service provided :


The network layer provides two well-defined classes of services, namely
connectionless and connection oriented services to the numerous nodes or
hosts communicating through subnet.

2. Internal organization :

Another important design issue in the network layer is the internal


organization of the subnet. The organization may be either a datagram
based that employs connectionless services or virtual circuit based that
employs a connection-oriented service.

PREVIOUS i d e n t i a NEXT
C o n f HOME l
Unit-8 Network Layer

Design issues of Network layer

The important design issues : ( CONTINUED..)


3 Routing :
Routing of packets across the subnet is considered the most important
function of the network layer. Two basic types of routing static and dynamic .
Static routing is also referred to as non-adaptive and dynamic is also referred
to as Adaptive routing methods.

4. Congestion control :
An important problem that any subnet faces is the congestion because of
heavy traffic in the subnet than the load that it can handle. The subnet gets
increasingly loaded with packets causing increase in delay in the delivery of
packets, which can lead to more retransmission, and ultimately increasing
more and more traffic.

PREVIOUS i d e n t i a NEXT
C o n f HOME l
Unit-8 Network Layer

Design issues of Network layer


The important design issues : ( CONTINUED..)
5. Internetworking :
A subnet can be considered as an interconnection of multiple subnets. The
network layer now has to perform a job of internetworking among the subnets.

Different subnets may use


Different routing and congestion control techniques,
Different packet length
Different frame format
Different data rates etc.
Hence internetworking is a very crucial job. For this purpose a separate sub-
layer has been created as the top part of the Network layer within an OSI
model in order to take care of internetworking task.

PREVIOUS i d e n t i a NEXT
C o n f HOME l
Unit-8 Network Layer

Principles of Routing

The main function of the network layer is routing packets from the source
machine to the destination machine. In computer networking the term
routing refers to selecting paths in a computer network along which to
send data.

There are two types of routing algorithm depending up on the


communication subnet.

•Session routing: if subnet uses virtual circuits

•Forwarding: if subnet uses datagram

PREVIOUS i d e n t i a NEXT
C o n f HOME l
Unit-8 Network Layer

Principles of Routing
Classes of routing algorithms :
Routing algorithms can be grouped into two major classes.
1. Static or Non-adaptive Routing algorithms
2. Dynamic or Adaptive Routing algorithms

Static or Non-adaptive Routing algorithms do not base their routing decisions


on measurements or estimates of the current traffic and topology. The choice
of the route to use to get from source to destination or from one node to other
is computed in advance

Dynamic or adaptive Routing algorithms in contrast change their routing


decisions to reflect changes in topology and usually the traffic as well.
Dynamic routing attempts to solve this problem by constructing routing tables
automatically.

PREVIOUS i d e n t i a NEXT
C o n f HOME l
Unit-8 Network Layer

Principles of Routing
Properties of routing algorithms :

• Correctness

• Simplicity

• Robustness – since usually the entire network can’t be “re-booted”

• Stability – routing algorithm reaches equilibrium in a reasonable time

• Fairness, and

• Optimality

PREVIOUS i d e n t i a NEXT
C o n f HOME l
Unit-8 Network Layer

Routing algorithms
Different routing Algorithms :
1. Shortest path algorithm :
It is the simplest and widely used algorithm.
It is a static algorithm.

2. Flooding :
This is also a static algorithm in which every incoming packet is sent out on
every outgoing line except the one it arrives on. This method usually
generates vast number of duplicate packets.

3. Distance vector routing :


It is a dynamic routing algorithm. Distance vector routing algorithm consists of
a data structure called a routing table. Distance vector algorithms use the
Bellman-Ford algorithm.

PREVIOUS i d e n t i a NEXT
C o n f HOME l
Unit-8 Network Layer

Routing algorithms

Different routing Algorithms : (continued..)

4. Hierarchical routing :
When hierarchical routing is used, the routers are divided into regions. Each
router knows all details about how to route packets to destinations
within its own region. But it does not have any idea about internal
structure of other regions.

5. Link state routing :


When applying link-state algorithms, each node uses as its fundamental
data a map of the network in the form of a graph.
Using this map, each router then independently determines the least-cost
path from itself to every other node using a standard shortest paths
algorithm such as Dijkstra's algorithm.

PREVIOUS i d e n t i a NEXT
C o n f HOME l
Unit-8 Network Layer

Congestion

When does congestion occurs ?

Network congestion occurs when a link or node is carrying so much data


that its quality of service deteriorates. Typical effects include queuing
delay, packet loss or the blocking of new connections.

Modern networks use congestion control and network congestion


avoidance techniques to try to avoid congestion collapse. These include:
exponential back off in protocols such as 802.11's CSMA/CA and the
original Ethernet, window reduction in TCP, and fair queuing in devices
such as routers.

PREVIOUS i d e n t i a NEXT
C o n f HOME l
Unit-8 Network Layer

Congestion

Factors of congestion :
Congestion can be brought by many factors which are listed below:

• If all of a sudden, streams of packets begin to arrive from most of


the input lines and all need the same output line.

• If there is insufficient memory to hold all the packets that arrive,


then packets may be lost and increase traffic because of
retransmission of those dropped packets.

• Adding more memory also increases congestion.

PREVIOUS i d e n t i a NEXT
C o n f HOME l
Unit-8 Network Layer

Congestion

Factors of congestion : (continued..)

• Slow processors also cause congestion. As queues can be build up,


even though there is excess line capacity.

• Low bandwidth lines also cause congestion.

• Finally congestion tends to feed upon itself and become worse.

PREVIOUS i d e n t i a NEXT
C o n f HOME l
Unit-8 Network Layer

IP protocol (IPV4)

IP protocol :
An IP datagram consists of two parts

Header: 20 byte fixed


Optional: variable to a maximum of 40 bytes.

PREVIOUS i d e n t i a NEXT
C o n f HOME l
Unit-8 Network Layer

IP protocol (IPV4)

• Version field: It is 4 bits long. It keeps track of which version of the


protocol the datagram belongs to. Here for IPV4 the value it takes is
4.

• IHL: It is 4 bits long. It is provided to tell how long the header is in


units of 32-bit words. The minimum value is 5 and maximum is 15,
which implies header to be maximum of 60 bytes..

• Type of service: It is 6 bits long. It allows the host to tell the subnet
what kind of service it wants.

• Total length: specifies length of the datagram including header and


data. The maximum value is 65535 bytes.

PREVIOUS i d e n t i a NEXT
C o n f HOME l
Unit-8 Network Layer

IP protocol (IPV4)

• Identification field: It specifies the fragment number.

• DF: the data gram should not be further broken down into fragments.

• MF: all fragments except the last one have this bit set.

• Time to live field: is a counter used like the hop counter discussed in
flooding. It is used to limit the packet life time allowing a maximum of
255 sec.

PREVIOUS i d e n t i a NEXT
C o n f HOME l
Unit-8 Network Layer

IP protocol (IPV4)

• Protocol: tells which of the protocols are used at Transport layer (TCP
or UDP)

• Header checksum: this checksum verifies the header only.

• Address field: it uses 32 bit addressing called an IP address.

• Option field: is variable length. It was provided to permit


experiments to try out new ideas.

PREVIOUS i d e n t i a NEXT
C o n f HOME l
Unit-8 Network Layer

Summary
• The network layer provides service to transport layer.

• It can be based on the virtual circuits or datagram’s.

• Apart from this there are pother major task that are carried out by the
network layer such as routing.

• Routing is a very complex task and are of two types. One of which is static
routing, which does not take any changes in topology or traffic variations
into account for decisions.

• And the other is dynamic or adaptive, that considers the topology changes
and traffic variations into account for decisions.

• Finally another important task taken care is congestion control.

C o n f i d eHOME
PREVIOUS ntial

You might also like