What Is Internet Routing

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

Network routing is the process of selecting a path across one or more networks.

The principles
of routing can apply to any type of network, from telephone networks to public transportation. In
packet switching networks, such as the internet, routing selects the paths for Internet Protocol
packets to travel from their origin to their destination. These Internet routing decisions are made
by specialized pieces of network hardware called router.

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. 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 system Fig. 1

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)

Autonomous System Number: Each autonomous system is uniquely identified through


autonomous system number (ASN). An ASN is the 16 bit number. There can be 65,536 possible
values for numbering Autonomous Systems. Within these possible values, there are different
ranges of ASN for different types of use such as: ASN for internet routing, ASN for identifying non-
routed networks etc.
Router Architecture:

Routers are computers 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 Sources (1.3.1.2)

On a Cisco router, the show ip route command is used to display the IPv4 routing table of a
router. A router provides additional route information, including how the route was learned, how
long the route has been in the table, and which specific interface to use to get to a predefined
destination.

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 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 Routing Table-Fig 2 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.
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: unicasting 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.

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 browsers 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. 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. 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. 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.

Internet Routing Architecture

The definition of Internet is network of networks or connection between different networks. It


means there will be connection or network between millions of computers or hosts through many
links and intermediate nodes such as switch, routers. However, it is really difficult to manage
routing with so many nodes, so there is a two level hierarchy of internet routing which are
routing inside a domain or autonomous system and inter-domain routing system.

Intra-domain / Intra-AS routing: (Routing Protocols)

Usually in intra-domain routing, the routers use the interior gateway protocols for routing the
packets. The two most common routing protocols are Routing Information Protocol (RIP),
Enhanced Interior Gateway Routing Protocol (EIGRP), Intermediate System to Intermediate
System (IS-IS), and Open Shortest Path First (OSPF) protocol. RIP and EIGRP are the
implemented routing protocol of distance vector routing protocol. IS-IS and OSPF are based on
Link State Routing Protocol.

Distance Vector Routing Protocol: Distance vector routing protocol uses routing table which has
both distance and direction. The router table always includes the minimum distance for packet
transferring using hop count as the metric, so the minimum cost is the minimum number of
hops or routers for transferring the packets from source to destination . Each node periodically
shares its routing table with its immediate neighbors . Usually routers create and update their
routing table using some algorithm. One of the most common algorithms is bellman-ford
algorithm.

Bellman-ford Algorithm

Bellman ford is an asynchronous, iterative, self termination, and distributed algorithm. Asynchronous: In
this algorithm, there is no serial for updating routing table, all the routers can update their routing table
at the same time. Iterative and self termination: The algorithm continues or iterates until all the routers
have same topology. When all the routers have same topology, it stops the iteration automatically.
There is no need of any specific signal for its termination which means the algorithm is self-terminating.
Distributed: After updating routing table, each node distributes it to its immediate neighbors.

The routers find the shortest path between two nodes through the Bellman ford equation.

Dx (y) = minv {c(x, v) + dv(y)}

Hence, Dx (y) is the least-cost path from node x to node y. c(x, v) is the cost and dv(y) is the distance.

The use of bellman ford equation is given below with


an example of three nodes: x, y, z through updating,
and sharing their routing table in three iterations.

Iteration 0 / Initial Iteration:


Initially, each node does not its routing table with one another, so the cost for neighbour nodes is
considered as infinity. Each node shares their initial routing table to their neighbour 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

After the calculation, node x has the new updated routing table:

Routing Table for Node X


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

After the calculation, node y has the new routing table:

Node y will not send this routing table to its neighbours since
there is no change in the cost of y (2, 0, 1) in previous and new
table.
Second Iteration for node z:

After Iteration 0, the node z has routing table of y and x. Now node z will update its routing table using
the table of node y and x and using bellman-ford equation.

Dz (x) = min{c (z, x) + Dx (x), c (z, y) + Dy (x)} = min {7 + 0, 1 + 2} = 3

Dz (y) = min{c (z, y) + Dy (y), c (z, x) + Dx (y)} = min {1 + 0, 7 + 2} = 1

Dz (z) = 0

After the calculation, node z has the new updated routing table:

