Presentation is loading. Please wait.

Presentation is loading. Please wait.

RST-120 © 2001, Cisco Systems, Inc. All rights reserved. 1.

Similar presentations


Presentation on theme: "RST-120 © 2001, Cisco Systems, Inc. All rights reserved. 1."— Presentation transcript:

1 RST-120 © 2001, Cisco Systems, Inc. All rights reserved. 1

2 Troubleshooting IP Multicast
Session RST-320

3 Other Related Presentations
Multicast Sessions Session # Title RST-120 Introduction to IP Multicast RST-220 Deploying Scalable IP Multicast RST-222 Deploying Inter-domain IP Multicast RST-321 Multicast Router Performance and Architectures MBGP Related Sessions RST-??? Deploying BGP

4 Agenda IP Multicast Overview PIM-SM Protocol Mechanics
Geekometer IP Multicast Overview PIM-SM Protocol Mechanics Rendezvous Points Troubleshooting Case Studies and examples 3

5 PIM-SM Shared Tree Join
RP (*, G) State created only along the Shared Tree. PIM-SM Shared Tree Joins In this example, there is an active receiver (attached to leaf router at the bottom of the drawing) has joined multicast group “G”. The leaf router knows the IP address of the Rendezvous Point (RP) for group G and when it sends a (*,G) Join for this group towards the RP. This (*, G) Join travels hop-by-hop to the RP building a branch of the Shared Tree that extends from the RP to the last-hop router directly connected to the receiver. At this point, group “G” traffic can flow down the Shared Tree to the receiver. (*, G) Join Shared Tree Receiver

6 PIM-SM Sender Registration
RP Source (S, G) State created only along the Source Tree. PIM-SM Sender Registration As soon as an active source for group G sends a packet the leaf router that is attached to this source is responsible for “Registering” this source with the RP and requesting the RP to build a tree back to that router. The source router encapsulates the multicast data from the source in a special PIM SM message called the Register message and unicasts that data to the RP. When the RP receives the Register message it does two things It de-encapsulates the multicast data packet inside of the Register message and forwards it down the Shared Tree. The RP also sends an (S,G) Join back towards the source network S to create a branch of an (S, G) Shortest-Path Tree. This results in (S, G) state being created in all the router along the SPT, including the RP. Traffic Flow Shared Tree Source Tree (S, G) Register (unicast) Receiver (S, G) Join

7 PIM-SM Sender Registration
RP Source (S, G) traffic begins arriving at the RP via the Source tree. PIM-SM Sender Registration (cont.) As soon as the SPT is built from the Source router to the RP, multicast traffic begins to flow natively from source S to the RP. Once the RP begins receiving data natively (i.e. down the SPT) from source S it sends a ‘Register Stop’ to the source’s first hop router to inform it that it can stop sending the unicast Register messages. Traffic Flow Shared Tree RP sends a Register-Stop back to the first-hop router to stop the Register process. Source Tree (S, G) Register (unicast) Receiver (S, G) Register-Stop (unicast)

8 PIM-SM Sender Registration
RP Source Source traffic flows natively along SPT to RP. PIM-SM Sender Registration (cont.) At this point, multicast traffic from the source is flowing down the SPT to the RP and from there, down the Shared Tree to the receiver. Traffic Flow Shared Tree From RP, traffic flows down the Shared Tree to Receivers. Source Tree Receiver

9 PIM-SM SPT Switchover RP Source Last-hop router joins the Source Tree.
PIM-SM Shortest-Path Tree Switchover PIM-SM has the capability for last-hop routers (i.e. routers with directly connected members) to switch to the Shortest-Path Tree and bypass the RP if the traffic rate is above a set threshold called the “SPT-Threshold”. The default value of the SPT-Threshold” in Cisco routers is zero. This means that the default behaviour for PIM-SM leaf routers attached to active receivers is to immediately join the SPT to the source as soon as the first packet arrives via the (*,G) shared tree. In the above example, the last-hop router (at the bottom of the drawing) sends an (S, G) Join message toward the source to join the SPT and bypass the RP. This (S, G) Join messages travels hop-by-hop to the first-hop router (i.e. the router connected directly to the source) thereby creating another branch of the SPT. This also creates (S, G) state in all the routers along this branch of the SPT. Traffic Flow Shared Tree Additional (S, G) State is created along new part of the Source Tree. Source Tree (S, G) Join Receiver

10 PIM-SM SPT Switchover RP Source Traffic Flow
PIM-SM Shortest-Path Tree Switchover Once the branch of the Shortest-Path Tree has been built, (S, G) traffic begins flowing to the receiver via this new branch. Next, special (S, G)RP-bit Prune messages are sent up the Shared Tree to prune off the redundant (S,G) traffic that is still flowing down the Shared Tree. If this were not done, (S, G) traffic would continue flowing down the Shared Tree resulting in duplicate (S, G) packets arriving at the receiver. Traffic Flow Traffic begins flowing down the new branch of the Source Tree. Shared Tree Source Tree Additional (S, G) State is created along along the Shared Tree to prune off (S, G) traffic. (S, G)RP-bit Prune Receiver

11 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. PIM-SM Shortest-Path Tree Switchover As the (S, G)RP-bit Prune message travels up the Shared Tree, special (S, G)RP-bit Prune state is created along the Shared Tree that selectively prevents this traffic from flowing down the Shared Tree. At this point, (S, G) traffic is now flowing directly from the first-hop router to the last-hop router and from there to the receiver. Traffic Flow Shared Tree Source Tree Receiver

12 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. PIM-SM Shortest-Path Tree Switchover At this point, the RP no longer needs the flow of (S, G) traffic since all branches of the Shared Tree (in this case there is only one) have pruned off the flow of (S, G) traffic. As a result, the RP will send (S, G) Prunes back toward the source to shutoff the flow of the now unnecessary (S, G) traffic to the RP Note: This will occur IFF the RP has received an (S, G)RP-bit Prune on all interfaces on the Shared Tree. Traffic Flow Shared Tree Source Tree (S, G) Prune Receiver

13 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. PIM-SM Shortest-Path Tree Switchover As a result of the SPT-Switchover, (S, G) traffic is now only flowing from the first-hop router to the last-hop router and from there to the receiver. Notice that traffic is no longer flowing to the RP. As a result of this SPT-Switchover mechanism, it is clear that PIM SM also supports the construction and use of SPT (S,G) trees but in a much more economical fashion than PIM DM in terms of forwarding state. Traffic Flow Shared Tree Source Tree Receiver

14 PIM-SM Protocol Mechanics
PIM SM Forwarding State PIM SM Joining PIM SM Registering PIM SM SPT-Switchover PIM SM Pruning PIM SM Turnaround Router

15 PIM State Describes the “state” of the multicast distribution trees as understood by the router at this point in the network. Represented by entries in the multicast routing (mroute) table Used to make multicast traffic forwarding decisions Composed of (*, G) and (S, G) entries Each entry contains RPF information Incoming (i.e. RPF) interface RPF Neighbor (upstream) Each entry contains an Outgoing Interface List (OIL) OIL may be NULL PIM State In general, Multicast State basically describes the multicast distribution tree as it is understood by the router at this point in the network. However to be completely correct, “Multicast State” describes the multicast traffic “forwarding” state that is used by the router to forward multicast traffic. Multicast Routing (mroute) Table Multicast “state” is stored in the multicast routing (mroute) table and which can be displayed using the show ip mroute command. Entries in the mroute table are composed of (*, G) and (S, G) entries each of which contain: RPF Information consisting of an Incoming (or RPF) interface and the IP address of the RPF (i.e. upstream) neighbor router in the direction of the source. (In the case of PIM-SM, this information in a (*, G) entry points toward the RP. PIM-SM will be discussed in a later module.) Outgoing Interface List (OIL) which contains a list of interfaces that the multicast traffic is to be forwarded. (Multicast traffic must arrive on the Incoming interface before it will be forwarded out this interfaces. If multicast traffic does not arrive on the Incoming interface, it is simply discarded.)

16 PIM-SM State Example sj-mbone> show ip mroute
IP Multicast Routing Table Flags: D - Dense, S - Sparse, C - Connected, L - Local, P - Pruned R - RP-bit set, F - Register flag, T - SPT-bit set, J - Join SPT M - MSDP created entry, X - Proxy Join Timer Running A - Advertised via MSDP Timers: Uptime/Expires Interface state: Interface, Next-Hop or VCD, State/Mode (*, ), 00:13:28/00:02:59, RP , flags: SCJ Incoming interface: Ethernet0, RPF nbr , Outgoing interface list: Ethernet1, Forward/Sparse, 00:13:28/00:02:32 Serial0, Forward/Sparse, 00:4:52/00:02:08 ( /32, ), 00:01:43/00:02:59, flags: CJT Incoming interface: Serial0, RPF nbr Ethernet1, Forward/Sparse, 00:01:43/00:02:11 Ethernet0, forward/Sparse, 00:01:43/00:02:11

17 PIM-SM (*,G) State Rules
(*,G) creation Upon receipt of a (*,G) Join or Automatically if (S,G) must be created (*,G) reflects default group forwarding IIF = RPF interface toward RP OIL = interfaces that received a (*,G) Join or with directly connected hosts or manually configured (*,G) deletion When OIL = NULL and no child (S,G) state exists

18 PIM-SM (S,G) State Rules
(S,G) creation By receipt of (S,G) Join or Prune or By “Register” process Parent (*,G) created (if doesn’t exist) (S,G) reflects forwarding of “S” to “G” IIF = RPF Interface normally toward source RPF toward RP if “RP-bit” set OIL = Initially, copy of (*,G) OIL minus IIF (S,G) deletion By normal (S,G) entry timeout

19 PIM-SM OIF Rules Interfaces in OIF list added
By receipt of Join message Interface added to (*,G) are added to all (S,G)’s Interfaces in OIF list removed By receipt of Prune message Interface removed from (*,G) are removed from all (S,G)’s Interface Expire timer counts down to zero Timer reset (to 3 min.) by receipt of periodic Join or By IGMP membership report

20 PIM Interface Lists Incoming Interface -- IIF
The interface a unicast packet would be sent to the source through. RPF Outgoing Interface -- OIF Kept alive by PIM JOIN/PRUNE messages Outgoing Interface List -- OIL Olist OIF List JOIN -- receiver is interested in data PRUNE -- receiver no longer wants data

21 New PIM Concept Immediate OIF: receipt of an (S,G) JOIN message
Ignore (S,G,RP-bit) Prune messages Inherited OIF: receipt of a (*,G) JOIN when (S,G) STATE already exists Process (S,G,RP-bit) Prune messages

22 PIM-SM State Flags S = Sparse Mode C = Directly Connected Host
L = Local (Router is member) P = Pruned (OIF list = NULL) T = Forwarding via SPT Indicates at least one packet was forwarded on the SPT X = Proxy Join Turnaround router

23 PIM-SM State Flags J = Join SPT F = Register In (*, G) entry
Indicates SPT-Threshold is being exceeded Next (S,G) received will trigger join of SPT In (S, G) entry Indicates SPT joined due to SPT-Threshold If rate < SPT-Threshold, switch back to Shared Tree F = Register In (S,G) entry Indicates the router is a first-hop router and there is a directly connected source or proxy registers are being sent. Set when “F” set in at least one child (S,G)

24 PIM-SM State Flags R = RP bit (S, G) entries only
Set by (S,G)RP-bit PRUNE message Used to prune (S,G) traffic from Shared Tree Initiated by Last-hop router after switch to SPT Modifies (S,G) forwarding behavior IIF = RPF toward RP (I.e. up the Shared Tree) OIL = Pruned accordingly

25 PIM-SM State Flags X = Proxy Join Timer flag
Indicates an intersection between the X-line and the shared tree. Some receiver wants to stay on the shared-tree (S, G) entries only Indicates Proxy Join Timer is running Used to handle turn-around router case When Proxy Join Timer is running Turn-around router initiates sending (S, G) Joins toward the source The sending of (S, G) Prunes are suppressed Even if the OIL list is NULL

26 PIM-SM State Flags M = MSDP Created bit A = MSDP Advertise bit
(S, G) entries only Set when (S, G) learned via an MSDP SA msg A = MSDP Advertise bit (S, G) may be advertised in an MSDP SA msg Presence of certain filters can affect this. Indicates source is in local SM domain Received a PIM (S,G) Register or Source is directly connected

27 PIM-SM State Flags s = Source Specific Multicast
Last hop router IGMPv3 Report URD v3-lite 232/8 range by default Can be modified by network manager Once SSM is initiated by the last-hop router it behaves exactly like PIM-SM shortest-path

28 PIM-SM State Flags Bi-Dir Flags

29 PIM-SM Forwarding Rules
Use longest match entry Use (S, G) entry if exists Otherwise, use (*, G) entry RPF check first If Packet didn’t arrive via IIF, drop it. Forward Packet (if RPF succeeded) Send out all “unpruned” interfaces in OIL Only “unpruned” interfaces will be in the OIL

30 PIM-SM Protocol Mechanics
PIM SM Forwarding State PIM SM Joining PIM SM Registering PIM SM SPT-Switchover PIM SM Pruning PIM SM Turnaround Router

31 PIM SM Joining rtr-a rtr-b
To RP ( ) S0 rtr-a E0 Shared Tree E0 E1 rtr-b IGMP Join 1 Rcvr A PIM SM Joining Example 1) Receiver “A” wishes to receive group “G” multicast traffic and therefore sends an IGMP Host Membership message (sometimes loosely referred to as an IGMP Join) which is received by “rtr-b”. “rtr-b” has no existing (*, G) state for group “G” and therefore creates an entry. (See next slide.) “Rcvr A” wishes to receive group traffic. Sends IGMP Report for G. 1

32 “rtr-b” creates (*, 224.1.1.1) state
PIM SM Joining S1 To RP ( ) S0 rtr-a E0 Shared Tree E0 E1 rtr-b (*, ), 00:00:05/00:02:54, RP , flags: SC Incoming interface: Ethernet0, RPF nbr Outgoing interface list: Ethernet1, Forward/Sparse, 00:00:05/00:02:54 “rtr-b” creates (*, ) state Rcvr A State in “rtr-b” after Joining (*, ) (*, ) indicates the (*, G) entry. 00:00:05/00:02:54 indicates that the entry has existed for 5 seconds and will expire in 2 minutes and 54 seconds. RP is the IP Address of the Rendezvous Point for Group flags: SC indicates that this is a Sparse mode group (S) and that there is a member of this group directly connected (C) to the router. Incoming interface: Ethernet0, RPF nbr indicates the Incoming interface (up the Shared Tree toward RP) and the RPF neighbor’s IP address (in the direction of the RP) is Outgoing interface list: lists the interfaces that are in the outgoing interface list for this entry. Ethernet1, Forward/Sparse, 00:00:05/00:02:54 indicates Ethernet 1 is in the oilist; it’s in the “Forward” state; Sparse mode and that it has been in the list for 5 seconds and will expire in 2 minutes and 54 seconds if no further (*, G) Join or IGMP Report is received on this interface. Ethernet1, Forward/Sparse, 00:00:05/00:02:54

33 PIM SM Joining rtr-a rtr-b
To RP ( ) S0 rtr-a E0 PIM Join 2 Shared Tree E0 E1 rtr-b Rcvr A PIM SM Joining Example 2) Because the OIL of the (*, G) transitioned from Null to non-Null (when “rtr-b” added Ethernet 1 to the OIL of the newly created entry), a PIM (*, G) Join is sent to rtr-b’s up-stream PIM neighbor (rtr-a) in the direction of the RP. When “rtr-a” receives the (*, G) Join it creates (*, G) state. (See next slide.) “Rcvr A” wishes to receive group traffic. Sends IGMP Report for G. 1 “rtr-b” triggers (*,G) Join toward the RP. 2

