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

Unit-3 CN

Uploaded by

tanveerpal2002
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)
21 views11 pages

Unit-3 CN

Uploaded by

tanveerpal2002
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
You are on page 1/ 11

Unit-3

Network Layer
It is majorly focused on getting packets from the source to the destination, routing error
handling and congestion control.
Various functions:
• 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

The network layer comes with some design issues they are described as follows:
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.”
2. Services provided to Transport Layer:
Through the network/transport layer interface, the 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:
• 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 establish 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.

Routing algorithms
The routing algorithm is that part of the network layer software responsible for deciding
which output line an incoming packet should be transmitted on.

Adaptive Routing algorithm

o An adaptive routing algorithm is also known as dynamic routing algorithm.


o This algorithm makes the routing decisions based on the topology and network traffic.
o The main parameters related to this algorithm are hop count, distance and estimated
transit time.
An adaptive routing algorithm can be classified into three parts:

o Centralized algorithm: It is also known as global routing algorithm as it computes the


least-cost path between source and destination by using complete and global
knowledge about the network. This algorithm takes the connectivity between the
nodes and link cost as input, and this information is obtained before actually
performing any calculation. Link state algorithm is referred to as a centralized
algorithm since it is aware of the cost of each link in the network.
o Isolation algorithm: It is an algorithm that obtains the routing information by using
local information rather than gathering information from other nodes.
o Distributed algorithm: It is also known as decentralized algorithm as it computes the
least-cost path between source and destination in an iterative and distributed
manner. In the decentralized algorithm, no node has the knowledge about the cost of
all the network links. In the beginning, a node contains the information only about its
own directly attached links and through an iterative process of calculation computes
the least-cost path to the destination. A Distance vector algorithm is a decentralized
algorithm as it never knows the complete path from source to the destination, instead
it knows the direction through which the packet is to be forwarded along with the
least cost path.

Non-Adaptive Routing algorithm

o Non-Adaptive routing algorithm is also known as a static routing algorithm.


o When booting up the network, the routing information stores to the routers.
o Non-Adaptive routing algorithms do not take the routing decision based on the
network topology or network traffic.

The Non-Adaptive Routing algorithm is of two types:

o Flooding: In case of flooding, every incoming packet is sent to all the outgoing links
except the one from it has been reached. The disadvantage of flooding is that node
may contain several copies of a particular packet.
o Random walks: In case of random walks, a packet sent by the node to one of its
neighbours randomly. An advantage of using random walks is that it uses the
alternative routes very efficiently.
Types of Routing
Static:

• Static Routing is also known as Nonadaptive Routing.


• It is a technique in which the administrator manually adds the routes in a routing
table.
• A Router can send the packets for the destination along the route defined by the
administrator.
• In this technique, routing decisions are not made based on the condition or topology
of the networks
• Advantages of Static Routing:
• No overhead
• Security
• Bandwidth

Default:

• Default Routing is a technique in which a router is configured to send all the packets
to the same hop device, and it doesn't matter whether it belongs to a particular
network or not. A Packet is transmitted to the device for which it is configured in
default routing.
• Default Routing is used when networks deal with the single exit point.
• It is also useful when the bulk of transmission networks have to transmit the data to
the same hp device.
• When a specific route is mentioned in the routing table, the router will choose the
specific route rather than the default route. The default route is chosen only when a
specific route is not mentioned in the routing table.
Dynamic:

• It is also known as Adaptive Routing.


• It is a technique in which a router adds a new route in the routing table for each
packet in response to the changes in the condition or topology of the network.
• Dynamic protocols are used to discover the new routes to reach the destination.
• In Dynamic Routing, RIP and OSPF are the protocols used to discover the new routes.
• If any route goes down, then the automatic adjustment will be made to reach the
destination.

Advantages of Dynamic Routing:

• It is easier to configure.
• It is more effective in selecting the best route in response to the changes in the
condition or topology.

Congestion Control
A state occurring in network layer when the message traffic is so heavy that it slows down
network response time.

Effects of Congestion
• As delay increases, performance decreases.
• If delay increases, retransmission occurs, making situation worse.

Congestion control algorithms


