0% found this document useful (0 votes)
13 views

Chapter4 Network Layer

Uploaded by

Harshad Shelke
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)
13 views

Chapter4 Network Layer

Uploaded by

Harshad Shelke
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/ 62

Chapter 4 - Network Layer

Prepared By: Mr. V. D. Chougule


Contents
• IPv4 Addresses:
– Classful Addressing Other Issues
– Sub-netting and Super netting
– Class less Addressing
– Delivery
– Forwarding and routing
• Routing methods:
– Shortest path
– Link state
– Distance vector routing and broadcast routing
• Congestion control algorithms:
– Principles
– Congestion prevention policies
– congestion control in datagram subnet
– Load Shedding
– Jitter Control
IPv4
• IP stands for Internet Protocol and v4 stands
for Version Four (IPv4).
• IPv4 was the primary version brought into
action for production within the ARPANET in
1983.
• IP version four addresses are 32-bit integers
which will be expressed in decimal notation.
• Example- 192.0.2.126 could be an IPv4
address.
Classful IP Addressing
• IP address is an address having information
about how to reach a specific host, especially
outside the LAN.
• An IP address is a 32 bit unique address having
an address space of 232.

• Generally, there are two notations in which IP


address is written, dotted decimal notation
and hexadecimal notation.
Classful IP Addressing
• Dotted Decimal Notation:

• Hexadecimal Notation:
Classful Addressing

• The 32 bit IP address is divided into five


sub-classes. These are:
• Class A
• Class B
• Class C
• Class D
• Class E
IPv4 address is divided into two parts:

• Network ID
• 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 IP
address to each device that is connected to its
network.
Class A
• IP address belonging to class A are assigned to the
networks that contain a large number of hosts.
• The network ID is 8 bits long.
• The host ID is 24 bits long.
• The higher order bit of the first octet in class A is always
set to 0.
• The remaining 7 bits in first octet are used to determine
network ID.
• The 24 bits of host ID are used to determine the host in
any network.
Class B
• IP address belonging to class B are assigned to the
networks that ranges from medium-sized to large-sized
networks.
• The network ID is 16 bits long.
• The host ID is 16 bits long.
• The higher order bits of the first octet of IP addresses of
class B are always set to 10.
• The remaining 14 bits are used to determine network ID.
• The 16 bits of host ID is used to determine the host in
any network.
Class C
• IP address belonging to class C are assigned to
small-sized networks.
• The network ID is 24 bits long.
• The host ID is 8 bits long.
• The higher order bits of the first octet of IP addresses of
class C are always set to 110.
• The remaining 21 bits are used to determine network ID.
• The 8 bits of host ID is used to determine the host in any
network.
Class D

• IP address belonging to class D are reserved for


