Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Edited Unit 3 CN 4TH Sem

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 23

UNIT 3:

Network Layer - design issues, example protocols (IPv4); Routing -


principles/issues, algorithms (Distance-vector, Link-state) and protocols (RIP,
OSPF);

Network Layer
o The Network Layer is the third layer of the OSI model.
o It handles the service requests from the transport layer and further
forwards the service request to the data link layer.
o The network layer translates the logical addresses into physical
addresses
o 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.
o The main role of the network layer is to move the packets from
sending host to the receiving host.

The main functions performed by the network layer are:

o Routing: When a packet reaches the router's input link, the router
will move the packets to the router's output link. For example, a
packet from S1 to R1 must be forwarded to the next router on the
path to S2.
o Logical Addressing: The data link layer implements the physical
addressing and network layer implements the logical addressing.
Logical addressing is also used to distinguish between source and
destination system. The network layer adds a header to the packet
which includes the logical addresses of both the sender and the
receiver.
o Internetworking: This is the main role of the network layer that it
provides the logical connection between different types of networks.
o Fragmentation: The fragmentation is a process of breaking the
packets into the smallest individual data units that travel through
different networks.

1
Design Issues in Network Layer :
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
it’s 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.

2
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 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.

The design issues can be elaborated under four heads −

 Store − and − Forward Packet Switching


 Services to Transport Layer
 Providing Connection Oriented Service
 Providing Connectionless Service

3
Network Layer Protocols
There are various protocols used in the network layer. Each protocol is used
for a different task. Below are the protocols used in the network layer:

Protocols at each Layer

1. IP (Internet Protocol)
IP stands for Internet Protocol. Internet Protocol helps to uniquely
identify each device on the network. Internet protocol is responsible for
transferring the data from one node to another node in the network.
Internet protocol is a connectionless protocol therefore it does not
guarantee the delivery of data. For the successful delivery higher level
protocols such as TCP are used to guarantee the data transmission. The
Internet Protocol is divided in two types. They are:

 IPv4: IPv4 provides with the 32 bit address scheme. IPv4


addressing has four numeric fields and are separated by dot.
IPv4 can be configured either using DHCP or manually. IPv4 does
not provide with more security features as it does not support
authentication or encryption techniques. IPv4 is further divided
into five classes as Class A, Class B, Class C, Class D and Class E.
 IPv6: IPv6 is the most recent version of IP. If provided with a 128
but addressing scheme. IP adress has eight fields that are
separated by colon, and these fields are alphanumeric. The IPv6
address is represented in hexadecimal. IPv6 provides with more
security features such as authentication and encryption. IPv6

4
supports end-to-end connection integrity. IPv6 provides with
more range of IP adress as compared to IPv4.

Routing
o A Router is a process of selecting path along which the data can be
transferred from source to the destination. Routing is performed by a
special device known as a router.
o A Router works at the network layer in the OSI model and internet
layer in TCP/IP model
o A router is a networking device that forwards the packet based on
the information available in the packet header and forwarding table.
o The routing algorithms are used for routing the packets. The routing
algorithm is nothing but a software responsible for deciding the
optimal path through which packet can be transmitted.
o The routing protocols use the metric to determine the best path for
the packet delivery. The metric is the standard of measurement such
as hop count, bandwidth, delay, current load on the path, etc. used
by the routing algorithm to determine the optimal path to the
destination.
o The routing algorithm initializes and maintains the routing table for
the process of path determination.

Issues :
The process of routing is extremely important in networking. There is a
lot of flow of data over a network. Data needs to be sent and received
continuously without any issue and problem. In fact, one of the most
essential functions performed by a network is to ensure that each data
packet reaches its destination without any modification or deletion. In
this regard, the process of routing comes into existence.

The process of routing ensures that the data reaches its exact
destination. This process comes into being during the layer 3 of OSI
model. It is quite essential that data packets have specific routes which
they can follow to reach their destination. In this regard, the map of the
whole network is stored beforehand in each router which makes use of it
to send data packets on appropriate routes. However, any issue in this
integral process of routing can lead to the breaking down of the network.
In this regard the data packets might get deleted or modified, the flow of
data might get slow or the connection might get lost. These issues need

