Sunteți pe pagina 1din 15

CHAPTER 1

INTRODUCTION
1.1 What is Routing?

In our day to day life, we come across many places where we use
internet or any mode of communication in order to have some data
transferred or to communicate via phone or messaging. There are
numerous examples of such places like schools, offices, workplaces, etc.
where we get to see an interconnected system through which
communication takes place. Suppose a person is at his home and wants
to send a message to his friend living overseas. So he would compose a
message and send through internet. This message travels from the
sender to various in between stages before reaching the receiver.
There are multiple ways in which message can reach the receiver, just
like there are multiple ways for you to go to your school or office.
So the selection of a path from so many alternatives is called
routing and it is achieved by means of a device called router. Routing is
done at many areas including circuit and packet switched networks and
also in transport systems, etc. Routers, switches, gateways are the
intermediate devices which act as nodes and have multiple incoming
and outgoing paths which are selected according to the forwarding
mechanisms.

1.2 Why Routing is Needed ?

The connectivity of IP revolves around routing and connections among


far away devices depend a lot on path selection for quick and successful
communication. More complex the network becomes, more becomes
difficult the implementation of connections. And surely it is impossible
to have an individual connection for each device with all other devices.
So, routing is an inseparable and unavoidable part of a network.

1.3 Optimal Path

Again considering the same example, suppose you want to go to


office from home. There are 5 choices, then which path would you
select ? Of course the one which takes the lowest time and lowest cost
to reach the office. There is no use of roaming round and round
travelling a lot and reaching the same destination which could easily be
reached using an alternate path. Same is the situation in networking.
You search something on Google and the result is on front of you in
fraction of seconds and as other example, you call someone and the
voice from both the sides is heard approximately without any delay.
The reason behind making such extreme things possible is selecting the
optimum path that is shortest path possible between sender and
receiver.
The shortest path calculation in a network is achieved by means
of various algorithms used according to different situations. Algorithms
consider the connections and lengths among all the nodes and calculate
the best route from a source to any destination. Optimum path is very
necessary for effective and quick communication. Had there not been
such routing systems, the communications would have been way to
slower hindering the effectiveness of communication and would lead to
very slow advancement of technology as today the most important
factor in any field is speed and much progress depends on how fast any
task is done. The forwarding mechanisms and the processing and
queuing delays, bit rate, etc. factors are also responsible for the time
taken by a message to reach its source to destination along with the
path selection. Generally, each router knows the incoming and
outgoing paths with its neighbors and this information is stored in the
form of routing tables.

1.4 Scope of Work

This mini project is made by studying different types of communication


systems having different topologies and connections. The work is
mainly focused upon to understand various routing algorithms and a
java program with GUI is made for the same in which the user can
simulate different situations by taking the number of nodes and
connections among them by providing data from an external user
specified file and the user can get the optimum path on using different
algorithms. The algorithms used in the project are:-
 Djkstra’s shortest path algorithm.
 Floyd Warshall’s Algorithm for Transitive closure.
 Bellman Ford Algorithm which can be used in case of negative
edges.

The study is further explained topic wise with various aspects related to
the subject of concern.
CHAPTER 2
Characteristics of Network and Terms
2.1 Ways of Delivering Messages

2.1.1 Unicast

The message is sent from the source node across the


network to a specific destination node in Unicast
system. For example, on performing a search on
web browser, that particular search result is shown only to

the user who asked for it. Fig: 2.1

2.1.2 Multicast

The message is sent from the source node across the


network to many destination nodes who have
requested for the data in Multicast system. For example,
sending a mail to a group of people.
Fig: 2.2

2.1.3 Anycast

The message is sent from the source node across the network to
any number of destination nodes which are particularly
nearer to the source and it takes less amount of cost to
reach in Anycast system.
Fig: 2.3
2.1.4 Geocast

The message is sent from the source node across the network to
destination nodes situated at a particular geographical
location in Geocast system. For example, there
happens an emergency situation like earthquake
or flood that may have cause effect on a specific
geographic area, so message can be sent to
particular geographic location.
Fig: 2.4

2.1.5 Broadcast

Fig: 2.5

The message is sent from the source node across the network to all the
nodes connected to the network irrespective of whether the node has
requested for the data or not in Broadcast system. The channels viewed
by people on television are example of broadcast system because all
the channels are available for the user to use even if the user has
demanded for it or not.
2.2 Network Topologies

2.2.1 Mesh Topology

In this type, each and every device is connected to every other


individual device with a point to point connection link. So if we have n
number of devices and all nodes are connected except itself. That is, n-
1 devices. And for two devices we need 1 link so for n devices we need
n(n-1)/2 number of double sided (duplex) links.

