0% found this document useful (0 votes)
113 views8 pages

Routing Protocols OSPF and RIP

The document discusses routing protocols and routing tables. It provides definitions and explanations of static and dynamic routing. Static routing involves manually configuring routes, while dynamic routing uses routing protocols to automatically distribute route information and update routes in response to network changes. Common dynamic routing protocols mentioned are RIP, OSPF, EIGRP, IGRP. The document also describes the components of routing tables and how best routes are selected based on prefix length, metrics, and administrative distance.

Uploaded by

Muhammad Jawad
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)
113 views8 pages

Routing Protocols OSPF and RIP

The document discusses routing protocols and routing tables. It provides definitions and explanations of static and dynamic routing. Static routing involves manually configuring routes, while dynamic routing uses routing protocols to automatically distribute route information and update routes in response to network changes. Common dynamic routing protocols mentioned are RIP, OSPF, EIGRP, IGRP. The document also describes the components of routing tables and how best routes are selected based on prefix length, metrics, and administrative distance.

Uploaded by

Muhammad Jawad
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/ 8

Abstract:

In a computer network, the transmission of data is based on the routing protocol which selects the best
routes between any two nodes. Different types of routing protocols are applied to specific network
environment. Three typical types of routing protocol are chosen as the simulation samples: RIP, OSPF
and EIGRP. RIP (Routing Information Protocol) is one of the oldest routing protocols still in service. Hop
count is the metric that RIP uses and the hop limit limits the network size that RIP can support. OSPF
(Open Shortest Path First) is the most widely used IGP (Interior Gateway Protocol) large enterprise
networks. OSPF is based on the Shortest Path First (SPF) algorithm which is used to calculate the
shortest path to each node

Introduction to Routing:
The process of sending packets from one network to another is called routing. Routing is of two types of
static and dynamic. Routes are based on the destination network. Routing is to find the best path for the
network from one network to another. The best path is chosen on the basis of metric and administrative
distance. Routing is performed by routers. For this routers make routing tables. Now let's understand
about routing tables.

Routers make routing tables that contain the following information's:

 Destination network and its subnet mask.


 There is information about the next hop router to go to Destination network.
 Routing metrics and administrative distance are stored.

Routing tables are related to 2 types of protocols:

1. Routed protocols
These are network layer protocols. Routed protocols attach to logical addresses with devices.
These protocols are responsible for sending data from one network to another. For example, IP
(Internet Protocol) and IPX etc.
2. Routing protocols
These protocols build networks, topology and next hop information in routing tables. All these
information is created dynamically (automatic). For example, RIP, IGRP, and OSPF etc. Routing
protocols are of 2 types.

a. Distance vector
Such protocols are determined by metric hop count (number of routers between sources
and destination). The route which is the lowest in the route is chosen by the same route.
Example of this type of protocol is RIP.
b. Link state
Metric shortest path in such protocols is determined by the first algorithm. The cost of the
cost of all the routes, which is the lowest cost, is route is chosen. The example of such
protocols is OSPF.
To determine the best route to Destination network, the router uses the following 3 elements:

1. Prefix-Length
This is the number of bits to identify the network. From this, the most accurate route is
determined. The longer the prefix length, the more precise the path is. For example, suppose a
packet is going to 10.1.5.0/24 host and the router's routing table has 2 networks given.
10.1.5.0/24
10.0.0.0/8
So the first network will be selected on this because its prefix length is high. It does not matter
what the metric or administrative distance is.
2. Metric
The metric router gives the ability to find the best routes under the routing protocol. Distance
vector uses the protocols distance as metric and link state protocols use the shortest path first
algorithm as the metric used to calculate. The routes which are best metric are added to the
routing tables. Even if a routing protocol has 4 routes to go to the same network, even if the
metric is the best, it will only be added to the routing table. If more than one route of equal
metric is available then correct metric will be selected by loading balance.
3. Administrative Distance
If more than one routing protocol is running on the router, then which protocol is to trust most,
it is determined by the administrative distance. The administrative distance at the bottom is the
lowest, the same protocol is chosen. Administrative distance is a numerical value that is
assigned to dynamic protocols. It is fixed. The protocol whose administrative distance is
unknown is never taken in the routing table.

