You are on page 1of 26

Outline

Introduction Routing strategies Routing algorithms


Shortest Path Routing Flooding Flow-based Routing Distance Vector Routing Link State Routing Deflection Routing Broadcast Routing Multicast Routing Routing for Mobile Hosts Onion Routing Hierarchical Routing

Final considerations
Arquitectura i Tecnologia de Xarxes de Transport ptiques

16/05/2013

Outline

Introduction Routing strategies Routing algorithms Final considerations

Arquitectura i Tecnologia de Xarxes de Transport ptiques


16/05/2013

Introduction

Routing: Driving packets from source node to destination node in a network


Desirable properties

Correctness Simplicity Robustness Stability Fairness Optimality


Arquitectura i Tecnologia de Xarxes de Transport ptiques
3

16/05/2013

Introduction (II)

Robustness
Its

expected that a network run continuously The algorithm should cope with changes in both topology and traffic when something crashes

Arquitectura i Tecnologia de Xarxes de Transport ptiques


16/05/2013

Outline

Introduction Routing strategies Routing algorithms Final considerations

Arquitectura i Tecnologia de Xarxes de Transport ptiques


16/05/2013

Routing strategies

Non-adaptative (static routing)


The state of the network doesnt matter The route to use is computed before the network is booted

Adaptative (dynamic routing)

Routing decisions are taken according to the topology and the state of the network

Alternative Routing and Multipath Routing


There is more than one static route to each destination The same route is not always taken (it changes each time) AR random decision MR according to network state
Arquitectura i Tecnologia de Xarxes de Transport ptiques

16/05/2013

Routing strategies (II)

Distributed

Each node receives some information about the network from its adjacent nodes This information is used to determine the way each router forwards its traffic

Centralized

There is one central node for routing intelligence (master) A node without an associated master (slave) is unable to route
Each slave node needs a master node

Less resilient
master failure all its slaves are useless until they find a new master node

Arquitectura i Tecnologia de Xarxes de Transport ptiques


16/05/2013

Outline

Introduction Routing strategies Routing algorithms Final considerations

Arquitectura i Tecnologia de Xarxes de Transport ptiques


16/05/2013

Shortest Path Routing


Static routing Only topology information is used A graph is build. Each router is a node and each link is represented as a weighted arc. Find a route between routers Find the shortest path in the graph between two nodes Dijkstra Algorithm

Arquitectura i Tecnologia de Xarxes de Transport ptiques


16/05/2013

Shortest Path Routing (II)

Source: [1]

First 5 steps computing shortest path from A to D

Arquitectura i Tecnologia de Xarxes de Transport ptiques


16/05/2013

10

Flooding

Static routing Only topology information used Every incoming packet is sent out on every outgoing link except the one it arrived on.

Infinite number of duplicate packets! some control needed

Hop counter

When its equal to 0 the packet is discarded If an incoming packet is in the list its not sent
Arquitectura i Tecnologia de Xarxes de Transport ptiques
11

Maintain a list of already flooded packets

16/05/2013

Selective flooding The router do not send every packet out to every line,only to those lines that are approximately right direction.

Arquitectura i Tecnologia de Xarxes de Transport ptiques


16/05/2013

12

Flow-based Routing

Static routing Both topology and load are taken into account Sometimes the mean data flow between a certain pair of nodes is stable and predictable

Compute mean delay for the entire network Known topology Traffic matrix Capacity matrix A routing algorithm

Requirements

Goal: find the routing algorithm that produces the minimum average delay for the subnet
Arquitectura i Tecnologia de Xarxes de Transport ptiques
13

16/05/2013

Flow-based Routing (II)


Source: [1]

A network with line capacities in Kbps

Source: [1]

The traffic in packets/s and the routing matrix

Arquitectura i Tecnologia de Xarxes de Transport ptiques


16/05/2013

14

Flow-based Routing (III)


Source: [1]

If the requirements are satisfied its easy to calculate the total traffic in each line: i

Mean delay:

Queuing theory: Ti = (iCi - i)-1

The mean delay time for the entire subnet is 86 ms


16/05/2013

Analysis of the previous slide subnet

Line AB Assume mean packet size 800b Link capacity: ABCAB = 1pkt/800b x 20kbps = 25pkts/s
Actual traffic: AB = 14pkts/s delay = TAB = 91ms

