Unit 3 CN

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 34

UNIT-3

NETWORK LAYER
NETWORK LAYER SERVICES
1.The network layer in the TCP/IP protocol suite is responsible for the host-to
host delivery of datagrams.
2 It provides services to the transport layer and receives services from the
data link layer.
3 .The network layer translates the logical addresses into physical addresses .
4 It determines the route from the source to the destination and also
manages the traffic problems such as switching, routing and controls the
congestion of data packets.
5. The main role of the network layer is to move the packets from sending
host to the receiving host
Design Issues in Network Layer

• The Network layer is majorly focused on getting packets from the source to the
destination, routing error handling, and congestion control. Before learning about
design issues in the network layer, let’s learn about its various functions.
• Addressing: Maintains the address at the frame header of both source and
destination and performs addressing to detect various devices in the 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.
Services provided by network layer
are
PACKETIZING

• The first duty of the network layer is definitely packetizing.


• This means encapsulating the payload (data received from upper
layer) in a network-layer packet at the source and decapsulating the
payload from the network-layer packet at the destination.
• The network layer is responsible for delivery of packets from a sender
to a receiver without changing or using the contents.
ROUTING AND FORWARDING
Routing

• The network layer is responsible for routing the packet from its source to
the destination.
• The network layer is responsible for finding the best one among these
possible routes.
• The network layer needs to have some specific strategies for defining the
best route.
• Routing is the concept of applying strategies and running routing protocols
to create the decision-making tables for each router. These tables are called
as routing tables.
Forwarding

• Forwarding can be defined as the action applied by each router when


a packet arrives at one of its interfaces.
• The decision-making table, a router normally uses for applying this
action is called the forwarding table.

• When a router receives a packet from one of its attached networks, it


needs to forward the packet to another attached network.
ERROR CONTROL

• The network layer in the Internet does not directly provide error
control.
• It adds a checksum field to the datagram to control any corruption in
the header, but not in the whole datagram.
• This checksum prevents any changes or corruptions in the header of
the datagram.
• The Internet uses an auxiliary protocol called ICMP(Internet Control
Message Protocol), that provides some kind of error control if the
datagram is discarded or has some unknown information in the
header.
FLOW CONTROL
• Flow control regulates the amount of data a source can send without
overwhelming the receiver.
• The network layer in the Internet, however, does not directly provide
any flow control.
• The datagrams are sent by the sender when they are ready, without
any attention to the readiness of the receiver.
• Flow control is provided for most of the upper-layer protocols that
use the services of the network layer, so another level of flow control
makes the network layer more complicated and the whole system less
efficient.
CONGESTION CONTROL

Another issue in a network-layer protocol is congestion control.


Congestion in the network layer is a situation in which too many
datagrams are present in an area of the Internet.
• Congestion may occur if the number of datagrams sent by source
computers is beyond the capacity of the network or routers.
• In this situation, some routers may drop some of the datagrams
SECURITY
• Another issue related to communication at the network layer is
security.
• To provide security for a connectionless network layer, we need to
have another virtual level that changes the connectionless service to a
connection oriented service. This virtual layer is called as called IPSec
(IP Security)
•Data Integrity and Privacy: Ensuring that data is not tampered with or
intercepted during transmission. This involves implementing encryption,
authentication, and other security measures.

•Firewalls and Intrusion Detection: Protecting the network from unauthorized


access and attacks by using firewalls, intrusion detection systems (IDS), and
other security mechanisms.
NETWORK LAYER PERFOMANCE
• The performance of a network can be measured in terms of Delay,
Throughput and Packet loss.
• Congestion control is an issue that can improve the performance
DELAY
• A packet from its source to its destination, encounters delays.
• The delays in a network can be divided into four types: Transmission
delay, Propagation delay, Processing delay and Queuing delay
• Transmission Delay
• A source host or a router cannot send a packet instantaneously.
• A sender needs to put the bits in a packet on the line one by one.
• If the first bit of the packet is put on the line at time t1 and the last bit is put
on the line at time t2, transmission delay of the packet is (t2 - t1).
• The transmission delay is longer for a longer packet and shorter if the sender
can transmit faster.
• The Transmission delay is calculated using the formula

Delaytr = (Packet length) / (Transmission rate)


• In a Fast Ethernet LAN with a transmission rate of 100 million bits per
second (100 Mbps), if you have a packet size of 10,000 bits, the time it
takes to transmit the entire packet onto the network (known as the
transmission delay) can be calculated as follows: ?
In a Fast Ethernet LAN with a transmission rate of 100 million bits per second (100
Mbps), if you have a packet size of 10,000 bits, the time it takes to transmit the
entire packet onto the network (known as the transmission delay) can be calculated
as follows:
• Propagation Delay
• Propagation delay is the time it takes for a bit to travel from point A to point B in
the transmission media.
• The propagation delay for a packet-switched network depends on the propagation
delay of each network (LAN or WAN).
• The propagation delay depends on the propagation speed of the media, which is
3X108 meters/second in a vacuum and normally much less in a wired medium.
• It also depends on the distance of the link.
• The Propagation delay is calculated using the formula

Delaypg = (Distance) / (Propagation speed)


Example
• If the distance of a cable link in a point-to-point WAN is 2000 meters
and the propagation speed of the bits in the cable is 2 X10^8
meters/second,
Processing Delay
• The processing delay is the time required for a router or a destination
host to receive a packet from its input port, remove the header,
perform an error detection procedure, and deliver the packet to the
output port (in the case of a router) or deliver the packet to the
upper-layer protocol (in the case of the destination host).
• The processing delay may be different for each packet, but normally
is calculated as an average.
• Delaypr = Time required to process a packet in a router or a
destination host
Queuing Delay
• Queuing delay can normally happen in a router.
• A router has an input queue connected to each of its input ports to
store packets waiting to be processed.
• The router also has an output queue connected to each of its output
ports to store packets waiting to be transmitted.
• The queuing delay for a packet in a router is measured as the time a
packet waits in the input queue and output queue of a router.
• Delayqu = The time a packet waits in input and output queues in a
router
• Total Delay Assuming equal delays for the sender, routers and
receiver, the total delay (source-to-destination delay) of a packet can
be calculated if we know the number of routers, n, in the whole path.

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

• If we have n routers, we have (n +1) links.


• Therefore, we have (n +1) transmission delays related to n routers
and the source, (n +1) propagation delays related to (n +1) links, (n +1)
processing delays related to n routers and the destination, and only n
queuing delays related to n routers.
• PACKET LOSS
• Another issue that severely affects the performance of
communication is the number of packets lost during transmission.
• 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 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.
• 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 the Transport Layer
• Through the network/transport layer interface, the network layer transfers
its patterns services to the transport layer. These services are described
below. But before providing these services to the transfer layer, the 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
patterns, 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 the subnet are
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
• Packets are termed as “datagrams” and corresponding subnets 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 the router via. a
few protocols. Each data packet has a destination address and is
routed independently irrespective of the packets.
• 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 the 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.
Circuit switching
• Circuit switching is a connection-oriented service that sends and
receives data via a dedicated path. In circuit switching, it is necessary
to establish an end-to-end path before delivering any data from the
source to the destination. Due to the dedicated circuit path, circuit
switching has the lowest probability of data loss. Still, a lot of
bandwidth is wasted because other senders cannot use a path during
congestion.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy