1 / 51

IP Multicast Lecture 3: PIM-SM

IP Multicast Lecture 3: PIM-SM. Carl Harris Communications Network Services Virginia Tech. PIM Review Constructing the shared tree for G. 8. Update (*,G) iif=NULL oif=1,2. 4. Create (*,G) iif=NULL oif=2. 7. B sends Join/Prune Group=G Join=A, WC, RPT Prune=NULL.

Download Presentation

IP Multicast Lecture 3: PIM-SM

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. IP MulticastLecture 3: PIM-SM Carl Harris Communications Network Services Virginia Tech

  2. PIM ReviewConstructing the shared tree for G 8. Update (*,G) iif=NULL oif=1,2 4. Create (*,G) iif=NULL oif=2 7. B sends Join/Prune Group=G Join=A, WC, RPT Prune=NULL 3. C sends Join/Prune towards RP for G (i.e. router A) Group=G Join=A, WC, RPT Prune=NULL R2 2. Create (*,G) iif=2 oif=3 6. Create (*,G) iif=2 oif=4 R1 5. Host R2 sends an IGMP membership report for group G 1. Host R1 sends an IGMP membership report for group G A 2 1 RP(G) = A 2 2 1 1 C 4 B 3 3

  3. PIM Review RPT for G connecting hosts R1 and R2 (*,G) iif=NULL oif=1,2 (*,G) iif=2 oif=4 R2 (*,G) iif=2 oif=3 R1 A 2 1 RP(G) = A 2 2 1 1 C 4 B 3 3

  4. Multicast Packet ForwardingReview • When a packet is received by a router from a directly connected source S addressed to a group G: • If neither (S,G) nor (*,G) state exists, the packet is dropped. We’re now ready to see how this rule must be changed for PIM-SM. • If (S,G) state exists, its entry timer is refreshed and the packet will be forwarded using the oif list for the (S,G) state.

  5. Multicast Packet ForwardingReview • If no (S,G) state exists and the packet matches (*,G) state, the (S,G) state is created. • iif is set to the interface on which the packet was received • oif is copied from the (*,G) state, excluding the interface on which the packet was received.

  6. PIM-SM Source Discovery • A source S for group G is discovered when the router receives a packet from S addressed to group G. • A directly connected source is discovered when the router receives a packet addressed to group G from the source on the connecting interface. • A distant (non-connected) source is discovered when the router receives a packet from the source on the shared tree for group G.

  7. PIM Register Message • The Register message is one means by which packets from a source S reach the root of the shared tree for group G. • Register messages are sent as unicast PIM messages addressed to the RP. • The payload of a Register message is a complete multicast packet (headers and all). • The RP decapsulates the Register message, and forwards (or drops) the packet according to prevailing state. No RPF check occurs. Why?

  8. Designated Router • On every subnet, one router is “elected” as the designated router (DR) for that network. • Only the DR sends Register messages to the RP, and only for directly connected sources. • Only the DR sends Join/Prune messages toward the RP or toward a source. • The highest IP address among PIM routers on a subnet is elected as the DR.

  9. Multicast Packet ForwardingPIM-SM version • When a packet is received by a PIM router on interface X from any source S addressed to a group G, exactly one of six possible conditions will be met. • Based on which of these conditions is met, there are two possible outcomes (packet is forwarded, or packet is dropped). • The router must consider the possible conditions in the order presented here.

  10. Forwarding Flow Chart begin PIM router processing a packet from source S to group G which has arrived on interface X. Does (S,G) exist ? Is it (S,G) iif=X ? yes yes If needed, set (S,G) SPT-bit and send (S,G)RPT prune. no no Is it (S,G) SPT-bit ? yes no Drop the packet. If desired, create (S,G) and send (S,G)SPT join. Is it (*,G) iif=X ? Does (*,G) exist ? Forward the packet to the oif list for this state. yes yes no no Send a Register message to the RP if needed. If S is directly connected, create (S,G). end

  11. Forwarding Flow Chart begin PIM router processing a packet from source S to group G which has arrived on interface X. Does (S,G) exist ? Is it (S,G) iif=X ? yes yes If needed, set (S,G) SPT-bit and send (S,G)RPT prune. no no Case 1, receiving via SPT Is it (S,G) SPT-bit ? yes no Drop the packet. Case 2, receiving via RPT If desired, create (S,G) and send (S,G)SPT join. Is it (*,G) iif=X ? Does (*,G) exist ? Forward the packet to the oif list for this state. yes yes no no Send a Register message to the RP if needed. If S is directly connected, create (S,G). end

  12. Multicast Packet ForwardingPIM-SM cases 1 and 2 • Case 1:(S,G) state exists and its iif is interface X. • This condition represents the situation in which the router has joined the SPT for S sending to G, and is receiving packets from that SPT. • Case 2:(*,G) state exists and its iif is interface X. • This condition represents the situation in which the router is receiving packets for G via the RPT (shared tree).

  13. PIM ExampleCase 1 S G payload We also have (*,G), but since we check case 1 first, we don’t notice the (*,G) state. 3 (*,G) iif=3 oif=1,2 (S,G) iif=2 oif=1 R 1 2 Packet arrives on interface 2 from source S to group G. (S,G) exists and its iif matches the interface on which the packet was received.

  14. PIM ExampleCase 2 S G payload Packet arrives on interface 3 from source S to group G. Only (*,G) exists and its iif matches the interface on which the packet was received. 3 (*,G) iif=3 oif=1,2 R 1 2

  15. Forwarding Flow Chart begin PIM router processing a packet from source S to group G which has arrived on interface X. Does (S,G) exist ? Is it (S,G) iif=X ? yes yes If needed, set (S,G) SPT-bit and send (S,G)RPT prune. Case 3: have (S,G), wrong iif, SPT active no no Is it (S,G) SPT-bit ? yes no Drop the packet. Case 4: have (S,G), wrong iif, SPT not ready If desired, create (S,G) and send (S,G)SPT join. Is it (*,G) iif=X ? Does (*,G) exist ? Forward the packet to the oif list for this state. yes yes no no Send a Register message to the RP if needed. If S is directly connected, create (S,G). end

  16. Multicast Packet ForwardingPIM-SM case 3 • Case 3:(S,G) exists, but iif is not interface X. (S,G)has the SPT-bit set. • This covers the situation in which the router has joined the SPT for S sending to G, but the packet has arrived on the wrong interface.

  17. PIM ExampleCase 3 S G payload We also have (*,G). Since the router matches on (S,G) first, and the SPT-bit is set. this (*,G) state is ignored and the packet is dropped. Packet arrives on interface 3 from source S to group G. 3 (*,G) iif=3 oif=1,2 (S,G) iif=2 oif=1 SPT-bit R 1 2 (S,G) exists but its iif does not match the interface on which the packet was received. This router is receiving packets via the SPT and thus doesn’t want to receive them via RPT.

  18. Multicast Packet ForwardingPIM-SM case 4 • Case 4:(S,G) exists, but iif is not interface X. (S,G)does not have the SPT-bit set. • Note that only the SPT-bit condition differentiates case 4 from case 3. • This covers the situation in which the router has created (S,G) state, and has sent a join towards S, but has yet to receive packets on that SPT. • The router must continue to except packets from S to G via the RPT, so it ignores the (S,G) state and uses (*,G) instead.

  19. PIM ExampleCase 4 S G payload We also have (*,G). Since since the iif matches, and we’re not getting packets from the SPT (no SPT-bit on (S,G)) we accept the packet from the RPT just like case 2. Packet arrives on interface 3 from source S to group G. 3 (*,G) iif=3 oif=1,2 (S,G) iif=2 oif=1 R 1 2 (S,G) exists but its iif does not match the interface on which the packet was received. This router has sent a join towards S on interface 2, but the lack of the SPT-bit tells us that the SPT is not delivering packets yet.

  20. Forwarding Flow Chart begin PIM router processing a packet from source S to group G which has arrived on interface X. Does (S,G) exist ? Is it (S,G) iif=X ? yes yes If needed, set (S,G) SPT-bit and send (S,G)RPT prune. no no Is it (S,G) SPT-bit ? yes no Drop the packet. If desired, create (S,G) and send (S,G)SPT join. Is it (*,G) iif=X ? Does (*,G) exist ? Forward the packet to the oif list for this state. yes yes no no Send a Register message to the RP if needed. If S is directly connected, create (S,G) end Case 5: Have (*,G), wrong iif.

  21. Multicast Packet ForwardingPIM-SM case 5 • Case 5: (S,G) does not exist. (*,G) does exist, but its iif is not interface X. • This condition represents either a packet received on the wrong interface, or a previously unknown directly connected source. • We’ll see shortly that if S is a directly connected source, and if this router is the DR on the network connected to interface X we may need to deliver the packet to the root of the shared tree using a Register message.

  22. PIM Example Case 5 S S G payload S G payload Here, B receives a packet from S to G on interface 3. He has only shared tree state (*,G) and 3 is not the right iif. Since S is connected, and assuming B is the DR on the network containing S, he’ll need to send this packet to the root of the shared tree in a Register message. (*,G) iif=NULL oif=1,2 A 2 1 (*,G) iif=2 oif=4 RP(G) = A 2 2 (*,G) iif=2 oif=3 1 1 C 4 B Over here, router C has somehow receives a packet from S to G on interface 3. Since S is not directly connected, and interface 2 is not the iif for (*,G), there must be a forwarding loop, which C suppresses by ignoring the packet since it doesn’t pass RPF. 3 3

  23. Forwarding Flow Chart begin PIM router processing a packet from source S to group G which has arrived on interface X. Does (S,G) exist ? Is it (S,G) iif=X ? yes yes If needed, set (S,G) SPT-bit and send (S,G)RPT prune. no no Is it (S,G) SPT-bit ? yes no Drop the packet. If desired, create (S,G) and send (S,G)SPT join. Is it (*,G) iif=X ? Does (*,G) exist ? Forward the packet to the oif list for this state. yes yes no no Send a Register message to the RP if needed. If S is directly connected, create (S,G) end Case 6: no G states

  24. Multicast Packet ForwardingPIM-SM case 6 • Case 6: Neither (S,G) nor (*,G) state exists. • This condition represents a router that has neither directly connected nor downstream receivers for group G. • Despite that this router knows of no receivers for G there may be receivers elsewhere in the PIM domain, thus we may need to deliver the packet to the root of the shared tree (if this router is the DR on the network connected to interface X, and if S is directly connected).

  25. PIM Example Case 6 S S G payload B receives a packet from S to G on interface 3. He has no states for G. Since S is connected, and assuming B is the DR on the network containing S, he’ll need to send this packet to the root of the shared tree in a Register message. (*,G) iif=NULL oif=2 A 2 1 RP(G) = A 2 2 (*,G) iif=2 oif=3 1 1 C 4 B 3 3 Router C does have downstream receivers for group G on interface 3, but B doesn’t know this. When B sends the packet in a Register to the root of the shared tree (at router A), the packet will be forwarded down to C, anyway.

  26. PIM Example A packet is delivered via the RPT 2. B creates (S,G) iif=3 oif=4 and unicasts the packet to A (the RP for G) in a Register packet. 3. A decapulates the Register packet and forwards it natively according to (*,G) state (I.e. on the RP tree). R2 S R1 1. Host S sends a packet destined for group G. 4. B and C forward the packet according to (*,G) state. (*,G) iif=NULL oif=1,2 A 2 1 (*,G) iif=2 oif=4 RP(G) = A 2 2 (*,G) iif=2 oif=3 1 1 C 4 B 3 3

  27. Forwarding Flow Chart begin PIM router processing a packet from source S to group G which has arrived on interface X. Does (S,G) exist ? Is it (S,G) iif=X ? yes yes If needed, set (S,G) SPT-bit and send (S,G)RPT prune. no no Is it (S,G) SPT-bit ? yes no Drop the packet. If desired, create (S,G) and send (S,G)SPT join. Is it (*,G) iif=X ? Does (*,G) exist ? Forward the packet to the oif list for this state. yes yes no no Send a Register message to the RP if needed. If S is directly connected, create (S,G) end

  28. Sending Register Messages • A register message is sent by a router when a packet from source S to group G on interface X only under the following conditions: • Source S is directly connected, and interface X is the RPF interface for S. • The router is the DR on the network connected to interface X, • The Register Suppression Timer is not running. • We find out about how this timer gets set, shortly…

  29. Forwarding Flow Chart begin PIM router processing a packet from source S to group G which has arrived on interface X. Does (S,G) exist ? Is it (S,G) iif=X ? yes yes If needed, set (S,G) SPT-bit and send (S,G)RPT prune. no no Is it (S,G) SPT-bit ? yes no Drop the packet. If desired, create (S,G) and send (S,G)SPT join. Is it (*,G) iif=X ? Does (*,G) exist ? Forward the packet to the oif list for this state. yes yes no no Send a Register message to the RP if needed. If S is directly connected, create (S,G) end

  30. Joining the SPT for (S,G) • A PIM router with connected receivers for group G may elect to join the shortest path tree (SPT) for a source S any time after it has discovered source S. • Intermediate PIM routers (those without directly connected receivers) do not initiate the construction of an SPT. • The decision of whether/when to join the SPT for a source is controlled entirely by the last-hop router for a collection of receivers.

  31. Joining the SPT for (S,G) • When a last-hop router is ready to join the SPT for a source S sending to group G • (S,G) state is created; iif is set to the RPF interface for S, oif is copied from (*,G), excluding the RPF interface for S. • If S is not directly connected, the router sends a Join/Prune message for (S,G) towards S. • A router with a connected source S and connected receivers (on interfaces other than that which leads to S) is already on the SPT.

  32. Joining the SPT for (S,G) • Until the router has received at least one packet on the from S via the SPT for G, it must continue to accept packets from S on the RPT for G. • Packets received while waiting for the SPT join to take effect are Case 4. • When the first packet arrives via the SPT, the router sets (S,G) SPT-bit, and subsequent packets from S to G are Case 1.

  33. PIM ExampleB joins the SPT for (S,G) 4. B encapsulates the packet in a Register packet and unicasts it to the RP for G. 5. A decapulates the Register packet and forwards it natively according to (*,G) state (I.e. on the RP tree). R2 3. B forwards the packet according to (S,G) state to oif=4. 6. C forwards the packet according to its (*,G) state. S R1 1. Host S sends a packet destined for group G. B drops the packet when it arrives on the RP tree. Why? 2. Create (S,G) SPT-bit (*,G) iif=NULL oif=1,2 A 2 1 (*,G) iif=2 oif=4 RP(G) = A 2 2 (*,G) iif=2 oif=3 1 1 C 4 B 3 3

  34. Forwarding Flow Chart begin PIM router processing a packet from source S to group G which has arrived on interface X. Does (S,G) exist ? Is it (S,G) iif=X ? yes yes If needed, set (S,G) SPT-bit and send (S,G)RPT prune. no no Is it (S,G) SPT-bit ? yes no Drop the packet. If desired, create (S,G) and send (S,G)SPT join. Is it (*,G) iif=X ? Does (*,G) exist ? Forward the packet to the oif list for this state. yes yes no no Send a Register message to the RP if needed. If S is directly connected, create (S,G) end

  35. Pruning (S,G) from the RPT • When a router is receiving source S for group G via the SPT, it drops those packets from S that arrive on the RPT for G. • After the router has (S,G) SPT-bit state, RPF is violated by the those packets from S to G that arrive via the RPT for G, so those packets must be ignored. • The setting of the SPT-bit flag on (S,G) is a trigger event: I am receiving packets from S to G via the SPT, so I want to prune S from the RPT.

  36. PIM ExampleB prunes (S,G) from the RPT 5. B encapsulates the packet in a Register packet and unicasts it to the RP for G. 3. B sends a (S,G)RPT prune towards the RP for G. 6. A decapulates the Register packet and forwards it natively according to (*,G) state. R2 4. B forwards the packet according to (S,G) state to oif=4. 7. C forwards the packet according to its (*,G) state. R1 S 1. Host S sends a packet destined for group G. B drops the packet when it arrives on the RP tree. Why? 2. Set (S,G) SPT-bit (*,G) iif=NULL oif=1,2 A 2 1 (*,G) iif=2 oif=4 (S,G) iif=3 oif=4 RP(G) = A 2 2 (*,G) iif=2 oif=3 1 1 C 4 B 3 3

  37. (S,G)RPT Prune • The setting of the SPT-bit flag in (S,G) triggers the router to send a Join/Prune message towards the RP for group G. • Group address = G • Join list = NULL • Prune list = {S, RPT}

  38. (S,G)RPT Prune • When a router receives a Join/Prune message with S in the prune list and the RPT bit set • If (S,G) state exists, the interface on which the Join/Prune is received is removed from the oif list. • If (S,G) does not exist and (*,G) state exists,

  39. PIM Example C joins the SPT for (S,G) 3. B encapsulates the packet in a Register packet and unicasts it to the RP for G (router A). 4. A decapulates the Register packet and forwards it natively according to (S,G) state. R2 2. B forwards the packet according to (S,G) state to oif=4. 5. C forwards the packet according to its (*,G) state. S R1 6. Create (S,G) iif=1 -- RPF-neighbor for S oif=3 -- copied from (*,G) 7. C sends Join/Prune for G towards RPF for S. Join=S, Prune=NULL 1. Host S sends another packet destined for group G. (*,G) iif=NULL oif=1,2 (S,G) iif=NULL oif=2 RPT-bit A 2 1 (*,G) iif=2 oif=4 (S,G) iif=3 oif=4 SPT-bit RP(G) = A 2 2 (*,G) iif=2 oif=3 1 1 C 4 B 3 3

  40. PIM Example C prunes the RPT for (S,G) 3. B encapsulates the packet in a Register packet and unicasts it to the RP for G (router A). 4. A decapulates the Register packet and forwards it natively according to (S,G) state. What happens to this packet? R2 2. B forwards the packet according to (S,G) state. 6. C sends an (S,G) RPT prune towards the RP. S R1 1. Host S sends another packet destined for group G. 5. C receives the packet on iif=1, sets the SPT-bit for (S,G) and forwards the packet accordingly. (*,G) iif=NULL oif=1,2 (S,G) iif=NULL oif=2 RPT-bit A 2 1 (*,G) iif=2 oif=4 (S,G) iif=3 oif=4,1 SPT-bit RP(G) = A 2 2 (*,G) iif=2 oif=3 (S,G) iif=1 oif=3 1 1 C 4 B 3 3

  41. PIM Example SPT for (S,G) connecting hosts R1 and R2 (*,G) iif=NULL oif=1,2 (S,G) iif=NULL oif=NULL RPT-bit (*,G) iif=2 oif=4 (S,G) iif=3 oif=4,1 SPT-bit R2 (*,G) iif=2 oif=3 (S,G) iif=1 oif=3 SPT-bit S R1 A 2 1 RP(G) = A 2 2 1 1 C 4 B 3 3

  42. Register Suppression • When the oif list for an (S,G) state on the RP is null, the RP doesn’t want to receive (S,G) register packets. • the oif list is null because there are no downstream receivers for G or because all downstream receivers have pruned S from the RPT for G. • the contents of the register packet won’t be forwarded, so there’s no need to get them in the first place.

  43. Register Suppression • The RP for G unicasts a Register-Stop message to the source of an (S,G) Register message when the oif for (S,G) is null. • The source of the Register packet is always the DR for the network containing S. • The Register-Stop message causes the DR to set the Register Suppression Timer for (S,G). • Even if the DR has no downstream receivers for group G, he’ll create (S,G) oif=null so he’ll have a place to store this timer.

  44. Forwarding Flow Chart begin PIM router processing a packet from source S to group G which has arrived on interface X. Does (S,G) exist ? Is it (S,G) iif=X ? yes yes If needed, set (S,G) SPT-bit and send (S,G)RPT prune. no no Is it (S,G) SPT-bit ? yes no Drop the packet. If desired, create (S,G) and send (S,G)SPT join. Is it (*,G) iif=X ? Does (*,G) exist ? Forward the packet to the oif list for this state. yes yes no no Send a Register message to the RP if needed. If S is directly connected, create (S,G) end

  45. Register Suppression • When the DR receives a packet addresed to group G from a directly connected source S, a Register packet is sent to the RP only if the Register Suppression Timer for (S,G) is not running. • When the timer expires, the first hop router for S resumes sending Register packets. • If (S,G) is (still) fully pruned from the RPT, the RP will (again) send a Register-Stop to the source of the Register packet.

  46. PIM Example RP sends a Register-Stop to B 3. B encapsulates the packet in a Register packet and unicasts it to the RP for G (router A). 4. A unicasts a Register-Stop to B. 5. B sets the Register Suppression Timer for (S,G). R2 2. B and C forward the packet according to (S,G) state. S R1 1. Host S sends another packet destined for group G. (*,G) iif=NULL oif=1,2 (S,G) iif=NULL oif=NULL RPT-bit A 2 1 (*,G) iif=2 oif=4 (S,G) iif=3 oif=4,1 SPT-bit RP(G) = A 2 (*,G) iif=2 oif=3 (S,G) iif=1 oif=3 SPT-bit 2 1 1 C 4 B 3 3

  47. RP Joins the SPT for (S,G) • When the RP receives a Register packet for from source S to group G it may elect to join the SPT for source S. • The RP acts like a last-hop router and a first-hop router. • More efficient when there are intermediate routers between the first hop router for S and the RP that have existing (S,G) state. • Reduces overhead on the RP -- unlike a Register packet, a native (S,G) packet requires no decapsulation.

  48. PIM ExampleRP joins the SPT for (S,G) 5. Update (S,G) set iif=1. 6. Send Join/Prune towards RPF neighbor for S. Group=G, Join=S, Prune=NULL. 4. A decapulates the Register packet and it is forwarded natively according to existing state. R2 2. B forwards the packet according to (S,G) state to oif=4. S R1 1. Host S sends a packet destined for group G. 3. B encapsulates the packet in a Register message and unicasts it to the RP for G (router A). (*,G) iif=NULL oif=1,2 (S,G) iif=NULL oif=2 RPT-bit A 2 1 (*,G) iif=2 oif=4 (S,G) iif=3 oif=4 SPT-bit RP(G) = A 2 2 (*,G) iif=2 oif=3 1 1 C 4 B 3 3

  49. Register Supression (Again) • When the RP has (S,G)SPT-bit state, it doesn’t want to receive Register packets in which the payload is a multicast packet from source S to group G. • SPT-bit is set because the RP is receiving packets from S to G natively on the shortest path tree. • The RP unicasts a Register-Stop to the DR for S whenever it receives an (S,G) Register packet while (S,G) SPT-bit state exists.

  50. PIM ExampleRP sends a Register-Stop to B What happens if the Register message arrives first? 3. B encapsulates the packet in a Register message and unicasts it to the RP for G (router A). 4. A receives native packet from B on interface 1 and sets SPT bit for (S,G). The packet is then forwarded according to existing state. R2 2. B forwards the packet according to (S,G) state. 5. A unicasts a Register-Stop to B. B sets the Register Suppression timer for (S,G). S R1 1. Host S sends another packet destined for group G. (*,G) iif=NULL oif=1,2 (S,G) iif=1 oif=2 RPT-bit A 2 1 (*,G) iif=2 oif=4 (S,G) iif=3 oif=2,4 SPT-bit RP(G) = A 2 2 (*,G) iif=2 oif=3 1 1 C 4 B 3 3

More Related