5
to be dealt with seriousness and they should be resolved as soon as
possible. Following are one of the most common issues with routing and
ways in which they can be resolved.

Improper port Configuration

Whenever a router is set in a network to carry out the process of routing,


there are a number of configuration settings which need to be done on
the router. Among these settings, the configuration of ports is very
important. Sometimes, misconfigured ports lead to the unusual flow of
data packets. The data packets might be transferred to the wrong
destination or might be amended as well. In this regard, it is important to
check all of these configurations before setting up a network.

Bad Cables

The process of routing is quite delicate and it requires all the cables in
the network to be perfect. This is because the data has to be sent out
these cables generally and any problem in these cables could lead to
issues in the process of routing. These problems could lead to connection
problems as well as loss of data packets. In addition to this, it could also
lead to interference of electrical signals which might modify or delete the
data packets. Hence, it is important to replace all the bad cables covered
with insulated material which will be able to carry the data packets
efficiently.

Mismatched Maximum Transmission Unit (MTU)

Maximum Transmission Unit (MTU) determines the largest data packet


which could be transferred over the network. It is quite important that the
interfaces and the devices are configured with the same MTU. It the MTU
is not same, then the data packets might be dropped which could lead to
incomplete data reaching the destination. Hence, whenever you figure
out that the data packets are being lost during the process of routing,
you should consider reconfiguring the MTU on the devices.

Power Failure

All of the devices in a network are powered on electricity. However, in


case there is a power failure, there is no way in which these routers could
remain running to carry out the process of routing. This means that whole
of the network will come to a halt in case of a power failure. In order to
avoid this, it is essential that these devices have got a backup power plan
for them. This power plan could be a generator which turns on

6
immediately in case of a power failure. This will ensure that the process
of routing does not stop in any condition.

Incorrect or Damaged Routing Tables

When each router in a network is configured, it is provided with a routing


table. This routing table contains details regarding all the routers which
are in the network and their distances between each other. This enables
the routers to determine the routes on which the data is to be sent.
However, if these tables are incorrect or there is any missing information
in them, this could lead to the incorrect routing of data packets. The
router will not be able to figure out the correct path to send the data
packets and this might even result in loss of data. Hence, it is important
to make sure that the routing tables are correct. Whenever you
experience such problems, you should immediately check the routing
tables and ensure that they are accurate. You should also make sure that
they are updated because the routers should know the latest routes in
the networks to carry the process of routing.

Incorrect subnet mask

The subnet mask is a part of the IPv4 addresses. In order to get the exact
position of a client, the router needs to know the subnet mask. However,
sometimes the wrong subnet mask is entered which leads to the
incorrect routing of data packets. In fact, the router will not even get to
know the exact destination without the subnet mask. Hence, it needs to
be ensured that the subnet mask is correct.

Duplicate IP Addresses

IP Addresses are unique addresses assigned to each device in a network.


These IP Addresses are unique identifiers which make sure that data gets
to the right destination. However, sometimes the problem of duplicate IP
Addresses arises which means that the router will now not be able to
identify the correct path over which the data has to be sent. In this
regard, it becomes quite essential to make sure that the IP Addresses are
unique and are not duplicated. The problem arises when the IP Addresses
are assigned manually without catering to the issue of duplicated IP
addresses. Thus, it is advised to use a DHCP server which allocates the IP
Addresses automatically to devices.

7
Distance Vector Routing –
 It is a dynamic routing algorithm in which each router computes
a distance between itself and each possible destination i.e. its
immediate neighbors.
 The router shares its knowledge about the whole network to its
neighbors and accordingly updates the table based on its
neighbors.
 The sharing of information with the neighbors takes place at
regular intervals.
 It makes use of Bellman-Ford Algorithm for making routing
tables.
 Problems – Count to infinity problem which can be solved by