34 “rtr-a” creates (*, 224.1.1.1) state.
PIM SM Joining S1 To RP ( ) (*, ), 00:00:05/00:02:54, RP , flags: S Incoming interface: Serial0, RPF nbr Outgoing interface list: Ethernet0, Forward/Sparse, 00:00:05/00:02:54 “rtr-a” creates (*, ) state. S0 rtr-a E0 Shared Tree E0 E1 rtr-b Rcvr A State in “rtr-a” after Joining (*, ) (*, ) indicates the (*, G) entry. 00:00:05/00:02:54 indicates that the entry has existed for 5 seconds and will expire in 2 minutes and 54 seconds. RP is the IP Address of the Rendezvous Point for Group flags: S indicates that this is a Sparse mode group (S). Incoming interface: Serial0, RPF nbr indicates the Incoming interface (up the Shared Tree toward RP) and the RPF neighbor’s IP address (in the direction of the RP) is Outgoing interface list: lists the interfaces that are in the outgoing interface list for this entry. Ethernet0, Forward/Sparse, 00:00:05/00:02:54 indicates Ethernet 0 is in the oilist; it’s in the “Forward” state; Sparse mode and that it has been in the list for 5 seconds and will expire in 2 minutes and 54 seconds if no further (*, G) Join or IGMP Report is received on this interface. Ethernet0, Forward/Sparse, 00:00:05/00:02:54

35 PIM SM Joining rtr-a rtr-b
Shared Tree 4 S1 To RP ( ) PIM Join 3 S0 rtr-a E0 Shared Tree E0 E1 rtr-b Rcvr A PIM SM Joining Example 3) Because the OIL of the (*, G) transitioned from Null to non-Null (when “rtr-a” added Ethernet 0 to the OIL of the newly created entry), a PIM (*, G) Join is sent to rtr-a’s up-stream PIM neighbor in the direction of the RP. When the upstream router receives the (*, G) Join it too creates (*, G) state and creates a branch of the Shared Tree. 4) This process continues all the way back to the RP (or until a router is reached that is already on the Shared Tree and therefore already has a (*, G) entry.) “Rcvr A” wishes to receive group traffic. Sends IGMP Report for G. 1 “rtr-b” triggers (*,G) Join toward the RP. 2 “rtr-a” triggers (*,G) Join toward the RP. 3 Shared tree is built all the way back to the RP. 4

36 PIM-SM Protocol Mechanics
PIM SM Forwarding State PIM SM Joining PIM SM Registering PIM SM SPT-Switchover PIM SM Pruning PIM SM Turnaround Router

37 PIM SM Registering State in “RP” before any source registers
(*, ), 00:00:03/00:02:56, RP , flags:S Incoming interface: Null, RPF nbr , Outgoing interface list: Serial0, Forward/Sparse, 00:03:14/00:02:59 Serial1, Forward/Sparse, 00:03:14/00:02:59 State in “RP” before any source registers (with receivers on Shared Tree) E0 S0 S3 S0 S1 S0 S1 rtr-c rtr-a rtr-b Shared Tree State in RP before Registering (Rcvr’s on Shared Tree) Pay particular attention to the following in the (*, G) entry: The “Incoming interface:” is NULL and the “RPF nbr” is This indicates that this router is the RP. The “Outgoing interface list:” contains Serial0 and Serial1 which are assumed to be the only two active branches of the Shared Tree (RPT).

38 PIM SM Registering State in “rtr-b” before any source registers
RP E0 S0 S3 S0 S1 S0 S1 rtr-c rtr-a rtr-b Shared Tree rtr-b>sh ip mroute <No such group> State in “rtr-b” before source registers Note that there is no group state information for this Group yet. State in “rtr-b” before any source registers (with receivers on Shared Tree)

39 PIM SM Registering State in “rtr-a” before any source registers
RP rtr-a>sh ip mroute <No such group> State in “rtr-a” before any source registers (with receivers on Shared Tree) E0 S0 S3 S0 S1 S0 S1 rtr-c rtr-a rtr-b Shared Tree State in 1st-hop router (rtr-a) before source registers Note that there is no group state information for this Group yet.

40 PIM SM Registering “Source” begins sending group G traffic. 1 1
( , ) Mcast Packets 1 RP Source E0 S0 S3 S0 S1 S0 S1 rtr-c rtr-a rtr-b Shared Tree Receivers Join Group First Example 1) Source “S” begins sending traffic to group “G”. 2) 1st-hop router (“rtr-a”) creates (*, G) and (S, G) state; encapsulates the multicast packets in PIM Register message(s) and unicasts it(them) to the RP. 3) The RP (“rtr-c”) de-encapsulates the packets and sees that the packet is for group “G” for which it already has (*, G) state. It then forwards the packets down the Shared Tree. “Source” begins sending group G traffic. 1

41 “rtr-a” creates (S, G) state for source
PIM SM Registering 2 ( , ) Mcast Packets Register Msgs RP Source (*, ), 00:00:03/00:02:56, RP , flags: SP Incoming interface: Serial0, RPF nbr , Outgoing interface list: Null ( /32, ), 00:00:03/00:02:56, flags: FPT Incoming interface: Ethernet0, RPF nbr , E0 S0 S3 S0 S1 S0 S1 rtr-c rtr-a rtr-b Shared Tree 1st-hop router (rtr-a) creates (S, G) state A (*, G) entry must be created before the (S, G) entry can be created. Note that: The RPF information for this entry points up the Shared Tree via Serial0 with the RPF neighbor of (Serial 0 of “rtr-b”.) Because in this example no members have joined the group (the sender is only sending), the OIL of the (*, G) entry is Null. The “P” flag (Pruned) is set since the OIL is Null. The (S, G) entry is then created. Pay particular attention to the following: The RPF information for this entry points towards the source via Ethernet0. The RPF neighbor is because the source is directly connected. The (S, G) OIL receives a copy of the (*, G) OIL. (Which is Null.) The “F” flags are set in the (S, G) entry which indicates that this is a directly connected Source. The “Registering” flag is set in the (S, G) entry which indicates that we are still sending Register messages to the RP for this Source. 2) The 1st-hop router encapsulates the multicast packets in PIM Register message(s) and unicasts them to the RP. FPT Registering “rtr-a” creates (S, G) state for source “Source” begins sending group G traffic. 1 “rtr-a” encapsulates packet in Register; unicasts to RP. 2

42 “RP” processes Register; creates (S, G) state
PIM SM Registering ( , ) Mcast Packets Register Msgs RP “RP” processes Register; creates (S, G) state (*, ), 00:09:21/00:02:38, RP , flags: S Incoming interface: Null, RPF nbr , Outgoing interface list: Serial0, Forward/Sparse, 00:09:21/00:02:38 Serial1, Forward/Sparse, 00:03:14/00:02:46 ( , , 00:01:15/00:02:46, flags: Incoming interface: Serial3, RPF nbr , Serial0, Forward/Sparse, 00:00:49/00:02:11 Serial1, Forward/Sparse, 00:00:49/00:02:11 Source E0 S0 S3 S0 S1 S0 S1 rtr-c rtr-a rtr-b 3 (*, ) Mcast Traffic Shared Tree The RP creates (S, G) state As a result of the Register message that was received from “rtr-a”, the RP creates (S, G) state as follows: The RPF information is calculated using the source address contained in the multicast packet encapsulated inside of the register message. This results in an IIF of Serial3 and an RPF neighbor of Next, the OIL of the parent (*, G) entry is copied into the OIL of the new (S,G) entry. (An additional check is made to insure that the IIF does not appear in the OIL. If it does, it is removed to prevent a route loop.) Now the router is ready to forward the (S, G) packet that was encapsulated in the Register message using the newly created (S, G) state. (Note that traffic is always forwarded using the matching (S, G) entry if one exists. Otherwise, the (*, G) entry is used.) This is accomplished as follows: Because this packet was received inside of a Register message, the RPF check is skipped. Next, the router forwards a copy of the packet out all interfaces in the (S, G) OIL. In this case a copy is sent out Serial0 and Serial1 which corresponds to the two branches of the Shared Tree. The “T” flag is not yet set in the (S, G) entry. However, when the first (S, G) packet is received natively (via the Incoming interface) and forwarded using this entry, the “T” flag will be set. “rtr-c” (RP) de-encapsulates packets; forwards down Shared tree. 3

43 PIM SM Registering RP triggers (S,G) Join toward Source 4 4
( , ) Mcast Packets Register Msgs Join S0 4 RP Source E0 S0 S0 S1 S0 S1 rtr-a rtr-c rtr-b Shared Tree Receivers Join Group First Example (cont.) 4) Because RP has existing (*, G) state (I.e. Receivers already waiting on the Shared Tree), it sends an (S, G) Join toward source “S” to build a Shortest-Path Tree (SPT) from source “S” to the RP. RP triggers (S,G) Join toward Source 4

44 “rtr-b” processes Join, creates (S, G) state
PIM SM Registering ( , ) Mcast Packets Register Msgs Join S0 5 RP Source (*, ), 00:04:28/00:01:32, RP , flags: SP Incoming interface: Serial1, RPF nbr , Outgoing interface list: Null ( /32, ), 00:04:28/00:01:32, flags: Incoming interface: Serial0, RPF nbr Outgoing interface list: Serial1, Forward/Sparse, 00:04:28/00:01:32 E0 S0 S0 S1 S0 S1 rtr-c rtr-a rtr-b Shared Tree “rtr-b” processes the (S, G) Join and creates state A (*, G) entry must be created before the (S, G) entry can be created. Note that: The RPF information for the (*, G) entry points up the Shared Tree via Serial1 with the RPF neighbor of (Serial 3 of the RP.) Because in this example no members have joined the group, the OIL of the (*, G) entry is Null. The “P” flag (Pruned) is set since the OIL is Null. The (S, G) entry is then created. Pay particular attention to the following: The RPF information for this entry points towards the source via Serial0. The RPF neighbor is (Serial 0 of “rtr-a”.) The (S, G) OIL initially receives a copy of the (*, G) OIL. (Which is Null.) Interface Serial1 (which is the interface that received the (S, G) Join) is added to the (S, G) OIL. The “T” flag is not yet set in the (S, G) entry. However, when the first (S, G) packet is forwarded using this entry, the flag will be “T” set. 5) Because the OIL of the (S, G) transitioned from Null to non-Null (when “rtr-b” added Serial1 to the OIL of the newly created entry), a PIM (S, G) Join is sent to rtr-a’s to continue the process of joining the SPT. “rtr-b” processes Join, creates (S, G) state RP triggers (S,G) Join toward Source 4 “rtr-b” triggers (S,G) Join toward Source 5

45 “rtr-a” processes the (S, G) Join; adds Serial0 to OIL
PIM SM Registering ( , ) Mcast Packets Register Msgs RP (*, ), 00:04:28/00:01:32, RP , flags: SP Incoming interface: Serial0, RPF nbr , Outgoing interface list: Null ( /32, ), 00:04:28/00:01:32, flags: FT Incoming interface: Ethernet0, RPF nbr , Registering Outgoing interface list: Source E0 S0 S0 S1 S0 S1 rtr-c rtr-a rtr-b Shared Tree “rtr-a” processes the (S, G) Join Because an (S, G) entry already existed, “rtr-a” simply added the interface on which it received the (S, G) join to the OIL. This results in the following: Serial0 is now listed in the “Outgoing interface list” (OIL) since the RP joined the SPT via this interface. The “P” flag (Pruned) is cleared since the OIL is no longer Null. Serial0, Forward/Sparse, 00:04:28/00:01:32 “rtr-a” processes the (S, G) Join; adds Serial0 to OIL

46 PIM SM Registering RP begins receiving (S,G) traffic natively
( , ) Mcast Packets Register Msgs 6 RP Source E0 S0 S0 S1 Register-Stop 7 S0 S1 rtr-c rtr-a rtr-b Shared Tree RP begins receiving (S,G) traffic natively 6 A branch of the (S,G) SPT has been built to the RP. 6) Now that the SPT has been built from source “S” to the RP, traffic begins flowing down the Shortest-Path Tree (SPT). At this point, the RP is receiving the (S, G) traffic “natively” down the SPT. (This causes the “T” flags to be set in the (S, G) entries along this path including in the RP.) 7) The RP then sends an (S, G) “Register-Stop” to the 1st-hop router to inform it that the encapsulated group “G” Register messages from source “S” are no longer necessary. RP unicasts “Register-Stop” to “rtr-a”. 7

47 “rtr-a” stops sending Register messages
PIM SM Registering ( , ) Mcast Packets 8 RP (*, ), 00:04:28/00:01:32, RP , flags: SP Incoming interface: Serial0, RPF nbr , Outgoing interface list: Null ( /32, ), 00:04:28/00:01:32, flags: FT Incoming interface: Ethernet0, RPF nbr , Registering Outgoing interface list: Serial0, Forward/Sparse, 00:04:28/00:01:32 Source E0 S0 S3 S0 S1 S0 S1 rtr-c rtr-a rtr-b Shared Tree “rtr-a” stops sending Register messages When the 1st-hop router (rtr-a) receives the (S, G) Register-Stop message it ceases sending encapsulated Register messages for (S, G) traffic. Notice that the “Registering” flag on the second line of the (S, G) entry is no longer being displayed indicating that “rtr-a” is not sending Registers. This is the final state in “rtr-a” after the Registration process. 8) (S, G) traffic is now only flowing down the Shortest-Path Tree (SPT). “rtr-a” stops sending Register messages (S,G) Traffic now flowing down a single path (SPT) to RP. 8

48 PIM SM Registering (171.68.37.121, 224.1.1.1) Mcast Packets RP
Source (*, ), 00:04:28/00:01:32, RP , flags: SP Incoming interface: Serial1, RPF nbr , Outgoing interface list: Null ( /32, ), 00:04:28/00:01:32, flags: T Incoming interface: Serial0, RPF nbr Outgoing interface list: Serial1, Forward/Sparse, 00:04:28/00:01:32 E0 S0 S0 S1 S0 S1 rtr-c rtr-a rtr-b Shared Tree Final state in “rtr-b” after the Registration process Pay particular attention to the following in the (S, G) entry: The “T” flag is now set indicating that (S, G) traffic is flowing along this path. The (*, G) entry still has a Null OIL and the “P” flag is still set. This is because there are no members that have joined the Shared Tree.