• Congestion Control is a mechanism that controls the entry of data packets into
the network, enabling a better use of a shared network infrastructure and
avoiding congestive collapse.
• Congestive-Avoidance Algorithms (CAA) are implemented at the TCP layer as
the mechanism to avoid congestive collapse in a network.
• There are two congestion control algorithm which are as follows:

“Leaky Bucket Algorithm”


• The leaky bucket algorithm discovers its use in the context of network traffic
shaping or rate-limiting.
• A leaky bucket execution and a token bucket execution are predominantly used
for traffic shaping algorithms.
• This algorithm is used to control the rate at which traffic is sent to the network
and shape the burst traffic to a steady traffic stream.
• The disadvantages compared with the leaky-bucket algorithm are the
inefficient use of available network resources.
• The large area of network resources such as bandwidth is not being used
effectively.
Let us consider an example to understand

Imagine a bucket with a small hole in the bottom. No matter at what rate water enters the
bucket, the outflow is at constant rate. When the bucket is full with water additional
water entering spills over the sides and is lost.

Similarly, each network interface contains a leaky bucket and the following steps are
involved in leaky bucket algorithm:
1. When host wants to send packet, packet is thrown into the bucket.
2. The bucket leaks at a constant rate, meaning the network interface transmits
packets at a constant rate.
3. Bursty traffic is converted to a uniform traffic by the leaky bucket.
4. In practice the bucket is a finite queue that outputs at a finite rate.

“Token bucket Algorithm”


• The leaky bucket algorithm has a rigid output design at an average rate
independent of the bursty traffic.
• In some applications, when large bursts arrive, the output is allowed to speed
up. This calls for a more flexible algorithm, preferably one that never loses
information. Therefore, a token bucket algorithm finds its uses in network
traffic shaping or rate-limiting.
• It is a control algorithm that indicates when traffic should be sent. This order
comes based on the display of tokens in the bucket.
• The bucket contains tokens. Each of the tokens defines a packet of
predetermined size. Tokens in the bucket are deleted for the ability to share a
packet.
• When tokens are shown, a flow to transmit traffic appears in the display of
tokens.
• No token means no flow sends its packets. Hence, a flow transfers traffic up to
its peak burst rate in good tokens in the bucket.
Need of token bucket Algorithm:

The leaky bucket algorithm enforces output pattern at the average rate, no matter how
bursty the traffic is. So, in order to deal with the bursty traffic we need a flexible algorithm
so that the data is not lost. One such algorithm is token bucket algorithm.

Steps of this algorithm can be described as follows:

1. In regular intervals tokens are thrown into the bucket. ƒ


2. The bucket has a maximum capacity. ƒ
3. If there is a ready packet, a token is removed from the bucket, and the packet is
sent.
4. If there is no token in the bucket, the packet cannot be sent.

NOTE
Ways in which token bucket is superior to leaky bucket: The leaky bucket algorithm
controls the rate at which the packets are introduced in the network, but it is very
conservative in nature. Some flexibility is introduced in the token bucket algorithm. In the
token bucket, algorithm tokens are generated at each tick (up to a certain limit). For an
incoming packet to be transmitted, it must capture a token and the transmission takes
place at the same rate. Hence some of the busty packets are transmitted at the same rate
if tokens are available and thus introduces some amount of flexibility in the system.

Host to Host Delivery


Host to Host delivery or source to destination delivery in Network Layer. In these packets
are delivered directly from source to destination using IP address to the sender and receiver
device.
Or
Host-to-host delivery in a computer network refers to the process of transmitting data from
one computer (host) to another across the network. This involves the efficient and reliable
transfer of information between the source and destination hosts.
To achieve host-to-host delivery, the network uses various protocols and technologies, such
as the Transmission Control Protocol (TCP) in the case of the Internet. TCP ensures reliable
delivery by dividing data into packets, assigning sequence numbers, and implementing
acknowledgment mechanisms. This way, if a packet is lost or corrupted during transmission,
the sender can retransmit it.