Arquitectura i Tecnologia de Xarxes de Transport ptiques

15

Flow-based Routing (IV)

Which is the added value of this algorithm?


It

uses the load to make routing decisions

Sometimes

its better to use a longer path instead of the shortest one (when this last one holds a huge amount of traffic) different routing algorithms and choose the best one according to your network characteristics
Arquitectura i Tecnologia de Xarxes de Transport ptiques

Compare

16/05/2013

16

Distance Vector Routing

Dynamic routing

Each router has a table with the best known distances to every destination and which line to use to get there

Different metrics are used as distance

This vector is updated using information messages from the neighbours

Arquitectura i Tecnologia de Xarxes de Transport ptiques


16/05/2013

17

In distance vector routing each router maintains a routing table indexed by and containing one entry for each router in the subnet. 2 parts

Arquitectura i Tecnologia de Xarxes de Transport ptiques


16/05/2013

18

Distance Vector Routing (II)

Example (the used metric is delay but other metrics are also possible)

Source: [1]

J neighbors are A, I, H and K J receives the routing tables of its neighbors J computes its new route to G

Via router A: 8+18=26 ms Via router I: 10+31=41 ms Via router H: 12+6=18 ms Via router K: 6+31=37 ms

The minimum delay is 18, so J updates its routing table with:

Delay=18ms, Output router: H


19

Source: [1]

Arquitectura i Tecnologia de Xarxes de Transport ptiques


16/05/2013

Link State Routing

Dynamic routing

Five parts
1.

2. 3. 4. 5.

Discover its neighbors and learn their network addresses Measure the delay or cost to each of its neighbors Construct a packet telling all it has just learned Send this packet to all other routers Compute the shortest path to every other router

Arquitectura i Tecnologia de Xarxes de Transport ptiques


16/05/2013

20

Link State Routing (II)


1.

2.

3.

Send special HELLO packets and wait for a reply of each router telling who it is (names must be globally unique) Send special ECHO packet and wait for response delay = RTT/2 Packet=sender identifier+#seq+age+list of delays to each neighbor

When? Periodically / When some significant event occurs


Source: [1]

Source: [1]

A subnet

The link state packets for this subnet

Arquitectura i Tecnologia de Xarxes de Transport ptiques


16/05/2013

21

Link State Routing (III)


4.

Fundamental idea: distribute packet using flooding

There is a control for each (source, #seq) pair


If new packet is flooded If duplicated or #seq is lower than the last seen packet is discarded

Some troubles
Sequence numbers wrap around Solution: 32bits #seq Router crash, #seq corrupted

Solution: age field Its decremented once per second


If age = 0 information from that router is discarded Also decremented at each hop ( TTL)

5.

Run Dijkstra algorithm to find the shortest path to all destinations


Arquitectura i Tecnologia de Xarxes de Transport ptiques
22

16/05/2013

Broadcast Routing

Send messages to all or many other hosts Send a packet to each destination / Flooding

Wasteful of bandwidth
The packet includes the list of destinations The root is the node initiating the broadcast Each router copies the packet only for the output lines corresponding with that tree The router checks if the packet arrived on the line used for sending packets TO the source of the broadcast
If it matches the packet is sent for all the other output links If not (the packet doesnt arrive via the preferred path) discard packet

Multi-destination routing Sink tree based

Reverse path forwarding

Routers dont need to know nothing about the ST

Arquitectura i Tecnologia de Xarxes de Transport ptiques


16/05/2013

23

Broadcast Routing (II)

Example sink tree and reverse path forwarding

Subnet

Spanning tree rooted on I

RPF

Source: [1]

Arquitectura i Tecnologia de Xarxes de Transport ptiques


16/05/2013

24

Multicast Routing

Send messages to many nodes Keeping groups information in the router

Each router has to know which of their hosts belong to which groups
[hosts router] or [router host] router learns

router router: info propagates

Each router computes a spanning tree (ST) covering all routers in the subnet

Prune the ST according to each multicast group It scales poorly for large networks
N groups and M members in each one High memory needed to store the N x M trees

Arquitectura i Tecnologia de Xarxes de Transport ptiques


16/05/2013

25

Multicast Routing (II)

Example:

Subnet

ST rooted on A

Source: [1]

ST for group 1

ST for group 2
26

Arquitectura i Tecnologia de Xarxes de Transport ptiques


16/05/2013

You might also like