49 PIM SM Registering (171.68.37.121, 224.1.1.1) Mcast Packets
RP Source E0 S0 S3 S0 S1 S0 S1 rtr-c rtr-a rtr-b Shared Tree (*, ), 00:09:21/00:02:38, RP , flags: S Incoming interface: Null, RPF nbr , Outgoing interface list: Serial0, Forward/Sparse, 00:09:21/00:02:38 Serial1, Forward/Sparse, 00:03:14/00:02:46 ( , , 00:01:15/00:02:46, flags: T Incoming interface: Serial3, RPF nbr , Serial0, Forward/Sparse, 00:00:49/00:02:11 Serial1, Forward/Sparse, 00:00:49/00:02:11 Final state in the RP after the Registration process Pay particular attention to the following in the newly created (S, G) entry: The “T” flag is now set indicating that (S, G) traffic is flowing along this path.

50 Register Msgs (data-header)
PIM SM Re-Registering ( , ) Mcast Packets Register Msgs (data-header) RP (*, ), 00:04:28/00:01:32, RP , flags: SP Incoming interface: Serial0, RPF nbr , Outgoing interface list: Null ( /32, ), 00:04:28/00:01:32, flags: FT Incoming interface: Ethernet0, RPF nbr , Outgoing interface list: Serial0, Forward/Sparse, 00:04:28/00:01:32 Source E0 S0 S0 S1 S0 S1 rtr-c rtr-a rtr-b Shared Tree “rtr-a” processes the (S, G) Join Because an (S, G) entry already existed, “rtr-a” simply added the interface on which it received the (S, G) join to the OIL. This results in the following: Serial0 is now listed in the “Outgoing interface list” (OIL) since the RP joined the SPT via this interface. The “P” flag (Pruned) is cleared since the OIL is no longer Null. Registering (data-header) “rtr-a” re-registers the source to maintain state on the RP

51 Register Msgs (data-header)
PIM SM Re-Registering ( , ) Mcast Packets Register Msgs (data-header) RP Source E0 S0 S0 S1 S0 S1 rtr-c rtr-a rtr-b Shared Tree RP updates (S,G) expire time RP updates the “A” flag for MSDP RP sends “Register-Stop” to “rtr-a” A branch of the (S,G) SPT has been built to the RP. 6) Now that the SPT has been built from source “S” to the RP, traffic begins flowing down the Shortest-Path Tree (SPT). At this point, the RP is receiving the (S, G) traffic “natively” down the SPT. (This causes the “T” flags to be set in the (S, G) entries along this path including in the RP.) 7) The RP then sends an (S, G) “Register-Stop” to the 1st-hop router to inform it that the encapsulated group “G” Register messages from source “S” are no longer necessary.

52 PIM-SM Protocol Mechanics
PIM SM Forwarding State PIM SM Joining PIM SM Registering PIM SM SPT-Switchover PIM SM Pruning PIM SM Turnaround Router

53 PIM SM SPT-Switchover By default routers always switch to the shortest path SPT Thresholds may be set for any Group Access Lists may be used to specify which Groups Threshold = “infinity” means “never join SPT” Joining the shortest-path Reduces Network Latency More (S,G) state must be stored in the routers Old images allowed data rates other than “0” or “infinity” -- This does not work well SPT Thresholds In PIM Sparse mode, SPT Thresholds may be configured to control when to switch to the Shortest-Path Tree (SPT). SPT Thresholds are specified in Kbps and can be used with Access List to specify to which Group(s) the Threshold applies. The default SPT-Threshold is 0Kbps. This means that any and all sources are immediately switched to the Shortest-Path Tree. If an SPT-Threshold of “Infinity” is specified for a group, the sources will not be switched to the Shortest-Path Tree (SPT) and will remain on the Shared Tree. Exceeding the Threshold When the Group’s SPT-Threshold is exceed in a last-hop router, the next received packet for the group will cause an (S, G) Join to be sent toward the source of the packet. This builds a Shortest-Path Tree from the source “S” to the last-hop router. PROS By switching to the Shortest-Path Tree (SPT), the most optimal (usually) path is used to deliver the multicast traffic. Depending on the location of the source in relation to the RP, this switch to the SPT can reduce network latency substantially. CONS In networks with large numbers of senders (remember most multicast applications such as IP/TV Client, send RTCP multicast packets in the background and are therefore senders), an increased amount of state must be kept in the routers. In some cases, an Infinity threshold may be used to force certain groups to remain on the Shared Tree when latency is not an issue.

54 PIM SM SPT-Switchover In the following slides:
Router B will do the default behavior of joining to the shortest-path Router D is configured with an spt-threshold of infinity and so remains on the shared-tree Router C now has to determine whether or not to remain on the shared-tree join to the shortest-path become a ‘turn-around’ router In this topology, Router C remains on the shared-tree. SPT Thresholds In PIM Sparse mode, SPT Thresholds may be configured to control when to switch to the Shortest-Path Tree (SPT). SPT Thresholds are specified in Kbps and can be used with Access List to specify to which Group(s) the Threshold applies. The default SPT-Threshold is 0Kbps. This means that any and all sources are immediately switched to the Shortest-Path Tree. If an SPT-Threshold of “Infinity” is specified for a group, the sources will not be switched to the Shortest-Path Tree (SPT) and will remain on the Shared Tree. Exceeding the Threshold When the Group’s SPT-Threshold is exceed in a last-hop router, the next received packet for the group will cause an (S, G) Join to be sent toward the source of the packet. This builds a Shortest-Path Tree from the source “S” to the last-hop router. PROS By switching to the Shortest-Path Tree (SPT), the most optimal (usually) path is used to deliver the multicast traffic. Depending on the location of the source in relation to the RP, this switch to the SPT can reduce network latency substantially. CONS In networks with large numbers of senders (remember most multicast applications such as IP/TV Client, send RTCP multicast packets in the background and are therefore senders), an increased amount of state must be kept in the routers. In some cases, an Infinity threshold may be used to force certain groups to remain on the Shared Tree when latency is not an issue.

55 State in “rtr-c” before switch
PIM SM SPT-Switchover rtr-c To RP ( ) rtr-a To Source “Si” S0 State in “rtr-c” before switch (*, ), 00:01:43/00:02:13, RP , flags: S Incoming interface: Serial0, RPF nbr , Outgoing interface list: Serial1, Forward/Sparse, 00:01:43/00:02:11 Serial2, Forward/Sparse, 00:00:32/00:02:28 S1 S1 S2 S0 E0 S0 rtr-d E0 (Si, G) Traffic Flow Shared (RPT) Tree SPT Tree E1 rtr-b E0 Rcvr A Rcvr B PIM-SM SPT-Switchover Example Receivers A & B have joined multicast group which has resulted in traffic flowing down the Shared Tree as shown by the solid arrows. The state is “rtr-c” prior to the switchover is as follows: The IIF of the (*, G) entry points toward the RP via Serial0. The OIL of the (*, G) entry contains Serial1 and Serial2 as a result of (*, G) Joins that were sent up the Shared Tree by “rtr-a” and “rtr-d”, respectively.

56 State in “rtr-d” before switch
PIM SM SPT-Switchover rtr-c To RP ( ) rtr-a To Source “Si” S0 S1 S1 S2 S0 E0 S0 rtr-d State in “rtr-d” before switch (*, ), 00:01:43/00:02:13, RP , flags: SC Incoming interface: Serial0, RPF nbr , Outgoing interface list: Ethernet0, Forward/Sparse, 00:01:43/00:02:11 E0 (Si, G) Traffic Flow Shared (RPT) Tree SPT Tree E1 rtr-b E0 Rcvr A Rcvr B PIM-SM SPT-Switchover Example The state is “rtr-d” prior to the switchover is as follows: The IIF of the (*, G) entry points toward the RP via Serial0. The OIL of the (*, G) entry contains Ethernet0 as a result of the IGMP Reports for group that are sent by Receiver “B”.

57 State in “rtr-a” before switch
PIM SM SPT-Switchover rtr-c To RP ( ) rtr-a To Source “Si” S0 S1 S1 (*, ), 00:01:43/00:02:13, RP , flags: S Incoming interface: Serial0, RPF nbr , Outgoing interface list: Ethernet0, Forward/Sparse, 00:01:43/00:02:11 State in “rtr-a” before switch S2 S0 E0 S0 rtr-d E0 (Si, G) Traffic Flow Shared (RPT) Tree SPT Tree E1 rtr-b E0 Rcvr A Rcvr B PIM-SM SPT-Switchover Example The state is “rtr-a” prior to the switchover is as follows: The IIF of the (*, G) entry points toward the RP via Serial0. The OIL of the (*, G) entry contains Ethernet0 as a result of (*, G) Joins that were sent up the Shared Tree by “rtr-b”.

58 State in “rtr-b” before switch
PIM SM SPT-Switchover rtr-c To RP ( ) rtr-a To Source “Si” S0 S1 S1 S2 S0 E0 S0 rtr-d E0 (Si, G) Traffic Flow Shared (RPT) Tree SPT Tree E1 rtr-b E0 State in “rtr-b” before switch (*, ), 00:01:43/00:02:13, RP , flags: SC Incoming interface: Ethernet0, RPF nbr , Outgoing interface list: Ethernet1, Forward/Sparse, 00:01:43/00:02:11 Rcvr A Rcvr B PIM-SM SPT-Switchover Example The state is “rtr-b” prior to the switchover is as follows: The IIF of the (*, G) entry points toward the RP via Ethernet0. The OIL of the (*, G) entry contains Ethernet1 as a result of the IGMP Reports for group that are sent by Receiver “A”.

59 PIM SM SPT-Switchover rtr-c rtr-a rtr-d rtr-b
To RP ( ) rtr-a To Source “Si” S0 S1 S1 S2 S0 E0 S0 Group “G” rate > Threshold 1 rtr-d E0 (Si, G) Traffic Flow Shared (RPT) Tree SPT Tree E1 rtr-b E0 (*, ), 00:01:43/00:02:13, RP , flags: SC Incoming interface: Ethernet0, RPF nbr , Outgoing interface list: Ethernet1, Forward/Sparse, 00:01:43/00:02:11 Rcvr A Rcvr B PIM-SM SPT-Switchover Example Step 1: The total amount of all traffic flowing down the Shared Tree begins to exceed the SPT-Threshold configured at “rtr-b”. Step 2: As a result, “rtr-b” sets the “J” flag in the (*, G) entry to denote that the rate is above the SPT-Threshold for this group. 2 J Group “G” rate exceeds SPT Threshold at “rtr-b”; 1 Set J Flag in (*, G) and wait for next (Si,G) packet. 2

60 PIM SM SPT-Switchover rtr-c rtr-a rtr-d rtr-b
To RP ( ) rtr-a To Source “Si” S0 S1 S1 S2 S0 E0 S0 rtr-d 3 E0 (Si, G) Traffic Flow Shared (RPT) Tree SPT Tree E1 rtr-b E0 (*, ), 00:01:43/00:02:13, RP , flags: SC Incoming interface: Ethernet0, RPF nbr , Outgoing interface list: Ethernet1, Forward/Sparse, 00:01:43/00:02:11 Rcvr A Rcvr B PIM-SM SPT-Switchover Example Step 3: The very next packet to arrive via the Shared Tree happens to be from source (Si, G). Because there is a member directly connected to this router (denoted by the “C” flag) and the traffic rate is above the SPT-Threshold (denoted by the “J” flag), “rtr-b” initiates a switch to the SPT for (Si, G) traffic. Step 4: The “J” flag in the (*, G) entry is first cleared and an new traffic rate measurement interval (1 second) is started. Next, (Si, G) state is created for source “Si” sending to group “G”. 4 J (Si,G) packet arrives down Shared tree. 3 Clear J Flag in the (*,G) & create (Si,G) state. 4

61 J Flag indicates (S, G) created by exceeding the SPT-threshold
PIM SM SPT-Switchover rtr-c To RP ( ) rtr-a To Source “Si” S0 S1 S1 S2 S0 E0 S0 rtr-d E0 (Si, G) Traffic Flow Shared (RPT) Tree SPT Tree E1 rtr-b New State in “rtr-b” (*, ), 00:01:43/00:02:13, RP , flags: SC Incoming interface: Ethernet0, RPF nbr , Outgoing interface list: Ethernet1, Forward/Sparse, 00:01:43/00:02:11 ( /32, ), 00:13:28/00:02:53, flags: CJT Incoming interface: Ethernet0, RPF nbr Ethernet1, Forward/Sparse, 00:13:28/00:02:53 E0 Rcvr A Rcvr B PIM-SM SPT-Switchover Example The ( /32, ) entry shown above is created as follows: To denote that this entry was created as a result of the SPT Switchover mechanism, the “J” flag is set on the (S, G) entry. (The “J” flag being set will cause “rtr-b” to monitor the rate of the (S, G) traffic and if the rate of this traffic drops below the SPT Threshold for over one minute, “rtr-b” will attempt to switch this traffic flow back to the Shared Tree.) The RPF information is calculated in the direction of source “Si”. This results in an Incoming interface of Ethernet0, and an RPF neighbor address of “ ”. (Note: That the RPF information for the (S, G) entry is the same as the (*, G) entry. This indicates that the Shared Tree and the SPT are following the same path at this point.) The OIL for the (S, G) entry is constructed by copying the OIL from the (*, G) entry and then removing the IIF from this list to prevent a possible route loop. This results in an (S, G) OIL containing only Ethernet1. J Flag indicates (S, G) created by exceeding the SPT-threshold CJT

62 PIM SM SPT-Switchover rtr-c rtr-a rtr-d rtr-b
To RP ( ) rtr-a To Source “Si” S0 S1 S1 S2 S0 E0 S0 (Si,G) Join 5 rtr-d E0 (Si, G) Traffic Flow Shared (RPT) Tree SPT Tree E1 rtr-b E0 Rcvr A Rcvr B PIM-SM SPT-Switchover Example Step 5: Once state has been created for (Si, G), an (S, G) Join is sent toward source “Si” to build a branch of the SPT to “rtr-b”. These (Si, G) Joins will continue to be sent periodically (once a minute) as long as the (Si, G) entry is not Pruned (i.e. does not have a Null OIL). 5 Send (Si,G) Join towards Si .

63 PIM SM SPT-Switchover rtr-c rtr-a rtr-d rtr-b
To RP ( ) rtr-a To Source “Si” S0 S1 S1 S2 S0 6 (Si,G) Join E0 S0 rtr-d E0 (Si, G) Traffic Flow Shared (RPT) Tree SPT Tree E1 rtr-b E0 Rcvr A Rcvr B PIM-SM SPT-Switchover Example Step 6: When the (Si, G) state is created at “rtr-a”, an (Si, G) Join is sent toward source “Si”. These (Si, G) Joins will continue to be sent periodically (once a minute) as long as the (Si, G) entry is not Pruned (i.e. does not have a Null OIL). Step 7: Because the paths of the Shared Tree and the SPT diverge at “rtr-a”, (note the difference in RPF information on the previous page), this causes “rtr-a” to begin sending (Si, G)RP-bit Prune messages up the Shared Tree to stop the flow of redundant (Si, G) traffic down the Shared Tree. “rtr-a” forwards (Si,G) Join toward Si. 6

64 PIM SM SPT-Switchover rtr-c rtr-a rtr-d rtr-b To RP (10.1.5.1)
rtr-a To Source “Si” S0 S1 S1 S2 S0 E0 S0 rtr-d E0 (Si, G) Traffic Flow Shared (RPT) Tree SPT Tree E1 rtr-b E0 Rcvr A Rcvr B PIM-SM SPT-Switchover Example When the (Si, G) Join is received by “rtr-a”, the ( /32, ) entry shown above is created as follows: The RPF information is calculated in the direction of source “Si”. This results in an Incoming interface of Serial1, and an RPF neighbor address of “ ”. (Note: That the RPF information for the (S, G) entry is not the same as the (*, G) entry. This indicates that the paths of the Shared Tree and the SPT diverge at this point.) The OIL for the (S, G) entry is constructed by copying the OIL from the (*, G) entry and then removing the IIF from this list to prevent a possible route loop. This results in an (S, G) OIL containing only Ethernet0. (*, ), 00:01:43/00:02:13, RP , flags: S Incoming interface: Serial0, RPF nbr , Outgoing interface list: Ethernet0, Forward/Sparse, 00:01:43/00:02:11 ( /32, ), 00:13:28/00:02:53, flags: Incoming interface: Serial1, RPF nbr Ethernet0, Forward/Sparse, 00:13:25/00:02:30