multi-casting.
• The higher order bits of the first octet of IP addresses
belonging to class D are always set to 1110.
• The remaining bits are for the address that interested
hosts recognize.
Class E
• IP addresses belonging to class E are reserved for
experimental and research purposes.
• IP addresses of class E ranges from 240.0.0.0 –
255.255.255.254.
• This class doesn’t have any sub-net mask.
• The higher order bits of first octet of class E are always
set to 1111.
Subnetting
• When a bigger network is divided into smaller networks,
to maintain security, then that is known as Subnetting.
• So, maintenance is easier for smaller networks.
• For example, if we consider a class A address, the
possible number of hosts is 224 for each network, it is
obvious that it is difficult to maintain such a huge
number of hosts, but it would be quite easier to maintain
if we divide the network into small parts.
Subnetting
• To divide a network into two parts, you need to
choose one bit for each Subnet from the host ID part.
Subnetting
• In the above diagram, there are two Subnets.
• Note: It is a class C IP so, there are 24 bits in the network
id part and 8 bits in the host id part.
• Subnetting for a network should be done in such a way
that it does not affect the network bits.
• In class C the first 3 octets are network bits so it remains
as it is.
For Subnet-1
• The first bit which is chosen from the host id part is zero
and the range will be from (193.1.2.00000000 till you get
all 1’s in the host ID part i.e., 193.1.2.01111111) except
for the first bit which is chosen zero for subnet id part.
• Thus, the range of subnet-1: 193.1.2.0 to 193.1.2.127
• Subnet id of Subnet-1 is : 193.1.2.0
• Direct Broadcast id of Subnet-1 is : 193.1.2.127
• Total number of host possible is : 126 (Out of 128, 2 id’s
are used for Subnet id & Direct Broadcast id)
• Subnet mask of Subnet- 1 is : 255.255.255.128
For Subnet-2
• The first bit chosen from the host id part is one and the
range will be from (193.1.2.100000000 till you get all 1’s
in the host ID part i.e., 193.1.2.11111111).
• Thus, the range of subnet-2: 193.1.2.128 to 193.1.2.255
• Subnet id of Subnet-2 is : 193.1.2.128
• Direct Broadcast id of Subnet-2 is : 193.1.2.255
• Total number of host possible is : 126 (Out of 128, 2 id’s
are used for Subnet id & Direct Broadcast id)
• Subnet mask of Subnet- 2 is : 255.255.255.192
• Finally, after using the subnetting the total number of
usable hosts are reduced from 254 to 252.
Supernetting
• Supernetting is the opposite of Subnetting.
• In subnetting, a single big network is divided into
multiple smaller subnetworks.
• In Supernetting, multiple networks are combined
into a bigger network termed as a Supernetwork or
Supernet.
• Supernetting is mainly used in Route Summarization.
• where routes to multiple networks with similar
network prefixes are combined into a single routing
entry, with the routing entry pointing to a Super
network, encompassing all the networks.
Classless Addressing
• Classless Inter-Domain Routing (CIDR) is another name
for classless addressing.
• This addressing type aids in the more efficient allocation
of IP addresses.
• This technique assigns a block of IP addresses based on
specified conditions when the user demands a specific
amount of IP addresses.
• This block is known as a "CIDR block", and it contains the
necessary number of IP addresses.
Classless Addressing
• When allocating a block, classless addressing is
concerned with the following three rules.
• Rule 1 − The CIDR block's IP addresses must all be
contiguous.
• Rule 2 − The block size must be a power of two to be
attractive. Furthermore, the block's size is equal to the
number of IP addresses in the block.
• Rule 3 − The block's first IP address must be divisible by
the block size.
Classless Addressing
• For example, assume the classless address is
192.168.1.35/27.
• The network component has a bit count of 27, whereas
the host portion has a bit count of 5. (32-27)
• The binary representation of the address is: (00100011 .
11000000 . 10101000 . 00000001).
• (11000000.10101000.00000001.00100000) is the first IP
address (assigns 0 to all host bits), that is, 192.168.1.32
• (11000000.10101000.00000001.00111111) is the most
recent IP address (assigns 1 to all host bits), that is,
192.168.1.63
• The IP address range is 192.168.1.32 to 192.168.1.63.
Difference Between Classful and Classless Addressing
• Classful addressing is a technique of allocating IP
addresses that divides them into five categories.
• Classless addressing is a technique of allocating IP
addresses that is intended to replace classful addressing
in order to reduce IP address depletion(reduction).
• The utility of classful and classless addressing is another
distinction.
• Addressing without a class is more practical and helpful
than addressing with a class.
• The network ID and host ID change based on the classes
in classful addressing.
• In classless addressing, however, there is no distinction
between network ID and host ID.
• As a result, another distinction between classful and
classless addressing may be made.
Delivery

• The term delivery refers to the way in which


