Lecture-13(ROUTING ALGORITHM) - WordPress – www.wordpress ...

businessmakeshiftΔίκτυα και Επικοινωνίες

29 Οκτ 2013 (πριν από 3 χρόνια και 11 μήνες)

91 εμφανίσεις



MUDULI

ACADEMY

ROUTING ALGORITHM:




The main function of network layer is to route the packets from the source machine to
the destination machine.




When the source and destination machines are not in the same network, routing is
necessary. The major area of network layer design includes the algorithms which choose
the shortest routes among all the available routes.



So this algorithm is responsible f
or deciding the output line over which packet is to be
sent.

Optimality principle:

Optimality principle states that the capability of routing algorithm to select the best route.

Types of routing algorithm:

Routing algorithm is divided into 2 types. These
are

1.

Non
-
A
daptive algorithm

or
stati
c routing algorithm(dijkstra algo, bellman
-
ford algo)

2.

A
daptive algorithm

or dynamic

routing algorithm(flood based, flow based, distance
vector, link state routing, hierarchical routing)

Adaptive algorithm:

For these algor
ithms, the routing decision can be changed if there are any changes in
topology or traffic. This is called as dynamic routing.

Non adaptive algorithm:

For this type of algorithm the routing decision is not based on the measurement or estimation
of current
traffic. So the route is selected depending on the router. This is called as static
routing.


S
tatic

routing algorithm:


Dijkstra routing algorithm


Bellman
-
ford routing algorithm








MUDULI

ACADEMY


D
ynamic

routing algorithm:

FLOODING:

In this algorithm every incoming packets is sent out on every outgoing line except the one it
arrived on. Flooding generates vast numbers of duplicate packets to prevent such types of
circumstances we can use a
hop counter
in each packets.




The hop
counter contained in the header of each packet which is decremented at each hop
with the packet being discarded when the counter reaches zero. The hop counter should be
initialized to the length of the path form source to destination. If the sender doesn’t

know
how long the path is, the counter can be initialilzed to the worst case.

FLOW BASED ROUTING:

In flow based routing the path is to be selected based on the traffic, is called as flow based
routing.

Example:




B



C









A



E F



D






G



H


Here there is always a huge traffic from A TO B. then the traffic from A TO C should not be
routed through B. instead route is through AGEFC even through it is a longer path than ABC.


DISTA
NCE VECTOR ROUTING
:

Distance vector routing algorithm is also known as bellman
-
ford or ford Fulkerson algorithm

In this algorithm, each router maintains a table called routing table/ vector. It gives best known
distance to each destination.

Periodically ea
ch router sends a vector to its neighboring routers as this vector contains estimated
distances so it is called as distance vector. On receipt of such vector from its neighbors every
router revises its estimates and updates its local routing table.




MUDULI

ACADEMY





(

Distance vector routing table


)



(


Initialization of distance vector routing table

)








(

updating in distance vector routing table

)




MUDULI

ACADEMY


LINK STATE ROUTING
:

In link state routing algorithm each router follows some algorithm i.e



First discover
its neighbor and their network address by sending special packets called
hello packet.



Estimate delay or cost or any other metric for reaching its neighbor by sending another
special packet called echo packets.



Distributing/send this packet to all other routers.



Compute the shortest path to other routers.



Destination

Link
-
cost

Next
-
hop

Hop count

A

0

A

1

B

7

B

1

C

15

B

2

D

12

E

2

E

5

B

1


HIERARCHICAL ROUTING:

In this type of routing the total number of routers are divided into different regions . so it
reduces the size of the router table. For any large network the hierarchy are

Level1
----------

regions

Level2
-----------

clusters
---
it is a group of regions

Level3

------------

zones
---
zone is a group of clusters

Level4
------------

groups
---
group contains many zones.



MUDULI

ACADEMY


Full routing table for 1A




Hierarchical routing table for 1A




















Hops

Line

-

-

1B

1

1C

1

1B

2

1B

3

1B

3

1B

4

1C

3

1C

2

Hops

Line

-

-

1B

1

1C

1

1B

2

1C

2



MUDULI

ACADEMY


UNICAST ROUTING protocol:

In unicast routing there is one source and one destination



UNICAST ROUTING PROTOCOL
:






ROUTING PROTOCOL




INTERIER PROTOCOL EXTERIER PROTOCOL



RIP OSPF BGP

INTERIER ROUTING:

The routing inside an autonomous system is called an interior routin
g.

Exterior routing:

Routing between autonomous system is called as exterior routing.





RIP:

it is an interior routing protocol and is based on distnce vector routing. This protocol used inside
an autonomous system.

In this protocol the routing table is

to be updated by an algorithm called bellman
-
ford algorithm.




MUDULI

ACADEMY


OSPF:

It is a interior routing protocol. To handle routing efficiency and in a timely manner OSPF
divides an autonomous system into areas.

An area is collection of networks,host and routers
which are present with in an autonomous
system.

at the boarder of an area a special routers called area boarder routers which summarize the
information about the area and send it to other area.

among the area inside an autonomous system is a special area

called the backbone.all the area
inside on autonomous system must be connected to the backbone.

so backbone are serves as primary area and other area acts as secondary area.

The routers inside the backbone are called backbone routers.



TYPES OF LINK:





1)

Point

to
-
point link:



In point to point connection two routers are connected directly.no other routers
interfere in between them.





MUDULI

ACADEMY


2)

Transient :

It is a network where several routers are attached .




3)

Stub link:

It is a network where only one
router is connected /attached.






4)

Virtual link:

When the path is broken between two router then administration create a path/link
between that two router, is called as virtual link.


BGP(Border gateway protocol):



Border gateway provides an inter domain
routing protocol using path vector routing.



Exchange of routing information between two routers in BGP takes place in a session.



A session is a connection that is established between two BGP routers.

BROADCAST ROUTING:



In this routing the host has to send
packets to many or all other hosts. Sending packets to
all destinations simultaneously is called as broadcasting.