splitting horizon.
– Good news spread fast and bad news spread slowly.
– Persistent looping problem i.e. loop will be there forever.
Link State Routing –
 It is a dynamic routing algorithm in which each router shares
knowledge of its neighbours with every other router in the
network.
 A router sends its information about its neighbors only to all the
routers through flooding.
 Information sharing takes place only whenever there is a change.
 It makes use of Dijkstra’s Algorithm for making routing tables.
 Problems – Heavy traffic due to flooding of packets.
– Flooding can result in infinite looping which can be solved by
using the Time to live (TTL) field.

RIP Protocol
RIP stands for Routing Information Protocol. RIP is an intra-domain routing
protocol used within an autonomous system. Here, intra-domain means
routing the packets in a defined domain, for example, web browsing
within an institutional area. To understand the RIP protocol, our main
focus is to know the structure of the packet, how many fields it contains,
and how these fields determine the routing table.

Before understanding the structure of the packet, we first look at


the following points:

o RIP is based on the distance vector-based strategy, so we consider


the entire structure as a graph where nodes are the routers, and the
links are the networks.

8
o In a routing table, the first column is the destination, or we can say
that it is a network address.
o The cost metric is the number of hops to reach the destination. The
number of hops available in a network would be the cost. The hop
count is the number of networks required to reach the destination.
o In RIP, infinity is defined as 16, which means that the RIP is useful
for smaller networks or small autonomous systems. The maximum
number of hops that RIP can contain is 15 hops, i.e., it should not
have more than 15 hops as 16 is infinity.
o The next column contains the address of the router to which the
packet is to be sent to reach the destination.

OSPF Protocol
The OSPF stands for Open Shortest Path First. It is a widely used and
supported routing protocol. It is an intradomain protocol, which means
that it is used within an area or a network. It is an interior gateway
protocol that has been designed within a single autonomous system. It is
based on a link-state routing algorithm in which each router contains the
information of every domain, and based on this information, it
determines the shortest path. The goal of routing is to learn routes. The
OSPF achieves by learning about every router and subnet within the
entire network. Every router contains the same information about the
network. The way the router learns this information by sending LSA (Link
State Advertisements). These LSAs contain information about every
router, subnet, and other networking information. Once the LSAs have
been flooded, the OSPF stores the information in a link-state database
known as LSDB. The main goal is to have the same information about
every router in an LSDBs.

9
ADDITIONAL INFORMATION 😊 \\

IPv4 vs IPv6

What is IP?
An IP stands for internet protocol. An IP address is assigned to each device
connected to a network. Each device uses an IP address for communication. It
also behaves as an identifier as this address is used to identify the device on a
network. It defines the technical format of the packets. Mainly, both the
networks, i.e., IP and TCP, are combined together, so together, they are
referred to as a TCP/IP. It creates a virtual connection between the source and
the destination.

We can also define an IP address as a numeric address assigned to each device


on a network. An IP address is assigned to each device so that the device on a
network can be identified uniquely. To facilitate the routing of packets, TCP/IP
protocol uses a 32-bit logical address known as IPv4(Internet Protocol version
4).

An IP address consists of two parts, i.e., the first one is a network address, and
the other one is a host address.

There are two types of IP addresses:

o IPv4
o IPv6

What is IPv4?
IPv4 is a version 4 of IP. It is a current version and the most commonly used IP
address. It is a 32-bit address written in four numbers separated by 'dot', i.e.,
periods. This address is unique for each device.

For example, 66.94.29.13

The above example represents the IP address in which each group of numbers
separated by periods is called an Octet. Each number in an octet is in the
range from 0-255. This address can produce 4,294,967,296 possible unique
addresses.

In today's computer network world, computers do not understand the IP


addresses in the standard numeric format as the computers understand the
numbers in binary form only. The binary number can be either 1 or 0. The IPv4

10
consists of four sets, and these sets represent the octet. The bits in each octet
represent a number.

Each bit in an octet can be either 1 or 0. If the bit the 1, then the number it
represents will count, and if the bit is 0, then the number it represents does not
count.

Representation of 8 Bit Octet