Viewing Routing Table


The routing table can be viewed on any router. For this, you need to run show IP route command. You
can see it from the user execution mode.

#Router1 show ip route

When you execute this command, the list of all routers is displayed to you. A label along with all these
routers is also shown which is how it is connected to all the current router. The list of all these labels is
being given below.

 C - This label means that the given router is directly connected to the current router.
 S - This label indicates that the given router has been statically managed.
 S * - This is the default route between the router given by the current router.
 D - This label means that the given router is using the EIGRP protocol.
 I - This label states that given the router IGRP protocol is being used.
 R - It says that the given router is using RIP protocol.
 - this label means that the given router is using OSPF protocol.

Clearing Routing Table


If you want to clear all routes from the routing table, you can use the clear command for this. By clearing
the Routing table, you can force routing protocols to populate the routing table again.

#Router clear ip route

Choosing Best Route

You can follow the procedure given below to choose the best route to any destination router.

 First of all you will have to match the prefix length of the route with the destination route. You
will choose the routes that are most accurate in the prefix length.
 Now you have to choose the route from which route is the lowest metric.
 If the same metric has more than one route then you will choose the route with the lowest
administrative distance and this will be your best route.

Static and Dynamic Routing:


Routing algorithms in the context of networking can be classified variously. The prior classification is
based on the building and modification of a routing table. This can be done in two manners statically or
dynamically. More precisely these are known as static and dynamic routing respectively.

In the Static routing, the table is set up and modified manually whereas in the Dynamic routing the table
is built automatically with the help of the routing protocols. Dynamic routing is preferred over static
routing because of the major issue in static routing where in case of link/node failure the system cannot
recover. The dynamic routing overcomes from the static routing limitations.

Routing is the process of transferring the packets from one network to another network and delivering
the packets to the hosts. The traffic is routed to all the networks in the internetwork by the routers. In
the routing process a router must know following things:

 Destination device address.


 Neighbor routers for learning about remote networks.
 Possible routes to all remote networks.
 The best route with the shortest path to each remote network.
 How the routing information can be verified and maintained

Definition of Static Routing


Static routing does not involve any change in routing table unless the network administrator changes or
modify them manually. Static routing algorithms function well where the network traffic is predictable.
This is simple to design and easy to implement. There is no requirement of complex routing protocols.

The routing decisions are not made by current topology or traffic because the static routing systems can
not react to network changes hence it doesn’t require extra resources to learn the changes. That is the
reason, static routing is considered as inappropriate for large and constantly changing networks.
Static routing is also known as non-adaptive routing which enables a pre-computed route to be fed into
the routers offline. The administrative distance is a metric to measure the trustworthiness of the
information received from a router. The default administrative distance for static route is 1,
consequently the static routes will only be covered in the routing table when there is a direct connection
to that network. Static routes can be considered as an efficient method for a small and simple network
that does not change frequently.

Definition of Dynamic Routing


Dynamic routing is a superior routing technique which alters the routing information according to the
altering network circumstances by examining the arriving routing update messages. When the network
change occurs, it sends out a message to the router to specify that change, then the routes are
recalculated and sent as a new routing update message. These messages pervade the network, enabling
the router to change their routing tables correspondingly.

The technique uses routing protocols to disseminate knowledge such as RIP, OSPF, BGP, etc. Unlike
static routing, it does not require manual updation instead its automatic in manner and updates the
routing table information periodically relying upon network conditions. For doing so, it requires extra
resources for storing the information.

Dynamic routing or otherwise called as adaptive routing. The routing decisions are altered in these
algorithms to mirror the changes in the topology or traffic. There are various adaptive algorithms which
can be classified according to the source of information (from where router get the information,
adjacent routers or from all routers), change in routes (whether the route is changing when load
changes or when topology changes), optimization metrics used (distance, number of hops, residual
bandwidth).

