DVMRPand MOSPF

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 43

Multicast Routing

Papers: DVMRP and MOSPF

Computer Networks
Dr. Jorge A. Cobb
Bridges and Extended LANs
 LANs have physical limitations (e.g., 2500m)
 Connect two or more LANs with a bridge
• accept and forward strategy
• transparent (does not add packet header)

A B C

Port 1
Bridge
Port 3
Port 2

X Y Z
H I J

2
Learning Bridges
 Do not forward when unnecessary
 Maintain forwarding table
Host Port
A B C A 1
B 1
Port 1 C 1
X 2
Bridge
Port 3 Y 2
Port 2 H 3

X Y Z
H I J

 Learn table entries based on source address


 Table is an optimization; need not be complete
 Always forward broadcast frames

3
Learning Bridges
Host Port
A B C A 1
B 1
Port 1 C 1
Bridge
Port 3 X 2
Port 2 Y 2
H 3
X Y Z
H I J

 I sends a message to Z
 Bridge “learns” I comes from port 3, sends the message over
BOTH port 1 and port 2
 Z sends a message to I (e.g. some reply)
 Bridge “learns” Z comes from port 2, sends the message over port
3 (it learned above where I is)

4
Spanning Tree Algorithm

 Problem: loops
A
A
B
B B3
B3
C B5
C B5
D B7
D B7 K
B2 K
E F
E F

B1
B1
G H
G H

B6 B4
B4
I
I
J
J

 Bridges run a distributed spanning tree algorithm


• Logically delete certain bridges to have a spanning tree
• We will assume we have a spanning tree
5
Multicast Routing in Datagram
Internetworks and Extended LANs

S. Deering and D. Cheriton


Computer Networks
Dr. Jorge A. Cobb
ACM Transactions on Computer Systems
1990
Efficient multicast in Extended LANs
 How to do efficient multicast in Extended LANs?
 Extended LANs are formed by connecting LANs with link layer
bridges
 Bridges propagate broadcast (and multicast) packets across
every segment of the extended LAN
• Way too inefficient, especially for multicast applications with
sparsely located receivers
• Find an efficient way of doing multicast and convert
applications to use multicast

How to do multicast better in Extended LANs?

7
Single Spanning-Tree Multicast Routing
 If bridges know which interface led to members of a given group, they
would forward the packets on those interfaces only
 But, in general, how do bridges learn which interface lead to individual
hosts?
• When a packet arrives from a host, bridge records the (source-
host addr, interface, age) into a table
• If an entry is too old, it is removed (self-cleaning table)
 Can we do something similar for multicast packets?
• We want to forward multicast packets only over the needed LANs
• Problem: bridge does not learn about a host (or group member)
unless it receives a packet from the host (receivers don’t send
data)
• Thus, group members periodically transmit a membership-report

8
Multicast Table
Arrow indicates
where group
members are
located

 Multicast table of each bridge has the following row for each multicast group:
(muticast addr, (outgoing interface, age), (outgoing interface, age), … )
 A group member of a group G sends a membership-report, the destination address is
the “ALL-BRIDGES” multicast address, the source address is G.
 Bridge receiving this message records this interface as an outgoing interface for
group G
 It then forwards this report to other bridges (out all of its interfaces) in the extended
LAN

9
Single Spanning-Tree Multicast Routing
 Bridge algorithm
• If source address is a mcast group address (i.e. a report),
• record arriving interface as an outgoing-interface with an age of zero
into the table entry for this mcast address
• and forward to all other interfaces.

• Periodically increment age of outgoing interface


• when age=expiry threshold, delete this outgoing-interface info from
the table’s entry
• if no outgoing-interfaces remain, delete the entire entry

• If a packet arrives with multicast dest addr


• forward a copy on every outgoing-interface recorded in the table entry
(if any) excluding the arriving interface

10
Another example
A

B
B3

C B5

G
D B7
K

E F
•Arrows indicate the
location of the group
B1
member
G
•Membership reports are
H
forwarded over all links of
a bridge
B4

I
G
J

G = group G member (receiver)

11
Suppressing Membership Reports
 An efficiency improvement to suppress unnecessary
membership reports
• Hosts send membership-reports as (G,G)

• This suppresses #membership reports to 1 per report


interval
• because all other group members (hosts) on the same LAN
heard the first membership-report (G,G), and will not send a
report

• Bridge, on receiving a pkt with address (G,G) (bridges receive


ALL packets, remember?)

• changes it to (G, all-bridges) and forwards to other interfaces

12
Why change the destination?
 Why does the router change from (G,G) to (G, “ALL-
BRIDGES”)?  Assume member G1 sends a
membership report (G,G) over
lan A
 Assume the bridge forwards it