The above representation shows the structure of 8- bit octet.

Now, we will see how to obtain the binary representation of the above IP
address, i.e., 66.94.29.13

Step 1: First, we find the binary number of 66.

To obtain 66, we put 1 under 64 and 2 as the sum of 64 and 2 is equal to 66


(64+2=66), and the remaining bits will be zero, as shown above. Therefore,
the binary bit version of 66 is 01000010.

Step 2: Now, we calculate the binary number of 94.

To obtain 94, we put 1 under 64, 16, 8, 4, and 2 as the sum of these numbers
is equal to 94, and the remaining bits will be zero. Therefore, the binary bit
version of 94 is 01011110.

Step 3: The next number is 29.

11
To obtain 29, we put 1 under 16, 8, 4, and 1 as the sum of these numbers is
equal to 29, and the remaining bits will be zero. Therefore, the binary bit
version of 29 is 00011101.

Step 4: The last number is 13.

To obtain 13, we put 1 under 8, 4, and 1 as the sum of these numbers is equal
to 13, and the remaining bits will be zero. Therefore, the binary bit version of
13 is 00001101.

Drawback of IPv4
Currently, the population of the world is 7.6 billion. Every user is having more
than one device connected with the internet, and private companies also rely
on the internet. As we know that IPv4 produces 4 billion addresses, which are
not enough for each device connected to the internet on a planet. Although the
various techniques were invented, such as variable- length mask, network
address translation, port address translation, classes, inter-domain translation,
to conserve the bandwidth of IP address and slow down the depletion of an IP
address. In these techniques, public IP is converted into a private IP due to
which the user having public IP can also use the internet. But still, this was not
so efficient, so it gave rise to the development of the next generation of IP
addresses, i.e., IPv6.

What is IPv6?
IPv4 produces 4 billion addresses, and the developers think that these
addresses are enough, but they were wrong. IPv6 is the next generation of IP
addresses. The main difference between IPv4 and IPv6 is the address size of IP
addresses. The IPv4 is a 32-bit address, whereas IPv6 is a 128-bit hexadecimal
address. IPv6 provides a large address space, and it contains a simple header
as compared to IPv4.

It provides transition strategies that convert IPv4 into IPv6, and these
strategies are as follows:

o Dual stacking: It allows us to have both the versions, i.e., IPv4 and IPv6,
on the same device.
o Tunneling: In this approach, all the users have IPv6 communicates with
an IPv4 network to reach IPv6.

12
o Network Address Translation: The translation allows the
communication between the hosts having a different version of IP.

This hexadecimal address contains both numbers and alphabets. Due to the
usage of both the numbers and alphabets, IPv6 is capable of producing over
340 undecillion (3.4*1038) addresses.

IPv6 is a 128-bit hexadecimal address made up of 8 sets of 16 bits each, and


these 8 sets are separated by a colon. In IPv6, each hexadecimal character
represents 4 bits. So, we need to convert 4 bits to a hexadecimal number at a
time

Address format
The address format of IPv4:

The address format of IPv6:

The above diagram shows the address format of IPv4 and IPv6. An IPv4 is a 32-
bit decimal address. It contains 4 octets or fields separated by 'dot', and each
field is 8-bit in size. The number that each field contains should be in the range
of 0-255. Whereas an IPv6 is a 128-bit hexadecimal address. It contains 8 fields
separated by a colon, and each field is 16-bit in size.

Differences between IPv4 and IPv6

Ipv4 Ipv6

Address IPv4 is a 32-bit address. IPv6 is a 128-bit address.


length

Fields IPv4 is a numeric address that IPv6 is an alphanumeric


consists of 4 fields which are address that consists of 8
separated by dot (.). fields, which are separated by

13
colon.

Classes IPv4 has 5 different classes of IPv6 does not contain classes
IP address that includes Class of IP addresses.
A, Class B, Class C, Class D,
and Class E.

Number of IPv4 has a limited number of IPv6 has a large number of IP


IP address IP addresses. addresses.