Internetworking
Internetworking is the practice of interconnecting multiple computer networks, such that
any pair of hosts in the connected networks can exchange messages irrespective of their
hardware-level networking technology.
An internetworking device is a widely-used term for any hardware within networks that
connect different network resources. Key devices that comprise a network are routers,
bridges, repeaters and gateways.
Routing
IP routing: The process of hosts and routers forwarding IP packets (Layer 3 PDUs), while
relying on the underlying LANs and WANs to forward the bits. Routing is the process of path
selection in any network. A computer network is made of many machines, called nodes, and
paths or links that connect those nodes

Subnet
A subnet, or subnetwork, is a network inside a network. Subnets make networks more
efficient. Through subnetting, network traffic can travel a shorter distance without passing
through unnecessary routers to reach its destination.
A subnetwork or subnet is a logical subdivision of an IP network. The practice of dividing a
network into two or more networks is called subnetting. Computers that belong to the same
subnet are addressed with an identical group of its most-significant bits of their IP addresses.

ARP/ Address Resolution Protocol


It is basically used to find the physical address of a node whose logical data is given.

RARP/ Reverse Address Resolution Protocol


This protocol helps in finding the logical address of whose physical address is known.
Note: Both are concerned with IP and MAC address mapping. Both the protocols are
supported by the internet layer in TCPIP Model.

MAC Addressing:
Media Access Control (MAC) addresses are hardware addresses assigned to the network
interface cards (NICs) of devices. While IP addresses are used for communication between
devices across networks, MAC addresses are essential for local communication within a
network segment.

IP addressing:
Addresses used to identify a packet's source and destination host computer.
Devices are assigned unique numerical labels called IP addresses. These addresses are used
to identify and locate devices on a network. There are two versions of IP addresses, IPv4 and
IPv6, with IPv6 providing a larger address space to accommodate the growing number of
connected devices.
Class Full IP addressing
Classful IP addressing refers to the traditional way of dividing IP addresses into different
classes: Class A, Class B, Class C, Class D, and Class E.
Each class has a fixed number of network and host bits.
Class A addresses are used for large networks, Class B for medium-sized networks, and Class
C for small networks. Class D is reserved for multicast addresses, and Class E is reserved for
experimental purposes.
Classful addressing is not as commonly used nowadays, as it has limitations in terms of
efficient address allocation.

Classless IP Addressing
Classless IP addressing, also known as CIDR (Classless Inter-Domain Routing), is a more
flexible approach to IP addressing.
In classless addressing, IP addresses are not strictly divided into predefined classes like in
classful addressing. Instead, CIDR allows for the allocation of IP addresses using variable-
length subnet masks (VLSM).
This means that the division between network and host bits can be customized, resulting in
more efficient utilization of IP address space.
CIDR has become the standard method for IP addressing, allowing for better scalability and
more efficient allocation of IP addresses.

The Internet Control Message Protocol (ICMP)


ICMP is a protocol that operates at the network layer of the TCP/IP protocol suite. It is used
for various network-related functions, such as error reporting, diagnostic messages, and
network management. ICMP messages are typically generated by network devices, like
routers or hosts, to communicate information about network conditions or to report errors.
For example, when a packet encounters an issue during transmission, ICMP can be used to
send an error message back to the source. ICMP is an essential component of network
troubleshooting and plays a crucial role in maintaining the stability and efficiency of network
communication.
One example of an ICMP message is the "Echo Request" message, commonly known as a
ping. When you use the ping command, your device sends an ICMP Echo Request message
to another device on the network. If the destination device is reachable and operational, it
will respond with an ICMP Echo Reply message. This helps to determine the round-trip time
(RTT) and the availability of a network device. ICMP messages like these are important for
network diagnostics and troubleshooting.
IPV4 & IPV6

Internet Control Message Protocol Version 6 (ICMPv6)


It is the implementation of the Internet Control Message Protocol (ICMP) for Internet
Protocol version 6 (IPv6). ICMPv6 is an integral part of IPv6 and performs error reporting and
diagnostic functions.
ICMPv4 is the messaging protocol for IPv4. ICMPv6 provides these same services for IPv6 but
includes additional functionality. In this course, the term ICMP will be used when referring to
both ICMPv4 and ICMPv6. The types of ICMP messages, and the reasons why they are sent,
are extensive.

You might also like