65 PIM SM SPT-Switchover rtr-c rtr-a rtr-d rtr-b
To RP ( ) rtr-a To Source “Si” S0 S1 S1 S2 (Si,G) Traffic 7 S0 E0 S0 rtr-d E0 (Si, G) Traffic Flow Shared (RPT) Tree SPT Tree E1 rtr-b E0 Rcvr A Rcvr B PIM-SM SPT-Switchover Example Step 8: When the (Si, G) Joins reach the first-hop router directly connected to source “Si”, a complete branch of the SPT has been built (shown by the dashed arrows). This permits (Si, G) traffic to flow via the SPT to “rtr-b” and receiver “A”. (Si, G) traffic begins flowing down SPT tree. 7

66 T-Bit is set when traffic arrives on S1
PIM SM SPT-Switchover rtr-c To RP ( ) rtr-a To Source “Si” S0 S1 S1 (*, ), 00:01:43/00:02:13, RP , flags: S Incoming interface: Serial0, RPF nbr , Outgoing interface list: Ethernet0, Forward/Sparse, 00:01:43/00:02:11 ( /32, ), 00:13:28/00:02:53, flags:T Incoming interface: Serial1, RPF nbr Ethernet0, Forward/Sparse, 00:13:25/00:02:30 New state in “rtr-a” S2 S0 E0 S0 rtr-d E0 (Si, G) Traffic Flow Shared (RPT) Tree SPT Tree E1 rtr-b E0 Rcvr A Rcvr B PIM-SM SPT-Switchover Example When the (Si, G) Join is received by “rtr-a”, the ( /32, ) entry shown above is created as follows: The RPF information is calculated in the direction of source “Si”. This results in an Incoming interface of Serial1, and an RPF neighbor address of “ ”. (Note: That the RPF information for the (S, G) entry is not the same as the (*, G) entry. This indicates that the paths of the Shared Tree and the SPT diverge at this point.) The OIL for the (S, G) entry is constructed by copying the OIL from the (*, G) entry and then removing the IIF from this list to prevent a possible route loop. This results in an (S, G) OIL containing only Ethernet0. T-Bit is set when traffic arrives on S1

67 PIM SM SPT-Switchover rtr-c rtr-a rtr-d rtr-b
To RP ( ) (Si,G)RP-bit Prune 8 rtr-a To Source “Si” S0 S1 S1 S2 S0 E0 S0 rtr-d E0 (Si, G) Traffic Flow Shared (RPT) Tree SPT Tree E1 rtr-b E0 Rcvr A Rcvr B PIM-SM SPT-Switchover Example Step 6: When the (Si, G) state is created at “rtr-a”, an (Si, G) Join is sent toward source “Si”. These (Si, G) Joins will continue to be sent periodically (once a minute) as long as the (Si, G) entry is not Pruned (i.e. does not have a Null OIL). Step 7: Because the paths of the Shared Tree and the SPT diverge at “rtr-a”, (note the difference in RPF information on the previous page), this causes “rtr-a” to begin sending (Si, G)RP-bit Prune messages up the Shared Tree to stop the flow of redundant (Si, G) traffic down the Shared Tree. SPT & RPT diverge, triggering (Si,G)RP-bit Prunes toward RP. 8

68 PIM SM SPT-Switchover rtr-c rtr-a rtr-d rtr-b
To RP ( ) rtr-a To Source “Si” S0 S1 S1 S2 9 S0 E0 S0 rtr-d E0 (Si, G) Traffic Flow Shared (RPT) Tree SPT Tree E1 rtr-b E0 Rcvr A Rcvr B PIM-SM SPT-Switchover Example When the (Si, G)RP-bit Prune reaches “rtr-c”, the ( /32, ) entry shown above is created as follows: Because this (S, G) entry was created as a result of the receipt of an (S,G)RP-bit Prune, the “R” bit is set to denote that this forwarding state is applicable to traffic flowing down the Shared Tree and not the Source Tree. Because the “R” bit is set, the RPF information is calculated in the direction of the RP instead of source “Si”. (Remember, this entry is applicable to (Si,G) traffic flowing down the Shared Tree and therefore the RPF information must point up the Shared Tree.) This results in an Incoming interface of Serial0, and an RPF neighbor address of “ ”. The OIL for the (S, G) entry is constructed by copying the OIL from the (*, G) entry minus the interface that the (Si, G)RP-bit Prune was received. Next, the IIF is removed from the OIL to prevent a possible route loop. These steps results in an (S, G) OIL containing only Serial2. At this point, (Si, G) traffic flowing down the Shared Tree will be forwarded using the (Si, G) entry. (Si, G) traffic arriving at “rtr-a” will RPF correctly because the RPF information in the (Si, G) entry is pointing up the Shared Tree (as a result of the “R” bit) and will then be forwarded out all interfaces in the (Si, G) OIL. In this case, only Serial2 remains in the (Si, G) OIL and therefore (Si, G) traffic will be sent to “rtr-d” but not “rtr-a”. This successfully prunes the redundant (Si, G) traffic from the branch of the Shared Tree between “rtr-c” and “rtr-a”. Rtr-c prunes interface S1 from the Shared Tree 9

69 State in “rtr-c” after receiving the (Si, G) RP-bit Prune
PIM SM SPT-Switchover rtr-c To RP ( ) rtr-a To Source “Si” (*, ), 00:01:43/00:02:13, RP , flags: S Incoming interface: Serial0, RPF nbr , Outgoing interface list: Serial1, Forward/Sparse, 00:01:43/00:02:11 Serial2, Forward/Sparse, 00:00:32/00:02:28 ( /32, ), 00:13:28/00:02:53, flags: R Incoming interface: Serial0, RPF nbr State in “rtr-c” after receiving the (Si, G) RP-bit Prune S0 S1 S1 S2 S0 E0 S0 rtr-d E0 (Si, G) Traffic Flow Shared (RPT) Tree SPT Tree E1 rtr-b E0 Rcvr A Rcvr B PIM-SM SPT-Switchover Example When the (Si, G)RP-bit Prune reaches “rtr-c”, the ( /32, ) entry shown above is created as follows: Because this (S, G) entry was created as a result of the receipt of an (S,G)RP-bit Prune, the “R” bit is set to denote that this forwarding state is applicable to traffic flowing down the Shared Tree and not the Source Tree. Because the “R” bit is set, the RPF information is calculated in the direction of the RP instead of source “Si”. (Remember, this entry is applicable to (Si,G) traffic flowing down the Shared Tree and therefore the RPF information must point up the Shared Tree.) This results in an Incoming interface of Serial0, and an RPF neighbor address of “ ”. The OIL for the (S, G) entry is constructed by copying the OIL from the (*, G) entry minus the interface that the (Si, G)RP-bit Prune was received. Next, the IIF is removed from the OIL to prevent a possible route loop. These steps results in an (S, G) OIL containing only Serial2. At this point, (Si, G) traffic flowing down the Shared Tree will be forwarded using the (Si, G) entry. (Si, G) traffic arriving at “rtr-a” will RPF correctly because the RPF information in the (Si, G) entry is pointing up the Shared Tree (as a result of the “R” bit) and will then be forwarded out all interfaces in the (Si, G) OIL. In this case, only Serial2 remains in the (Si, G) OIL and therefore (Si, G) traffic will be sent to “rtr-d” but not “rtr-a”. This successfully prunes the redundant (Si, G) traffic from the branch of the Shared Tree between “rtr-c” and “rtr-a”.

70 PIM SM SPT-Switchover rtr-c rtr-a rtr-d rtr-b
To RP ( ) rtr-a To Source “Si” S0 S1 S1 10 S2 S0 E0 S0 rtr-d E0 (Si, G) Traffic Flow Shared (RPT) Tree SPT Tree E1 rtr-b E0 Rcvr A Rcvr B PIM-SM SPT-Switchover Example Step 10: (Si, G) traffic is still reaching receiver “B” via a branch of the Shared Tree through “rtr-c” and “rtr-d”. This is because the (Si, G) state in “rtr-c” still has Serial2 in its OIL. Unnecessary (Si, G) traffic is pruned from the Shared tree. 9 Rtr-c has a non-NULL (S,G,R) entry and so does not include an (S,G,RP-bit) Prune in periodic messages 10

71 PIM-SM Protocol Mechanics
PIM SM Forwarding State PIM SM Joining PIM SM Registering PIM SM SPT-Switchover PIM SM Pruning PIM SM Turnaround Router

72 PIM SM Pruning IGMP group times out / last host sends Leave
Interface removed from all (*,G) and (S,G) entries IF all interfaces in “olist” for (*,G) are pruned; THEN send Prune up shared tree toward RP Any (S, G) state allowed to time-out Each router along path “prunes” interface SM Pruning Locally connected host sends an IGMP Leave (or IGMP state times out in the router) for group “G”. The interface is removed from the (*, G) and all (S, G) entries in the Multicast Routing Table. If the (*, G) “Outgoing Interface list” is now Null, then send a (*, G) Prune up the Shared Tree (RPT) towards the RP. Any remaining (S, G) entries are allowed to timeout and be deleted from the Multicast Routing Table. When the routers up the Shared Tree receive the (*, G) Prune, they remove the interface on which the Prune was received from their (*, G) “Outgoing interface list”. If as a result of removing the interface the (*, G) “Outgoing Interface list” becomes Null, then forward a (*, G) Prune up the Shared Tree (RPT) towards the RP.

73 PIM SM Pruning Shared Tree Case
To RP ( ) S0 rtr-a (Si, G) Traffic Flow E0 Shared Tree SPT Tree E0 E1 rtr-b (*, ), 00:01:43/00:02:13, RP , flags: SC Incoming interface: Ethernet0, RPF nbr , Outgoing interface list: Ethernet1, Forward/Sparse, 00:01:43/00:02:11 State in “rtr-b” before Pruning Rcvr A State in “rtr-b” before Pruning Pay particular attention to the following: Traffic is flowing down the Shared Tree. (Denoted by the existance of only the (*, G) entry.) The “Incoming interface” is Ethernet0. The “Outgoing interface list” contains Ethernet1. The “C” flag is set in the (*, G) which denotes that there is a locally connected host for this group. (Rcvr A)

74 PIM SM Pruning Shared Tree Case
To RP ( ) (*, ), 00:01:43/00:02:13, RP , flags: S Incoming interface: Serial0, RPF nbr , Outgoing interface list: Ethernet0, Forward/Sparse, 00:01:43/00:02:11 State in “rtr-a” before Pruning S0 rtr-a (Si, G) Traffic Flow E0 Shared Tree SPT Tree E0 E1 rtr-b Rcvr A State in “rtr-a” before Pruning — RPT Case Pay particular attention to the following: Traffic is flowing down the Shared Tree. (Denoted by the existance of only the (*, G) entry.) The “Incoming interface” is Serial0. The “Outgoing interface list” contains Ethernet0.

75 PIM SM Pruning Shared Tree Case
To RP ( ) S0 rtr-a (Si, G) Traffic Flow E0 (*,G) Prune 3 Shared Tree SPT Tree E0 IGMP Leave 1 E1 X rtr-b Rcvr A 2 PIM SM Pruning Example — RPT Case 1) The last-hop or Leaf router (rtr-b) receives an IGMP Group Leave message from “Rcvr A” for group “G”. After performing the normal IGMP Leave processing and finding that “Rcvr A” was the last host to leave, the IGMP state for group “G” on interface “E1” is deleted. 2) This causes interface “E1” to be removed from the “Outgoing interface list” of the (*, G) entry and any (Si, G) entries (in this case there are none) in the Multicast Routing Table. Because “E1” was the only interface in the (*, G) entry, it’s outgoing interface list becomes Null. 3) Because the (*, G) “Outgoing interface list” is now Null, a (*, G) Prune is sent up the Shared Tree (RPT) via “E0” toward the RP. “rtr-b” is a Leaf router. Last host “Rcvr A”, leaves group G. 1 “rtr-b” removes E1 from (*,G) and any (Si,G) “oilists”. 2 “rtr-b” (*,G) “oilist” now empty; sends (*,G) Prune toward RP. 3

76 PIM SM Pruning Shared Tree Case
X 6 S1 To RP ( ) (*,G) Prune 5 S0 rtr-a (Si, G) Traffic Flow E0 X Shared Tree SPT Tree 4 E0 E1 rtr-b PIM SM Pruning Example — RPT Case (cont.) 4) The (*, G) Prune is received by “rtr-a” which causes interface “E0” to be removed from the “Outgoing interface list” of the (*, G) entry in the Multicast Routing Table. (Note: “rtr-a” delayed Pruning E0 from the (*, G) entry for 3 seconds since this is a Multi-Access network and it needed to wait for a possible overriding Join from another PIM neighbor. Since none was received, the interface was pruned.) 5) Because the (*, G) “Outgoing interface list” is now Null, a (*, G) Prune is forwarded on up the Shared Tree (RPT) via “S0” toward the RP. 6) This pruning continues back toward the RP or until a router is reached whose (*, G) “Outgoing interface list” doesn’t go to Null as a result of the Prune. “rtr-a” receives Prune; removes E0 from (*,G) “oilist”. (After the 3 second Multi-access Network Prune delay.) 4 “rtr-a” (*,G) “olist” now empty; send (*,G) Prune toward RP. 5 Pruning continues back toward RP. 6

77 PIM SM Pruning Source (SPT) Case
To Source “Si” S1 To RP ( ) S0 rtr-a (Si, G) Traffic Flow E0 Shared Tree SPT Tree E0 E1 rtr-b (*, ), 00:01:43/00:02:59, RP , flags: SC Incoming interface: Ethernet0, RPF nbr , Outgoing interface list: Ethernet1, Forward/Sparse, 00:01:43/00:02:11 ( /32, ), 00:01:05/00:01:55, flags: CJT Incoming interface: Ethernet0, RPF nbr Ethernet1, Forward/Sparse, 00:01:05/00:02:55 State in “rtr-b” before Pruning Rcvr A State in “rtr-b” before Pruning — SPT Case Pay particular attention to the following: Both a (*, G) and (S, G) entries exist. The “J” flag is set in the (S, G) entry. This indicates that the (S, G) state was created as a result of the SPT-Threshold being exceeded. The “T” flag is set in the (S, G) entry. This indicates that (S, G) traffic is being successfully received via the Shortest-Path Tree (SPT). The “Incoming interface” is the same for the (*, G) and the (S, G) entry. This indicates that Shared Tree and the Shortest-Path tree are the same at this point.

78 PIM SM Pruning Source (SPT) Case
To Source “Si” S1 To RP ( ) (*, ), 00:01:43/00:02:59, RP , flags: S Incoming interface: Serial0, RPF nbr , Outgoing interface list: Ethernet0, Forward/Sparse, 00:01:43/00:02:11 ( /32, ), 00:01:05/00:01:55, flags: T Incoming interface: Serial1, RPF nbr Ethernet0, Forward/Sparse, 00:01:05/00:02:55 State in “rtr-a” before Pruning S0 rtr-a (Si, G) Traffic Flow E0 Shared Tree SPT Tree E0 E1 rtr-b Rcvr A State in “rtr-b” before Pruning — SPT Case Pay particular attention to the following: Both a (*, G) and (S, G) entries exist. The “T” flag is set in the (S, G) entry. This indicates that (S, G) traffic is being successfully received via the Shortest-Path Tree (SPT). The “Incoming interface” is different for the (*, G) and the (S, G) entry. This indicates that Shared Tree and the Shortest-Path tree diverge at this point.