A B as (G,G) over lan B
 This will suppress the
membership report of G2
G1  The bridge will never know
there is a group member in lan
bridge B

G2

13
 Done with extended LANS (bridges)

 Now we do multicast over multiple LANs (across


routers)

14
Distance Vector Multicast Routing
 How to support multicast routing in a distance-vector
environment? (this is general enough for ANY unicast routing
protocol)
• Compute a spanning tree across all the links and use a
multicast routing algorithm similar to the one above
• Specifically, a source-based shortest path spanning trees
• Tree is rooted at the source site
• It corresponds to shortest path from each receiver to the
source
• Main assumption is path symmetry
(links have the same costs in both directions)
• Observation:
Every shortest-path multicast tree rooted at the sender is a
subtree of a single shortest-path spanning (i.e. broadcast) tree
rooted at this sender
15
Broadcast Trees and Multicast Trees in Point-to-Point
Networks

Network Broadcast Tree Multicast Tree


S S
S

S = source (host) node, also root of tree


R = receiver
For any router U, parent(U) = next-hop(U,S) = V

16
Reverse Path Flooding (RPF) (broadcast in point-
to-point networks)

 Routers forward a broadcast packet originated at S on all of their


outgoing interfaces (except the incoming one) if it arrives via the
shortest path from the router back to S

• Note: each router forwards each packet only once.

• Router needs to know the shortest path back to S

• Given by the distance vector routing algorithm

• Forward to all neighbors

17
Example

Broadcast tree S
Broadcast messages
v

Which of all three copies will be forwarded by t?

18
Internetworks
 Original RPF is designed considering point-to-point links
 In the Internet we typically have LANs (e.g. Ethernet)
• There are many routers per LAN
 A multicast packet sent by a source host S will have
• LAN source: LAN address of S
• LAN destination: LAN multicast address for group G
• IP source: IP address of S
• IP destination: IP multicast address for group G
 Routers do not modify the IP src or dst addresses
 Routers send the packet over the LAN with
• LAN source: LAN address of router
• LAN destination: LAN multicast address for group G
 All routers “listen” (receive a copy) of all LAN packets
addressed to any multicast group.

19
A problem with original RPF
 When shared links (Ethernet) used between routers, two problems

 Identifying the parent on the tree

• In RPF, routers only accept the broadcast packet from the next router on the
shortest path back to S (its parent on the tree)

• How does this router learn which packet is coming from its parent? (many
routers per LAN)
• Looks at the link layer (Ethernet) source address in the incoming
packets, it must be from the next-hop router.

 Multiple copies of the packet is sent on the shared link

• Multiple routers are attached to the same LAN (Ethernet)


• Waste of bandwidth on the link & waste of router resources

20
Reverse Path Broadcasting (RPB)
 Eliminates duplicate broadcasts on shared links in RPF

 Identify a single “parent” router for each link w.r.t. S

• For the link S is attached to, S is considered the parent


• Otherwise, router with min distance to S is the parent
• In case of tie, router w/ lowest IP address is the parent

21
RPF:

Both x and y inject


packets into a

z only forwards the copy it


receives from x, because x
is its next hop to S

RPB:

x, y and z learn that only x


should inject packets into
a

22
S

X Y

Z L

Path of broadcast
messages

23
Observations
 How to identify min distance router to S?
• Routers exchange distance vector records with each other
• Therefore, each router independently finds the parent
(break ties by ID)

 Overhead:
• Parent selection requires that routers add a children bitmap
to each routing table entry (i.e. for each possible source)
• the bit-map has one bit for each incident link
• Bit for link λ for destination S is set, if λ is a child link of this
router for broadcasts originating at S

24
Prunning the Tree
 Both RPF and RPB are broadcast algorithms !

 To provide shortest path multicast delivery from source S to group


members, broadcast tree of S must be pruned back to reach only
links with receivers

 May be accomplished by requiring members of G to send


membership reports back up the broadcast tree of S periodically
• How do you identify the sources?
• Too costly – need to be done for each group and each source
• What if only a few groups/sources are active at a time?
• We want to do this only for active groups/sources

25
Truncated Reverse-Path Broadcast (TRPB)
 An alternative in which only non-member leaf LANs
are deleted from each broadcast tree

• Truncate child link if


• no router uses this link to receive multicast messages
from the source (i.e., it is a leaf link)
• No host is a group member on this link (LAN)

26
Leaf Truncation example

X Y

Z L

Path of broadcast
messages

 At L, L truncates the lower LAN in the figure if


