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

Bellman Ford Algorithm - in Routing Information Protocol (RIP)

The document discusses the Bellman-Ford algorithm and how it is used in the Routing Information Protocol (RIP). The Bellman-Ford algorithm finds the shortest paths between nodes in a graph and can detect negative weight cycles. It works by relaxing edges and updating distance values over multiple iterations. RIP is a dynamic routing protocol that uses Bellman-Ford to automatically determine the best routes in a network based on the number of hops. The algorithm helps optimize network performance in large-scale networks using RIP.

Uploaded by

yash
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
95 views

Bellman Ford Algorithm - in Routing Information Protocol (RIP)

The document discusses the Bellman-Ford algorithm and how it is used in the Routing Information Protocol (RIP). The Bellman-Ford algorithm finds the shortest paths between nodes in a graph and can detect negative weight cycles. It works by relaxing edges and updating distance values over multiple iterations. RIP is a dynamic routing protocol that uses Bellman-Ford to automatically determine the best routes in a network based on the number of hops. The algorithm helps optimize network performance in large-scale networks using RIP.

Uploaded by

yash
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Journal of Physics: Conference Series

PAPER • OPEN ACCESS You may also like


- The impact of Routing Protocols and
Bellman Ford algorithm - in Routing Information topologies on IOT Based Systems
Saif Saad Hameed and Hadeel
Protocol (RIP) Mohammed Saleh

- SMOOTHNESS OF THE VALUE


FUNCTION FOR A CONTROLLED
To cite this article: Oris Krianto Sulaiman et al 2018 J. Phys.: Conf. Ser. 1007 012009 DIFFUSION PROCESS IN A DOMAIN
N V Krylov

- Comparative Analysis between Dijkstra


and Bellman-Ford Algorithms in Shortest
Path Optimization
View the article online for updates and enhancements. Samah W.G. AbuSalim, Rosziati Ibrahim,
Mohd Zainuri Saringat et al.

This content was downloaded from IP address 117.248.194.28 on 08/03/2022 at 11:41


MECnIT IOP Publishing
IOP Conf. Series: Journal of Physics: Conf. Series 1007 (2018)
1234567890 ‘’“” 012009 doi:10.1088/1742-6596/1007/1/012009

Bellman Ford algorithm-in RoutingInformation Protocol


(RIP)

Oris Krianto Sulaiman1*, Amir Mahmud Siregar2, Khairuddin Nasution1,


Tasliyah Haramaini1
1
Faculty of Engineering, Universitas Islam Sumatera Utara, Indonesia
2
Faculty of Technology and Computer Science, Universitas Prima Indonesia,
Indonesia

E-mail: *[email protected], [email protected],


[email protected], [email protected]

Abstract. In a large scale network need a routing that can handle a lot number of users, one of
the solutions to cope with large scale network is by using a routing protocol, There are 2 types
of routing protocol that is static and dynamic, Static routing is manually route input based on
network admin, while dynamic routing is automatically route input formed based on existing
network. Dynamic routing is efficient used to network extensively because of the input of route
automatic formed, Routing Information Protocol (RIP) is one of dynamic routing that uses the
bellman-ford algorithm where this algorithm will search for the best path that traversed the
network by leveraging the value of each link, so with the bellman-ford algorithm owned by
RIP can optimize existing networks.

1. Introduction
Needs of people by use the technology gradually increasing so that it is reasonably necessary to the
development of technology enhanced. Almost all of this technology is now using the internet access as
communication media, good internet access and efficient can increase performance of the system that
used the technology. For time efficiency and workmanship at the time of application usage on the
network then need an optimal network performance. Network with large scale is usually between one
and the other are not directly connected, but it went through some other network devices. A good
design and architecture is necessary in anticipation of problems that may occur when the network
traffic is solid. In heavy of network traffic may need to data packets can reach the destination by using
the best line from every kind of path. Bellman-Ford algorithm is one of the best routes search
algorithm utilizing the value of each existing link, this algorithm is used in routing protocol RIP,
metric is hop i.e. value of each router are in her past. Routing Information Protocol (RIP) is a dynamic
routing protocol where the entry route will automatically be formed if there are new routers that are
not yet known. Routers connected usingRouting Information Protocol (RIP) will not suffered a
looping because one of the links will be used as a backup link. By using the Bellman-Ford algorithm,
then the best path that will be going through the package data will be achieved so that it can optimize
existing networks

Content from this work may be used under the terms of the Creative Commons Attribution 3.0 licence. Any further distribution
of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI.
Published under licence by IOP Publishing Ltd 1
 ISSN: 1978-1520

