IP Multicast

advertisement
IP Multicast
Angelos Vassiliou
HMY 654
Overview
• Definitions
• Multicast routing Concepts
• IP Multicast Protocols
Definitions
• A multicast group is a set of receivers with a
common interest.
• A source is an end user that originates a data
stream.
• A receiver is an end user wishing to receive a
data stream.
ASM vs. SSM
• Any source multicast (ASM) model - no limit
on the number of multicast groups, or on the
number of sources and receivers for a group.
• Source specific multicast (SSM) allows, for a
given group g, a receiver to select the specific
sources for this g from which it will receive a
stream.
A sample network
Multicast group g, ASM
Multicast group g, SSM
Multicast routing Concepts
•
•
•
•
Reverse Path Forwarding
Shared Trees
Source Trees
Network coding
Broadcast
Not a good solution
• Result:
Broadcast Storm
• Solutions:
Switched LANs:
Spanning Trees
Spanning Tree
Routed Networks
• Solution: Forbid / ignore Broadcasts.
• In case of dense Multicasting, all routers
require multicast traffic.
• Links cannot be shut down in routed WANs.
• Routing protocols need some time to
converge.
• Simple and viable solution: RPF
RPF
• Consider a source S for group g that is sending
packets to a set of receivers that have joined g.
Suppose some node N receives a packet from a
neighbour C and must decide what to do with the
packet.
• The reverse path forwarding (RPF) check is: if the
shortest path from N to S has neighbour C as its
next hop, the check passes, and N should forward
the packet on each of the arcs specified in its
multicast forwarding table for group g; otherwise,
the check fails and N should discard the packet.
RPF: Reverse Path forwarding
C’s Routing Table
Destination Next Hop
S
B’s Routing Table
Destination Next Hop
S
G
A
N’s Routing Table
Destination Next Hop
S
A
Source Trees
• Group g1,
source s1,
behind router
S
• G,N,K,D
belong in g1
Source Trees
• Each router in the source
tree must create a routing
table, containing entries
regarding (s1,g1) routing
A’s Routing Table
C’s Routing Table
(s,g) pair
(s,g) pair
Next Hop
s1,g1
N
s1,g1
C
s1,g1
Next Hop
K
Source Trees
• Suppose a host off of router
F wants to also send to
group g1
• A new source tree is created
A’s Routing Table
C’s Routing Table
(s,g) pair
(s,g) pair
Next Hop
Next Hop
s1,g1
N
s1,g1
K
s1,g1
C
s2,g1
K
s2,g1
S
s2,g1
A
Source Trees vs. Shared Trees
• When the number of sources and groups is
large, considerable memory can be required at
each node to store, for each (s, g) tree
touching the node, the (s, g) pair, the interface
to the RPF neighbour, and the outgoing
interface list.
• The memory requirement can be greatly
reduced by using shared trees.
Shared Tree
• A shared tree for a group g is a single tree
used by all sources for g.
• A core node
(Rendezvous
Point) has to be
selected.
Shared Trees
• When a new node joins
the group or a new
source needs to send, it
joins the tree.
• Sub-optimal routing:
• Suppose a source exists off node D.
• Multicast traffic to node N must travel the
D-K-C-A-N path.
• Shared trees solve the Scalability issues of Source
Trees
Network Coding Example
• S1 generates message x
and S2 generates message
y
• t1 and t2 want to receive
both messages.
• a message needs one time
unit to traverse an arc
(link)
Network Coding
• 3 time units are
necessary for message x
to reach node t2
Network Coding
• 3 time units are
necessary for
message y to
reach node t1
Network Coding
• XOR is the simplest
example of a
network coding
scheme
• 3 time units are
necessary for both
messages y and x
to reach both
nodes t1 and t2
IP Multicast Protocols
•
•
•
•
•
•
•
•
Internet Group Management Protocol (IGMP)
Multicast Listener Discovery (MLD)
Multiple Registration Protocol (MRP)
Protocol Independent Multicast (PIM) (and flavors)
Distance Vector Multicast Routing Protocol (DVMRP)
Multicast Open Shortest Path First (MOSPF)
Multicast BGP (MBGP)
Multicast Source Discovery Protocol(MSDP) Multicast
DNS (mDNS)
3 main functions
• Multicast Addressing
– Multicast address defines a multicast group of hosts
• Multicast Group Management
– Mostly IGMP
– MLD for IPv6 LANs
• Multicast Datagram processing and routing
– Many routing protocols have been developed,
deployed and “standardized”
– More issues than unicast routing protocols
Multicast Datagram routing protocols
• IGP
– DVMPR
– MOSPF
• EGP
– MBGP
– MSDP
• PIM
IGMP
• used by hosts and adjacent routers to establish
multicast group memberships.
• Hosts let their gateway (subnet router) to know
they are interested in joining a Multicast group.
Multicast Listener Discovery (MLD)
• RFC 4604 defines MLDv2
• used by IPv6 routers for discovering multicast listeners
• Multicast Listener Query - Sent by a multicast router to
poll a network segment for group members. Queries
can be general, requesting group membership for all
groups, or can request group membership for a specific
group.
• Multicast Listener Report - Sent by a host when it joins
a multicast group, or in response to an MLD Multicast
Listener Query sent by a router.
• Multicast Listener Done - Sent by a host when it leaves
a host group and is the last member of that group on
the network segment.
Multiple Registration Protocol (MRP)
• Registration framework defined by the IEEE
802.1ak amendment to the IEEE 802.1Q
standard.
• MRP allows switches or similar devices to register
and de-register attribute values, such as VLAN
identifiers and multicast group membership
across a large LAN.
• MRP operates at the Data Link Layer.
• The information distributed using MRP is used by
“smart” switches.
• Better bandwidth utilization
MRP example
• Switches use IGMP
snooping to recognize
to which port they
should forward
multicast traffic
• They use MRP to
exchange multicast
Layer 2 switching
information
PIM
•
•
•
•
PIM Sparse Mode (PIM-SM)
PIM Dense Mode (PIM-DM)
Bidirectional PIM
PIM source-specific multicast (PIM-SSM)
PIM Sparse Mode (PIM-SM)
• explicitly builds unidirectional shared trees
rooted at a rendezvous point (RP) per group,
and optionally creates shortest-path trees per
source.
• Sparse mode means that the protocol is
designed for situations where multicast
groups are thinly populated across a large
region. Sparse-mode protocols are most
efficient over WANs.
PIM-SM source Join
• RP is chosen
• RP tree is built
PIM-SM group join
• Host A Joins
group G
• Traffic goes
trough RP
PIM-SM source tree setup
• After a
threshold is
reached, RP
prunes itself
from the
shared tree
• Source tree is
set up
PIM Dense Mode (PIM-DM)
• Dense protocols follow a flood-and-prune model. To
inform the routers of multicast sources, this traffic is
initially broadcast throughout the domain. Upon first
receiving traffic to a dense group on its interface
closest to the source, a router forwards this traffic out
all of its interfaces except the interface on which it
received the data.
• If traffic is received on the interface that is not the RPF
interface toward the source, the traffic is discarded,
and a Prune message is sent upstream. If a router has
no interested receivers for the, it sends a Prune
upstream.
• Periodic reflooding is used to refresh state.
• Wasteful but simple
Bidirectional PIM
• Builds shared bi-directional trees. It never
builds a shortest path tree, so may have
longer end-to-end delays than PIM-SM
• Scales better than PIM-SM because it needs
no source-specific state
PIM source-specific multicast
(PIM-SSM)
• Builds trees that are rooted in just one source,
offering a more secure and scalable model for
a limited amount of applications (mostly
broadcasting of content).
• In SSM, an IP datagram is transmitted by a
source S to an SSM destination address G, and
receivers can receive this datagram by
subscribing to channel (S,G)
Distance Vector Multicast Routing
Protocol (DVMRP)
• Dense protocol
• Forms the basis of the Internet's multicast backbone
(MBONE)
• based on RIP
• Does not scale well
• All routers in the network need global information about all
multicast groups and their sources.
• Uses distance metrics (router hops by default).
• Maintains a table with all the router interfaces connected
to a host interested in the group.
• most DVMRP deployments have been replaced by PIM-SM
• standard flood-and-prune behaviour
MOSPF
• RFC 1584 defines Multicast Extensions to
OSPF
• For a given multicast datagram, all routers
calculate an identical shortest-path tree.
There is a single path between the datagram's
source and any particular destination group
member.
• Link State
• Not widely deployed
Multiprotocol Extensions for BGP
(MBGP)
• defined in IETF RFC 4760 as an extension to
Border Gateway Protocol
• enables the exchange of inter-domain
multicast routing information
• other protocols (such as PIM) are needed to
build trees and forward multicast traffic
Multicast Source Discovery Protocol
(MSDP)
• a mechanism to
connect multiple
PIM sparse-mode
(PIM-SM) domains
MSDP operation overview
1.
2.
3.
4.
5.
6.
7.
When a source's first data packet is registered by the first-hop router,
that same data packet is decapsulated by the RP and forwarded down
the shared tree.
That packet is also re-encapsulated in a Source-Active (SA) message that
is immediately forwarded to all MSDP peers.
The SA message identifies the source, the group the source is sending to,
and the RP's own address
If the peer is an RP and has a member of that multicast group, the data
packet is decapsulated and forwarded down the shared-tree in the
remote domain.
Each MSDP peer receives and forwards the SA message away from the
originating RP to achieve "peer-RPF flooding."
The concept of peer-RPF flooding is with respect to forwarding SA
messages.
The router examines the BGP or MBGP routing table to determine which
peer is the next hop toward the originating RP of the SA message.
MSDP
Multicast DNS (mDNS)
• A multicast application
• Suitable for environments where there in no
central DNS server
• Each host looking for the IP address of a local
host, multicasts a mDNS query
• The host that owns the queried hostname,
multicasts a mDNS response with its IP addess
• Uses well-known multicast address
• Why not simply broadcast?
Broadcast
ISP
Multicast
ISP
References
• A Primer of Multicast Routing by Eric Rosenberg.
Springer Press 2012 edition
• Network Information Flow. by Ahlswede R, Cai N, Li
SYR, Yeung RW(2000)published in IEEE Transactions on
Information Theory 46:1204-1216
• Interdomain Multicast Routing: Practical Juniper
Networks and Cisco Systems Solutions by Brian M.
Edwards, Leonard A. Giuliano , Brian R. Wright.
Addison-Wesley Professional 1st edition May, 2002
• Wikipedia
• http://www.ietf.org/rfc.html
• http://www.cisco.com/en/US/docs/ios/12_0t/
12_0t7/feature/guide/msdp.html
Download