the packet is handled by the networks under
the network layer.
• The network layer handles the packets in the
physical network and it is termed as delivery
of the packet.
Delivery Techniques
• The delivery to the final destination takes place in two ways.
1)Direct Delivery
• In this method when the source and the destination are
located on the same physical network then the delivery takes
place.
• The sender can find out the network address with the
addresses of the networks to which it is connected.
• If the match is found then it is assured that is direct delivery.
2)Indirect Delivery
• In this type of the method the destination is not on the same
network as the delivery point from where the packet is to be
delivered.
• Such type of the delivery is termed as the indirect type of
delivery.
Forwarding
• Forwarding means the way in which the
packet is delivered to the next station
Forwarding Techniques
1)Next Hop Method
• the next closest router a packet can go through
2)Route Method
• In this method the routing table contains the
address of the next hop instead of the information
of the complete route.
3)Network Specific Method
• It is the technique in which the routing table is
reduced and the searching process is simplified.
4)Host Specific Method
• In this method entry of every destination is
connected to the same physical network.
Forwarding Process
• Here we make the assumption that the
routers and the hosts use the classless
addressing.
• In the case of the classless addressing the
routing tables needs to have one row of
information for each of the blocks.
• The table which is to be searched is based on
the network address.
• It is to be noted that the destination address
gives no idea about the network address.
ROUTING

• The term Routing signifies the way routing


tables are created to help in the forwarding
process.
• To continuously update the routing tables the
routing protocols are used.
• A router has the routing table with the entry
for each destination to route the IP packets
ROUTING TABLE
1)Static Routing Table
• It contains the information entered manually.
• The route for each destination is entered into the table
by the administrator.
• It can be used in the small internet which is not to be
changed quite often.
• It will be the case of poor strategy if the static routing
table is to be used in the big internet.
2)Dynamic Routing Table
• This table is updated timely using the dynamic
protocols such as RIP (Routing Information Protocol),
OSPF or BGP.
• Whenever changes occur in the internet then the
dynamic routing protocols update all the tables in the
router automatically for the efficient delivery of the IP
packets.
Unicast Routing Protocols
• As we know that the dynamic routing table is the
demand of the todays internet.
• The tables needs to be updated whenever there
are changes in the internet.
• The routing protocols have been created for the
dynamic routing tables.
• It is the combination of the certain rules and the
procedures which let the router know about the
changes in the internet.
• It even allows the router to share the information
about the internet and their neighbourhood.
Optimization
• The function of the router is to receive the packets
from the network and then passes it to the other
network.
• The router is connected to the various networks.
• The optimization makes the decision that when the
router receives the packet to which network the
packet is to be passed on and out of the available
pathways the optimum path is to be selected.
• The term optimum can be explained as the one
approach to assign the cost for the passing network
and this assigned cost is called metric.
• The metric is assigned to the networks depending on
the type of the protocols.
Optimization
1)Routing Information Protocol(RIP)
• In this the cost of passing the network is all same.
• All the networks are treated as same in this protocol.
2)Open Shorted Path First(OSPF)
• It allows the administrator to assign the cost for
passing through the network based on the type of the
service required.
• A route has different cost through the network.
3)Border Gateway Protocol(BGP)
• The criteria is based on the policy and the policy
decides which path is to be chosen by the
administrator.
Intra-Domain Routing and Inter-Domain
Routing
• In today’s era the internet has become such a
vast network that it will be impossible for one
routing protocol to perform the task of
updating the routing table of all the routers.
• For such a reason the internet is divided into
the autonomous systems.
• The autonomous system(AS) can be defined as
the group of the networks and routers under
the authority of the single administration.
Intra-Domain Routing and Inter-Domain
Routing
1)When the routing is done inside the autonomous
system then it is referred as INTRA-DOMAIN ROUTING.
• Each autonomous system can choose either one or
more than one intra domain routing protocols to
handle the routing in the autonomous systems.
2)When the routing is done between the autonomous
systems then it is known as INTER DOMAIN ROUTING.
• Each autonomous system can choose only one inter
domain routing protocol to handle the routing
between the autonomous systems.
Distance Vector Routing

