0% found this document useful (0 votes)
12 views11 pages

Computer Network Notes - Unit IV

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

Computer Network Notes - Unit IV

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

UNIT IV

NETWORK LAYER DESIGN ISSUES


Network layer is majorly focused on:
Getting packets from the source to the destination, routing
error handling and congestion control. Functions 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: This 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:
1. Store and Forward packet switching:
• The host sends the packet to the nearest router.
• This 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.
• This mechanism is called “Store and Forward packet switching.”
Services Provided to the Transport Layer:
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.
Implementation of Connectionless Service:
• Packet are termed as “datagram” 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.

Connectionless device
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.
Comparison of Virtual-Circuit and Datagram Network

Routing Algorithm:
• Routing is the process of establishing the routes that data packets
must follow to reach the destination.
• In this process, a routing table is created which contains
information regarding routes that data packets follow.
• Various routing algorithms are used for the purpose of deciding
which route an incoming data packet needs to be transmitted on to
reach the destination efficiently.
Classification of Routing Algorithms
• The routing algorithms can be classified as follows:
• Adaptive Algorithms
• Non-Adaptive Algorithms
• Hybrid Algorithms
Routing Algorithms
Adaptive Algorithms
• These are the algorithms that change their routing decisions
whenever network topology or traffic load changes.
• The changes in routing decisions are reflected in the topology
as well as the traffic of the network.
• Optimization parameters are distance, number of hops, and
estimated transit time.
• Further, these are classified as follows:
• Isolated: In this method each, node makes its routing
decisions using the information it has without seeking
information from other nodes.
Examples: Hot potato routing, and backward learning.
• Centralized: In this method, a centralized node has
entire information about the network and makes all the
routing decisions..
• Distributed: In this method, the node receives
information from its neighbors and then takes the
decision about routing the packets.
• A disadvantage is that the packet may be delayed if
there is a change in between intervals in which it
receives information and sends packets.
Non-Adaptive Algorithms
• These are the algorithms that do not change their routing
decisions once they have been selected.
• This is also known as static routing as a route to be taken is
computed in advance and downloaded to routers when a
router is booted.
• Further, these are classified as follows:
• Flooding: This adapts the technique in which every incoming
packet is sent on every outgoing line except from which
it arrived.
• Random walk: In this method, packets are sent host by host or
node by node to one of its neighbors randomly. This is a
highly robust method that is usually implemented by
sending packets onto the link which is least queued.
HYBRID ALGORITHMS:
These algorithms are a combination of both adaptive and non-adaptive algorithms.
• Further, these are classified as follows:
• Link-state: In this method, each router creates a detailed and complete map of the
network which is then shared with all other routers.
• This allows for more accurate and efficient routing decisions to be made.
• Distance vector: In this method, each router maintains a table that contains
information about the distance and direction to every other node in the network.
• This table is then shared with other routers in the network. The disadvantage of this
method is that it may lead to routing loops.

Link State routing Algorithm


• Link state routing is a technique in which each router shares the knowledge of its
neighborhood with every other router in the internetwork.
• The three keys to understand the Link State Routing algorithm:
• Knowledge about the neighborhood: Instead of sending its routing table, a router
sends the information about its neighborhood only.
• Flooding: Each router sends the information to every other router on the
internetwork except its neighbors. This process is known as Flooding.
• Information sharing: A router sends the information to every other router only when
the change occurs in the information.
Link State Routing has two phases:
• Initial state: Each node knows the cost of its neighbors.
• Final state: Each node knows the entire graph
Routing Algorithms (Contd..)
Route Calculation
• Each node uses Dijkstra's algorithm on the graph to calculate the optimal routes to all
nodes.
• The Link state routing algorithm is also known as Dijkstra's algorithm which is used
to find the shortest path from one node to every other node in the network.
th
• The Dijkstra's algorithm is an iterative, and it has the property that after k iteration
of the algorithm, the least cost paths are well known for k destination nodes.

• Let's describe some notations:


• c( i , j): Link cost from node i to node j. If i and j nodes are not directly
linked, then c(i , j) = ∞.
• D(v): It defines the cost of the path from source code to destination v that has
the least cost currently.
• P(v): It defines the previous node (neighbor of v) along with current
least cost path from source to v.
• N: It is the total number of nodes available in the network.
Distance Vector Routing Algorithm

• In distance-vector routing (DVR), each router is required to inform the topology changes to its
neighboring routers periodically.
• Historically it is known as the old ARPNET routing algorithm or Bellman-Ford algorithm.

How the DVR Protocol Works?


• In DVR, each router maintains a routing table. It contains only one entry
for each router. It contains two parts − a preferred outgoing line to use for that
• destination and an estimate of time (delay). Tables are updated by exchanging
the information with the neighbor’s nodes.
• Each router knows the delay in reaching its neighbors (Ex − send echo
request).
• Routers periodically exchange routing tables with each of their
neighbors.
• It compares the delay in its local table with the delay in the neighbor’s
table and the cost of reaching that neighbor.
• If the path via the neighbor has a lower cost, then the router updates its
local table to forward packets to the neighbor.

Congestion Control Algorithms


• Congestion is an important issue that can arise in packet
switched network.
• Congestion causes choking of the communication
medium.
• When too many packets are displayed in a method of the
subnet, the subnet's performance degrades.
• Hence, a network's communication channel is called
congested if packets are raversing the path and experience delays
mainly over the path's propagation delay.

LEAKY BUCKET ALGORITHM – CONGESTION CONTROL ALGORITHM


• The leaky bucket algorithm discovers its use in the context of network traffic shaping or rate-limiting.
• The algorithm allows controlling the rate at which a record is injected into a network and managing
burst ness in the data rate.
• In this algorithm:
• A bucket with a volume of, say, b bytes and a hole in the Notes bottom is considered.
• If the bucket is null, it means b bytes are available as storage.
• A packet with a size smaller than b bytes arrives at the bucket and will forward it.
• If the packet's size increases by more than b bytes, it will either be discarded or queued.
• It is also considered that the bucket leaks through the hole in its bottom at a constant rate of
r bytes per second.
• The outflow is considered constant when there is any packet in the bucket and zero when it
is empty. This defines that if data flows into the bucket faster than data flows out through
the hole, the bucket overflows.
How Does the IP Routing Perform?

• IP routing is a process of determining the path for data so that it can travel from the source to the
destination.
• As we know that the data is divided into multiple packets, and each packet will pass through a
web of the router until it reaches the final destination.
• The path that the data packet follows is determined by the routing algorithm.
• The routing algorithm considers various factors like the size of the packet and its header to determine the
efficient route for the data from the source to the destination.
• When the data packet reaches some router, then the source address and destination address are used with
a routing table to determine the next hop's address.
• This process goes on until it reaches the destination.
• The data is divided into multiple packets so all the packets will travel individually to reach the destination.

Functions of Internet Protocol (IP)


• The main function of the internet protocol is to
provide addressing to the hosts, encapsulating
the data into a packet structure, and routing the
data from source to the destination across one or
more IP networks.

What is an IP packet?
• Before an IP packet is sent over
the network, two major components
are added in an IP packet, i.e., header
and a payload.
TYPES OF INTERNET PROTOCOL

The Internet Protocols are of different types having different uses:-

• 1. TCP/IP(Transmission Control Protocol/ Internet Protocol): These are a set


of standard rules that allows different types of computers to communicate
with each other. The IP protocol ensures that each computer that is
connected to the Internet is having a specific serial number called the IP
address. TCP specifies how data is exchanged over the internet and how it
should be broken into IP packets.
• 2. SMTP(Simple Mail Transfer Protocol):
These protocols are important for sending
and distributing outgoing emails.
• 3. PPP(Point to Point Protocol): It is a communication protocol that is used to
create a direct connection between two communicating devices.
• 4. FTP (File Transfer Protocol): This protocol is used for transferring files from
one system to the other.
• 5. SFTP(Secure File Transfer Protocol): SFTP which is also
known as SSH FTP refers to File Transfer Protocol (FTP)
over Secure Shell (SSH) as it encrypts both commands
and data while in transmission.

IP Address

• An IP address is a unique identifier assigned to the computer which is


connected to the internet.
• Each IP address consists of a series of characters like 192.168.1.2.
• Users cannot access the domain name of each website with the help of
these characters, so DNS resolvers are used that convert the human-readable
domain names into a series of characters.
• Each IP packet contains two addresses, i.e., the IP address of the device,
which is sending the packet, and the IP address of the device which is
receiving the packet.

• Types of IP addresses - IPv4 addresses are divided into two categories:
• Public Address
• Private Address
Internet Control Message Protocol (ICMP) (Contd..)

• Position of ICMP in the network layer: The ICMP resides in the IP layer, as shown in the
below diagram.

• Messages: The ICMP messages are usually divided into two


categories:

You might also like