79 PIM SM Pruning Source (SPT) Case
To Source “Si” S1 To RP ( ) S0 rtr-a (Si, G) Traffic Flow (*,G) Prune 3 E0 Shared Tree SPT Tree E0 IGMP Leave 1 E1 X rtr-b Rcvr A 2 PIM SM Pruning Example — SPT Case 1) The last-hop or Leaf router (rtr-b) receives an IGMP Group Leave message from “Rcvr A” for group “G”. After performing the normal IGMP Leave processing and finding that “Rcvr A” was the last host to leave, the IGMP state for group “G” on interface “E1” is deleted. 2) This causes interface “E1” to be removed from the “Outgoing interface list” of the (*, G) entry and any (Si, G) entries in the Multicast Routing Table. Because “E1” was the only interface in the (*, G) and the (Si, G) entries, their outgoing interface lists become Null. 3) Because the (*, G) “Outgoing interface list” is now Null, a (*, G) Prune is sent up the Shared Tree (RPT) via “E0” toward the RP. “rtr-b” is a Leaf router. Last host “Rcvr A”, leaves group G. 1 “rtr-b” removes E1 from (*,G) and any (Si,G) “olists”. 2 “rtr-b” (*,G) “olist” now empty; sends (*,G) Prune toward RP. 3

80 PIM SM Pruning Source (SPT) Case
To Source “Si” S1 To RP ( ) S0 rtr-a (Si, G) Traffic Flow E0 Shared Tree X SPT Tree Periodic (S, G) Join 4 E0 E1 X rtr-b Rcvr A PIM SM Pruning Example — SPT Case (cont.) 4) Because the (Si, G) “Outgoing interface list” is now Null, “rtr-b” stops sending Periodic (Si, G) Join messages up the Shortest-Path Tree (SPT). “rtr-b” is a Leaf router. Last host “Rcvr A”, leaves group G. 1 “rtr-b” removes E1 from (*,G) and any (Si,G) “olists”. 2 “rtr-b” (*,G) “oilist” now empty; sends (*,G) Prune toward RP. 3 “rtr-b” stops sending periodic (S, G) joins. 4

81 PIM SM Pruning Source (SPT) Case
To Source “Si” S1 To RP ( ) (*,G) Prune 6 S0 rtr-a (Si, G) Traffic Flow E0 X Shared Tree SPT Tree 5 E0 E1 rtr-b PIM SM Pruning Example — SPT Case (cont.) 5) The (*, G) Prune is received by “rtr-a” which causes interface “E0” to be removed from the “Outgoing interface list” of the (*, G) entry in the Multicast Routing Table. (Note: “rtr-a” delayed Pruning E0 from the (*, G) entry for 3 seconds since this is a Multi-Access network and it needed to wait for a possible overriding Join from another PIM neighbor. Since none was received, the interface was pruned.) 6) Because the (*, G) “Outgoing interface list” is now Null, a (*, G) Prune is forwarded on up the Shared Tree (RPT) via “S0” toward the RP. 7) Because “rtr-a” is no longer receiving (Si, G) Join messages from “rtr-b”, the (Si, G) state eventually times out. This causes a (Si, G) Prune to be sent up the Shortest-Path Tree (SPT) towards the source “Si”. 8) Traffic stops flowing down the Shortest-Path Tree (SPT). “rtr-a” receives Prune; removes E0 from (*,G) “olist”. (After the 3 second Multiaccess Network Prune delay.) 5 “rtr-a” (*,G) “olist” now empty; sends (*,G) Prune toward RP. 6

82 PIM SM Pruning Source (SPT) Case
To Source “Si” S1 To RP ( ) S0 rtr-a (Si, G) Traffic Flow E0 Shared Tree SPT Tree E0 E1 rtr-b (*, ), 00:02:32/00:02:59, RP , flags: SP Incoming interface: Ethernet0, RPF nbr , Outgoing interface list: ( /32, ), 00:01:56/00:00:53, flags: PT Incoming interface: Ethernet0, RPF nbr State in “rtr-b” after Pruning PIM SM Pruning Example — SPT Case (cont.) 5) The (*, G) Prune is received by “rtr-a” which causes interface “E0” to be removed from the “Outgoing interface list” of the (*, G) entry in the Multicast Routing Table. (Note: “rtr-a” delayed Pruning E0 from the (*, G) entry for 3 seconds since this is a Multi-Access network and it needed to wait for a possible overriding Join from another PIM neighbor. Since none was received, the interface was pruned.) 6) Because the (*, G) “Outgoing interface list” is now Null, a (*, G) Prune is forwarded on up the Shared Tree (RPT) via “S0” toward the RP. 7) Because “rtr-a” is no longer receiving (Si, G) Join messages from “rtr-b”, the (Si, G) state eventually times out. This causes a (Si, G) Prune to be sent up the Shortest-Path Tree (SPT) towards the source “Si”. 8) Traffic stops flowing down the Shortest-Path Tree (SPT).

83 PIM SM Pruning Source (SPT) Case
To Source “Si” S1 To RP ( ) (*, ), 00:02:32/00:02:59, RP , flags: SP Incoming interface: Serial0, RPF nbr , Outgoing interface list: ( /32, ), 00:01:56/00:00:53, flags: PT Incoming interface: Serial1, RPF nbr State in “rtr-a” after Pruning S0 rtr-a (Si, G) Traffic Flow E0 Shared Tree SPT Tree E0 E1 rtr-b PIM SM Pruning Example — SPT Case (cont.) 5) The (*, G) Prune is received by “rtr-a” which causes interface “E0” to be removed from the “Outgoing interface list” of the (*, G) entry in the Multicast Routing Table. (Note: “rtr-a” delayed Pruning E0 from the (*, G) entry for 3 seconds since this is a Multi-Access network and it needed to wait for a possible overriding Join from another PIM neighbor. Since none was received, the interface was pruned.) 6) Because the (*, G) “Outgoing interface list” is now Null, a (*, G) Prune is forwarded on up the Shared Tree (RPT) via “S0” toward the RP. 7) Because “rtr-a” is no longer receiving (Si, G) Join messages from “rtr-b”, the (Si, G) state eventually times out. This causes a (Si, G) Prune to be sent up the Shortest-Path Tree (SPT) towards the source “Si”. 8) Traffic stops flowing down the Shortest-Path Tree (SPT).

84 PIM SM Pruning Source (SPT) Case
(Si,G) Data 7 To Source “Si” S1 To RP ( ) (Si,G) Prune 8 S0 rtr-a (Si, G) Traffic Flow E0 Shared Tree SPT Tree E0 E1 rtr-b PIM SM Pruning Example — SPT Case (cont.) 5) The (*, G) Prune is received by “rtr-a” which causes interface “E0” to be removed from the “Outgoing interface list” of the (*, G) entry in the Multicast Routing Table. (Note: “rtr-a” delayed Pruning E0 from the (*, G) entry for 3 seconds since this is a Multi-Access network and it needed to wait for a possible overriding Join from another PIM neighbor. Since none was received, the interface was pruned.) 6) Because the (*, G) “Outgoing interface list” is now Null, a (*, G) Prune is forwarded on up the Shared Tree (RPT) via “S0” toward the RP. 7) Because “rtr-a” is no longer receiving (Si, G) Join messages from “rtr-b”, the (Si, G) state eventually times out. This causes a (Si, G) Prune to be sent up the Shortest-Path Tree (SPT) towards the source “Si”. 8) Traffic stops flowing down the Shortest-Path Tree (SPT). Another (Si,G) data packet arrives via Serial1. 7 ‘rtr-a’ responds by sending an (Si,G) Prune toward source. 8

85 PIM SM Pruning Source (SPT) Case
9 To Source “Si” S1 To RP ( ) S0 rtr-a (Si, G) Traffic Flow E0 Shared Tree SPT Tree E0 E1 rtr-b PIM SM Pruning Example — SPT Case (cont.) 5) The (*, G) Prune is received by “rtr-a” which causes interface “E0” to be removed from the “Outgoing interface list” of the (*, G) entry in the Multicast Routing Table. (Note: “rtr-a” delayed Pruning E0 from the (*, G) entry for 3 seconds since this is a Multi-Access network and it needed to wait for a possible overriding Join from another PIM neighbor. Since none was received, the interface was pruned.) 6) Because the (*, G) “Outgoing interface list” is now Null, a (*, G) Prune is forwarded on up the Shared Tree (RPT) via “S0” toward the RP. 7) Because “rtr-a” is no longer receiving (Si, G) Join messages from “rtr-b”, the (Si, G) state eventually times out. This causes a (Si, G) Prune to be sent up the Shortest-Path Tree (SPT) towards the source “Si”. 8) Traffic stops flowing down the Shortest-Path Tree (SPT). Another (Si,G) data packet arrives via Serial1. 7 ‘rtr-a’ responds by sending an (Si,G) Prune toward source. 8 (Si,G) traffic ceases flowing down SPT. 9

86 PIM-SM Protocol Mechanics
PIM SM Forwarding State PIM SM Joining PIM SM Registering PIM SM SPT-Switchover PIM SM Pruning PIM SM Turnaround Router

87 PIM Sparse Mode Triangle
For a PIM Sparse-Mode route to be established through a network there must be: A source A receiver A rendezvous point If any of these is missing information in the multicast routing table can be very misleading

88 PIM Sparse Mode Triangle
The source, receiver and RP define a triangle The lines connecting these points together define the complete multicast path from source to receiver. RP Source Receiver

89 PIM Sparse Mode Triangle
Each line is defined by certain characteristics Setting up a line is order-independent of the other lines (i.e receiver or source can join/register first). RP Shared-tree X-line Source Receiver Shortest-path-tree

90 PIM Sparse Mode Triangle
The Shared-Tree (RPT) is the line that connects the RP to the receiver. This line is described by (*,G) state (with a non-Null olist) along the path. Packets from all sources follow this line unless pruned by (S,G) RP-bit state. RP Shared-tree X-line Source Receiver Shortest-path-tree

91 PIM Sparse Mode Triangle
The X-line is the branch of the SPT that connects the source to the RP. This line (SPT branch) is described by (S,G) state from the source to the RP. RP Shared-tree X-line Source Receiver Shortest-path-tree

92 PIM Sparse Mode Triangle
The Shortest-path-tree is the line that connects the source to the receiver. This line is described by (S,G) state from the source to the receiver. Packets for a single source may travel on this line to the receiver to bypass the RP. RP Shared-tree X-line Source Receiver Shortest-path-tree

93 PIM Sparse Mode Triangle
If the receiver never joins to the source, the source traffic will always flow along the X-line and back down the shared tree. This will be the case if SPT-Threshold = Infinity. i.e Shared-Tree only operation If there are no other branches of the Shared-tree, this results in the “RP-on-a-stick” scenario. RP Shared-tree X-line Source Receiver Shortest-path-tree

94 PIM Sparse Mode Triangle
The router at which the X-line and Shared-tree line meet is the “Turnaround” router. Packets flow up to the turnaround router and then down the shared-tree RP Turnaround Router Shared-tree X-line Source Receiver Shortest-path-tree

95 PIM Sparse Mode Triangle
RP The X-flag is set on the Turnaround router. The Turnaround router has an (S,G) with a NULL olist The turnaround router is often some other router than the RP. Packets do not flow all the way to the RP in this case. Turnaround Router Shared-tree X-line Source Receiver Shortest-path-tree

96 RP on a Stick Special situation that occurs on the RP:
When all members have joined the Shared tree only via a single interface on the RP. And the source is out the same interface Results in special “state” at the RP Frequently misunderstood and rarely seen Default behavior is to join SPT which avoids this Mishandled in versions of IOS prior to 12.0 Requires the Proxy Join Timer to resolve Need to understand concept of “atomic joins” RP on a Stick This is a special situation that occurs under the following conditions: All branches of the Shared Tree are out a single interface on the RP (i.e. there is only a single interface in the (*, G) OIL at the RP.) All sources for the group are out the same interface. (This would result in (S, G) entries with Null OIL’s since the incoming interface can never appear in the OIL of an entry.) Unusually State results in this condition Special PIM rules had to be created that were not in the original PIMv2 specification in order to avoid situations where : (S, G) traffic flows were incorrectly pruned. (S, G) traffic continued to flow to the RP only to be dropped. (S, G) state would get stuck in the RP and the First-Hop router even when the source has long since stopped sending. Problem was solved in IOS 12.0 by: Special “Proxy Join” Timer and Introduction of “Atomic” and “Non-Atomic” (*, G) Joins

97 RP on a Stick RP rtr-a rtr-b rtr-c E0 10.1.4.1 10.1.4.2 E1 10.1.4.3 E1
RP-on-a-Stick Example Consider that above network topology where both “rtr-b” and “rtr-c” share a common Ethernet segment with the RP. E0 E0

98 RP on a Stick RP rtr-a rtr-b rtr-c Shared Tree E0 10.1.4.1 10.1.4.2 E1
(*, ), 00:01:21/00:02:59, RP , flags: S Incoming interface: Null, RPF nbr , Outgoing interface list: Ethernet0, Forward/Sparse, 00:01:21/00:02:39 E E1 E1 rtr-b rtr-c RP-on-a-Stick Example When a host behind “rtr-c” joins group , a branch of the Shared Tree is created (shown by the solid arrow) which results in the following state on the RP: (*, ), 00:01:21/00:02:59, RP , flags: S Incoming interface: Null, RPF nbr , Outgoing interface list: Ethernet0, Forward/Sparse, 00:01:21/00:02:39 E0 E0 Member

99 RP on a Stick RP rtr-a rtr-b rtr-c Shared Tree E0 10.1.4.1 10.1.4.2 E1
(*, ), 00:01:21/00:02:59, RP , flags: SC Incoming interface: Ethernet1, RPF nbr , Outgoing interface list: Ethernet0, Forward/Sparse, 00:01:21/00:02:39 RP-on-a-Stick Example This also results in the following state on “rtr-c”: (*, ), 00:01:21/00:02:59, RP , flags: SC Incoming interface: Ethernet1, RPF nbr , Outgoing interface list: Ethernet0, Forward/Sparse, 00:01:21/00:02:39 E0 E0 Member

100 RP on a Stick RP rtr-a rtr-b rtr-c (192.1.1.1, 224.1.1.1) Traffic Flow
Shared Tree SPT E E1 E1 rtr-b rtr-c RP-on-a-Stick Example Now assume that source behind “rtr-b” begins sending to group After the normal Register process has completed, a branch of the SPT (shown by the heave dashed arrow) is built from “rtr-b” to the RP. This allows traffic to flow to the members as shown by the thin dashed arrows. E0 E0 Source Member

101 RP on a Stick RP rtr-a rtr-b rtr-c (192.1.1.1, 224.1.1.1) Traffic Flow
Shared Tree SPT E E1 E1 rtr-b rtr-c (*, ), 00:01:21/00:02:59, RP , flags: SP Incoming interface: Ethernet1, RPF nbr , Outgoing interface list: ( /32, ), 00:00:49/00:02:46, flags: T Incoming interface: Ethernet0, RPF nbr , Ethernet1, Forward/Sparse, 00:00:49/00:02:11 RP-on-a-Stick Example The creation of the SPT results in the following state on “rtr-b”: (*, ), 00:01:21/00:02:59, RP , flags: SP Incoming interface: Ethernet1, RPF nbr , Outgoing interface list: ( /32, ), 00:00:49/00:02:46, flags: T Incoming interface: Ethernet0, RPF nbr , Ethernet1, Forward/Sparse, 00:00:49/00:02:11 E0 E0 Source Member