2.2.2 Star Topology

In this type, each and every device is connected via point to point link
with a central device which is a hub or a switch. Its advantage over the
mesh topology is the number of links are significantly reduced but the
failure of one link completely puts that device out from communicating
with any other device connected to the network.

2.2.3 Bus Topology

Bus topology is multipoint. Nodes are connected to the bus cables by


taps and drop lines . Drop line is a connection that runs between the
main cable and devices. As the signal travels along the backbone that is
main line, it becomes weaker due to heat dissipation losses and noise.
The advantage of bus topology is its easy installation. Disadvantages of
bus topology, it is difficult to reconnect and isolate fault.

2.2.4 Ring Topology

In ring topology, each device has point to point connection with only
the two devices on each of its side and signal is passed along the ring in
one direction only from device to device until it reaches the
destination. A ring is relatively easier to install compared to other
topologies. To modify a device, it requires to change couple of
connections as each device is connected only to its two neighbors. But
unidirectional traffic is a disadvantage.

2.2.5 Hybrid Topology

It is a topology with mixed star and bus topology with star as a


backbone.

2.3 Routing Tables

Each router has some information stored in it that becomes useful in


the process of routing. Generally, every router has at least 2 columns.
One that contains the addresses of destinations and other that contains
the next best node to be selected to traverse in order to reach the
destination address. When a message comes to a router to be
forwarded ahead, using the information in header of the packet, the
router will get the destination address and its next destination is chose
on base of routing table.

The information that routing table contains is calculated by two


methods. Method 1: The person himself sets the addresses of nodes
and destinations and creates the table. This type of method is called as
static routing. Method 2: This method makes the use of various
dynamic protocols for routing in which the columns of tables are set by
the routers automatically based upon the communication with its
neighboring nodes.

2.4 Links
Links play an important role for connection from router to router.
Information is transferred from one router to the another with the use
of link only. If the link between two routers fail, an alternate path has
to be selected to traverse from one of those two routers to the other
one. So links act as bridge among routers.

2.5 Packet

Packet is the carrier of all the information across the network. In


short, it can be called as collection of bits or data elements. The packet
has two types of content, one the payload, and second the metadata
that is the information about the payload. The meta-data consists of
fields such as the source and destination addresses, data length,
number of bits and type of the data. The introduction of meta-data is a
fundamental innovation in networking technology. The network cannot
determine by itself origination of samples, or where they are eventually
have to reach without additional information.
For example, the packet is at any node in the network, then the
next destination or the originating one does not matter as the
metadata has already the information about where the packet has to
reach.

CHAPTER 3
Qualities for an Efficient Routing System
3.1 Characteristics of a good Network System
3.1.1 Stability and Robustness

There are often situations when the internet connection to our homes
or offices fails due to hardware failures of particular routers that
constitute the path. In such circumstances, Being robust, means that
routers should make internet connection perfect again by diverting to
some different path unless the hardware failure or the unexpected
error is corrected. Because routers are prone to failures due to some
mechanical or physical harm. The evaluation of an algorithm can be
done on the basis of how stable and secure it proves to be in such hard
and fast situations.

3.1.2 Simplicity and Low Overhead

The Routing algorithms should be as simple as possible along


with being efficient. In different words, the routing algorithm should
function effective with the minimum software utilization so that the
load on systems become less. This results in minimization of costs while
implementing the software and hardware. Our main goal is to achieve
quality results with minimum expense done and minimum resources
utilized.

3.1.3 Optimality

The efficiency of a communication system largely depends upon the


optimality of the algorithms implemented under the operating routing
protocol. For instance, a network uses less number of hops but the
message is delivered with a significant delay while on the other hand
another algorithm on the same network uses more number of hops but
the message is reached faster than the previous case. So it depends
upon which protocol is used and how the system is working.
3.1.4 Flexibility

The routing process should be flexible and should be adaptive to any


change that occurs into the system. Suppose a network is based on
mesh topology and is then changed to star topology, then the message
delivery time should not be changing significantly. Of course, there will
be some time difference but it should not be major. So, the system
should be able to maintain its optimality and should be able to work
with changes in topology changes, bit rates, bandwidth, queuing size,
etc.

3.1.5 Rapid Convergence

The convergence of routing algorithms should be as quick as possible.


Convergence means when optimal paths are to be decided in a network
system, all the routers must converge to the optimal distances quickly
and simultaneously. When a situation of failure of a router or a hub
arises, the routers recalculate the routes and based on the remaining
number and position of routers, new paths are calculated which
overcome the absence of the failed router. The routers if converge
slowly can result into significant delays and loops which then never let
the message to reach the intended destination.

