You are on page 1of 12

DEEDS

Routing Algorithms
Broadcast Routing
Multicast Routing

Broadcast and Multicast

• Broadcasting: sending a packet to all destinations


simultaneously (e.g. weather reports, stock market
updates, live radio programs)
• Some applications require many processes to work
together in groups (e.g. a group of objects
implementing a fault-tolerant service)
– Multicasting: sending a message to a well-defined
group of processes.
– Challenge: groups are too large to use p-t-p and too
small to use broadcast.
– Note: broadcast is a special case of multicast
2
D. Dobre

1
The Model

• A network consists of nodes labeled 1, 2, 3, …, N


• Each node is connected to a set of nodes (i.e. neighbors)
by links numbered 1, 2, …, L relative to that node
• There is exactly one host computer connected to each
node (i.e. router) through link 0
• A packet is defined by SourceNode, DestinationNode
and Text
• At each node, a packet arrives on an IncomingLink and is
transmitted over an OutgoingLink
• The OutgoingLink for a packet is determined by applying
the routing function to the DestinationNode of the packet

3
D. Dobre

Broadcast Routing

• Different routing strategies:


– Transmission of separately addressed packets
– Multidestination addressing
– Hot potato forwarding
– Spanning tree forwarding
– Source based forwarding
– Reverse path forwarding
• A special destination address AllNodes is reserved for
packets that are to be broadcast.
• Many parameters from the model will become sets (e.g.
OutgoingLink -> OutgoingLinkSet; AllLinks is {0, 1, …, L})
4
D. Dobre

2
Metrics

• Need metrics to evaluate the different algorithms:


1) C(n) is the number of copies to transmit a packet from the host
connected to node n to all destination hosts
2) The min value for C(n) is 2*N – 1 (N nodes + N – 1 destination
hosts)
3) A(n) the average delay (#hops) across the N – 1 destination hosts
of a broadcast initiated by the host connected to n
4) M(n) the maximum delay

• Some other qualitative metrics:


• size of the routing table
• algorithm complexity in a node
• reliability of the broadcast
5
D. Dobre

Separately Addressed Packets

• Simplest method:
• Makes a copy of the broadcast packet at the source, one for each
destination.
• Uses the normal routing mechanism for delivering each one
• Pros (+):
• No changes required to the routing algorithm or packet format.
• The reliability is that of the underlying routing mechanism
• Cons (-):
• Large values of C(n) => level of congestion increases
• Large A(n) and M(n) because of queuing delays
• Sender has to know all hosts in the network

6
D. Dobre

3
Example
1 2
2 3
2 3 2
4

4 3

4 3
4 3

• Number of copies C(1) = 10, optimum is 7


• For A(n) and M(n) queuing is considered and it’s assumed that
a hosts sends the first/last packet to the furthest/closest host.
M(1) = 5 hops and A(1) = (4 + 4 + 5)/3 = 4.3 hops 7
D. Dobre

Multidestination Addressing

• A single packet carries multiple destination addresses


• Copies of the broadcast packet are made at a node if the
different destinations imply different outgoing links.
• A copy is forwarded to its destination(s) on the
corresponding outgoing link.
• Pros (+):
• Optimal number of copies and minimum delay
• The algorithm permits multicast
• Cons (-):
• The routing algorithm must be extended to handle multiple
destination adresses in one packet
• Sender has to know all hosts in the network
8
D. Dobre

4
Example
1 2
2,3
2
2,3,4

4 3

4 3
4 3

• Number of copies C(1) = 7 which is the optimum


• M(1) = 4 hops and A(1) = (3 + 3 + 4)/3 = 3.3 hops

9
D. Dobre

Hot Potato Forwarding

• This algorithm and the rest use the AllNodes address


• Each node copies the broadcast packet on all links except
the incoming link => produces network flooding
• How to prevent flooding?
• Broadcast packets carry a HopCount field that is incremented by nodes
upon arrival. If HopCount exceeds a threshold the packet is discarded. Q:
What is a good threshold?
• The diameter of the network is defined as the #hops of the longest
shortest path between any two nodes.
• Pros (+): High Reliability
• Cons (-): Too many copies lead to congestion in the
network and increased delays for subsequent packets