102 RP on a Stick RP rtr-a rtr-b rtr-c (192.1.1.1, 224.1.1.1) Traffic Flow
Shared Tree (*, ), 00:02:43/00:02:59, RP , flags: S Incoming interface: Null, RPF nbr , Outgoing interface list: Ethernet0, Forward/Sparse, 00:02:43/00:02:17 ( /32, ), 00:00:49/00:02:46, flags: PT Incoming interface: Ethernet0, RPF nbr , SPT E E1 E1 rtr-b rtr-c RP-on-a-Stick Example The creation of the SPT also results in the following state on the RP: (*, ), 00:02:43/00:02:59, RP , flags: S Incoming interface: Null, RPF nbr , Outgoing interface list: Ethernet0, Forward/Sparse, 00:02:43/00:02:17 ( /32, ), 00:00:49/00:02:46, flags: PT Incoming interface: Ethernet0, RPF nbr , Notice that the OIL of the (S, G) entry is Null which, in turn, results in the “P” flag being set. Normally, this would cause the RP to send an (S, G) Prune toward the source to shut off the flow of (S, G) traffic. However in this case, that would starve the host behind “rtr-c” of the desired group traffic. Obviously, something else must be done to prevent this. E0 E0 Source Member Normally results in the suppression of (S,G) Joins

103 RP on a Stick Solution requires three new concepts
Atomic & Non-Atomic Joins Proxy Join Timer/Flag Header-only Registers RP-on-a-Stick Solution In order to deal of this special situation, several new concepts were added to the 12.0 implementation of PIM. These are: Atomic vs. Non-Atomic (*, G) Joins The Proxy Join Timer (and its flag) on (S, G) entries Header-only Registers (aka Data-less Registers) Each of the above are discussed in the following pages

104 RP on a Stick Non-Atomic Joins Atomic Joins
Contains (*, G) Join for group “G” only This is the type of (*, G) Join we are familiar with Atomic Joins Contains (*, G) Join for group “G” followed by (S, G)RP-bit Prunes for all sources in group “G” Used to prune unnecessary (S, G) traffic from the Shared Tree after switchover to the SPT. All in the same PIM Join/Prune message Non-Atomic Joins This is a PIM Join/Prune message that contains only a (*, G) Join for group “G” in the Join list without any associated (S, G)RP-bit Prunes for group “G” in the Prune list. This is the typical (*, G) Join that has been described in most of the examples in Module 5, “PIM-SM”. Atomic Joins This is a PIM Join/Prune message that contains a (*, G) Join for group “G” in the Join list AND a complete list of all (S, G)RP-bit Prunes for group “G” in the Prune list. Remember, these (S, G)RP-bit Prunes are used to Prune specific (S, G) traffic off of the Shared Tree after a router has joined the SPT directly toward the source.

105 RP on a Stick PIM Join/Prune Message Header
( , ) WC, RP ( , ) WC, RP ( , ) WC, RP ( , ) RP . ( , ) WC, RP ( , ) RP Join List (*, G) Join + (S, G)RP-bit Prune = Atomic Join Example: Atomic (*, G) Join In this example, a (*, G) entry for group in the Join list of the PIM Join/Prune message. (The WC (wildcard) and RP (RP-Tree) bits tell us that this entry is a (*, G) Join to RP ) In addition, there is an (S, G) entry for group ( , ) with the RP-bit set in the Prune list. (I.e. an (S, G)RP-bit Prune exists for group ). Because both a (*, G) Join along with one or more (S, G)RP-bit Prunes exist in this Join/Prune message for group , it is said to contain an Atomic (*, G) Join for group ( , ) ( , ) WC, RP ( , ) RP ( , ) . Prune List

106 RP on a Stick PIM Join/Prune Message Header
( , ) WC, RP ( , ) WC, RP ( , ) WC, RP ( , ) RP . ( , ) WC, RP Join List (*, G) Join + NO (S, G)RP-bit Prunes = Non-Atomic Join Example: Non-Atomic (*, G) Join Also in this example, is a (*, G) entry for group in the Join list of the PIM Join/Prune message. (The WC (wildcard) and RP (RP-Tree) bits tell us that this entry is a (*, G) Join to RP ) In addition, there are no (S, G) entries for group with the RP-bit set in the Prune list. (I.e. there are no (S, G)RP-bit Prunes for group ). Because only a (*, G) Join exists in this Join/Prune message for group without any corresponding (S, G)RP-bit Prunes, it is said to contain an Non-Atomic (*, G) Join for group ( , ) ( , ) WC, RP ( , ) RP ( , ) . Prune List

107 RP on a Stick Proxy Join Timer Used on (S, G) entries only
Started on the RP by the initial (S, G) Register If (S, G) OIL is Null AND (*, G) OIL is Non-Null Started/Restarted by receipt of a Non-Atomic Join The “X” flag indicates when it is running Times out in 2 minutes Controls the sending of (S, G) Joins and Prunes down the SPT When Proxy Join Timer is Running (X flag set) Send (S, G) Joins down SPT Suppress sending any (S, G) Prunes down SPT Proxy Join Timer The Proxy Join Timer only exists on (S, G) entries in the Mroute table. Its purpose is to attract (S, G) traffic to the router even when the OIL of the (S, G) entry is Null. This maintains the flow of (S, G) traffic in cases such as the RP-on-a-Stick. Proxy Join Timer Rules The Proxy Join Timer is started when the RP receives the first (S, G) Register message when a source goes active if: The OIL is null in resulting (S, G) entry AND the OIL is non-Null in the (*, G) entry. (This is the RP-on-a-Stick condition.) The Proxy Join Timer is started whenever the router receives a Non-Atomic (*,G) Join and an (S, G) entry already exists. This timer runs for 2 minutes unless restarted by the receipt of another Non-Atomic (*, G) Join. When this timer is running on an (S, G) entry, the “X” flag will be displayed in the flags field of the entry. When the Proxy Join Timer is running, the router will: Send periodic (S, G) Joins toward the source even though the OIL is Null. Suppress the sending of (S, G) Prunes toward the source even though the OIL is Null.

108 RP on a Stick Data-Header Registers
Used to keep (S, G) state alive in the RP Sent every 2 minutes by First-hop router As long as source is still active Continues sending until a Register-Stop is received Register Messages contains null (S,G) data packet Processed by the RP Resets (S, G) entry timer at the RP RP doesn’t send Null packet down Shared Tree Header-only (Data-less) Registers Normally, the Expire timer of an (S, G) entry is reset to 3 minutes every time the router forwards a packet associated with that entry. However, in the RP-on-a-Stick case, the (S, G) entry has a Null OIL and is therefore not forwarding any packets. This would normally result in the (S, G) entry timing out at the RP. This can not be allowed to happen as it is possible that another member somewhere in the network could join the Shared Tree via another interface. If the (S, G) entry was allowed to timeout, the RP would not be able to trigger the “Batch-Join” to rejoin the SPT when this new member joined. (Because there wouldn’t be any (S, G) entry to tell the RP of the active source.) To prevent this from happening, the behavior of the First-Hop DR was changed in IOS 12.0 so that (S, G) Header-only (aka Data-less) Registers would be sent periodically (every 2 minutes) to the RP. These Header-only Registers cause the RP to reset the Expire timer in the (S, G) entry thereby preventing it from timing out. Contents of Header-only Registers Header-only Registers contain a specially formatted null or “data-less” (S, G) packet. These “null” (S, G) packets are not forwarded down the Shared Tree by the RP.

109 RP on a Stick RP rtr-a rtr-b rtr-c Non-Atomic Join Normal Register
(*, ), 00:02:43/00:02:59, RP , flags: S Incoming interface: Null, RPF nbr , Outgoing interface list: Ethernet0, Forward/Sparse, 00:02:43/00:02:17 ( /32, ), 00:00:49/00:02:46, flags: PXT Incoming interface: Ethernet0, RPF nbr , Normal Register (S, G) Join E E1 E1 rtr-b rtr-c RP-on-a-Stick Example In this example, “rtr-c” is sending Non-Atomic (*, G) Joins to the RP to keep on the Shared Tree. (Note that “rtr-c” has not joined the SPT at this point. This could be due to the SPT-Threshold being set to Infinity.) The RP is now running version 12.0 or later of IOS. Therefore, when the Non-Atomic (*, G) Join for group is received, the RP starts the Proxy Join Timer in all (S, G) entries for group This results in the following state in the RP: (*, ), 00:02:43/00:02:59, RP , flags: S Incoming interface: Null, RPF nbr , Outgoing interface list: Ethernet0, Forward/Sparse, 00:02:43/00:02:17 ( /32, ), 00:00:49/00:02:46, flags: PXT Incoming interface: Ethernet0, RPF nbr , Notice the “X” flag is set in the above example. This causes the RP to continue sending (S, G) Joins toward the source (even though the OIL is Null) which, in turn, will keep the traffic flowing to the member across the common Ethernet segment. E0 E0 Source Proxy Join Timer started/restarted by Non-Atomic Joins Member

110 RP on a Stick RP rtr-a rtr-b rtr-c Periodic (S, G) Joins
(*, ), 00:02:43/00:02:59, RP , flags: S Incoming interface: Null, RPF nbr , Outgoing interface list: Ethernet0, Forward/Sparse, 00:02:43/00:02:17 ( /32, ), 00:00:49/00:02:59, flags: PXT Incoming interface: Ethernet0, RPF nbr , Header-only Registers E E1 E1 rtr-b rtr-c RP-on-a-Stick Example The First-hop router (rtr-b) is also running version 12.0 or later of IOS and it will therefore send periodic Header-only (S, G) Register messages to the RP. When RP receives these Header-only (S, G) Registers, (roughly every 2 minutes), it resets the Expire timer in the corresponding (S, G) entry in the Mroute table. This results in the following state in the RP: (*, ), 00:02:43/00:02:59, RP , flags: S Incoming interface: Null, RPF nbr , Outgoing interface list: Ethernet0, Forward/Sparse, 00:02:43/00:02:17 ( /32, ), 00:00:49/00:02:59, flags: PXT Incoming interface: Ethernet0, RPF nbr , (Notice the Expire timer in the (S, G) entry has been reset.) E0 E0 Expiration Timer restarted by Data-Header Registers Source Member

111 Turnaround Router Extension of the RP-on-a-Stick Problem
Occurs when the SPT and the Shared Tree share a single common path Want to avoid pulling traffic to the RP unnecessarily Special “state” in the Turnaround Router Uses special techniques to resolve Proxy Join Timer Atomic and Non-Atomic Joins Header-only Registers Turnaround Router As it turns out, the RP-on-a-Stick problem is actually a special case of another problem referred to the Turnaround Router problem. This situation occurs whenever : There is only a single branch of the Shared Tree and the Shared Tree and a SPT share a common path to the RP. We want to have the (S, G) traffic flow along the SPT toward the RP and “turnaround” at the appropriate router in the network and flow back down the Shared Tree without sending unnecessary traffic to the RP. Turnaround Router Solution Once again, the new concepts of Proxy Join Timer Atomic and Non-Atomic Joins Header-only Registers permit the routers to solve this problem.

112 Turnaround Router RP rtr-a rtr-x Turnaround Router rtr-b rtr-c
( , ) Traffic Flow S Shared Tree SPT S rtr-x Turnaround Router E E1 E1 Turnaround Router Example In this example, we once again have a single branch of the Shared Tree at the RP. The SPT for source ( , ) merges with the single branch of the Shared Tree at “rtr-x”. This router is referred to as the Turnaround Router because it is here that we want the (S, G) traffic to turnaround and flow back down the Shared Tree to the members of group Additionally, we do not want the (S, G) traffic flow to all the way to the RP as it is unnecessary traffic because there is only the single branch of the Shared Tree. In cases where the number of hops between the Turnaround Router and the RP is large or where the links along this path are congested, the flow of traffic to the RP would simply waste precious network resources. Instead, we want the traffic to only flow as shown by the thin dashed arrows in the drawing above. rtr-b rtr-c E0 E0 Source Member

113 Turnaround Router RP rtr-a rtr-x Turnaround Router rtr-b rtr-c
Non-Atomic Joins (*, ), 00:02:43/00:02:59, RP , flags: S Incoming interface: Null, RPF nbr , Outgoing interface list: Serial0, Forward/Sparse, 00:02:43/00:02:17 S S rtr-x Turnaround Router (*, ), 00:02:43/00:02:59, RP , flags: S Incoming interface: Serial0, RPF nbr , Outgoing interface list: Ethernet0, Forward/Sparse, 00:02:43/00:02:17 E E1 E1 Turnaround Router — Step-by-Step Step 1 The host connected to “rtr-c” joins group This causes “rtr-c” to create (*, G) state and sends a Non-Atomic (*, G) Join toward the RP. Step 2 The Turnaround Router (rtr-x) receives this Non-Atomic (*, G) Join and it too creates (*, G) state and sends a Non-Atomic (*, G) Join to the RP. Step 3 The RP receives the (*, G) Join and creates (*, G) state with only Serial0 in the OIL. rtr-b rtr-c E0 E0 Source Member

114 Turnaround Router RP rtr-a rtr-x Turnaround Router rtr-b rtr-c
Non-Atomic Joins (*, ), 00:02:43/00:02:59, RP , flags: S Incoming interface: Null, RPF nbr , Outgoing interface list: Serial0, Forward/Sparse, 00:02:43/00:02:17 ( /32, ), 00:00:49/00:02:59, flags: PXT Incoming interface: Serial0, RPF nbr , Normal Register S S rtr-x Turnaround Router E E1 E1 Turnaround Router — Step-by-Step Step 4 The source, , begins sending to group This causes the first-hop router (rtr-b) to send an (S, G) Register to the RP. Step 5 The RP processes the Register message and creates an (S, G) entry. Because the OIL of the newly created (S, G) entry is Null and the OIL of the (*, G) entry is non-Null, the RP starts the Proxy Timer in the (S, G) entry and sends an (S, G) Join toward the source. At this point, the state in the RP is as follows: (*, ), 00:02:43/00:02:59, RP , flags: S Incoming interface: Null, RPF nbr , Outgoing interface list: Serial0, Forward/Sparse, 00:02:43/00:02:17 ( /32, ), 00:00:49/00:02:59, flags: PXT Incoming interface: Serial0, RPF nbr , Notice that the Proxy Join Timer is running (note the “X” flag in the (S,G) entry.) While the Proxy Join Timer is running, the RP will continue to send periodic (S, G) Joins toward the source. The Proxy Join Timer will be restarted each time the RP receives another Non-Atomic Join from “rtr-x”. rtr-b rtr-c E0 E0 Source Member (S, G) Entry created & Proxy Join Timer started

115 Turnaround Router RP rtr-a rtr-x Turnaround Router rtr-b rtr-c
Non-Atomic Joins S (S, G) Joins S rtr-x Turnaround Router (*, ), 00:02:43/00:02:59, RP , flags: S Incoming interface: Serial0, RPF nbr , Outgoing interface list: Ethernet0, Forward/Sparse, 00:02:43/00:02:17 ( /32, ), 00:00:49/00:02:59, flags: T Incoming interface: Ethernet0, RPF nbr , Serial0, Forward/Sparse, 00:00:48/00:02:12 E E1 E1 Turnaround Router — Step-by-Step Step 6 The (S, G) Join travels hop-by-hop building the SPT from the source to the RP. At this point, the state in the Turnaround Router (rtr-x) is as follows: (*, ), 00:02:43/00:02:59, RP , flags: S Incoming interface: Serial0, RPF nbr , Outgoing interface list: Ethernet0, Forward/Sparse, 00:02:43/00:02:17 ( /32, ), 00:00:49/00:02:59, flags: T Incoming interface: Ethernet0, RPF nbr , Serial0, Forward/Sparse, 00:00:48/00:02:12 rtr-b rtr-c E0 E0 Source Member

116 Turnaround Router RP rtr-a rtr-x Turnaround Router rtr-b rtr-c
Non-Atomic Joins S (S, G) Joins S rtr-x Turnaround Router ( , ) Traffic Flow E E1 E1 Turnaround Router — Step-by-Step Once “rtr-b” receives the (S, G) Join, traffic begins to flow as shown above. rtr-b rtr-c E0 E0 Source Member

117 (Contains (*,G)Join + (S,G)RP-bit Prune)
Turnaround Router RP rtr-a Non-Atomic Joins Atomic Joins (Contains (*,G)Join + (S,G)RP-bit Prune) S (S, G) Joins S rtr-x Turnaround Router ( , ) Traffic Flow (*, ), 00:02:43/00:02:59, RP , flags: S Incoming interface: Serial0, RPF nbr , Outgoing interface list: Ethernet0, Forward/Sparse, 00:02:43/00:02:17 ( /32, ), 00:00:49/00:02:59, flags: PT Incoming interface: Ethernet0, RPF nbr , Serial0, Forward/Sparse, 00:00:48/00:02:12 E E1 E1 Turnaround Router — Step-by-Step Step 7 Router “rtr-x” detects that the paths of the SPT and the Shared Tree diverge at this point. As a result, “rtr-x” begins sending periodic (S,G)RP-bit Prunes up the Shared Tree in the same Join/Prune message with the periodic (*, G) Joins. In other words, it begins sending Atomic Joins to the RP instead of Non-Atomic Joins! (Note: Router “rtr-x” knows that the SPT and Shared Tree paths have diverged at this point because the RPF information (Incoming Interface and/or RPF neighbor) of the (S, G) entry is different than the (*,G) entry.) rtr-b rtr-c Ethernet0, RPF nbr , Serial0, RPF nbr , E0 E0 Source Member

118 (Contains (*,G)Join + (S,G)RP-bit Prune)
Turnaround Router RP rtr-a Non-Atomic Joins (*, ), 00:02:43/00:02:59, RP , flags: S Incoming interface: Null, RPF nbr , Outgoing interface list: Serial0, Forward/Sparse, 00:02:43/00:02:17 ( /32, ), 00:00:49/00:02:59, flags: PXT Incoming interface: Serial0, RPF nbr , Atomic Joins (Contains (*,G)Join + (S,G)RP-bit Prune) S (S, G) Joins S rtr-x Turnaround Router ( , ) Traffic Flow E E1 E1 Turnaround Router — Step-by-Step Because the RP is no longer receiving Non-Atomic Joins, the Proxy Join Timer for the (S, G) entry is no longer being restarted and it eventually times out. This is indicated by the “X” flag being clear in the (S, G) entry shown below: (*, ), 00:02:43/00:02:59, RP , flags: S Incoming interface: Null, RPF nbr , Outgoing interface list: Serial0, Forward/Sparse, 00:02:43/00:02:17 ( /32, ), 00:00:49/00:02:59, flags: PT Incoming interface: Serial0, RPF nbr , rtr-b rtr-c PT E0 E0 Proxy Join Timer eventually expires (Non-Atomic Joins no longer being received) Source Member

119 (Contains (*,G)Join + (S,G)RP-bit Prune)
Turnaround Router RP rtr-a Non-Atomic Joins Atomic Joins (Contains (*,G)Join + (S,G)RP-bit Prune) S (S, G) Joins (S, G) Prunes S rtr-x Turnaround Router ( , ) Traffic Flow (*, ), 00:02:43/00:02:59, RP , flags: S Incoming interface: Serial0, RPF nbr , Outgoing interface list: Ethernet0, Forward/Sparse, 00:02:43/00:02:17 ( /32, ), 00:00:49/00:02:59, flags: PT Incoming interface: Ethernet0, RPF nbr , E E1 E1 Turnaround Router — Step-by-Step Step 8 Now that the Proxy Join Timer is no longer running, the RP resumes its normal behavior and sends an (S, G) Prunes toward the source in response to the arrival of (S, G) packets. Step 9 When “rtr-x” receives the (S, G) Prune, it removes Serial0 from its outgoing interface list. rtr-b rtr-c E0 E0 Source Member Serial0 removed from (S, G) OIL

120 (Contains (*,G)Join + (S,G)RP-bit Prune)
Turnaround Router RP rtr-a Non-Atomic Joins Atomic Joins (Contains (*,G)Join + (S,G)RP-bit Prune) S (S, G) Join S rtr-x Turnaround Router ( , ) Traffic Flow (*, ), 00:02:43/00:02:59, RP , flags: S Incoming interface: Serial0, RPF nbr , Outgoing interface list: Ethernet0, Forward/Sparse, 00:02:43/00:02:17 ( /32, ), 00:00:49/00:02:59, flags: PT Incoming interface: Ethernet0, RPF nbr , E E1 E1 Turnaround Router — Step-by-Step As a result of Serial0 being removed from the (S, G) OIL, the flow of traffic to the RP is shutoff. Step 10 Non-Atomic Joins arriving at “rtr-x” now start the Proxy Join Timer. (Note the “X” flag in the (S, G) entry.) This causes the Turnaround Router (rtr-x) to suppress sending (S, G) Prunes and instead, send (S, G) Joins toward the source. This keeps the traffic flowing as shown. rtr-b rtr-c E0 E0 PXT Source Member Proxy Join Timer started by Non-Atomic Join

121 Final Steady-State Condition
Turnaround Router RP rtr-a Final Steady-State Condition Non-Atomic Joins Atomic Joins S (S, G) Joins Data-Header Registers S ( , ) Traffic Flow rtr-x Turnaround Router E E1 E1 Turnaround Router Step 11 Finally, Header-only Registers sent by the First-hop router (rtr-b) continue to reset the Expire timer in the (S, G) entry at the RP. This prevents the (S, G) entry from timing out and being deleted at the RP. rtr-b rtr-c E0 E0 Source Member

122 Final Steady-State Condition
Turnaround Router RP rtr-a Final Steady-State Condition Non-Atomic Joins (*, ), 00:02:43/00:02:59, RP , flags: S Incoming interface: Null, RPF nbr , Outgoing interface list: Serial0, Forward/Sparse, 00:02:43/00:02:17 ( /32, ), 00:00:49/00:02:59, flags: PT Incoming interface: Serial0, RPF nbr , Atomic Joins S (S, G) Joins Data-Header Registers S ( , ) Traffic Flow rtr-x Turnaround Router E E1 E1 Turnaround Router As a result of the Header-only Registers, the state in the RP will be as follows as long as the source and member remain active: (*, ), 00:02:43/00:02:59, RP , flags: S Incoming interface: Null, RPF nbr , Outgoing interface list: Serial0, Forward/Sparse, 00:02:43/00:02:17 ( /32, ), 00:00:49/00:02:59, flags: PT Incoming interface: Serial0, RPF nbr , rtr-b rtr-c E0 E0 Source Member

123 Final Steady-State Condition
Turnaround Router RP rtr-a Final Steady-State Condition Non-Atomic Joins Atomic Joins S (S, G) Joins Data-Header Registers S ( , ) Traffic Flow rtr-x Turnaround Router (*, ), 00:02:43/00:02:59, RP , flags: S Incoming interface: Serial0, RPF nbr , Outgoing interface list: Ethernet0, Forward/Sparse, 00:02:43/00:02:17 ( /32, ), 00:00:49/00:02:59, flags: PXT Incoming interface: Ethernet0, RPF nbr , E E1 E1 Turnaround Router As a result of the Non-Atomic Joins, the state in the Turnaround router will be as follows as long as the source and member remain active : (*, ), 00:02:43/00:02:59, RP , flags: S Incoming interface: Serial0, RPF nbr , Outgoing interface list: Ethernet0, Forward/Sparse, 00:02:43/00:02:17 ( /32, ), 00:00:49/00:02:59, flags: PXT Incoming interface: Ethernet0, RPF nbr , rtr-b rtr-c E0 E0 Source Member

124 Agenda IP Multicast Overview PIM-SM Protocol Mechanics
Rendezvous Points Troubleshooting Case Studies and examples 3

125 Auto-RP Fundamentals Candidate RPs
Configured via global config command ip pim send-rp-announce <intfc> scope <ttl> [group-list acl] Multicast RP-Announcement messages Sent to Cisco-Announce ( ) group Sent every rp-announce-interval (default: 60 sec) RP-Announcements contain: Group Range (default = /4) Candidate’s RP address Holdtime = 3 x <rp-announce-interval>

126 Auto-RP Fundamentals Mapping agents
Configured via global config command ip pim send-rp-discovery scope <ttl> Receive RP-Announcements Select highest C-RP IP address as RP for group range Stored in Group-to-RP Mapping Cache with holdtimes Multicast RP-Discovery messages Sent to Cisco-Discovery ( ) group Sent every 60 seconds or when changes detected RP-Discovery messages contain: Contents of MA’s Group-to-RP Mapping Cache

127 Auto-RP Fundamentals All Cisco routers
Join Cisco-Discovery ( ) group Automatic No configuration necessary Receive RP-Discovery messages Stored in local Group-to-RP Mapping Cache Information used to determine RP for group range

128 Auto-RP—From 10,000 Feet MA MA A B C D C-RP 1.1.1.1 C-RP 2.2.2.2
Discovery Discovery MA MA A B C D C-RP C-RP Discovery RP-Discoveries multicast to the Cisco Discovery ( ) group

129 Initial Cache State in the Mapping Agent
Auto-RP—A Closer Look MA A Rtr-A# show ip pim rp mapping This system is an RP-mapping agent C-RP C-RP Auto-RP Up Close This is the same example that was presented in the previous slides. However, in this case, we will examine the process in more detail at each step. Step 1 At time zero, the Group-to-RP mapping caches in the Mapping Agents are empty since no RP-Announcements have been received. The output of the ‘show ip pim rp mapping’ command shows that router A is a Mapping Agent and that the Group-to-RP mapping cache is empty. C D Initial Cache State in the Mapping Agent

130 Auto-RP—A Closer Look A C D MA C-RP 1.1.1.1 C-RP 2.2.2.2
Rtr-A# show ip pim rp mapping This system is an RP-mapping agent Group(s) /4, uptime: 00:00:15, expires: 00:02:45 RP (Rtr-C), PIMv1 Info source: (Rtr-C) Announce Group-Range = /4 Holdtime = 180 sec RP = C-RP C-RP Auto-RP Up Close Step 2 Assume router C is the first C-RP to send its RP Announce message advertising itself as a candidate to be RP for all multicast groups. (Note the group range, the IP address of the C-RP and the holdtime in the message.) Step 3 The Mapping Agent (router A) receives this first RP Announcement and because the IP address of router C is the highest one received so far, router A installs this information in its Group-to-RP mapping cache. The output of the ‘show ip pim rp mapping’ command shows that router C is currently selected as the RP for group range /4 (i.e. all multicast groups with the exception of the Auto-RP groups). C D

131 C-RP with Highest Address Is Selected as RP and Stored in Cache
Auto-RP—A Closer Look MA A Rtr-A# show ip pim rp mapping This system is an RP-mapping agent Group(s) /4, uptime: 00:00:04, expires: 00:02:56 RP (Rtr-D), PIMv1 Info source: (Rtr-D) Announce RP = Group-Range = /4 Holdtime = 180 sec C-RP C-RP Auto-RP Up Close Step 4 Next, router D sends its RP Announce message advertising itself as a candidate to be RP for all multicast groups. (Note the group range, the IP address of the C-RP and the holdtime in the message.) Step 5 The Mapping Agent (router A) receives this RP Announcement and because the IP address of router D is the higher than router C it installs this information in its Group-to-RP mapping cache. The output of the ‘show ip pim rp mapping’ command now shows that router currently selected as the RP for group range /4 (i.e. all multicast groups with the exception of the Auto-RP groups) has changed to router D. The contents of the Group-to-RP mapping cache on router A will remain in this state until either router D fails (i.e. the holdtime of the cache expires) or another RP Announcement for this group range is received with a higher IP address. C D C-RP with Highest Address Is Selected as RP and Stored in Cache

132 All Mapping Agents Must Have Consistent Data !
Auto-RP—A Closer Look All Mapping Agents Must Have Consistent Data ! MA MA A B Rtr-B# show ip pim rp mapping This system is an RP-mapping agent Group(s) /4, uptime: 00:00:04, expires: 00:02:56 RP (Rtr-D), PIMv1 Info source: (Rtr-D) Rtr-A# show ip pim rp mapping This system is an RP-mapping agent Group(s) /4, uptime: 00:00:04, expires: 00:02:56 RP (Rtr-D), PIMv1 Info source: (Rtr-D) Auto-RP Up Close It is critical that all Mapping Agents in the PIM-SM domain have identical information in their Group-to-RP mapping caches. Note that in our example network, they do. If the information in the mapping caches are not identical, it can cause the routers in the network to flip-flop between two different RPs. X

133 Local Cache Initially Loaded from Router “B”
Auto-RP—A Closer Look Local Cache Initially Loaded from Router “B” Rtr-X# show ip pim rp mapping Group(s) /4, uptime: 00:00:04, expires: 00:02:56 RP (Rtr-D), PIMv1 Info source: (Rtr-B) MA MA A B Discovery Group-Range = /4 Holdtime = 180 sec RP = Auto-RP Up Close Step 6 Assume that router B is the first MA to send its RP Discovery message containing its Group-to-RP mapping cache contents. Step 7 The routers in the network (router X in this example) all receive this RP Discovery message and install the information in their local Group-to-RP mapping cache. The output of the ‘show ip pim rp mapping’ command shows that router D is currently selected as the RP for group range /4 (i.e. all multicast groups with the exception of the Auto-RP groups) and that this information was most recently received from router B. X

134 Identical Info Received from Router “A”
Auto-RP—A Closer Look Identical Info Received from Router “A” Rtr-X# show ip pim rp mapping Group(s) /4, uptime: 00:00:04, expires: 00:02:56 RP (Rtr-D), PIMv1 Info source: (Rtr-A) MA MA A B Discovery RP = Group-Range = /4 Holdtime = 180 sec “Info source” will continue to flip-flop between routers A and B Auto-RP Up Close Step 8 Next, router A sends an RP Discovery message containing its Group-to-RP mapping cache contents. Step 9 The routers in the network (router X in this example) all receive this RP Discovery message and update the information in their local Group-to-RP mapping cache. Since both Mapping Agents are sending identical information, the only thing that will change in the local Group-to-RP mapping cache is the “source” of the information. The output of the ‘show ip pim rp mapping’ command shows that router D is still selected as the RP for group range /4 (i.e. all multicast groups with the exception of the Auto-RP groups). However, the data reflects that this information was most recently received from router A. The flip-flop of the information source in the routers’ local Group-to-RP mapping cache has little or no performance impact on the router. No performance impact X

135 PIMv2 BSR Overview A single Bootstrap Router (BSR) is elected
Multiple Candidate BSR’s (C-BSR) can be configured Provides backup in case currently elected BSR fails C-RP’s send C-RP announcements to the BSR C-RP announcements are sent via unicast BSR stores ALL C-RP announcements in the “RP-set” BSR periodically sends BSR messages to all routers BSR Messages contain entire RP-set and IP address of BSR Messages are flooded hop-by-hop throughout the network away from the BSR All routers select the RP from the RP-set All routers use the same selection algorithm; select same RP BSR cannot be used with Admin-Scoping BSR Overview Bootstrap Router (BSR) A single router is elected as the BSR from a collection of Candidate BSR’s. If the current BSR fails, a new election is triggered. The election mechanism is pre-emptive based on C-BSR priority. Candidate RP’s (C-RP’s) Send C-RP announcements directly to the BSR via unicast. (Note: C-RP’s learn the IP address of the BSR via periodic BSR messages.) The BSR stores the complete collection of all received C-RP announcements in a database called the “RP-set”. The BSR periodically sends out BSR messages to all routers in the network to let them know the BSR is still alive. BSR messages are flooded hop-by-hop throughout the network. Multicast to the “All-PIM Routers” group ( ) with a TTL of 1. BSR messages also contain: The complete “RP-set” consisting of all C-RP announcements. The IP Address of the BSR so that C-RP’s know where to send their announcements. All routers receive the BSR messages being flooded throughout the network. Select the active RP for each group range using a common hash algorithm that is run against the RP-set. This results in all routers in the network selecting the same RP for a given group-range. BSR cannot be used with Admin-Scoping! Admin scoping was not considered when BSR was designed. One problem is that C-RP announcements that are unicast to the BSR cross multicast boundaries. There are several other problems as well.