• In this the minimum cost route between any


two nodes is the route with the minimum
distance.
• Each node is given the vector of minimum
distance to every node.
• The table at each node instructs the packets to
their node by showing the next stoppage in
the route.
• It is the Intra domain routing protocol.
Link State Routing
• Link state routing is quite different in the concept
than the distance vector routing.
• If each node in the domain has the entire
topology of the domain then the entire list of the
links and the nodes, cost including the condition
of the links the Dijkstra’s algorithm can be used in
this case to build the routing table.
• Dijkstra's algorithm is an algorithm for finding the
shortest paths between nodes in a graph.
• It is the Intra domain routing protocol.
Path Vector Routing
• Path vector routing is used in the inter domain routing.
• Its principle is same as the distance vector routing.
• Lets assume that a node in each autonomous system
can act on the behalf of the entire autonomous
systems.
• This particular node can be called as the speaker node.
• The speaker node in the autonomous system creates
the routing table and advertises it to the speaker
nodes of the neighbouring autonomous systems.
• The speaker node in each autonomous system can
freely communicate with each other.
• It is to be noted that the speaker node advertises the
paths not the metric nodes.
MULTICAST ROUTING PROTOCOLS

• Unicast, Multicast, and Broadcast


Unicasting

• In this communication there is one source and one


destination.
• There is one to one relationship between source and the
destination.
• The address of the source and the destination in the IP
diagram are the unicast address which are assigned to the
host.
• In the unicasting when the router receives the packets the
packet is forwarded through only one of its interfaces as
described in the routing table.
• A packet can be discarded by the router if it is unable to find
the destination address in the routing table.
multicasting
• In this type of the
communication there is one
source and group of the
destinations.
• The relation is one to many
type.
• The source address is the
unicast address but the
destination address is the
group address i.e. it defines
one or more destinations.
• The group address identifies
the members of the group.
• When the router receives
the packet it forwards
through the several of its
interfaces.
Broadcasting
• In this communication on
the relationship between
the source and the
destination is one to all.
• In this one host is the
source and other hosts
are the destinations.
Congestion prevention policies
• Congestion control refers to the techniques used to
control or prevent congestion.
• Congestion control techniques can be broadly classified
into two categories:
Open Loop Congestion Control

• Open loop congestion control policies are applied to


prevent congestion before it happens.
• The congestion control is handled either by the source or
the destination.
Policies adopted by open loop
congestion control
• Retransmission Policy
• It is the policy in which retransmission of the packets are
taken care of.
• If the sender feels that a sent packet is lost or corrupted,
the packet needs to be retransmitted.
• This transmission may increase the congestion in the
network.
• To prevent congestion, retransmission timers must be
designed to prevent congestion and also able to optimize
efficiency.
Window Policy

• The type of window at the sender’s side may also affect


the congestion.
• Several packets in the Go-back-n window are re-sent,
although some packets may be received successfully at
the receiver side.
• This duplication may increase the congestion in the
network and make it worse.
• Therefore, Selective repeat window should be adopted as
it sends the specific packet that may have been lost.
Discarding Policy

• A good discarding policy adopted by the routers is that


the routers may prevent congestion and at the same time
partially discard the corrupted or less sensitive packages
and also be able to maintain the quality of a message.

• In case of audio file transmission, routers can discard less


sensitive packets to prevent congestion and also maintain
the quality of the audio file.
Acknowledgment Policy

• Since acknowledgements are also the part of the load in


the network, the acknowledgment policy imposed by the
receiver may also affect congestion.
• Several approaches can be used to prevent congestion
related to acknowledgment.
• The receiver should send acknowledgement for N
packets rather than sending acknowledgement for a
single packet.
Admission Policy

• In admission policy a mechanism should be used to