MECnIT IOP Publishing


IOP Conf. Series: Journal of Physics: Conf. Series 1007 (2018)
1234567890 ‘’“” 012009 doi:10.1088/1742-6596/1007/1/012009

2. Review of literature

2.1 Bellman-Ford Algorithm


Bellman-Ford algorithm is a graph search algorithm for searching shortest route. Bellman-ford
algorithm can find negative weights from each edge. In Figure 1 is an example of the bellman-ford
algorithm, where there are 5 vertex i.e. A, B, C, D, and E. Each edge has a weight value i.e. directed
edge A toward B is -3 and the other edge is one. N vertices Search iterations N – 1, in the example
images there are 5 vertices so that there are 4 iteration, But if there's a vegative cyle or value weights
are negative then it should be in iteration again called Nth [1][2][3].

Figure 1. Example of Bellman-Ford algoritm.

As for the source code from the Bellman-ford algorithm is as follow:

function BellmanFord(list vertices, list edges, vertex source)


::distance[],predecessor[]
// Step 1: initialize graph
for each vertex v in vertices:
distance[v] := inf
predecessor[v] := null
distance[source] := 0
// Step 2: relax edges repeatedly
for i from 1 to size(vertices)-1:
for each edge (u, v) with weight w in edges:
if distance[u] + w < distance[v]:
distance[v] := distance[u] + w
predecessor[v] := u
// Step 3: check for negative-weight cycles
for each edge (u, v) with weight w in edges:
if distance[u] + w < distance[v]:
error "Graph contains a negative-weight cycle"
return distance[], predecessor[]

2.2 Routing Information Protocol


The process of connecting two or more different network so-called routing. A device that connects two
different network is called with a router. Each internet network requires protocol to process data
communication, router has a protocol with routing protocol. Routing protocol served to regulate data

2
IJCCS ISSN: 1978-1520

MECnIT IOP Publishing


IOP Conf. Series: Journal of Physics: Conf. Series 1007 (2018)
1234567890 ‘’“” 012009 doi:10.1088/1742-6596/1007/1/012009

traffic in a network and can search for the best path for each of the data points in the network. Each
Routing protocol has an entry route i.e. database storage route that will pass, entry route lies in the
routing table that lists ip address all of the objectives that can it traversed.[4]
A Routing Protocol is divided into two, Static routing and Dynamic routing. Static routing is the
process of connecting two or more different network with entry routes manually input, While the
dynamic route process connects two or more different network where entry routes in the routing table
is formed automatically.
There are several types of routing protocol, including:
1. Routing Information Protocol (RIP)
2. Interior Gateway Routing Protocol (IGRP)
3. Enhanced Interior Gateway Routing Protocol (EIGRP)
4. Open Shortest Path Firs (OSPF)
5. Intermediate System-to-Intermediate System (IS-IS)
6. Border Gateway Protocol (BGP)

Figure 2 the following is a division between the routing protocol:

Figure 2. Types Of Routing Protocol.

Routing Information Protocol or collectively RIP is the routing protocol with dynamic types using the
bellman-ford algorithm for searching shortest path. Metric of the RIP is using hop count i.e the
number of routers that kind. Every router that is passed then the hop count will be calculated 1. In the
RIP, the vertex is router, edge is the link, and weight of edge is the number of hop count from each
track path. the number of Count hops that can be traversed routing protocol RIP is 15. [5][6]

3. Design of network
This research will use the 2 network topology, the first topology is trials for the bellman-ford
algorithm and the second topology is a test for the Routing Information Protocol (RIP). Figure 3 and
table 1 is the topology and addressing table for testing the network by using the Routing Information
Protocol (RIP). Trials will be carried out by means of simulation, simulation program used is cisco
packet tracer.

Title of manuscript is short and clear, implies research results (First Author)
 ISSN: 1978-1520

MECnIT IOP Publishing


IOP Conf. Series: Journal of Physics: Conf. Series 1007 (2018)
1234567890 ‘’“” 012009 doi:10.1088/1742-6596/1007/1/012009

Figure 3.Topology Design.