136 PIMv2 BSR Fundamentals Candidate RPs
Configured via global config command ip pim rp-candidate <intfc> [group-list acl] Unicast PIMv2 C-RP messages to BSR Learns IP address of BSR from BSR messages Sent every rp-announce-interval (default: 60 sec) C-RP messages contain: Group Range (default = /4) Candidate’s RP address Holdtime = 3 x <rp-announce-interval>

137 PIMv2 BSR Fundamentals Bootstrap router (BSR) Receive C-RP messages
Accepts and stores ALL C-RP messages Stored in Group-to-RP Mapping Cache w/holdtimes Originates BSR messages Multicast to All-PIM-Routers ( ) group (Sent with a TTL = 1) Sent out all interfaces. Propagate hop-by-hop Sent every 60 seconds or when changes detected BSR messages contain: Contents of BSR’s Group-to-RP Mapping Cache IP Address of active BSR

138 PIMv2 BSR Fundamentals All PIMv2 routers Receive BSR messages
Stored in local Group-to-RP Mapping Cache Information used to determine active BSR address Selects RP using Hash algorithm Selected from local Group-to-RP Mapping Cache All routers select same RP using same algorithm Permits RP-load balancing across group range

139 Basic PIMv2 BSR PIMv2 Sparse Mode BSR G F A D C-RP C-RP B C
BSR Msgs G PIMv2 Sparse Mode F BSR A D C-RP Advertisement (unicast) C-RP Advertisement (unicast) Router A is configured as the RP mapping agent - Router A listens to group for announcements from C-RPs. It then sends the group-RP mappings to the group RP discovery group for routers D,E,F,G to discover the group-RP mappings automatically Router A could also be the administrative boundary to external routing domains Routers A and B are both configured as C-RPs for all groups (group range /4) and send candidate announcements to the RP announce group Auto-RP allows for multiple hot backup C-RPs for a given group range. (Highest IP address C-RP is selected.) C-RP C-RP B C BSR Msgs Flooded Hop-by-Hop E

140 Anycast RP One way to provide RP redundancy.
The same RP address is configured on multiple routers. RP address is advertised in the Unicast routing table as a host route. Sources register with the closest RP. Receivers “join” toward the closet RP. MSDP (Multicast Source Distribution Protocol) advertises sources to the other RPs.

141 PIM RP Selection No matter how the RP is chosen or advertised, PIM Sparse-Mode works the same way. Do NOT combine Auto-RP and Bootstrap in the same PIM domain. Debugging the RP advertisement information is separate from all other PIM operations. If the RP information is not correct, no other PIM routing information will be correct.

142 Agenda IP Multicast Overview PIM-SM Protocol Mechanics
Rendezvous Points Troubleshooting Case Studies and examples 3

143 Troubleshooting Cheat Sheet
Check IGMP membership on PIM DR on Last Hop LAN Check RP address in (*,G) entry on the DR Check RPF interface to RP in (*,G) entry Repeat above check for (*,G) state on routers along the shared tree, up to RP. Repeat above check for (S,G) state on routers along the source tree, up to Source DR.

144 PIM Timers The secret to understanding PIM is to watch the timers.
3 minutes (3:30) is the “magic” number. Interface expiration timers are updated every minute so if the expire timer goes below 2:00 the route is not being used. Entry expiration timers are updated when data is forwarded so if the timer drops below 2:59, the source has stopped sending.

145 Source Tree In IOS a (*,G) entry is always created whenever a (S,G) entry is created. The Source-tree may overlap the Shared-tree in which case the (*,G) entry will be non-NULL. The Source-tree may be independent of the Shared-tree in which case the (*,G) entry will be NULL.

146 PIM SM Source Tree (S,G) forwarding entry
( /32, ), 00:04:28/00:01:32, flags: T Incoming interface: Serial0, RPF nbr Outgoing interface list: Serial1, Forward/Sparse, 00:04:28/00:01:32 NOTE: These uptimes indicate the receiver has always been present

147 Receivers have stopped joining
PIM SM Source Tree (S,G) forwarding entry ( /32, ), 00:04:28/00:01:32, flags: T Incoming interface: Serial0, RPF nbr Outgoing interface list: Serial1, Forward/Sparse, 00:04:28/00:01:32 Receivers have stopped joining

148 PIM SM Source Tree (S,G) forwarding entry Data is not flowing
( /32, ), 00:04:28/00:01:32, flags: T Incoming interface: Serial0, RPF nbr Outgoing interface list: Serial1, Forward/Sparse, 00:04:28/00:01:32 Data is not flowing

149 PIM SM Shared Tree (*,G) forwarding entry
(*, ), 00:04:28/00:01:32, RP , flags: S Incoming interface: Serial1, RPF nbr , Outgoing interface list: Serial0, Forward/Sparse, 00:04:28/00:01:32 All Sources for this group will be forwarded out the olist

150 PIM SM Shared Tree (*,G) forwarding entry This always points to the RP
(*, ), 00:04:28/00:01:32, RP , flags: S Incoming interface: Serial1, RPF nbr , Outgoing interface list: Serial0, Forward/Sparse, 00:04:28/00:01:32 This always points to the RP

151 PIM SM Shared Tree (*,G) forwarding entry
(*, ), 00:04:28/00:01:32, RP , flags: S Incoming interface: Serial1, RPF nbr , Outgoing interface list: Serial0, Forward/Sparse, 00:04:28/00:01:32 This is the next-hop to the RP from “sh ip RPF”

152 PIM SM Shared tree (*,G) forwarding entry
(*, ), 00:04:28/00:01:32, RP , flags: S Incoming interface: Serial1, RPF nbr , Outgoing interface list: Serial0, Forward/Sparse, 00:04:28/00:01:32 The entry has been up for this long. Note the uptime of the olist

153 PIM SM Shared tree (*,G) forwarding entry
(*, ), 00:04:28/00:01:32, RP , flags: S Incoming interface: Serial1, RPF nbr , Outgoing interface list: Serial0, Forward/Sparse, 00:04:28/00:01:32 All receivers for the entry may have left

154 PIM SM Shared tree (*,G) forwarding entry
(*, ), 00:04:28/00:01:32, RP , flags: S Incoming interface: Serial1, RPF nbr , Outgoing interface list: Serial0, Forward/Sparse, 00:04:28/00:01:32 A sparse-mode group must have an RP

155 Last-hop router is sending (s,g,r) prunes
PIM Shared Tree (S,G,R) forwarding entry ( /32, ), 00:04:28/00:01:32, flags: RP Incoming interface: Serial0, RPF nbr Outgoing interface list: NULL Points toward the RP!!!! Last-hop router is sending (s,g,r) prunes Note R-flag

156 mtrace Shows: Troubleshooting Usage:
Multicast path from source to receiver. Similar to unicast “trace” command Trace path between any two points in network TTL Thresholds & Delay shown at each node Troubleshooting Usage: Find where multicast traffic flow stops. Focus on router where flow stops Verify path multicast traffic is following. Identify sub-optimal paths.

157 mtrace/mstat—How it works
Mtrace Packet Flow Adds mtrace data Adds mtrace data Adds mtrace data Adds mtrace data Adds mtrace data src dest mtrace response First-hop Router mtrace request Last-hop Router Multicast Dist. Tree Mtrace Packet Unix Workstation or Cisco Router Note: Mtrace packets use special IGMP packets with IGMP Type codes of 0x1E and 0x1F.

158 mtrace dallas-gw>mtrace bloom-iptv-svr bwilliam-ss5 224.2.156.43
Type escape sequence to abort. Mtrace from to via group From source (?) to destination (bwilliam-ss5.cisco.com) Querying full reverse path... 0 bwilliam-ss5 ( ) -1 dallas-gw ( ) PIM thresh^ 0 3 ms -2 wan-gw4 ( ) PIM thresh^ ms -3 bloomington-mn-gw ( ) PIM thresh^ ms -4 bloom-mnlab ( ) PIM thresh^ ms -5 bloom-iptv-svr ( ) dallas-gw> Shows all active groups with an aggregate bandwidth greater than the specified kbps (4kbps is the default) Listed in each entry is: group address session name source address and domain name averaged pps and kbps rates for this flow

159 mstat Shows: Troubleshooting Usage:
Multicast path in pseudo graphic format. Trace path between any two points in network Drops/Duplicates shown at each node TTLs & Delay shown at each node Troubleshooting Usage: Locate congestion point in the flow. Focus on router with high drop/duplicate count Duplicates indicated as “negative” drops

160 mstat dallas-gw>mstat 172.17.67.43 bwilliam-ss5 224.2.156.43
Source Response Dest Packet Statistics For Only For Traffic All Multicast Traffic From | __/ rtt 547 ms Lost/Sent = Pct Rate To v / hop 547 ms bloom-mnlab | ^ ttl 0 v | hop -409 ms /168 = --% 16 pps 0/67 = 0% 6 pps bloomington-mn-gw | ^ ttl 1 v | hop 379 ms -9/170 = --% 17 pps -3/67 = --% 6 pps wan-gw4 | ^ ttl 2 v | hop 28 ms -3/195 = --% 19 pps 0/70 = 0% 7 pps dallas-gw | \__ ttl 3 v \ hop 0 ms pps pps Receiver Query Source Shows all active groups with an aggregate bandwidth greater than the specified kbps (4kbps is the default) Listed in each entry is: group address session name source address and domain name averaged pps and kbps rates for this flow

161 mstat dallas-gw>mstat 172.17.67.43 bwilliam-ss5 224.2.156.43
Source Response Dest Packet Statistics For Only For Traffic All Multicast Traffic From | __/ rtt 399 ms Lost/Sent = Pct Rate To v / hop 399 ms bloom-mnlab | ^ ttl 0 v | hop 119 ms 77/694 = 11% 69 pps 0/65 = 0% 6 pps bloomington-mn-gw | ^ ttl 1 v | hop -150 ms /609 = 65% 60 pps 44/65 = 68% 6 pps wan-gw4 | ^ ttl 2 v | hop 30 ms -8/39 = --% 3 pps -1/21 = --% 2 pps dallas-gw | \__ ttl 3 v \ hop 0 ms pps pps Receiver Query Source

162 Debugging Auto-RP Operation
Understand the Auto-RP mechanisms This is the fundamental debugging tool for problems with Auto-RP!!! Verify Group-to-RP Mapping Caches First on the Mapping Agents Other routers will learn Group-to-RP mapping info from these routers If not correct, use debug commands to see what’s wrong Make sure all MA’s have consistent Group-to-RP information If not, watch for TTL Scoping problems Then on other routers If info doesn’t match MA, there is a problem distributing the information Use show and debug commands to find where the break is Debugging Auto-RP First and foremost, you must understand the fundamental mechanisms behind Auto-RP in order to debug problems! Verify Group-to-RP Mapping Caches on Mapping Agents Because other routers in the network will learn the Group-to-RP mapping information from the Mapping Agents, it is important that this information is correct on the Mapping Agents. If the information is not correct, verify that the C-RP’s are configured correctly and that C-RP Announcements are being received properly by the Mapping Agent. If multiple Mapping Agents are in use, make sure that their Group-to-RP mapping information is identical. If not, the routers in the network will oscillate between the different RP’s selected by the Mapping Agents. Again, make sure all Mapping Agents are properly receiving Auto-RP Announcements from all C-RP’s in the network. Watch out for TTL scoping problems! Verify Group-to-RP Mapping Caches on all other routers Group-to-RP mapping information should match the MA’s. If not, verify that the router is properly receiving Auto-RP Discovery messages from the Mapping Agents. Again, watch out for TTL scoping problems!

163 Debugging Auto-RP Operation
Insure Auto-RP group state is correct Should normally be in Dense mode Watch out for mixed DM and SM conditions Can occur when Static RP’s are also defined Always ‘deny’ Auto-RP groups on Static RP configurations Use ‘Accept-RP’ filters on all routers as insurance Watch out for DM problems in NBMA networks (See Module 7 for details) Common Problem - Incorrect Auto-RP Group mode The two Auto-RP groups, and are normally run in Dense mode so that this information is flooded throughout the network. Only in very rare situations is it desirable to run these two groups in Sparse mode because this creates a “chicken-and-the-egg” problem. (How do you join the RP for the Auto-RP groups if you don’t know the RP address?) Therefore, the following situations should be verified: Insure that the Auto-RP groups are operating in Dense mode on all routers in the network. Mixed DM/SM situations can arise when static RP addresses have been configured on some routers in the network. To avoid this: Always specify an <acl> on any ‘ip pim rp-address’ commands that denies groups and Configure Accept-RP filters on all routers in the network that “deny” groups and (Note: The ‘ip pim accept-rp auto-rp’ command has an implied set of “deny” clauses for these two groups to prevent them from switching into Sparse mode.)

164 Debugging BSR Operation
Understand the BSR mechanisms This is the fundamental debugging tool for problems with BSR!!! Verify Group-to-RP Mapping Caches First on the BSR Other routers will learn Group-to-RP mapping info from this router If not correct, use debug commands to see what’s wrong Then on other routers If info doesn’t match BSR, there is a problem distributing the information Use show and debug commands to find where the break is Debugging BSR Operation First and foremost, you must understand the fundamental mechanisms behind BSR in order to debug problems! Verify Group-to-RP Mapping Caches on the elected BSR. Because other routers in the network will learn the Group-to-RP mapping information from the elected BSR, it is important that this information is correct on this router. If the information is not correct, verify that the PIMv2 C-RP’s are configured correctly and that C-RP Announcements are being received properly by the BSR. Verify Group-to-RP Mapping Caches on all other routers Group-to-RP mapping information should match the BSR. If not, verify that the router is properly receiving BSR messages.

165 “Bogus” Designated Router
to RP Company Field Site Field Site Router (DR) pim sparse-mode Becomes “DR” !!! E /24 E0— xx Multicast Receivers Test Lab Router Hmmmmm. Let’s turn on this IP Multicast stuff and see what it does. Network Engineer config term interface E0 ip pim dense-mode

166 Partial Multicast Cloud
src no ip pim dense-mode ip pim dense-mode T1 56K X RPF Failure!!!!! We’ll just use the spare 56K line for the IP Multicast traffic and not the T1. rcvr Network Engineer

167 Debugging PIM Why was the IIF not pointing toward the source?
Why was the “R-flag” set? How do you repeat these conditions?

168 Documentation and Contact Info EFT/Beta Site Web Page: ftp://ftpeng.cisco.com/ipmulticast.html TAC Support Mailing List: Customer Support Mailing List:

169 If All Else Fails—RTFB1 1 Read this fine book

170 Troubleshooting IP Multicast
Session RST-320 RST-320 © 2001, Cisco Systems, Inc. 170

171 Please Complete Your Evaluation Form
Session RST-320 RST-320 © 2001, Cisco Systems, Inc. 171

172 RST-320 © 2001, Cisco Systems, Inc. 172


Download ppt "RST-120 © 2001, Cisco Systems, Inc. All rights reserved. 1."

Similar presentations


Ads by Google