• if Z does not accept multicast messages from this
LAN
• No host is a group member on this link (LAN)

27
S

Receiver

Receiver

X Y

Z L
X cannot cut this
child LAN since Z
uses X as its next L truncates this LAN since Z
hop (not leaf link) does not use L to reach S (it
is a leaf link) and there are
no receivers.
28
Algorithm

 If a multicast packet (S, G) arrives from the next-hop-link for S,


• forward a copy of the packet on all child links for S,
• except leaf links (no other router receives from this link) that
have no members of G

 To implement this, we need two things:


• The router needs to learn if the child link is a leaf link
• I.e. If no other router uses this link to receive messages from
the group.
• The router also needs to know if no host group members
are on this link.

29
Implementation
 Leaf pruning requires that routers add a leaf bitmap to
each routing table entry (i.e. for each possible source)
• the bit-map has one bit for each incident link
• bit for link λ for destination S is set, if λ is a leaf link of this
router for multicasts originating from S

 How to know if the link is a leaf link?

30
Implementation (continued…)
 Distance vectors tell me the distance from routers on this
link to S, but not if I am their next hop.

 However, if DV with split-horizon and poisoned-reverse is


used then
• If a router gives me a distance of infinity then it uses
me as the next hop
• I.e., the link is not a leaf link

31
Implementation (contd)…
 Hosts send a membership report message over their
LAN using the mcast group address as the
destination (all hosts group members listen to this,
and only one report is sent per interval)

 Routers maintains a table with one entry per link


(LAN)
• The entry contains a bit-map field, link-groups, with one
bit per group
• It identifies for each group if there are members on this
link.

32
Overview of “bitmaps” required
 For each source S and each link λ,
• Is λ a child link of the router on the broadcast tree of
S?
• Is λ a leaf link of the router on the broadcast tree of S?
• Both of these are obtained via the DV routing
algorithm

 For each link λ and group G,


• Does λ have any members of G?
• Obtained via membership reports (IGMP)

33
Reverse Path Multicasting (RPM)
 Prune shortest path multicast tree as follows

• First packet for (S,G) is forwarded everyone on the truncated


shortest path broadcast tree acc. to TRPB

• Leaf routers w/ no attached members send nonmembership report


(NMR) to their parent on the tree

• If a router receives NMR from all of its children routers and itself
has no directly attached members, it also sends NMR to its parent
router on the tree.

34
S

NMR

R NMR NMR NMR

X Y

NMR Z L

35
S

X Y
Cannot be
truncated because
there is a receiver
here.
Z L

36
NMR expiration

 NMR reports include an age field, when it expires data


flows all the way to leaves again and gets re-pruned back

 Routers remember NMR reports that they sent


• When a new host joins G, they send a cancellation
message to undo the effect of NMR

37
Pros and Cons
 Reverse path multicasting, when used with distance vector
routing, is known as distance-vector multicast routing protocol
(DVMRP)
 Advantages: good when there are many receivers, since
multicast messages are initially flooded to the entire
network.
 Disadvantages
• Bad if there are few receivers
• Again, the first multicast messages are sent throughout the
network unnecessarily.
• Routers need to remember the “prune” state, i.e. they need to
maintain state even when there are no receivers below them
on the tree
• The path from source to receiver may not be optimal if the
cost of links is not bi-directional.
38
Link-State Multicast Routing
 This is covered in the book, section 4.4.1

 Extend OSPF – MOSPF


• Send group membership information in OSPF link state
advertisement (LSA) messages

• I.e., each router learns the entire set of receivers.

• Each router can compute the minimum cost path from every
source to the current set of receivers of the multicast group.

39
R(G)
A B
R(G)

S(G) C

Routers A and B mention in their LSA that they have receivers in their
adjacent LANs.
Hence, C can recreate the above picture in detail.
40
R(G)
A B
R(G)

S(G) C
∞ ∞

C computes the shortest path tree from S(G) to the receivers


Each link is tagged with its distance to the closest R(G)

41
How do you know who are the sources?
 You could precompute, for every group G, a tree for every
source S
 This is way too expensive
 Instead, use caching

42
MOSPF Cache
 The cache has entries of the following form:
• (S, G, iif, min-hops)
• Min-hops is a VECTOR with an entry per output link
• This vector contains the number of hops needed to reach a
group member via the link
• If a link does not reach a group member (not on tree) use
infinity
• If a packet is received from S to G,
• The packet is sent over all links such that the time-to-live of the
packet is at most the link’s entry in min-hops
 If no cache-entry of (S,G) compute the tree on the fly
 Cache entries are not timed-out, they are just flushed out if new
ones are needed.

43

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy