Download multicast

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Spanning Tree Protocol wikipedia , lookup

IEEE 802.1aq wikipedia , lookup

Zero-configuration networking wikipedia , lookup

Transcript
Fundamentals of
IP Multicast
PS-541
2933_05_2001_c1
© 2001, Cisco Systems, Inc. All rights reserved.
1
Unicast vs Multicast
Unicast
Host
Router
Multicast
Host
Router
PS-541
2933_05_2001_c1
© 2001, Cisco Systems, Inc. All rights reserved.
2
Multicast Addressing
• IP group addresses
224.0.0.0–239.255.255.255
• “Class D” addresses = high order
bits of “1110”
• Special reserved group addresses:
224.0.0.0–224.0.0.255:
PS-541
2933_05_2001_c1
– 224.0.0.1
All systems on this subnet
– 224.0.0.2
– 224.0.0.4
All routers on this subnet
DVMRP routers
© 2001, Cisco Systems, Inc. All rights reserved.
3
IP Multicast Addressing
• Global Scope Addresses
– Addresses 224.0.1.0 through 238.255.255.255
– Allocated dynamically
• Administratively Scoped Addresses
– Addresses 224.0.1.0 through 238.255.255.255
– Reserved for use inside of private Domains
• Static Group Address Assignment
– Group range: 233.0.0.0 - 233.255.255.255
• Your AS number is inserted in middle two octets
• Remaining low-order octet used for group assignment
PS-541
2933_05_2001_c1
© 2001, Cisco Systems, Inc. All rights reserved.
4
Multicast Protocol Basics
• Multicast Distribution Trees
• Multicast Forwarding
• Types of Multicast Protocols
– Dense/Sparse Mode Protocols
• MBGP
• MSDP
PS-541
2933_05_2001_c1
© 2001, Cisco Systems, Inc. All rights reserved.
5
Multicast Distribution Trees
Characteristics of Distribution Trees
• Source or Shortest Path trees
– Uses more memory (S x G) but you get optimal
paths from source to all receivers; minimizes delay
• Shared trees
– Uses less memory (G) but you may get sub-optimal
paths from source to all receivers; may introduce
extra delay
PS-541
2933_05_2001_c1
© 2001, Cisco Systems, Inc. All rights reserved.
6
Multicast Distribution Trees
Shortest Path or Source Distribution Tree
Source 1
Notation: (S, G)
S = Source
G = Group
Source 2
A
B
C
Receiver 1
PS-541
2933_05_2001_c1
© 2001, Cisco Systems, Inc. All rights reserved.
F
D
E
Receiver 2
7
Multicast Distribution Trees
Shared Distribution Tree
Notation: (*, G)
* = All Sources
G = Group
A
B
C
D (RP)
E
F
(RP)
PIM Rendezvous Point
Shared Tree
Receiver 1
PS-541
2933_05_2001_c1
© 2001, Cisco Systems, Inc. All rights reserved.
Receiver 2
8
Multicast Distribution Trees
Shared Distribution Tree
Source 1
Notation: (*, G)
* = All Sources
G = Group
Source 2
A
B
C
D (RP)
E
F
(RP)
PIM Rendezvous Point
Shared Tree
Source Tree
Receiver 1
PS-541
2933_05_2001_c1
© 2001, Cisco Systems, Inc. All rights reserved.
Receiver 2
9
Multicast Distribution Trees
How Are Distribution Trees Built?
• PIM
– Uses existing Unicast Routing Table plus Join/Prune/Graft
mechanism to build tree.
• DVMRP
– Uses DVMRP Routing Table plus special Poison-Reverse
mechanism to build tree.
• MOSPF
– Uses extension to OSPF’s link state mechanism to build tree.
• CBT
– Uses existing Unicast Routing Table plus Join/Prune/Graft
mechanism to build tree.
PS-541
2933_05_2001_c1
© 2001, Cisco Systems, Inc. All rights reserved.
10
Multicast Forwarding
• Multicast Routing is backwards from
Unicast Routing
– Unicast Routing is concerned about where
the packet is going.
– Multicast Routing is concerned about where
the packet came from.
• Multicast Routing uses “Reverse Path
Forwarding”
PS-541
2933_05_2001_c1
© 2001, Cisco Systems, Inc. All rights reserved.
11
Multicast Forwarding
Example: RPF Checking
Source
151.10.3.21
Mcast Dist. Tree
RPF Checks Fail
Packets arrived on wrong interface!
Mcast Packets
PS-541
2933_05_2001_c1
© 2001, Cisco Systems, Inc. All rights reserved.
12
Types of Multicast Protocols
• Dense-mode
– Uses “Push” Model
– Traffic Flooded throughout network
– Pruned back where it is unwanted
– Flood & Prune behavior (typically every 3 minutes)
• Sparse-mode
– Uses “Pull” Model
– Traffic sent only to where it is requested
– Explicit Join behavior
PS-541
2933_05_2001_c1
© 2001, Cisco Systems, Inc. All rights reserved.
13
Dense-Mode Protocols
• DVMRP - Distance Vector Multicast
Routing Protocol
• MOSPF - Multicast OSPF
• PIM DM - Protocol Independent
Multicasting (Dense Mode)
PS-541
2933_05_2001_c1
© 2001, Cisco Systems, Inc. All rights reserved.
14
DVMRP — Evaluation
• Widely used on the old MBONE (being phased out)
• Significant scaling problems
– Slow Convergence—RIP-like behavior
– Significant amount of multicast routing state information
stored in routers—(S,G) everywhere
– No support for shared trees
– Maximum number of hops < 32
• Not appropriate for large scale production networks
– Due to flood and prune behavior
– Due to its poor scalability
PS-541
2933_05_2001_c1
© 2001, Cisco Systems, Inc. All rights reserved.
15
PIM-DM
• Protocol Independent
– Supports all underlying unicast routing protocols
including: static, RIP, IGRP, EIGRP, IS-IS, BGP, and
OSPF
• Uses reverse path forwarding
– Floods network and prunes back based on
multicast group membership
– Assert mechanism used to prune off redundant
flows
• Appropriate for...
– Testing and pilot networks
PS-541
2933_05_2001_c1
© 2001, Cisco Systems, Inc. All rights reserved.
16
PIM-DM Flood & Prune
Initial Flooding
Source
(S, G) State created in
every router in the network!
Multicast Packets
Receiver
PS-541
2933_05_2001_c1
© 2001, Cisco Systems, Inc. All rights reserved.
17
PIM-DM Flood & Prune
Pruning unwanted traffic
Source
Multicast Packets
Prune Messages
Receiver
PS-541
2933_05_2001_c1
© 2001, Cisco Systems, Inc. All rights reserved.
18
PIM-DM Flood & Prune
Results after Pruning
Source
(S, G) State still exists in
every router in the network!
Multicast Packets
Flood & Prune process
repeats every 3 minutes!!!
PS-541
2933_05_2001_c1
© 2001, Cisco Systems, Inc. All rights reserved.
Receiver
19
PIM-SM (RFC 2362)
• Supports both source and shared trees
– Assumes no hosts want multicast traffic unless they
specifically ask for it
• Uses a Rendezvous Point (RP)
– Senders and Receivers “rendezvous” at this point to learn of
each others existence.
• Senders are “registered” with RP by their first-hop router.
• Receivers are “joined” to the Shared Tree (rooted at the RP) by
their local Designated Router (DR).
• Appropriate for…
– Wide scale deployment for both densely and sparsely
populated groups in the enterprise
– Optimal choice for all production networks regardless of size
and membership density.
PS-541
2933_05_2001_c1
© 2001, Cisco Systems, Inc. All rights reserved.
20
PIM-SM Shared Tree Join
RP
(*, G) State created only
along the Shared Tree.
(*, G) Join
Shared Tree
Receiver
PS-541
2933_05_2001_c1
© 2001, Cisco Systems, Inc. All rights reserved.
21
PIM-SM Sender Registration
RP
Source
(S, G) State created only
along the Source Tree.
Traffic Flow
Shared Tree
Source Tree
(S, G) Register
(unicast)
Receiver
(S, G) Join
PS-541
2933_05_2001_c1
© 2001, Cisco Systems, Inc. All rights reserved.
22
PIM-SM Sender Registration
RP
Source
(S, G) traffic begins arriving
at the RP via the Source tree.
Traffic Flow
Shared Tree
Source Tree
(S, G) Register
(S, G) Register-Stop
PS-541
2933_05_2001_c1
© 2001, Cisco Systems, Inc. All rights reserved.
(unicast)
Receiver
RP sends a Register-Stop
back to the first-hop router
to stop the Register process.
(unicast)
23
PIM-SM Sender Registration
RP
Source
Traffic Flow
Source traffic flows natively
along SPT to RP.
Shared Tree
Source Tree
From RP, traffic flows down
the Shared Tree to Receivers.
Receiver
PS-541
2933_05_2001_c1
© 2001, Cisco Systems, Inc. All rights reserved.
24
PIM-SM SPT Switchover
RP
Source
Last-hop router joins the Source
Tree.
Traffic Flow
Shared Tree
Source Tree
(S, G) Join
PS-541
2933_05_2001_c1
© 2001, Cisco Systems, Inc. All rights reserved.
Additional (S, G) State is created
along new part of the Source Tree.
Receiver
25
PIM-SM SPT Switchover
RP
Source
Traffic Flow
Shared Tree
Source Tree
(S, G)RP-bit Prune
PS-541
2933_05_2001_c1
© 2001, Cisco Systems, Inc. All rights reserved.
Traffic begins flowing down the
new branch of the Source Tree.
Receiver
Additional (S, G) State is created
along along the Shared Tree to
prune off (S, G) traffic.
26
PIM-SM SPT Switchover
RP
Source
(S, G) Traffic flow is now
pruned off of the Shared Tree
and is flowing to the Receiver
via the Source Tree.
Traffic Flow
Shared Tree
Source Tree
Receiver
PS-541
2933_05_2001_c1
© 2001, Cisco Systems, Inc. All rights reserved.
27
PIM-SM SPT Switchover
RP
Source
(S, G) traffic flow is no longer
needed by the RP so it Prunes
the flow of (S, G) traffic.
Traffic Flow
Shared Tree
Source Tree
(S, G) Prune
PS-541
2933_05_2001_c1
© 2001, Cisco Systems, Inc. All rights reserved.
Receiver
28
PIM-SM SPT Switchover
RP
Source
(S, G) Traffic flow is now only
flowing to the Receiver via a
single branch of the Source
Tree.
Traffic Flow
Shared Tree
Source Tree
Receiver
PS-541
2933_05_2001_c1
© 2001, Cisco Systems, Inc. All rights reserved.
29
PIM-SM — Evaluation
• Advantages:
– Traffic only sent down “joined” branches
– Can switch to optimal source-trees for high traffic
sources dynamically
– Unicast routing protocol-independent
– Basis for inter-domain multicast routing
• When used with MBGP and MSDP
PS-541
2933_05_2001_c1
© 2001, Cisco Systems, Inc. All rights reserved.
30
MBGP Overview
• MBGP: Multiprotocol BGP
– Defined in RFC 2283 (extensions to BGP)
– Can carry different types of routes
•IPv4 Unicast
•IPv4 Multicast
•IPv6 Unicast
– May be carried in same BGP session
– Does not propagate multicast state info
•Still need PIM to build Distribution Trees
– Same path selection and validation rules
• AS-Path, LocalPref, MED, …
PS-541
2933_05_2001_c1
© 2001, Cisco Systems, Inc. All rights reserved.
31
MBGP Overview
• Separate BGP tables maintained
– Unicast Routing Information Base (U-RIB)
– Multicast Routing Information Base (M-RIB)
– New BGP ‘nlri’ keyword specifies which RIB
– Allows different unicast/multicast topologies or
policies
• Unicast RIB (U-RIB)
– Contains unicast prefixes for unicast forwarding
– Populated with BGP unicast NLRI
• Multicast RIB (M-RIB)
PS-541
2933_05_2001_c1
– Contains unicast prefixes for RPF checking
– Populated with BGP multicast NLRI
© 2001, Cisco Systems, Inc. All rights reserved.
32
MBGP — NLRI Information
RIB’s may be populated by:
• Network commands
network <foo> <foo-mask> [nlri multicast unicast]
– New “nlri” keyword controls in which RIB the
matching route(s) is(are) stored
• M-RIB if “multicast” keyword specified
• U-RIB if “unicast” keyword specified
(or if nlri clause omitted)
• Both RIB’s if both keywords specified
PS-541
2933_05_2001_c1
© 2001, Cisco Systems, Inc. All rights reserved.
33
MBGP—Summary
• Solves part of inter-domain problem
– Can exchange multicast RPF information
– Uses standard BGP configuration knobs
– Permits separate unicast and multicast
topologies if desired
• Still must use PIM to:
– Build multicast distribution trees
– Actually forward multicast traffic
– PIM-SM recommended
PS-541
2933_05_2001_c1
© 2001, Cisco Systems, Inc. All rights reserved.
34
MSDP Overview
• Use inter-domain source trees
• Reduces the problem to locating
active sources
• MSDP establishes a neighbor
relationship between MSDP peers
• MSDP peers talk via TCP connections
– use keepalives every 60 sec
– after 75 sec TCP connection is reset
PS-541
2933_05_2001_c1
© 2001, Cisco Systems, Inc. All rights reserved.
35
MSDP Overview
• Works with PIM-SM only
– RP’s knows about all sources in a domain
•Sources cause a “PIM Register” to the RP
•Can tell RP’s in other domains of its sources
– Via MSDP SA (Source Active) messages
– RP’s know about receivers in a domain
•Receivers cause a “(*, G) Join” to the RP
•RP can join the source tree in the peer domain
– Via normal PIM (S, G) joins
– Only necessary if there are receivers for the group
PS-541
2933_05_2001_c1
© 2001, Cisco Systems, Inc. All rights reserved.
36
MSDP SA Messages
• Used to advertise active Sources in a
domain
• SA Message Contents:
– IP Address of Originator (RP address)
– Number of (S, G)’s pairs being advertised
– List of active (S, G)’s in the domain
– Encapsulated Multicast packet
• Source Active (SA) messages
– Peer-RPF forwarded to prevent loops
•RPF check on path back to the originating RP
– If using MSDP mesh group
– If one MSDP peer without running BGP
– Since they have only one exit (e.g., default peer)
PS-541
2933_05_2001_c1
© 2001, Cisco Systems, Inc. All rights reserved.
37
MSDP Overview
MSDP Example
Domain E
MSDP Peers
Source Active
Messages
RP
SA
r
SA
Domain C
Join (*, 224.2.2.2)
RP
SA
Domain B SA
SA
RP
SA
SA
SA Message
192.1.1.1, 224.2.2.2
RP
RP
SA Message
192.1.1.1, 224.2.2.2
Domain D
s
Domain A
PS-541
2933_05_2001_c1
Register
192.1.1.1, 224.2.2.2
© 2001, Cisco Systems, Inc. All rights reserved.
38
MSDP Overview
MSDP Example
Domain E
MSDP Peers
RP
r
Domain C
RP
Domain B
RP
RP
Domain D
RP
s
Domain A
PS-541
2933_05_2001_c1
© 2001, Cisco Systems, Inc. All rights reserved.
39
MSDP Overview
MSDP Example
Domain E
MSDP Peers
RP
Multicast Traffic
r
Domain C
RP
Domain B
RP
RP
Domain D
RP
s
Domain A
PS-541
2933_05_2001_c1
© 2001, Cisco Systems, Inc. All rights reserved.
40
Originating SA Messages
• SA messages are triggered when any new
source in the local domain goes active.
– Initial multicast packet is encapsulated in an SA
message.
• This is an attempt at solving the bursty-source problem
PS-541
2933_05_2001_c1
© 2001, Cisco Systems, Inc. All rights reserved.
41
MSDP Mesh-Groups
• Optimises SA flooding
– Useful when 2 or more peers are in a group
• Reduces amount of SA traffic in the net
– SA’s are not flooded to other mesh-group peers
• No RPF checks on arriving SA messages
– When received from a mesh-group peer
– SA’s always accepted from mesh-group peers
PS-541
2933_05_2001_c1
© 2001, Cisco Systems, Inc. All rights reserved.
42
MSDP Mesh-Groups
• Configured with:
ip msdp mesh-group <name> <peer-address>
• Peers in the mesh-group should be
fully meshed.
• Multiple mesh-groups per router are
supported.
PS-541
2933_05_2001_c1
© 2001, Cisco Systems, Inc. All rights reserved.
43
MSDP Mesh-Group Example
MSDP mesh-group
ip
ip
ip
ip
msdp
msdp
msdp
msdp
peer R2
peer R3
mesh-group My-Group R2
mesh-group My-Group R3
SA not forwarded to other
members of the mesh-group
R1
RP
RP
R4
SA
R5
R2
R3
ip
ip
ip
ip
ip
msdp
msdp
msdp
msdp
msdp
peer R1
peer R3
peer R4
mesh-group My-Group R1
mesh-group My-Group R3
ip
ip
ip
ip
ip
msdp
msdp
msdp
msdp
msdp
peer R1
peer R2
peer R5
mesh-group My-Group R1
mesh-group My-Group R2
MSDP mesh-group peering
PS-541
2933_05_2001_c1
© 2001, Cisco Systems, Inc. All rights reserved.
44
Quiz
• … is used to propagate forwarding
state?
• … permits separate unicast and
multicast topologies?
• … exchanges active source
information between RPs?
PS-541
2933_05_2001_c1
© 2001, Cisco Systems, Inc. All rights reserved.
45
PS-541
2937_05_2001_c1
© 2001, Cisco Systems, Inc. All rights reserved.
46