DVMRPand MOSPF
DVMRPand MOSPF
DVMRPand 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
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
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.
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
11
Suppressing Membership Reports
An efficiency improvement to suppress unnecessary
membership reports
• Hosts send membership-reports as (G,G)
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)
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
16
Reverse Path Flooding (RPF) (broadcast in point-
to-point networks)
17
Example
Broadcast tree S
Broadcast messages
v
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
• 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.
20
Reverse Path Broadcasting (RPB)
Eliminates duplicate broadcasts on shared links in RPF
21
RPF:
RPB:
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 !
25
Truncated Reverse-Path Broadcast (TRPB)
An alternative in which only non-member leaf LANs
are deleted from each broadcast tree
26
Leaf Truncation example
X Y
Z L
Path of broadcast
messages
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
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
30
Implementation (continued…)
Distance vectors tell me the distance from routers on this
link to S, but not if I am their next hop.
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)
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
33
Reverse Path Multicasting (RPM)
Prune shortest path multicast tree as follows
• 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
X Y
NMR Z L
35
S
X Y
Cannot be
truncated because
there is a receiver
here.
Z L
36
NMR expiration
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
• 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
∞ ∞
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