The routes on which dynamic routing is performed are known as dynamic routes where the information
is responsive to changes in the network so that it is consistently being updated. Though, there is always
a slack between the period that a network changes and when all the routers are informed about the
change. The router tries to match the network change, and it causes a delay which is also known
as convergence time. The convergence time must be shorter. The larger network requires dynamic
routing because with static routing larger networks could not be manageable and result in loss of
connectivity.

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 application 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 and a hop count of 16 is
considered as network unreachable.

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)# exit

Configuring RIP for R2 :


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

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

Open Shortest Path First OSPF:


Open shortest path first (OSPF) is a link-state routing protocol which is used to find the best path
between the source and the destination router using its own SPF algorithm.

Open shortest path first (OSPF) router roles –


An area is a group of contiguous networks and routers. Routers belonging to same area shares a
common topology table and area I’d. The area I’d is associated with router’s interface as a router can
belong to more than one area. There are some roles of router in OSPF:

1. Backbone router – The area 0 is known as backbone area and the routers in area 0 are known as
backbone routers. If the routers exists partially in the area 0then also it is a backbone router.
2. Internal router – An internal router is a router which have all of its interfaces in a single area.
3. Area Boundary Router (ABR) – The router which connects backbone area with another area is
called Area Boundary Router. It belongs to more than one area. The ABRs, therefore, maintain
multiple link-state databases that describe both the backbone topology and the topology of the
other areas.
4. Area Summary Border Router (ASBR) – When an OSPF router is connected to a different
protocol like EIGRP or Border Gateway Protocol, or any other routing protocol then it is known
as AS. The router which connects two different AS (in which one of the interfaces is operating
OSPF) is known as Area Summary Border Router. These routers perform redistribution. ASBRs
run both OSPF and another routing protocol, such as RIP or BGP. ASBRs advertise the exchanged
external routing information throughout their AS.

Configuration –

There is a small topology in which there are 3 routers namely R1, R2, R3 are connected. R1 is connected
to networks 10.255.255.80/30 (interface fa0/1), 192.168.10.48/29 (interface fa0/0) and 10.255.255.8/30
(interface gi0/0)
Note – In the figure, IP addresses are written with their respected interfaces but as have to advertise
networks therefore, you have to write network I’d. R2 is connected to networks 192.168.10.64/29
(interface fa0/0), 10.255.255.80/30 (interface fa0/1). R3 is connected to networks 10.255.255.8/30 (int
fa0/1), 192.168.10.16/29 (int fa0/0).

Now, configuring OSPF for R1.

R1(config)#router ospf 1
R1(config-router)#network 192.168.10.48 0.0.0.7 area 1
R1(config-router)#network 10.255.255.80 0.0.0.3 area 1
R1(config-router)#network 10.255.255.8 0.0.0.3 area 1
Here, 1 is the OSPF instance or process I’d. It can be same or different (doesn’t matter). You have use
wildcard mask here and area used is 1.
Now, configuring R2

R2(config)#router ospf 1
R2(config-router)#network 192.168.10.64 0.0.0.7 area 1
R2(config-router)#network 10.255.255.80 0.0.0.3 area 1
Similarly, for R3

R3(config)#router ospf 1
R3(config-router)#network 192.168.10.16 0.0.0.7 area 1
R3(config-router)#network 10.255.255.8 0.0.0.3 area 1
You can check the configuration by typing command

R3#show ip protocols

Conclusion:
In this paper we have discussed about routing. We discussed types of routing protocols including
distance vector and link state routing. Moreover, we go through Static and Dynamic routing and
configured RIP and OSPF Dynamic Routing Protocols. RIP is used when there’s a small network which is
less than 15 Routers or Hops. While OSPF can be used for large networks where the HOPs or Routers are
more than 15.

References:
http://ijcsit.com/docs/Volume%205/vol5issue02/ijcsit2014050222.pdf

https://www.geeksforgeeks.org/open-shortest-path-first-ospf-router-roles-configuration/?ref=gcse

https://www.includehelp.com/computer-networks/introduction-to-routing-and-viewing-routing-
table.aspx

https://techdifferences.com/difference-between-static-and-dynamic-routing.html

You might also like