Routing

17
Routing

description

 

Transcript of Routing

Page 1: Routing

Routing

Page 2: Routing

Routing Routing is the process of selecting

paths in a network along which to send network traffic

Process of relaying packets among multiple interconnected networks

Page 3: Routing

Least Cost Routing Based on efficiency Which of the available paths is

cheapest A value is assigned to each link;

length of the particular route is equal to the total no of the values of the component links.

Shortest means the route requiring the smallest no of relays

Page 4: Routing

Non adaptive and Adaptive routing

Non Adaptive Once the pathway to destination

has been selected, the router sends all packets for that destination along that route

Adaptive Router may select a new route for

each packet

Page 5: Routing

Routing Algorithms Shortest Path Routing Flooding Flow Based Routing Distance Vector Routing Link State Routing Hierarchical Routing Broadcast Routing Multicast routing

Page 6: Routing

Shortest Path Routing A graph of subnet is built. Each node represents a router Each arc of graph represents a

communication link. To choose a route algorithm just

finds the shortest path between them on the graph

Page 7: Routing

Flooding Every incoming packet is sent out on every

outgoing line except the one it arrived on. So it generates vast no. of duplicate packets. A hop counter is maintained in header of each

packet Hop counter is decremented at each hop Packet is discarded when the counter reaches zero Ideally hop counter is initialized to the length of the

path from source to destination Selective flooding- incoming packets are sent on

lines that are going approximately in the right direction

Page 8: Routing

Flow Based Routing Used when data flow between each pair of nodes is

relatively stable and predictable Considers the flow in the network; mean consider the

amount of traffic in the network before deciding on which outgoing line to place the packet.

The key here is to be able to characterize the nature of the traffic flows over time.

The basic idea behind the algorithm, is that any given line, if the capacity and average flow are known, it is possible to compute the mean packet delay on that line from queuing theory.

The routing problem thus reduces to finding the routing algorithm that produces the minimum average delay for the subnet.

Page 9: Routing

Distance Vector Routing Each router maintains a table

giving the best known distance to each destination and which line to use to get there

These tables are updated by exchanging info from neighbors.

Page 10: Routing

Distance Vector Routing-Mechanism Each router maintains a table indexed by and

containing one entry for each router in the subnet. The entry has two parts

Preferred outgoing line Estimate of time or distance to that destination

The router is assumed to know the “distance” to each of its neighbors.

if metrics is hops , distance is one hops If metrics is queue length, the route simply examines

each queue If metrics is delay, the router can measure it directly with

the special echo packets that the receiver just timestamps and send back as fast it can

Page 11: Routing

A B C D

H

LKJ

E

I

F G

TO A I H K Line

A 0 24

20

21

8 A

B 12

36

31

28

20

A

C 25

18

19

36

28

I

D 40

27

8 24

20

H

E 14

7 30

22

17

I

F 23

20

19

40

30

I

G 18

31

6 31

18

H

H 17

20

0 19

12

H

I 21

0 14

22

10

I

J 9 11

7 10

0 -

K 24

22

22

0 6 K

L 29

33

9 9 15

K

J computes its new route to router GJ to A=8 msecA to g=18 msecTotal=26 msec

J to I=10 msecI to G=31 msecTotal=41 msec

JA Delay=8

JI Delay=10

JH Delay=12

JK Delay=6

J to H=12 msecH to G =6 msecTotal=18 msec

J to K =6 msecK To G=31 msecTotal=37 msec

Best : 18 i.e via H

New estimated

delay from J

Page 12: Routing

Link State Routing Each router must

Discover its neighbour and learn their network address by sending Hello packet

Measure the delay or cost to each of the neighbours by sending echo packet

Construct a packet telling all it has learned Send this packet to all other routers Compute the shortest path to every other

router. In effect, the complete topology and all delays

are experimentally measured and distributed to every router.

Page 13: Routing

Hierarchical Routing As network grow, routing tables increase in size

consuming router memory It is not feasible for every router to have an

entry for every other router Routing is done hierarchically Routers are divided into regions Each router knows all details of router within its

own region. In very large networks

regions -> clusters Clusters->zones Zones->groups

Page 14: Routing

Hierarchical RoutingRegion1 Region 2

Region 3Region 4

Page 15: Routing

Routing for mobile hosts When a new user enters an area it must register itself

with the foreign agent here Each foreign agent broadcasts a packet announcing its

existence and address A newly arrived mobile host broadcasts a packet

inquiring any foreign agents Mobile hosts registers with the foreign agent giving its

home address, DL layer Address and security info Foreign agent contacts mobile host’s home address Home agent checks info sent by foreign agent, if ok,

informs foreign agent to proceed Foreign agent the makes an entry in tables and

informs mobile hosts that it is registered

Page 16: Routing

Broadcast Routing Send messages to many or all hosts

simultaneously Each packet contains a list of destinations Router examines this list to determine set of

output lines that will be needed It generates a new copy of packet for each output

line to be used and include in each packet only those destination that are to use the line

Destination set is partitioned amount output lines Each packet will carry only one destination

Page 17: Routing

Multicast Routing Sending messages to well defined network

groups With a multicast design, applications can

send one copy of each packet and address it to the group of computers that want to receive it.

This technique addresses packets to a group of receivers rather than to a single receiver

It depends on the network to forward the packets to only the networks that need to receive them.