VLSM It supports VLSM (Virtual It does not support VLSM.


Length Subnet Mask). Here,
VLSM means that Ipv4
converts IP addresses into a
subnet of different sizes.

Address It supports manual and DHCP It supports manual, DHCP,


configuratio configuration. auto-configuration, and
n renumbering.

Address It generates 4 billion unique It generates 340 undecillion


space addresses unique addresses.

End-to-end In IPv4, end-to-end In the case of IPv6, end-to-end


connection connection integrity is connection integrity is
integrity unachievable. achievable.

Security In IPv4, security depends on In IPv6, IPSEC is developed for


features the application. This IP security purposes.
address is not developed in
keeping the security feature
in mind.

Address In IPv4, the IP address is In IPv6, the representation of


representati represented in decimal. the IP address in hexadecimal.
on

Fragmentati Fragmentation is done by the Fragmentation is done by the


on senders and the forwarding senders only.
routers.

14
Packet flow It does not provide any It uses flow label field in the
identificatio mechanism for packet flow header for the packet flow
n identification. identification.

Checksum The checksum field is The checksum field is not


field available in IPv4. available in IPv6.

Transmissio IPv4 is broadcasting. On the other hand, IPv6 is


n scheme multicasting, which provides
efficient network operations.

Encryption It does not provide encryption It provides encryption and


and and authentication. authentication.
Authenticati
on

Number of It consists of 4 octets. It consists of 8 fields, and each


octets field contains 2 octets.
Therefore, the total number of
octets in IPv6 is 16.

Routing Information Protocol (RIP)


Routing Information Protocol (RIP) is a dynamic routing protocol that uses
hop count as a routing metric to find the best path between the source and the
destination network. It is a distance-vector routing protocol that has an AD
value of 120 and works on the Network layer of the OSI model. RIP uses port
number 520.
Hop Count
Hop count is the number of routers occurring in between the source and
destination network. The path with the lowest hop count is considered as the
best route to reach a network and therefore placed in the routing table. RIP
prevents routing loops by limiting the number of hops allowed in a path from
source and destination. The maximum hop count allowed for RIP is 15 ands a
hop count of 16 is considered as network unreachable.

Features of RIP
1. Updates of the network are exchanged periodically.
2. Updates (routing information) are always broadcast.
3. Full routing tables are sent in updates.

15
4. Routers always trust routing information received from neighbor routers.
This is also known as Routing on rumors.

RIP versions:

There are three versions of routing information protocol – RIP Version1, RIP
Version2, and RIPng.

RIP v1 RIP v2 RIPng

Sends update as broadcast Sends update as multicast Sends update as multicast

Multicast at FF02::9 (RIPng can


Broadcast at 255.255.255.255 Multicast at 224.0.0.9 only run on IPv6 networks)

Doesn’t support authentication Supports authentication of



of updated messages RIPv2 update messages

Classless protocol updated


Classful routing protocol Classless updates are sent
supports classful

RIP v1 is known as Classful Routing Protocol because it doesn’t send


information of subnet mask in its routing update.

RIP v2 is known as Classless Routing Protocol because it sends information


of subnet mask in its routing update.

>> Use debug command to get the details :


# debug ip rip
>> Use this command to show all routes configured in router, say for router
R1 :
R1# show ip route
>> Use this command to show all protocols configured in router, say for
router R1 :

16
R1# show ip protocols

Configuration :

Consider the above-given topology which has 3-routers R1, R2, R3. R1 has IP
address 172.16.10.6/30 on s0/0/1, 192.168.20.1/24 on fa0/0. R2 has IP
address 172.16.10.2/30 on s0/0/0, 192.168.10.1/24 on fa0/0. R3 has IP
address 172.16.10.5/30 on s0/1, 172.16.10.1/30 on s0/0, 10.10.10.1/24 on
fa0/0.

Configure RIP for R1 :


R1(config)# router rip
R1(config-router)# network 192.168.20.0
R1(config-router)# network 172.16.10.4
R1(config-router)# version 2
R1(config-router)# no auto-summary

Note: no auto-summary command disables the auto-summarisation. If we