3.2 Metrics that ensure effective communication

3.2.1 Quality of routers

The factors here that affect communication are number of packets lost,
size of routers, queuing and processing delays, propagation delay, bit-
rate of the links
3.2.2 Path length

The factors here that affect communication are the number of hops,
distance between routers, distance between source and destination,
cost set by the administrator,

3.2.3 Delay

The factors here that affect communication are the amount of time
that the message reaches late to the one who has requested as well as
the amount to time source takes to process and transmit the required
information. It also depends on the bandwidth of the links that are
situated in between two nodes.

3.2.4 Noise

The factors here that affect communication are the external factors
that make the message erroneous like some amplitude changing
factors, undesired signals.

3.2.5 Bandwidth

Bandwidth determines how much traffic a link can handle.


More bandwidth is preferred in order to have more effective
communication, just like we prefer 10 mbps internet over 2 mbps
internet. Bandwidth is actually the maximum value of achievable
throughput. If the link having more bandwidth is busy, the link having
less bandwidth is used which could result into more time consumption.
Chapter-4

Algorithms
4.1 Dijkstra’s algorithm:
Each node has full knowledge of whole topology.
Each node calculates shortest path from its node.
Topology change is broadcasted to all nodes via flooding.
In this method, user is needed to enter adjacency matrix to determine
the cost (path).
A loop is used to determine the shortest path is direct or via some
nodes. The minimum path is updated and stored. Finally, we will get
shortest path from all nodes to other nodes.

4.1.1 Advantages:
Finds shortest path in Order of O (E+ V Log(V) ) if we use a
minimum priority queue. E: no. of edges; V: no. of vertex

4.1.2 Disadvantages:
It cannot detect negative cycle.

4.1.3 Application:
Traffic information systems use this algorithm to track specific
destination from given source.
Open Shortest Path First, used in Internet routing.

4.2 Bellman-ford Algorithm:


To solve the problem of Dijkstra’s algorithm of negative edges, we use
this algorithm.
This algorithm requires user to enter data in form of Adjacency
matrix. It is a single source shortest path calculator. When the matrix
containing the relation between sources and destinations has at least
one of its entry as negative edge then the algorithm notifies about
containing a negative distance edge. If there is negative cycle than
shortest path we get is not well defined.

User will enter the source and destination for which the shortest
path is needed to be calculated.

The algorithm iterates for (n-1) times (no. of nodes - 1).


First it will consider all single edge paths possible from a given node.
Then for two edge path and so on. If the distance is lower for other
paths it will update shortest path.

… (4.1)

4.2.1 Advantages:
It can detect negative cycles which Dijkstra’s algorithm cannot.

4.2.2 Disadvantages:
Since the path is calculated from node to node, the change in
network is not reflected at same instance.
If a link or node fails the other node will try to find alternate path
possible and may result in routing loops.

4.2.3 Applications:
Used to solver linear inequality.
Finding shortest path for routing.
Each node sends its table to all neighboring nodes.
4.3 Floyd-Warshall Algorithm:

Fig: 4.1

The above two algorithm works on single source shortest path and this
algorithm gives all source shortest paths between all nodes in graph.
In the above figure, there are various paths from A to E and in this
algorithm it will consider all types of path and returns shortest path.
It is noticed that each node is considered only once.
The problem arises when we allow a negative edge as it would form a
loop and determines it as shortest path.
It forms a transitive closure matrix which shows all pair shortest path.
Chapter-5
Conclusion
5.1 Conclusion:

After this project, we understood about various topologies used


by the routers.

About various algorithms and protocols used by routers.

Thus according to these described 4 chapters about routing we


come to a conclusion that the decision of path and the implementation
of the system largely depends upon which type of algorithms and
protocols are used while building the system. The simulator made by us
hence shows the most suitable path that should be selected in each
case of different algorithms used. It takes the adjacency matrix from
the user in the form of a text file which contains information about the
connections between different nodes present in the network and
imports it into the simulator. The user selects the algorithm to be used
and according to the working of the particular algorithm the result is
displayed to the user after simulation on given data in algorithms.

It is or it may be possible to analyze and calculate shortest path


when the network is comparatively smaller in size and contains lesser
number of nodes, but in real life situation the networks are very vast
and it is almost impossible to do the routing process manually without
the help of algorithms. So we conclude that routing algorithms prove to
be a very important factor for network building and the simulation
process also comes out to be a helping hand to implement the system.

S-ar putea să vă placă și