Mcast Tutorial
Mcast Tutorial
Mcast Tutorial
RedIRIS/Red.es
October 7th, 2004
Agenda
Introduction
Multicast addressing
PIM-SM / SSM
MSDP
MBGP
2
•Introduction
•Multicast addressing
•PIM-SM / SSM
•MSDP
•MBGP
3
What is Multicasting?
Unicast
Server
Router
Multicast
Server
Router
4
Multicast Uses
5
A bit of history
6
A bit of history
Problem
•DVMRP can’t scale to Internet sizes
Distance vector-based routing protocol
Periodic updates
• Full table refresh every 60 seconds
Table sizes
• Internet > 40,000 prefixes at that moment
Scalability
• Too many tunnels, hop-count till 32 hops, etc
7
The evolution
8
The evolution
9
PIM Dense Mode Overview
Initial Flooding
Source
Receiver
10
PIM Dense Mode Overview
Source
Multicast Packets
Prune Messages
Receiver
11
PIM Dense Mode Overview
Source
12
(S,G) notation
13
IP Multicast building blocks
The routers make sure the STREAMS make it to the correct receiving
nets.
Multicast Routing Protocols (PIM-SM/SSM)
RPF (reverse path forwarding) – against source address
14
Multicast Forwarding
15
Multicast Forwarding
What is RPF?
A router forwards a multicast datagram only if received on the up
stream interface to the source (i.e. it follows the distribution tree).
The RPF Check
The source IP address of incoming multicast packets are checked
against a unicast routing table.
If the datagram arrived on the interface specified in the
routing table for the source address; then the RPF check
succeeds.
Otherwise, the RPF Check fails.
16
Multicast Forwarding
17
Multicast Forwarding
Source
151.10.3.21
Mcast Packets
18
Multicast Distribution Trees
State Information:
(S, G)
S = Source
G = Group
19
Multicast Distribution Trees
Source 1
Core Source 2
State Information:
(*,G)
* = Any Source
G = Group
20
Multicast Distribution Trees
21
•Introduction
•Multicast addressing
•PIM-SM / SSM
•MSDP
•MBGP
22
Multicast Addressing
224.0.0.0–239.255.255.255
Class “D” Address Space
• High order bits of 1st Octet = “1110”
TTL value defines scope and limits distribution
• IP multicast packet must have TTL > interface TTL or it is
discarded
• values are: 0=host, 1=network, 32=same site, 64=same region,
128=same continent, 255=unrestricted
• No longer recommended as a reliable scoping mechanism
23
Multicast Addressing
24
Multicast Addressing
GLOP addresses
Provides globally available private Class D space
233.x.x/24 per AS number
RFC2770
How?
AS number = 16 bits
• Insert the 16 ASN into the middle two octets of 233/8
25
Multicast Addressing
http://www.iana.org/assignments/multicast-addresses
Examples of Reserved & Link-local Addresses
26
•Introduction
•Multicast addressing
•PIM-SM / SSM
•M-BGP
•MSDP
27
Internet Group Membership Protocol
(IGMP)
28
IGMPv2 Protocol Flow - Join a
Group
I want
to JOIN!
230.0.0.1
Router adds group
I want 230.0.0.1
230.0.0.1
230.0.0.1 Forwards stream
29
IGMPv2 Protocol Flow -
Querier
Still
interested? Yes, me!
(general query)
224.0.0.1
230.0.0.1
I want 230.0.0.1
230.0.0.1 group
230.0.0.1
224.0.0.1
30
IGMPv2 Protocol Flow - Leave a
Group
230.0.0.1 group
31
IGMPv3
RFC 3376
Enables hosts to listen only to a specified subset of the
hosts sending to the group
32
IGMP Enhancements
IGMP Version 2
multicast router with lowest IP address is elected querier
Group-Specific Query message is defined. Enables router to transmit query
to specific multicast address rather than to the "all-hosts" address of
224.0.0.1
Leave Group message is defined. Last host in group wishes to leave, it
sends Leave Group message to the "all-routers" address of 224.0.0.2.
Router then transmits Group-Specific query and if no reports come in, then
the router removes that group from the list of group memberships for that
interface
IGMP Version 3
Group-Source Report message is defined. Enables hosts to specify which
senders it can receive or not receive data from.
Group-Source Leave message is defined. Enables host to specify the
specific IP addresses of a (source,group) that it wishes to leave.
33
•Introduction
•Multicast addressing
•PIM-SM / SSM
•MSDP
•MBGP
34
PIM-SM
draft-ietf-pim-sm-v2-new-10.txt
• Obsoletes RFC 2362
• BSR removed from PIM spec.
explicit join: assumes everyone does not want the data
uses unicast routing table for RPF checking
data and joins are forwarded to RP for initial rendezvous
all routers in a PIM domain must have RP mapping
when load exceeds threshold forwarding swaps to shortest path tree
(default is first packet)
state increases (not everywhere) as number of sources and number of
groups increase
source-tree state is refreshed when data is forwarded and with Join/Prune
control messages
35
PIM Sparse-Mode :RP
36
PIM-SM Shared Tree Join
RP
Receiver
37
PIM-SM Sender Registration
RP
Source
38
PIM-SM Sender Registration
RP
Source
39
PIM-SM Sender Registration
RP
Source
40
PIM-SM SPT Switchover
RP
Source
41
PIM-SM SPT Switchover
RP
Source
Traffic Flow
Traffic begins flowing down the
Shared Tree new branch of the Source Tree.
Source Tree
Additional (S, G) State is created
(S, G)RP-bit Prune Receiver along along the Shared Tree to
prune off (S, G) traffic.
42
PIM-SM SPT Switchover
RP
Source
43
PIM-SM SPT Switchover
RP
Source
44
PIM-SM SPT Switchover
RP
Source
45
PIM-SM Configuration
RP Mapping options
Static RP
• Recommended
• Easy transition to Anycast-RP
• Allows for a hierarchy of RPs
Auto-RP
• Fixed convergence timers (slow)
• Must flood RP mapping traffic
BSR
• No longer in the PIM spec.
• Fixed convergence timers (slow)
• Allows for a hierarchy of RPs
46
PIM-SSM
No shared trees
No register packets
No RP required
No RP-to-RP source discovery (MSDP)
Requires IGMP include-source list – IGMPv3
Host must learn of source address out-of-band (web page)
Requires host-to-router source AND group request
47
PIM-SSM
RP
Source
48
PIM-SSM
RP
Source
49
•Introduction
•Multicast addressing
•PIM-SM / SSM
•MSDP
•MBGP
50
MSDP
RFC 3618
Allows each domain to control its own RP(s)
Interconnect RPs between domains with TCP connections to pass
source active messages (SAs)
Can also be used within a domain to provide RP redundancy
(Anycast-RP)
RPs send SA messages for internal sources to MSDP peers
SAs are Peer-RPF checked before accepting or forwarding
RPs learn about external sources via SA messages and may
trigger (S,G) joins on behalf of local receivers
MSDP connections typically parallel MBGP connections
51
MSDP Operation
52
MSDP Source Active
Messages
Other MSDP peers don’t originate this SA but only forward it if received
SA messages cached on router for new group members that may join
Reduced join latency
Prevent SA storm propagation
53
MSDP Overview
Domain E
MSDP Peers
Source Active SA RP
Messages
SA r
Domain C
RP
SA
Domain B SA SA Join (*, 224.2.2.2)
RP
SA RP
SA Domain D
SA Message
192.1.1.1, 224.2.2.2
RP
SA Message
192.1.1.1, 224.2.2.2 s
Domain A
Register
192.1.1.1, 224.2.2.2
54
MSDP Overview
Domain E
MSDP Peers
RP
r
Domain C
.2.2.2)
RP
(S, 224 n
Joi
Domain B
RP
RP
Domain D
RP
s
Domain A
55
MSDP Overview
Domain E
MSDP Peers
Multicast Traffic RP
r
Domain C
RP
Domain B
RP
RP
Domain D
RP
s
Domain A
56
MSDP Peers
57
RPF-peer Rules
58
MSDP with SSM – Unnecessary!
Domain E
ASM MSDP Peers
(irrelevant to SSM)
RP
r
Domain C
Receiver learns
RP S AND G out of
band; ie Web page
Domain B
RP
RP
Domain D
Source in 232/8 RP
s
Domain A
59
MSDP with SSM –
Unnecessary!
Domain E
ASM MSDP Peers
(irrelevant to SSM)
RP
r
Domain C
Receiver learns
RP S AND G out of
band; ie Web page
Domain B
RP
RP
Domain D
Source in 232/8 RP
s
Domain A
60
MSDP Application: Anycast-RP
•RFC 3446
•Within a domain, deploy more than one RP for the same
group range
•Sources from one RP are known to other RPs using MSDP
•Give each RP the same /32 IP address
•Sources and receivers use closest RP, as determined by
the IGP
•Used intra-domain to provide redundancy and RP load
sharing, when an RP goes down, sources and receivers are
taken to new RP via unicast routing
Fast convergence!
61
Anycast-RP
Src Rec
MSDP
RP1 – lo0 RP2 – lo0
X.X.X.X
Rec Y.Y.Y.Y
10.0.0.1 10.0.0.1
Rec
Rec
Src
62
Anycast-RP
Src Rec
RP1 – lo0
X.X.X.X
X Rec
RP2 – lo0
Y.Y.Y.Y
10.0.0.1 10.0.0.1
Rec
Rec
Src
63
•Introduction
•Multicast addressing
•PIM-SM / SSM
•MSDP
•MBGP
64
MBGP Overview
65
MBGP Overview
66
MBGP Overview
MP_UNREACH_NLRI
• Used to indicate a previously route is no longer reachable
67
MBGP—Capability Negotiation
•RFC 2842
68
Summary
69
Summary
ISP Requirements
•Current solution: MBGP + PIM-SM + MSDP
Environment
• ISPs run iMBGP and PIM-SM (internally)
• ISPs multicast peer at a public interconnect
Deployment
• Border routers run eMBGP
• The interfaces on interconnect run PIM-SM
• RPs’ MSDP peering must be consistant with eMBGP peering
• All peers set a common distance for eMBGP
70