10
D. Dobre

5
Example
1 2
1
0
-1 2
1
0 1

diameter =
threshold = 2
1
1 2
1
4 2 2
3

• Number of copies C(1) = 13 (remember that 7 is optimum)


• M(1) = 4 hops and A(1) = (3 + 3 + 4)/3 = 3.3 hops

11
D. Dobre

Spanning Tree Forwarding

• A spanning tree of an undirected graph (E,V) is a subset of


E s.t. there is a unique path between any two vertices in V.
• Idea: overlay a spanning tree on the network topology
a) Each node lies on it
b) There is a (unique) path between any two nodes
c) Each node knows which links belong to the spanning tree
• A broadcast is forwarded only on the branches of the
spanning tree except the incoming link.
• Pros (+): Optimal in the #copies (i.e. min C(n))
• Cons (-): The delay is a function of the position of the
source in the spanning tree.

12
D. Dobre

6
Example
1 2
m
m

m m

m m
m
4 3

• Number of copies C(1) = 7 (which is optimum)


• M(1) = 5 hops and A(1) = (5 + 4 + 3)/3 = 4 hops

13
D. Dobre

Shortest Path Trees


1 2

M(1) = 4 3
M(2) = 3 M(3) = 4

4
M(4) = 3

14
D. Dobre

7
Source Based Forwarding

• Instead of having just one spanning tree, a node has a


spanning tree for each source node
• Each node determines the set of outgoing links for an
incoming packet based on the shortest path tree for the
source node
• Pros (+):
• Minimum number of copies
• Minimum transmission delay
• Cons (-):
• A large routing table (i.e. N-1 spanning trees)

15
D. Dobre

Example (1)
sender 1 2
m
m
m

m m
m
4 3

• Number of copies C(1) = 7 (which is optimum)


• M(1) = 4 hops and A(1) = (3 + 3 + 4)/3 = 3.3 hops

16
D. Dobre

8
Example (2)
sender
1 2
m
m m

m
m

m m
4 3

• Number of copies C(1) = 7 (which is optimum)


• M(2) = 3 hops and A(1) = (3 + 3 + 3)/3 = 3 hops

17
D. Dobre

Reverse Path Forwarding

• Has the flavor of both hot potato and source based


forwarding
• It uses the routing table for “normal” routing
• When a packet m from source s arrives at node k over link
l, k forwards m on all links except l iff l is used by k to send
packets to s m
s k
m l m k’s “normal”
m
routing table
m
l’
Dest Link
m m

s l

18
D. Dobre

9
Example
1 2
m
m
m

m m

m m
m m
4 3

• Number of copies C(1) = 11


• M(1) = 4 hops and A(1) = (3 + 3 + 4)/3 = 3.3 hops

19
D. Dobre

Example (2)

Reverse path forwarding. (a) A subnet. (b) a Sink tree. (c) The
tree built by reverse path forwarding.
20
D. Dobre

10
Reverse Path Forwarding (2)

• Pros (+):
• Smaller number of copies than hot potato (duplicates are
immediately discarded)
• No additional routing tables needed
• Minimum transmission delays (if shortest path tree from source =
shortest reverse path tree from source)
• Cons (-):
• Larger number of copies than source based routing

• Literature on broadcast routing:


• Yogen K. Dalal and Robert M. Metcalfe: Reverse Path Forwarding
of Broadcast Packets

21
D. Dobre

Multicast Routing

• Recall:
• Some applications require many processes to work
together in groups (e.g. a group of objects implementing
a fault-tolerant service)
• Multicasting: sending a message to a well-defined
group of processes.
• Challenge: groups are too large to use p-t-p and too
small to use broadcast.
• Group management (create, destroy, join, leave)
• Routers learn about the groups their hosts are in
• Routers tell to their neighbors
22
D. Dobre

11
Multicast Routing

(a) A network. (b) A spanning tree for the leftmost router.


(c) A multicast tree for group 1. (d) A multicast tree for group23 2.
D. Dobre

12

You might also like