📌Highlights: Hi friends ! In this post I will discuss about the concept of adaptive routing in computer network including how many type of routing and concept of algorithm in routing.We are going to explain about following algorithm such as Isolated routing algorithm, Centralised routing algorithm, Distributed routing algorithm (such as: Bellman-ford algorithm / Distance vector routing algorithm / Ford-Fulkerson algorithm,Flloyd warshall Algorithm / All pair shortest path algorithm,Hierarchical Routing Algorithm, Link State Routing Algorithm,Broad Casting Routing Algorithm,Multi Casting Algorithm.
Routing is a process of selecting appropriate route for transferring data. The mechanism inside the router by which routing process is done is called routing algorithm.
Routing is classified into two parts:
1. Adaptive Routing.
2. Non Adaptive Routing.
Adaptive Routing:
In adaptive routing router can select new path according to our circumstances. It can select new path / route for each packet.
Suppose if load increases / decreases on network layer or we can say that load is change on network layer or any route or line is damaged than at that condition router can change / select new route to send their packet.
Non Adapting Routing:
In non adaptive routing router can not change / select new route in any condition whether route is damaged or load is changed to send their packet.
Adaptive Routing Algorithms:
We know that adaptive routing algorithm are classified into following:
1. Isolated adaptive routing algorithm.
2. Centralised adaptive routing algorithm.
3. Distributed adaptive routing algorithm.
Isolated adaptive routing algorithm:
First of all we discuss about isolated adaptive routing. In this type of adaptive routing any IMP ( Interface message processor) can not discuss to other IMP for taking decision about route.It takes individual decision for selection of route is called Isolated adaptive routing.
In this diagram one IMP is give and from this IMP there are three routes for three different destination such as Delhi,Mumbai,Calcutta and there are one queue is also present corresponding to each route in IMP where the packet are stored.
In isolated adaptive routing the procedure for delivering a packet through any route is that, when any packet comes in IMP then it first check which queue contain minimum number of packets after comparing all the queue. When it get the queue of minimum packets then it select there corresponding route and send message or packet by using that communication line.
Modify the isolated adaptive routing by adding Non adaptive features:
Now after adding non adaptive routing feature one routing table is created at each IMP which is fixed.
for example; it is just like if you want to go for Delhi then you must find which is correct (less time and less cost).
That means which route/line contain minimum no of packets that line are selected.
We did this modification because may be queue have a minimum number of packets and if we select it, if we follow that route then it may take longer or more cost but here we follow the same Will do!
But if we add non-adaptive method too, then we will have a route which if we follow, it will not be time consuming or costly.
Centralised Adaptive Routing:
In this process we can ask any authorised IMP or central agency for taking routing decision is called centralised adaptive agency.
In above diagram a network is show when many IMP's are present. Among al IMP there is one central IMP which is known as routing control centre (RCC).At central condition of line whether it is working or not . So that RCC have a huge database about the lines. On the basis of this information RCC creart a table for each IMP for particular interval that mean the table is exist for a particular interval of time. whether it is 1 hour or more. It is totally depends on system design (RCC). These table are dynamic not static.
Those IMP's and lines which are present closer to RCC have more traffic because information of all IMP's are passes through that lines.
Suppose line of IMP A contain only information of A but if we talk about line of IMP Z is contain information of Y,P,Q,R,X,O,H,I etc. So here traffic is much more than A.
Drawback:
1. Not Reliable: It is not reliable because if RCC fails then whole system will stop.
2. Inconsistent: Inconsistently occur when table of one IMP are modified where other IMP are not then at that time they can not communicate properly.
Distributed adaptive routing algorithm:
In this process any IMP can take decision by discussing any other IMP then it is called distributed adaptive routing.
There are following type of distributed adaptive routing algorithm:
1. Bellman-ford algorithm / Distance vector routing algorithm / Ford-Fulkerson algorithm:
Distance vector routing is one of the most popular dynamic routing algorithm generally used in modern computer networks.
Distance vector routing algorithm works by having each router maintain a routing table (i.e a vector) that contain one entry for each router in subnet.
Procedure for creation of routing table:
Here we are crating a table for finding best route from Y to V
We know that any IMP contain information of our adjacent /neighbour IMP.
For example here Y contain information of X,P,Z,W. So we create table for there four IMP's.
Explanation:
Let we understand the above tables, In first row we consider all the neighbour / adjacent of Y such as P,X,W,Z.
Write all IMP's of subnet in first column like :P,Q,R,S,T,U,V,W,X,Y,Z,M.
now we understand how to read columns
0 is time taken from P to P
10 is time taken from Q to P
20 is time taken from R to P
30 is time taken from S to P
and so on.....
Similarly for other columns
22 is time taken from P to X
Now we understand how to do entry in new table:
We have two column in new table such as
1. via(line)
2. Cost
In via column we will enter those IMP's form (P,X,W,Z) which have less cost (with respect to time).
In cost column we will enter cost (less cost ) w.r.t time.
Procedure to calculate the cost:
Cost(w.r.t time) to travel from Y to their adjacent / neighbour IMP + Cost to travel from Adjacent IMP to another IMP.
Such as :
1. For P
Cost to travel from Y to P is 5
Cost to travel from P to P is 0
than the total cost will be (5 + 0=5)
2. For X
Cost to travel from Y to X is 6
Cost to travel from X to P is 22
than the total cost will be (6 + 22=28)
3. For W
Cost to travel from Y to W is 10
Cost to travel from W to P is 22
than the total cost will be (10 + 22=32)
4. For Z
Cost to travel from Y to Z is 3
Cost to travel from Z to P is 20
than the total cost will be (3 + 20=23)
Now compare all the above calculated costs such as (5,28,32,23) select the minimum cost from all i.e 5.
Now enter this cost 5 in new table in cost field and "P" in via field.
In the same way calculate the other entries in new table.
2. Flloyd warshall Algorithm / All pair shortest path algorithm:
In this algorithm weight is given in time or distance .Time show delivery of packet from one node to another.
If we take distance than it is non adaptive but if we take time than it is adaptive.
Now here in this algorithm we make adjacency cost matrix for every node / IMP's.
Basic Cost Matrix will be:
Let we know how we create routing table in each IMP's using this algorithm:
Routing table for IMP-1:
This table is for IMP -1. It shows when we traverse from one IMP to another then we go from IMP-1 ,like when we go from IMP-2 to IMP-3 then we must go through IMP-1. (such as path is :2-1-3). If any direct path is available than then compare cost of direct cost to indirect cost and consider minimum cost in table. such as:
Direct cost (2-3) :11
Indirect cost (2-1-3) : 9
Here 9 is the minimum cost so we consider it.
Indirect cost (1-2-3) : 14
Here 4 is the minimum cost so we consider it.
Direct cost (2-1) : 5
Indirect cost (2-3-1) : 17
Here 5 is the minimum cost so we consider it.
These table show the shortest path among all IMP's
3. Hierarchical Routing Algorithm:
In hierarchical routing we can reduce the size of routing table. Suppose we have 720 IMP's in network than in this case we used to create 720 entries in routing table (fr collecting information for each IMP).
So for solving this problem. Total IMP's are divided into region and each region is further divided into cluster and each cluster is a collection of IMP's.
Let number of region =R
Number of cluster per region = C
Number of IMP's per cluster = I
If 720 IMP's in network , suppose if we have 24 cluster in a region, than each cluster contain 720/24=30 IMP's in each cluster.
Each cluster contain information of one IMP's and also contain information of one IMP in neighbour cluster.
Let
R=8
C=9 per region
I=10 per cluster
Total IMP's = 8 X 9 X 10 = 720 IMP's
In the case of 3-dimension addressing.
If R=8 C=9 I=10
Total table size = 10+8+7
Just like Book → Page No → Line No → Word No
In general way :
Size of routing table is :
= I + (C-1) + (R-1)
= 10 + (9-1) + (R-1)
= 10 + 8 + 7
OR
Size of table = I + C + R -2
Total IMP = I . C . R
= 10 X 8 X 7 = 720
Note :
If N is total IMP's and we are using 3-dimension addressing when (N=512) than what will be the value of I,C,R that will minimise the table size.
For minimising I=C=R then the size of routing table will be minimum.
I3=N
I=N1/3
Example If N=512
I=(512)1/3 =8
That means I=8, C=8, R=8
In Case if we are not getting complete number
Example : If N=612
I=(720)1/3=8.9628
then we take near value whose product is equal to 612
i.e 8 X 9 X 10 =720
so, I=8, C=9, R=10
Note : For 3D → I = N1/3 = I.C.R
4D → I = N1/4 = I.C.R.2
No comments:
Post a Comment