prevent congestion.
• Switches in a flow should first check the resource
requirement of a network flow before transmitting it
further.
• If there is a chance of a congestion or there is a
congestion in the network, router should deny
establishing a virtual network connection to prevent
further congestion.
Closed Loop Congestion Control

• Closed loop congestion control techniques are used to


reduce congestion after it happens.
• Several techniques are used by different protocols; some
of them are:
Backpressure
• Backpressure is a technique in which a congested node
stops receiving packets from upstream node.
• This may cause the upstream node or nodes to become
congested and reject receiving data from above nodes.
• Backpressure is a node-to-node congestion control
technique that propagate in the opposite direction of
data flow.
• The backpressure technique can be applied only to virtual
circuit where each node has information of its above
upstream node.
Backpressure

• In above diagram the 3rd node is congested and stops


receiving packets as a result 2nd node may be get
congested due to slowing down of the output data flow.
• Similarly 1st node may get congested and inform the
source to slow down.
Choke Packet Technique
• A choke packet is a packet sent by a node to the source
to inform about congestion.
• Each router monitors its resources and the utilization at
each of its output lines.
• Whenever the resource utilization exceeds the threshold
value which is set by the administrator, the router
directly sends a choke packet to the source giving it a
feedback to reduce the traffic.
• The intermediate nodes through which the packets has
travelled are not warned about congestion.
Choke Packet Technique
Implicit Signaling

• In implicit signaling, there is no communication between


the congested nodes and the source.
• The source guesses that there is congestion in a network.
• For example, when sender sends several packets and
there is no acknowledgment for a while, one assumption
is that there is a congestion.
Explicit Signaling
• In explicit signaling, if a node experiences congestion it
can explicitly sends a packet to the source or destination
to inform about congestion.
• The difference between choke packet and explicit
signaling is that the signal is included in the packets that
carry data rather than creating a different packet as in
case of choke packet technique.
• Explicit signaling can occur in either forward or backward
direction.
Explicit Signaling
• Forward Signaling : In forward signaling, a signal is sent
in the direction of the congestion. The destination is
warned about congestion.
• The receiver in this case adopt policies to prevent further
congestion.

• Backward Signaling : In backward signaling, a signal is


sent in the opposite direction of the congestion.
• The source is warned about congestion and it needs to
slow down.
Congestion Control in Datagram Subnets

• Some congestion Control approaches which can be used


in the datagram subnet are given under.
1. Load shedding
2. Jitter control
1. Load Shedding
• Admission control and choke packets are the techniques
suitable for congestion control.
• But if these techniques cannot make the congestion
disappear, then the load-shedding technique is to be
used.
• The principle of load shedding states that when the
router is overflow by packets that it cannot handle, it
should simply throw packets away.
• A router flooded with packets due to congestion can drop
any packet at random.
• The policy for dropping a packet depends on the type of
packet.
1. Load Shedding
• The application should mark their packets in priority
classes to indicate how important they are.
• If this is done then when the packets are to be discarded
the routers can first drop packets from the lowest class
(i.e. the packets which are least important).
• Then the routers will discard the packets from the next
lower class and so on.
2. Jitter control
• Jitter may be defined as the variation in delay for the
packet belonging to the same flow.
• The real-time audio and video cannot tolerate jitter on
the other hand the jitter doesn’t matter if the packets are
carrying information contained in a file.
• For the audio and video transmission, if the packets take
20 ms to 30 ms delay to reach the destination, it doesn’t
matter, provided that the delay remains constant.
• The quality of sound and visuals will be hampered by the
delays associated with different packets having different
values.
2. Jitter control
• When а packet arrives at a router, the router will check
to see whether the packet is behind or ahead and by
what time.
• This information is stored in the packet and updated at
every hop.
• If a packet is ahead of the schedule then the router will
hold it for a slightly longer time and if the packet is
behind schedule, then the router will try to send it out as
quickly as possible.
• This will help in keeping the average delay per packet
constant and will avoid time jitter.

You might also like