Node z will send this updated routing table to node y and node
x.

Routing Table of node x,y,and z after second iteration:


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 x
has updated routing
table of z. Now node x
will compare its own
table with the table of
node z and create an
updated table with
minimum cost.

Node x will now have the updated routing table


Third Iteration for node y: After Iteration 1, the node y has updated routing table of z and x.
Now node y will compare its own table with the table of node z and x and create an updated
table with minimum cost.

Node x will now have the updated routing table

Third Iteration for node z: After Iteration 1, the node z has updated routing table of x. Now
node z will compare its own table with the table of node x and create an updated table with
minimum cost.
Node z will now have the updated routing table.

It seems after third iteration, node x, y, z have the similar routing table, so the iteration will stop
here.
Figure 3: Summarized Table for Bellman ford Algorithm

Routing Information Protocol:

Routing Information protocol is an implemented version of distance vector routing


protocol which is used inside an autonomous system. This protocol is usually used for Local
Area Network (LAN). RIP uses hop count as the cost or metric during creating and updating
routing table. The maximum number of hop for RIP is 15. It means if there is 16 hop
requirements for packet transfer, the cost is infinity. Every 30s each router sends it updated
routing table to its immediate neighbors . The maximum receiving time for routing table is
180s. If the receiver router does not get any updated routing table from sender router within
180s, it considers the sender router as down and consider cost for that router as 16 or infinity.
When one router sends its updated routing table to its neighbor routers, the neighbor routers
in turn pass the tables to the next neighbor routers and it continues until the state of network
convergence (a state when all the routers of an AS has the same routing topology). There are
two version of RIP: RIP Version 1 and RIP Version 2.
Table 2: Difference between RIP Version1 and RIP Version 2

Routing table in RIP:

RIP routing table usually has three columns. The


first column contains destination ip address, the second
column is about metric/cost which is hop count, and the
third column contains next node ip address for transferring
the packet.

Link State Routing Protocol:

Link State routing protocol is an intra-domain routing protocol which is used for
networks in several areas under one domain.
In link state routing, the routers create Link
State Packet (LSP) periodically after 1-2
hours.The LSP contains info of node identity,
list of links, sequence number, and age. After
creating LSP, the routers send it to all other
routers. The router creates shortest path tree using Dijkstra algorithm. The router calculate
routing table from shortest path tree.

Dijkstra Algorithm: This algorithm creates a shortest path tree from a graph. In this algorithm,
one node is considered as root node. All the other nodes can be reached from root node. The
figure is a graph where u is the root node. All other nodes can be reached from root u using
shortest path through dijkstra algorithm.

Figure 6: Steps of Dijkstra Algorithm:

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‟.

Open Shortest Path First


Routing Protocol (OSPF):

OSPF is one of the link state


routing protocols. In OSPF, an
autonomous system is divided
into several areas. Each area has
set of networks, routers, and
hosts. There is a backbone area
with a backbone router in an
autonomous system which acts
as the primary area. The rest of
the areas are secondary areas. Each secondary area has one area border router to connect to the
backbone router. There is a boundary router in AS to connect it to other AS. The cost or metric for OSPF
is minimum delay and maximum bandwidth.

Inter-Domain routing: (Routing Protocols):

Inter-domain routing or routing between two or more autonomous system follows the most common
protocol named Border Gateway Protocol version 4 [9]. This protocol is the implemented version of Path
Vector Routing Protocol.

Table: Difference between RIP and OSPF

Path Vector Routing Protocol:

In path vector routing, each


autonomous system has a
speaker node which acts on
behalf of the whole AS. The
speaker node creates a routing
table and sends it to other
speaker nodes of immediate
neighbor autonomous systems.
In fact, the speaker node does
not send any cost or metric in
path vector routing table; rather
it sends the path for routing the packets. In path vector routing, initially each speaker nodes only know
the path of its own AS, so initially the speaker node does not know how to reach to other AS[1]. When a
speaker node shares its routing table with its immediate neighbor Autonomous Systems‟ speaker node,
the neighbor speaker node update their routing tables by adding nodes that are not in its routing table
and adding its own autonomous system and the autonomous system that send the routing table.

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. External 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. 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:
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.

You might also like