Table 1. Addressing.
Device Interface IP address Subnet Mask Default
Gateway
R1 Fa 0/0 10.10.10.1 255.255.255.252 N/A
Fa 0/1 192.168.1.254 255.255.255.0 N/A
Fa 1/0 10.10.30.1 255.255.255.252 N/A
R2 Fa 0/0 10.10.10.2 255.255.255.252 N/A
Fa 0/1 10.10.20.1 255.255.255.252 N/A
R3 Fa 0/0 10.10.20.2 255.255.255.252 N/A
Fa 0/1 172.16.10.254 255.255.255.0 N/A
Fa 1/0 10.10.50.2 255.255.255.252 N/A
R4 Fa 0/0 10.10.30.2 255.255.255.252 N/A
Fa 0/1 10.10.40.1 255.255.255.252 N/A
R5 Fa 0/0 10.10.40.2 255.255.255.252 N/A
Fa 0/1 10.10.50.1 255.255.255.252 N/A
PC0 NIC 192.168.1.1 255.255.255.0 192.168.1.254
PC1 NIC 172.16.10.1 255.255.255.0 172.16.10.254

4. Results and discussion

4.1 Bellman-Ford Testing


Discussion of using 3 router as vertex, i.e. R1, R2 and R3, Search route u = 1. Each edge has a value
does it weigh each which have been listed in table 1.

Figure 4.Vertex and weighting value.

4
IJCCS ISSN: 1978-1520

MECnIT IOP Publishing


IOP Conf. Series: Journal of Physics: Conf. Series 1007 (2018)
1234567890 ‘’“” 012009 doi:10.1088/1742-6596/1007/1/012009

Table 2.Weighting value.


Edge Weight
1–2 10
1–3 5
2–1 -3
3–2 2

Relax (u,v):
If v.d > u.d + w (u,v)
v.d = u.d + w (u,v)
v.p = u

ITERATION I

Table 3. Array d and p.


1 2 3 1 2 3
D 0 ∞ ∞ P - - -

Calculate the edge 1 – 2


u.d = 1.d = 0
v.d = 2.d = ∞
w (u,v) = w (1,2) = 10

Relax (u,v):
2.d> 1.d + w (1,2)
∞> 0 + 10
TRUE
v.d = 2.d = 0 + 10 = 10
v.p = 2.p = 0

Table 4. Results of calculation edge 1 – 2.

1 2 3 1 2 3
D 0 10 ∞ P - 0 -
Calculate the edge1 – 3
u.d = 1.d = 0
v.d = 3.d = ∞
w (u,v) = w (1,3) = 5

Relax (u,v):
3.d> 1.d + w (1,3)
∞> 0 + 5
TRUE
v.d = 3.d = 0 + 5 = 5
v.p = 3.p = 0

Title of manuscript is short and clear, implies research results (First Author)
 ISSN: 1978-1520

MECnIT IOP Publishing


IOP Conf. Series: Journal of Physics: Conf. Series 1007 (2018)
1234567890 ‘’“” 012009 doi:10.1088/1742-6596/1007/1/012009

Table 5. Results of calculation edge 1 – 3.


1 2 3 1 2 3
d 0 10 5 p - 0 0

Calculate the edge2 – 1


u.d = 2.d = 10
v.d = 1.d = 0
w (u,v) = w (2,1) = -3

Relax (u,v):
1.d> 2.d + w (2,1)
0 > 10 + -3
ELSE
Next Edge

Calculate the edge3 – 2


u.d = 3.d = 5
v.d = 2.d = 10
w (u,v) = w (3,2) = 2

Relax (u,v):
2.d> 3.d + w (3,2)
10 > 5 + 2 = 7
TRUE
v.d =2.d = 5 + 2 = 7
v.p = 2.p = 5

Table 6. Results of calculation edge 3 – 2.

1 2 3 1 2 3
D 0 7 5 p - 5 0

ITERATION II
Calculate the Edge 1 – 2
u.d = 1.d = 0
v.d = 2.d = 7
w (u,v) = w (1,2) = 10

Relax (u,v):
1.d> 2.d + w (2,1)
0 > 17
FALSE

Calculate the edge 1 – 3


u.d = 1.d = 0
v.d = 3.d = 5
w (u,v) = w (1,3) = 5

Relax (u,v):

6
IJCCS ISSN: 1978-1520

MECnIT IOP Publishing


IOP Conf. Series: Journal of Physics: Conf. Series 1007 (2018)
1234567890 ‘’“” 012009 doi:10.1088/1742-6596/1007/1/012009

3.d> 1.d + w (1,3)


5> 0 + 5
FALSE
Next Edge

Calculate the edge 2 – 1


u.d = 2.d = 7
v.d = 1.d = 0
w (u,v) = w (2,1) = -3

Relax (u,v):
1.d> 2.d + w (2,1)
0 > 7 + -3
FALSE
Next Edge

Calculate the edge 3 – 2


