1
CSE 401N:Computer Network
LECTURE-14MULTICAST ROUTING
2
Chapter 4 roadmap
4.1 Introduction and Network Service Models4.2 Routing Principles4.3 Hierarchical Routing4.4 The Internet (IP) Protocol4.5 Routing in the Internet4.6 What’s Inside a Router?4.7 IPv64.8 Multicast Routing4.9 Mobility
3
Multicast: one sender to many receivers
Multicast: act of sending a datagram to multiple receivers with single “transmit” operation
Question: how to achieve multicast
Multicast via unicast source sends N unicast
datagrams, one addressed to each of N receivers
multicast receiver (red)
not a multicast receiver (grey)
routersforward unicastdatagrams
4
Multicast: one sender to many receivers
Question: how to achieve multicast
Application-layer multicast
receivers involved in multicast copy and forward unicast datagrams among themselves
5
Multicast: one sender to many receivers
Question: how to achieve multicast
Network multicast Router actively participate
in multicast, making copies of packets as needed and forwarding towards multicast receivers
Only a single copy of a datagram will ever traverse a link
Multicastrouters (red) duplicate and forward multicast datagrams
6
Multicast Groups
How to identify the receivers of a multicast datagram?
Let datagram carry the IP addresses of all the recipients Only workable with a small number of recipients Sender needs to know the addresses of all receivers Not a good solution!
Internet solution: use multicast group A multicast group identifies a set of receivers and has a
single identifier Packet sent to a multicast group are received by all
members in the group
7
Internet Multicast Service Model
Multicast group in the Internet has its own Class D multicast address IP addresses 224.0.0.0 to 239.255.255.255 reserved
for multicast (IP addresses begin with 1110)
128.119.40.186
128.59.16.12
128.34.108.63
128.34.108.60
multicast group
226.17.30.197
8
Internet Multicast Service Model
Host group semantics:o anyone can join/leave a multicast groupo anyone can send to a multicast groupo no network-layer identification of hosts that have joined
a multicast group Questions to answer:
How are hosts join/leave a group? A: Internet Group Management Protocol (IGMP) How do the routers deliver a multicast datagram to all
group members? A: multicast routing protocols
9
IP multicasting: two-step process
local: host informs local router of desire to join a multicast group: IGMP
wide area: local router interacts with other routers to receive multicast datagrams many multicast routing protocols (e.g., DVMRP,
MOSPF, PIM)
IGMPIGMP
IGMP
wide-areamulticast
routing
10
Internet Group Management Protocol (IGMP)
RFC 2236 Operate between a host and its directly
attached router Provide the means for:
A host to inform its attached router that it wants to join/leave a multicast group
A router to detect if a LAN has any members for a particular multicast group
11
IGMP Messages
Three message types: membership query, membership report, leave group
General membership query Sent by a router to all nodes on the LAN Query multicast groups joined by attached hosts Multicast group address field set to 0
Specific membership query Sent by a router to all nodes on the LAN Query if a specific multicast group is joined by attached hosts Multicast group address field set to the multicast group address being
queried
Type
Max. Resp.
Time
Checksum
Multicast group address
12
IGMP Messages (cont’d)
Membership report message Sent by host to all nodes on the LAN in response to a
membership query message or when first joins a multicast group
Contains the address of a group the host has joined A router only cares about whether one or more hosts
belong to a given group want to hear from only one of the hosts that belongs to each group Each membership query message includes a “maximum
response time” field A host waits a random time between 0 and maximum
response time before sending a membership report message Feedback suppression: if the host observes a membership
report message from some other host for the multicast group, discard its own pending membership report message
13
IGMP Messages (cont’d) Leave group message:
sent by host to report leaving a group leave group message is optional
• Router periodically sends a membership query message
• A router infers that no hosts are joined to a group when no host responds to the query message
• Soft state protocol: state is removed via a timeout event if it is not explicitly refreshed
IGMP messages are encapsulated within an IP datagram
There is no control over who sends to the group and who joins the group
Multicast Routing: Problem Statement
Goal: Given a multicast group, find a tree connecting routers having local multicast group members shared tree: a single tree used by all group members source-based tree: different tree for each sender
Shared tree Source-based trees
Approaches for building mcast trees
group-shared tree: group uses one tree minimal cost (Steiner) tree center-based tree
source-based tree: one tree per source shortest path tree reverse path forwarding
…we first look at basic approaches, then specific protocols adopting these approaches
Group-Shared Tree: Steiner Tree All multicast packets are
routed along the same tree, regardless of the sender
Steiner Tree: minimum cost tree connecting all routers with attached group members problem is NP-complete good heuristics exist
not used in practice: information about all links needed rerun whenever link costs change not able to use unicast routing
info
Router having attached group members
Router having no attached group members
4
1
11
2
22
3
Group-Shared Tree: Center-based tree
single delivery tree shared by all one router identified as center of
tree to join:
router with attached group members sends unicast join message addressed to the center
join message “processed” by intermediate routers and forwarded towards center
join message either hits existing tree branch for this center, or arrives at center
path taken by join message becomes new branch of tree for this router
R1
R2
R3
R4
R5
R6 R7
2
3
1
router with attachedgroup member
router with no attachedgroup member
path order in which join messages generated
1
center
18
Multicast Routing Using a Source-Based Tree
Construct a multicast routing tree for each source in the multicast group
Router maintains state for each (group, sender) pair
Shortest path tree: union of the shortest paths from source to each receiver Obtained by Dijkstra’s
algorithm
Router having attached group members
Router having no attached group members
A
B
D
E
C
F
19
Steiner Tree v.s Shortest Path Tree
4
1
11
2
22
34
1
11
2
22
3
A A (source)
Steiner tree: minimize the sum of the link costs in the tree
Shortest path tree: minimize the cost from source to each receiver
20
Compute Shortest Path Tree
Use link state algorithm: each router needs to know the state of each link in the network
Can we compute the tree without link state information?
A: use reverse path forwarding algorithm
21
Reverse Path Forwarding (RPF)
Forward packet from source S to all interfaces (except the incoming one) iff the packet arrived on the link that is on its shortest path to S A router need only know
the next hop on its shortest path to the sender
result is a source-specific reverse shortest path tree
A
B
D
E
C
F
Packet that will be forwarded
Packet not forwarded beyond receiving router
G
22
RPF: Pruning
forwarding tree contains subtrees with no mcast group members no need to forward
datagrams down subtree “prune” msgs sent
upstream by router with no downstream group members
• Router tells parent in the tree to stop forwarding
• Prune message propagate upstream
A
B
D
E
C
FG
Prune message
23
Rejoining
If a router sends a prune message upstream, what should happen if it later needs to join the group? Send a graft message to upstream router Or, allow pruned branches to time-out and be
added again to the tree
24
Issues in Wide-Area Multicast
Hosts may join and leave a multicast group dynamicallyneed to dynamically update routing tree
State information for a multicast connection must be established and maintained in routers Group-shared tree: per group state Source-based tree: per (group, source) state
Internet Multicasting Routing: DVMRP
DVMRP: distance vector multicast routing protocol, RFC1075
flood and prune: source-based tree, reverse path forwarding each router uses a distance vector algorithm to
compute the next hop on its shortest path to each source
initial datagram to mcast group flooded everywhere via RPF
routers not wanting multicast datagram: send upstream prune messages
routers store state for each (source, group) pair
DVMRP: continued…
soft state: DVMRP router periodically “forgets” branches are pruned: multicast data again flows down unpruned branch router: reprune or else continue to receive data
routers can quickly regraft to tree using graft message
odds and ends commonly implemented in commercial routers MBONE (Multicast Backbone) routing done using DVMRP
Tunneling some Internet routers are not multicast-capable Internet MBONE: a virtual network of multicast-capable routers on top of
a physical network containing a mix of unicast and multicast routers
mcast datagram encapsulated inside unicast datagram unicast IP datagram sent thru “tunnel” via regular IP unicast to
receiving mcast router receiving mcast router extracts mcast datagram
physical topology logical topology
AB
C
A B
C
PIM: Protocol Independent Multicast
not dependent on any particular underlying unicast routing protocol (works with all)
two different multicast distribution scenarios:
Dense mode: group members
densely located, many routers need to be involved in routing multicast datagrams
Sparse mode: # routers with attached
group members small wrt total # routers
Consequences of Sparse-Dense Dichotomy
Dense mode group membership by
routers assumed until routers explicitly prune
data-driven construction of mcast tree (e.g., RPF)
Sparse mode routers not involved in
multicast distribution until explicitly join a group
receiver- driven construction of mcast tree (e.g., center-based)
PIM - Dense Mode
flood-and-prune reverse path forwarding similar to DVMRP, but can interoperate with
any underlying unicast routing protocol
PIM - Sparse Mode
center-based approach router sends JOIN msg to
rendezvous point (RP) to join the tree intermediate routers update
state and forward JOIN message toward RP
PRUNE message is sent when a router leaves a group
R1
R2
R3
R4
R5
R6R7
join
join
join
rendezvouspoint
PIM - Sparse Mode
sender unicast data to RP, which multicasts down RP-rooted tree
RP can send STOP message to source if no routers are jointed to the tree “no one is listening!”
after joining RP, router can switch to source-specific tree
R1
R2
R3
R4
R5
R6R7
join
join
join
all data multicastfrom rendezvouspoint
rendezvouspoint
33
Switch from group-shared tree to a source-specific tree
In group-shared tree, E sends to RP, then RP sends to A
when data rate from E exceeds a threshold A sends join message directly
to E A does not send prune
message towards RP so it can continue to receive from other sources
increased performance: less traffic concentration, shorter paths
source
receiverRP
Before switch
After switch
A B C
E
D
34
MOSPF: Multicast Open Shortest Path First
Multicast extension to OSPF Routers flood group membership information
with Link State Advertisements Each router independently computes source-
specific, shortest-path trees for each multicast group
35
Evaluating a Multicast Routing Protocol
Scalability: the amount of state required in the routers Group-shared tree: per
group state Source-based tree: per
group, per source state Excess traffic received?
Yes: DVMRP, PIM Dense Mode
No: MOSPF, PIM Sparse Mode
Traffic Concentration Group-shared tree tends
to concentrate traffic on a smaller number of links
Source-based trees tend to distribute multicast traffic more evenly
Optimality of forwarding paths Minimum cost multicast
tree not used in practice Shortest path trees and
center based trees are used
36
THANX.