don’t select any auto-summary, then the subnet mask will be considered as
classful in Version 1.

Configuring RIP for R2:


R2(config)# router rip
R2(config-router)# network 192.168.10.0
R2(config-router)# network 172.16.10.0

17
R2(config-router)# version 2
R2(config-router)# no auto-summary

Similarly, Configure RIP for R3 :

\R3(config)# router rip


R3(config-router)# network 10.10.10.0
R3(config-router)# network 172.16.10.4
R3(config-router)# network 172.16.10.0
R3(config-router)# version 2
R3(config-router)# no auto-summary

RIP timers:
 Update timer: The default timing for routing information being
exchanged by the routers operating RIP is 30 seconds. Using an
Update timer, the routers exchange their routing table periodically.
 Invalid timer: If no update comes until 180 seconds, then the
destination router considers it invalid. In this scenario, the
destination router mark hop counts as 16 for that router.
 Hold down timer: This is the time for which the router waits for a
neighbor router to respond. If the router isn’t able to respond within
a given time then it is declared dead. It is 180 seconds by default.
 Flush time: It is the time after which the entry of the route will be
flushed if it doesn’t respond within the flush time. It is 60 seconds by
default. This timer starts after the route has been declared invalid
and after 60 seconds i.e time will be 180 + 60 = 240 seconds.
Note that all these times are adjustable. Use this command to change the
timers :
R1(config-router)# timers basic
R1(config-router)# timers basic 20 80 80 90

Normal utilization of RIP:

1. Small to medium-sized networks: RIP is normally utilized in


little to medium-sized networks that have moderately basic
directing prerequisites. It is not difficult to design and requires
little support, which goes with it a famous decision for little
organizations.
2. Legacy organizations: RIP is as yet utilized in some heritage
networks that were set up before further developed steering
conventions were created. These organizations may not merit the
expense and exertion of overhauling, so they keep on involving
RIP as their directing convention.

18
3. Lab conditions: RIP is much of the time utilized in lab conditions
for testing and learning purposes. A basic convention is not
difficult to set up, which pursues it a decent decision for
instructive purposes.
4. Backup or repetitive steering: In certain organizations, RIP
might be utilized as a reinforcement or excess directing
convention, on the off chance that the essential steering
convention falls flat or encounters issues. RIP isn’t generally so
productive as other directing conventions, however, it very well
may be helpful as a reinforcement if there should be an
occurrence of crisis.

Advantages of RIP :

 Simplicity: RIP is a relatively simple protocol to configure and


manage, making it an ideal choice for small to medium-sized
networks with limited resources.
 Easy implementation: RIP is easy to implement, as it does not
require much technical expertise to set up and maintain.
 Convergence: RIP is known for its fast convergence time,
meaning that it can quickly adapt to changes in network topology
and route packets efficiently.
 Automatic updates: RIP automatically updates routing tables at
regular intervals, ensuring that the most up-to-date information is
being used to route packets.
 Low bandwidth overhead: RIP uses a relatively low amount of
bandwidth to exchange routing information, making it an ideal
choice for networks with limited bandwidth.
 Compatibility: RIP is compatible with many different types of
routers and network devices, making it easy to integrate into
existing networks.

Disadvantages of RIP :
 Limited scalability: RIP has limited scalability, and it may not
be the best choice for larger networks with complex topologies.
RIP can only support up to 15 hops, which may not be sufficient
for larger networks.

 Slow convergence: While RIP is known for its fast convergence


time, it can be slower to converge than other routing protocols.
This can lead to delays and inefficiencies in network performance.

19
 Routing loops: RIP can sometimes create routing loops, which
can cause network congestion and reduce overall network
performance.

 Limited support for load balancing: RIP does not support


sophisticated load balancing, which can result in suboptimal
routing paths and uneven network traffic distribution.

 Security vulnerabilities: RIP does not provide any native


security features, making it vulnerable to attacks such as
spoofing and tampering.

 Inefficient use of bandwidth: RIP uses a lot of bandwidth for


periodic updates, which can be inefficient in networks with limited
bandwidth.

What is the OSPF Protocol?


Open Shortest Path First (OSPF) is an Interior Gateway Protocol (IGP) that has an algorithm
type of Link-State.

This is how a link-state protocol functions:


 When we use a link-state routing protocol, every router creates a ‘connectivity map’
of the network.

20
 To make this happen, each router advertises information about its interfaces
(connected networks) to its neighbors. These advertisements are passed along to
other routers until all the other routers in the network develop the same map of the
network.
 Therefore, it is very important to note that each of the routers then uses this same
map to calculate the best routers for each destination.
 Since more information is shared, link-state protocols use more resources on the
router.
 The link-state routers react faster to the changes in the network than the distance
vector routers.

Now, let us understand the OSPF in detail:


 If we expand the term OSPF, it is Open Shortest Path First.
 It uses the Shortest Path First algorithm which is also called Dijkstra’s algorithm. This
algorithm is named after the name of a Dutch computer scientist.
 There are three versions of OSPF:

 OSPFv1: This is the first version of OSPF created in the year 1989. It is no
longer in use.
 OSPFv2: This is the second version of OSPF created in 1998. It is used in IPv4.
This version is important for CCNA 200-301.
 OSPFv3: This is the latest version of OSPF created in the year 2008. This version
is used for IPv6 and as well as for IPv4.
 The routers store information about networks in Link State Advertisements (LSAs)
which are organized in a structure called the Link State Database (LSDB).
 Routers flood the LSAs until all the routers in the OSPF area develop the same map of
the network (LSDB).
 This flooding is similar to switches when they receive a broadcast frame or an
unknown unicast frame.
 In OSPF, flooding means that they send the LSAs to all of their OSPF neighbors.

How OSPF Works?

21
The basic functioning of OSPF is carried out through LSA Flooding. As we know by now, the
OSPF chooses the shortest path for the routers. The main process involves the sharing of
LSAs and determining the best route to each destination.

This is how OSPF works in three main steps:


 The first step is to become neighbors with other routers connected to the same
segment.
 Then the routers exchange the Link State Advertisements (LSAs) with neighbor
routers.
 After that, each router independently calculates the best routes to each destination.
Then it inserts all of these into the routing table.

What are the Different States of OSPF?


The network devices that use the OSPF protocol undergo certain states. The various states
of OSPF are as follows:
 Down:
No “Hello” packets are received on the interface in the down state. The downstate means
that the OSPF adjacency process has not begun yet.
 INIT:
The “Hello” packets are received from other routers in the INIT state.
 2WAY:
In this state, a bidirectional connection is formed. Both routers receive “Hello” packets from
other routers.
 Exstart:
In this state, the exchange of NULL DBD takes place. Similar to the First Hop Redundant
Protocol (FHRP), the election of the master and slave router occurs. The router with
the higher router ID becomes the master while the router with the lower router
ID becomes the slave. This decides which router sends the DBD first.

 Exchange:
The actual DBDs are exchanged in this state.
 Loading:

22
The Link State Advertisements (LSAs) along with LSUs and LSRs are exchanged in this state.
 Full:
All the information is synced in this state. It is only after the Full state that the OSPF routing
begins!
Therefore, there are a total of seven states of OSPF that the routers undergo before the
actual OSPF routing begins.

What are the Advantages of OSPF?


The following are the major advantages of the OSPF protocol:
 OSPF can be configured on both IPv4 and IPv6 versions of IPs.
 It can carry out load balancing.
 It uses the SPF algorithm to present a loop-free technology.
 It is not Cisco proprietary. It can run on many routers.
 It is a classless protocol.
 It has unlimited hop counts.
 It works very fast.

What are the Disadvantages of OSPF?


The following are the disadvantages of the OSPF protocol:
 It needs extra storage. Therefore, it means that it needs an extra CPU process to run
the SPF algorithm.
 It needs more RAM to save adjacency topology.
 It is very complex. Therefore, it’s very difficult to troubleshoot.

23

You might also like