u.d = 3.d = 5
v.d = 2.d = 7
w (u,v) = w (3,2) = 2

Relax (u,v):
2.d> 3.d + w (3,2)
7> 5 + 2 = 7
FALSE

Final result :

Table 7. Result of last iteration.

1 2 3 1 2 3
d 0 7 5 p - 5 0

Figure 5. The shortest path is obtained.

Shortest path traveled from vertex 1 to other vertex is weighting value 5 and 2.

4.2 RIP Testing


Bellman-ford algorithm used in RIP will be on implementation of topology in Figure 6 below:

Title of manuscript is short and clear, implies research results (First Author)
 ISSN: 1978-1520

MECnIT IOP Publishing


IOP Conf. Series: Journal of Physics: Conf. Series 1007 (2018)
1234567890 ‘’“” 012009 doi:10.1088/1742-6596/1007/1/012009

Figure 6. Shortest path.

The image of R1, R2, R3, R4 and R5 as the vertex and each link (edge) have metric i.e. hop count on
RIP is the weights value from each edge.

R1#show ip route rip


10.0.0.0/30 is subnetted, 5 subnets
R 10.10.20.0 [120/1] via 10.10.10.2, 00:00:23, FastEthernet0/0
R 10.10.40.0 [120/1] via 10.10.30.2, 00:00:13, FastEthernet1/0
R 10.10.50.0 [120/2] via 10.10.30.2, 00:00:13, FastEthernet1/0
[120/2] via 10.10.10.2, 00:00:23, FastEthernet0/0
172.16.0.0/24 is subnetted, 1 subnets
R 172.16.10.0 [120/2] via 10.10.10.2, 00:00:23, FastEthernet0/0
From R1 look his pass routes to reach across a network is:
 From R1 to network 10.10.20.0 through ip10.10.10.2 (R2) with the number ofhop 1.
 From R1to network 10.10.40.0 throughip10.10.30.2 (R4) with the number ofhop 1.
 From R1 to network 10.10.50.0 through ip 10.10.30.2 (R4) with the number ofhop 2.
 From R1 to network 172.16.10.0 through ip 10.10.30.2 (R4) with the number ofhop 2.
From the trials obtained the optimum results to achieve throughout the network with routing
protocol RIP which uses the Bellman-ford algorithm.

5. Conclusions and suggestions


The following is the conclusion from the results of this research are:
1. Bellman-Ford algorithm is used by the routing protocol RIP to search the best path in
a network.
2. Weighting value of routing protocol RIP by default is worth 1.
3. The maximum number of vertices in the routing protocol RIP is 15.

The following is a suggestion from the results of this research are:


1. Can be expanded by using the others shortest path search algorithm.
2. Can be developed by using the others routing protocol.

Reference
[1] S. Tayeb and S. Latifi, "An Evaluative Analysis of DUAL, SPF, and Bellman-Ford," Journal of
Software Networking, pp. 1-22, 2017

8
IJCCS ISSN: 1978-1520

MECnIT IOP Publishing


IOP Conf. Series: Journal of Physics: Conf. Series 1007 (2018)
1234567890 ‘’“” 012009 doi:10.1088/1742-6596/1007/1/012009

[2] A. A. P, S. H. Pramono and A. M. Muslim, "Optimasi Jalur Tercepat dengan Menggunakan


Modifikasi Algoritma Bellman Ford (Studi Kasus Lintasan antar Kecamatan Kota Malang),"
Jurnal EECCIS , vol. 9, no. 2, pp. 168-172, 2015
[3] F. Anggraini and S. Mingparwoto, "Penerapan Metode Algoritma Bellman – Ford Dalam
Aplikasi Pencarian Lokasi Perseroan Terbatas Di Pt.Jakarta Industrial Estate Pulogadung
(PT.JIEP)," Jurnal Teknologi, vol. 7, no. 1, pp. 28-34, 2015
[4] R. Towidjojo, Mikrotik Kung Fu Kitab 4, Jakarta: Jasakom, 2016
[5] M. N. Shah, "Implementation of Graph Theory in Computer Networking To Find an Efficiect
Routing Algorithm," International Journal of Innovative Research in Computer and
Communication Engineering, vol. 4, no. 1, pp. 12-20, 2016
[6] A. Verma and N. Bhardwaj, "A Review on Routing Information Protocol (RIP) and Open
Shortest Path First (OSPF) Routing Protocol," International Journal of Future Generation
Communication and Networking, vol. 9, no. 4, pp. 161-170, 2016

Title of manuscript is short and clear, implies research results (First Author)

You might also like