Routing Internet Routing Protocols and Algorithms
Routing Internet Routing Protocols and Algorithms
net/publication/281490293
CITATION READS
1 12,747
2 authors:
All content following this page was uploaded by Jannatul Ferdaus on 05 September 2015.
Abstract:
Routing is the process of finding the best path for transferring the IP Packets from source
to destination. There are several practical uses of routing in networking such as routing for
Telephone networks, routing for Internet, and routing for VoIP communication. In this paper, we
focus on Internet routing architecture including some popular routing protocols such as Routing
Information Protocol (RIP), Open Shortest Path First Protocol (OSPF), and Border Gateway
Protocol (BGP) and two algorithms which are Link State Routing Algorithm and Distance
Vector Routing Algorithm. We also include a brief explanation of router architecture and
unicast, multicast, and broadcast routing.
Introduction:
Suppose you want to send a letter to your friend who is in another city or country.
Basically, you‟d choose a service that takes the shortest path (takes less time/delay) or you‟d
choose a path that is less expensive but takes more time. Depending on your situation, you‟d take
a path that is best for you. The same as in everyday life, communication devices as well have to
deal with choosing a path or route to send information from one node (device) to another.
Routing, also referred to as forwarding network in the past, is the process to find the best path
(usually shortest path) from a source to destination. Just as a person would travel through roads
with different traffic regulations, and taking different steps and using different kinds of maps.
Routing can have different processes depending on different rules (protocols) and steps
(algorithm) having different maps (tables or trees). In short, the points to be taken into
consideration in routing is which route to take, is the route the shortest and therefore in case the
route faces some problem how to solve it.
Depending on different factors, there are different types of routing. Basically, there are
two types of routing: source routing and hop-to-hop routing. In source routing, the source
collects all the information about the route and then sends the message (packet) containing the
full information [4]. However, in hop-to-hop routing the source is not responsible for all the
2
information about getting from source to destination. Instead it can send the packet to next hop
(node) and the next hope will take care of the hop after that and so on [4]. The most important
terms in the routing process are the routing table, routing protocols and routing algorithms.
Routing table has the information about different routes and based on routing protocols each
node and router will decide which route to take which differs based on different algorithms or
steps. In the process of routing, router plays a main role.
Autonomous Systems:
An autonomous system or domain is
consisted of several networks and routers
under the authority of a single administration
[7]. Each domain uses Interior gateway
protocol (IGP) to route packets through the
routers inside the domain (for example:
Routing packets for Local Area Networks
(LAN)) and inter-domain routing protocol to route packets to other domain (for example:
Routing packets for Wide Area Network (WAN) [7].
65,535 Reserved
Router Architecture:
Routers are computers [11] having both hardware and software components. It has CPU,
RAM, ROM, NVRAM, Flash Memory, and Operating System and the four main components are
input ports, switching fabric, output port and routing processor. Router is an intermediate device
in the process of routing. Back to our example of traveling, a person might need a vehicle for
going from one place to another. Routing also needs a router to deliver a packet from one node to
another across a network and therefore the router plays a similar role as a vehicle. Basically, a
router connects networks together and is responsible for delivering a packet in a timely and
efficient manner. Therefore, the efficiency of the delivery depends on router which chooses the
best path [15]. In short, a router is responsible to choose the best path and also to forward the
packets towards their destinations.
Routing Table:
Router has a routing table which contains the information about all the routes. It is
initially the memory where the physical addresses of all neighboring routers and therefore the
node to node address of Routing Table-Fig 2
frames are saved for
delivery. It is a router‟s
memory which records
the physical addresses of
its neighbor routers and
destination address of
frames for node to node
delivery. There are two
types of routing table.
Static routing table is
updated manually while
4
dynamic routing table updates automatically. In the routing process the routing table is analyzed
for choosing the shortest (best) path.
Routing Protocols:
A routing protocol is the software part in the routing process which is assigned to an
interface. It is part of the router‟s operating system which is used for creating routing tables and
updating them. Just as there are different traffic laws and regulations when a person drives on
different road (routes) anywhere, a router also has terms based on which it decides the
information it should keep and the routes it should take with the help of the routing table. A
routing protocol sets the standards for the exchange of information between nodes. It determines
how the errors should be checked and how the sender should show that it has finished sending
and for the receiver if it has received the message (packet). Basically, it is an “agreed upon
format for transmitting data” between two nodes or devices on a network. Depending on being
simple, reliable or faster, each routing protocol has it‟s own advantages and disadvantages [11].
Different routing protocols use different routing algorithms. The most popular routing protocols
are Distance Vector, Link State and Path Vector routing protocol where the first two are intra-
domain and the last one is for inter-domain routing. An intra-domain routing connects the nodes
and devices within a network or autonomous system and inter-domain routing connects different
networks or autonomous systems. There are basically two types of routing which will be
discussed in this paper: uni-casting and multicasting.
Unicasting:
First of all, in unicasting there is only one sender and one receiver. Therefore, the router uses
only one of its interfaces for forwarding a packet towards its next destination [12].
Multicasting:
In multicasting at least one sender sends the message (packet) to multiple receivers which is
called a multicast group. Suppose, for example, Google Chrome needs to be updated. As an
update alert, the browser‟s administrators will send a message to all its users. It will multicast the
message to a group of receivers and for that the router will use several of its interfaces for
forwarding the message [12]. The basic requirements in this type of routing is to find the
„optimal‟ (shortest path) where one copy of the packet should be received by the members while
the non-members should not receive any and that the packet should not visit a router more than
5
once which will create loops[12]. Multicasting is usually used for streaming media such as
online video news or transfer of audio or video in a live lecture to a set of participants and
Internet television applications [9]. Just as in unicasting tables are analyzed to find the best path,
in multicasting trees are used which are of two types: source-based trees and group-shared trees.
Broadcasting:
Broadcasting is when one sender sends a packet to everyone on the network. Therefore, if there
are N nodes in a network, there will be N receivers. In broadcasting, when a sender duplicates N
copies of the packet and then send it to all the nodes which is also called source duplication. On
the other hand, send one copy of the packet to the next node and therefore that node makes
another copy and sends it to all the nodes it is directly connected to. This type of duplicate
creation is called in-network duplication [11].
x y Z x y Z X y z
x 0 2 7 x ∞ ∞ ∞ x ∞ ∞ ∞
y ∞ ∞ ∞ y 2 0 1 y ∞ ∞ ∞
z ∞ ∞ ∞ z ∞ ∞ ∞ z 7 1 0
Initially, each node does not its routing table with one another, so the cost for neighbor nodes is
considered as infinity. Each node shares their initial routing table to their neighbor nodes. Hence
x share its table with y and z. y share its table with x and z. z share its table with y and x.
Iteration 1 / Second Iteration:
Second Iteration for node x:
After Iteration 0, the node x has routing table of y and z. Now node x will update its routing table
using the table of node y and z and using bellman-ford equation.
Dx(x) = 0
Dx (y) = min{c(x, y) + Dy (y), c(x, z) + Dz (y)} = min {2 + 0, 7 + 1} = 2
Dx (z) = min{c(x, y) + Dy (z), c(x, z) + Dz (z)} = min {2 + 1, 7 + 0} = 3
Routing table for Node x Routing table for Node y Routing table for Node z
x y z x y Z x y Z
X 0 2 3 x ∞ ∞ ∞ x ∞ ∞ ∞
Y ∞ ∞ ∞ y 2 0 1 y ∞ ∞ ∞
Z ∞ ∞ ∞ z ∞ ∞ ∞ z 7 1 0
After the calculation, node x has the new updated routing table:
Routing table for Node x
8
x y z
x 0 2 3
y 2 0 1
z 7 1 0
Node x will send this updated routing table to node y and node z.
Second Iteration for node y:
After Iteration 0, the node y has routing table of x and z. Now node y will update its routing table
using the table of node x and z and using bellman-ford equation.
Dy (x) = min{c(y, x) + Dx (x), c(y, z) + Dz (x)} = min {2 + 0, 1 + 7} = 2
Dy(y) = 0
Dy (z) = min{c(y, z) + Dz (z), c(y, x) + Dx (z)} = min {1 + 0, 2 + 7} = 1
Routing table for Node y Routing table for Node x Routing table for Node z
x y z x y z x y z
x ∞ ∞ ∞ X 0 2 7 x ∞ ∞ ∞
y 2 0 1 Y ∞ ∞ ∞ y ∞ ∞ ∞
z ∞ ∞ ∞ Z ∞ ∞ ∞ z 7 1 0
After the calculation, node y has the new routing table: Routing table for Node y
x y z
x 0 2 7
y 2 0 1
z 7 1 0
Node y will not send this routing table to its neighbors since
there is no change in the cost of y (2, 0, 1) in previous and new table.
9
x y z x y z x y z
x ∞ ∞ ∞ x 0 2 7 x ∞ ∞ ∞
y ∞ ∞ ∞ y ∞ ∞ ∞ y 2 0 1
z 3 1 0 z ∞ ∞ ∞ z ∞ ∞ ∞
x y z
x 0 2 7
y 2 0 1
z 3 1 0
Node z will send this updated routing table to node y and node x.
x y z x y z x y z
x 0 2 3 x 0 2 7 x 0 2 7
y 2 0 1 y 2 0 1 y 2 0 1
z 7 1 0 z 7 1 0 z 3 1 0
Since node x, y, and z has different routing table, the algorithm will continue.
Iteration 2 / Third Iteration:
Third Iteration for node x:
After Iteration 1, the node
Old Routing table for Node x Routing table for Node z
x has updated routing table
of z. Now node x will
x y z x y z
compare its own table with
x 0 2 3 x 0 2 7
the table of node z and
y 2 0 1 y 2 0 1
create an updated table
z 7 1 0 z 3 1 0
with minimum cost.
x y z
x 0 2 3
y 2 0 1
z 3 1 0
x y z x y z x y z
x 0 2 7 X 0 2 7 x 0 2 3
y 2 0 1 Y 2 0 1 y 2 0 1
z 7 1 0 Z 3 1 0 z 7 1 0
x y z
x 0 2 3
y 2 0 1
z 3 1 0
x y z x y z
x 0 2 7 x 0 2 3
y 2 0 1 y 2 0 1
z 3 1 0 z 7 1 0
x y z
x 0 2 3
y 2 0 1
z 3 1 0
It seems after third iteration, node x, y, z have the similar routing table, so the iteration will stop
here.
Final Routing table for Node Final Routing table for Node Final Routing table for Node
y z x
x y z x y z x y z
x 0 2 3 x 0 2 3 x 0 2 3
y 2 0 1 y 2 0 1 y 2 0 1
z 3 1 0 z 3 1 0 z 3 1 0
Hence, D(v) is the cost of least cost path from source node to destination. P(V) is the previous
node or neighbor node. N‟ is the subset of nodes.
Steps of the algorithm:
1. Initially, the root node finds the least cost path from root to other nodes which are
directly attached with the root. If other nodes are not directly attached, the cost is set to
infinity.
2. Then the root node finds the neighbor node which has the minimum cost and adds it in
N‟.
3. Step 2 is continued until the last node is added to N‟[10].
Metric/Cost: number of hops. Max hop is 15. Metric/Cost: Minimum Delay, Maximum
Throughput. Administrator can assign the cost.
Routing table is sent to neighbor nodes. Routing table is sent to all nodes (not just
neighbors)
system and the autonomous system that send the routing table[1].
Border Gateway Protocol:
Border Gateway protocol is a common protocol for packet transferring through internet.
It is an implemented version of path vector routing protocol. In BGP, the connection between the
speaker nodes of different AS is called a session. The connection or session is set up for sending
and receiving the routing table. The TCP level services are used for BGP session.
There are two types of session in BGP: External BGP session and Internal BGP session[1].
External BGP Session: Interior and Exterior BGP session
This session is used for
exchanging routing
information between two
speaker nodes of two
different Autonomous
systems.
Internal BGP Session:
The I-BGP session is used
for exchanging routing
information between the routers inside an autonomous system[1].
Routing Table for BGP: In this protocol, the speaker nodes have minimum two column routing
table. The first column includes the
destination AS and the second column
includes the path/Intermediate AS to
reach the destination.
Conclusion:
Conclusion:
Routing is mainly the role of network layer in OSI model for packet transferring using
least cost. Routers are the intermediate nodes which route or direct the best path having least cost
(least number of hop, minimum delay, and maximum bandwidth) for packet transmission with
the help of its routing table. Routing table is created and updated based on some protocols. For
the packet transmission in LAN networks, some common intra-domain routing protocols are
used. Besides, some inter-domain routing protocols are used for routing in WAN or internet.
18
References
[1] Behrouz A. Forouzan. Data Communications and Networking. Singapore: The McGraw-
Hill, 2007. Print.
[2] Benjamin, Henry. “Distance Vector and Link-State Routing Protocols.” Pearson:
InformIT. http://www.informit.com/library/content.aspx?b=CCNP_Studies_Routing&seqNum
=22
[3] “Configuring Multiprotocol BGP (MP-BGP) Support for CLNS.” IP Routing: BGP
Configuration Guide, Cisco IOS Release 12.4T. CA: Cisco Systems Inc, 2011. http://www.cisco
.com /c/en/us/td/docs/ios-xml/ios/iproute_bgp/configuration/12-4t/irg-12-4t-book.pdf
[4] David M. Piscitello, Bellcore and A. Layman Chapin. “Introduction to Routing.” 1993.
7(9). Connexions. http://www.corecom.com/external/OSNconnexions/OSNconnexions.html
[5] “Difference between RIPv1 and RIPv2.” OmniSecu.com. http://www.omnisecu.com/
cisco-certified-network-associate-ccna/difference-between-ripv1-and-ripv2.php
[7] Huston, Geoff. “Exploring Autonomous System Numbers.” APNIC: The Internet
Protocol Journal. 9 (1). http://www.cisco.com/web/about/ac123/ac147/ archived_issues/ipj_9-1/
autonomous_ system_numbers.html
[8] http://www.certificationkits.com/cisco-certification/images/stories/ccnp-route/ch-6-4-
ccnp-route-bgp/cisco-ccnp-route-bgp-12.jpg
[11] Leon, Alexis and Mathews Leon. Introduction to Computers. New Delhi: Vikas
Publishing House, 1999.
19
[12] McGraw Hill. 2000. “Multicasting and Multicast Routing Protocols,” The Mc-Graw Hill
Companies: http://medusa.sdsu.edu/network/CS596/Lectures/ch14_Multicasting.pdf
[13] Rexford, Jennifer. “Intradomain Routing.” Advanced Computer Networks.
http://www.cs.princeton.edu/courses/archive/fall06/cos561/
[15] “Routing Concepts.” Routing and Switching Essentials Companion Guide. Cisco
Networking Academy. Indianapolis(IN): Cisco Systems Inc., 2014. http://ptgmedia.pearsoncmg
.com/images/9781587133213/samplepages/02_9781587133213_ch01.pdf
[16] http://www.ciscopress.com/articles/article.asp?p=2180208&seqNum=4
[17] http://ptgmedia.pearsoncmg.com/images/9781587132063/samplepages/1587132060.pdf
[18] http://www.cs.cornell.edu/skeshav/book/slides/routing/routing.pdf
[19] http://faculty.ksu.edu.sa/Al-Rodhaan/CAP%20240/Spring2010/Chapter%2022.pdf