{"id":33142,"date":"2019-10-31T21:50:58","date_gmt":"2019-10-31T18:50:58","guid":{"rendered":"https:\/\/prohoster.info\/blog\/printsipy-raboty-protokola-pim\/"},"modified":"2019-10-31T21:50:58","modified_gmt":"2019-10-31T18:50:58","slug":"printsipy-raboty-protokola-pim","status":"publish","type":"post","link":"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/printsipy-raboty-protokola-pim","title":{"rendered":"Principles of PIM Protocol Operation","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>The PIM protocol is a set of protocols for transmitting multicast in networks between routers. Neighbor relationships are established similarly to dynamic routing protocols. PIMv2 sends Hello messages every 30 seconds to the reserved multicast address 224.0.0.13 (All-PIM-Routers). The message contains Hold Timers, which are typically equal to 3.5 * Hello Timer, or 105 seconds by default.<br \/>\n<noindex><a rel=\"nofollow\" href=\"https:\/\/i.imgur.com\/AqjQmPR.jpg\"><img decoding=\"async\" alt=\"Principles of PIM Protocol Operation\" src=\"\/wp-content\/uploads\/2019\/05\/f2e0c7dbdb8d7640671440289fbcd91f.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/a><\/noindex><br \/>\n PIM uses two main operating modes \u2014 Dense and Sparse mode. Let's start with Dense mode. <noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><br \/>\n<b>Source-Based Distribution Trees.<\/b><br \/>\nDense mode is advisable to use when there are a large number of clients from various multicast groups. When a router receives multicast traffic, the first thing it does is check it against the RPF rule. RPF is a rule used to verify the source of the multicast against the unicast routing table. The traffic must arrive on the interface behind which the host is hidden according to the unicast routing table. This mechanism solves the problem of loops occurring during multicast transmission.<br \/>\n <noindex><a rel=\"nofollow\" href=\"https:\/\/i.imgur.com\/RE54lnP.png\"><img decoding=\"async\" alt=\"Principles of PIM Protocol Operation\" src=\"\/wp-content\/uploads\/2019\/05\/4d855ea59c6329c7e727cc70a79367b2.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/a><\/noindex><br \/>\nR3 learns the source of the multicast (Source IP) from the multicast message and checks two streams from R1 and R2 against its unicast table. The stream from the interface indicated by the table (R1 to R3) will be forwarded, while the stream from R2 will be dropped, as packets need to be sent via S0\/1 to reach the multicast source.<br \/>\nWhat happens if you have two equivalent routes with the same metric? In this case, the router will choose based on the next-hop of these routes. The one with the higher IP address wins. If you need to change this behavior, you can use ECMP. Learn more. <noindex><a rel=\"nofollow\" href=\"https:\/\/drive.google.com\/file\/d\/1yiam4-OwlDoXrfdfdienMN_nQaOJGi29\/view?usp=sharing\">here<\/a><\/noindex>.<br \/>\nAfter checking the RPF rule, the router sends the multicast packet to all its PIM neighbors, except for the one from whom the packet was received. The other PIM routers repeat this process. The path that the multicast packet takes from the source to the final recipients forms a tree called a source-based distribution tree, shortest-path tree (SPT), or source tree. Three different names, choose any.<br \/>\nHow to deal with situations where some routers don't want a particular multicast stream and have no one to send it to, yet an upstream router sends it to them? The Prune mechanism was invented for this. <br \/>\n<b>Prune Message.<\/b><br \/>\nFor instance, R2 will continue sending multicast to R3, even though R3 drops it according to the RPF rule. Why overload the channel? R3 sends a PIM Prune Message, and upon receiving this message, R2 will remove the S0\/1 interface from the outgoing interface list for that stream, which is the list of interfaces from where this traffic should be sent. <\/p>\n<blockquote><p>The following is a more formal definition of a PIM Prune message:<br \/>\nThe PIM Prune message is sent by one router to a second router to cause the second router to remove the link on which the Prune is received from a particular (S,G) SPT.<\/p><\/blockquote>\n<p>\nAfter receiving the Prune message, R2 sets the Prune timer to 3 minutes. After three minutes, it will start sending traffic again, unless it receives another Prune message. This is in PIMv1.<br \/>\nIn PIMv2, a State Refresh timer is added (default 60 seconds). As soon as a Prune message is sent from R3, this timer starts on R3. Upon the timer expiring, R3 will send a State Refresh message, which will reset the 3-minute Prune Timer on R2 for that group. <br \/>\nReasons for sending a Prune message:<\/p>\n<ul>\n<li> When a multicast packet has failed the RPF check.<\/li>\n<li> When there are no locally connected clients that have requested the multicast group (IGMP Join), and there are no PIM neighbors to which multicast traffic can be sent (Non-prune Interface).<\/li>\n<\/ul>\n<p>\n<b>Graft Message.<\/b><br \/>\nImagine that R3 did not want traffic from R2, sent a Prune, and was receiving multicast from R1. But suddenly, the link between R1 and R3 goes down, and R3 is left without multicast. Waiting for 3 minutes until R2's Prune Timer expires is too long; to avoid waiting, it is necessary to send a message that will immediately bring the S0\/1 interface on R2 out of the pruned state. This message will be the Graft message. After receiving the Graft message, R2 will respond with a Graft-ACK.<br \/>\n<b>Prune Override.<\/b><br \/>\n <noindex><a rel=\"nofollow\" href=\"https:\/\/i.imgur.com\/zfo0Dx5.png\"><img decoding=\"async\" alt=\"Principles of PIM Protocol Operation\" src=\"\/wp-content\/uploads\/2019\/05\/72e368905d2e37ba9b9d46101ebcd8ae.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/a><\/noindex><br \/>\nLet's look at this diagram. R1 is broadcasting multicast in a segment with two routers. R3 receives and broadcasts traffic, R2 receives but has no one to broadcast to. It sends a Prune message to R1 in this segment. R1 must remove Fa0\/0 from the list and stop broadcasting to this segment, but what will happen to R3? R3 is in the same segment, also received this Prune message, and understands the gravity of the situation. Before R1 stops broadcasting, it sets a timer for 3 seconds and will stop broadcasting in 3 seconds. R3 has exactly 3 seconds to avoid losing its multicast. Therefore, R3 quickly sends a Pim Join message for this group, and R1 no longer thinks about stopping broadcasting. More on Join messages below.<br \/>\n<b>Assert Message.<\/b><br \/>\n <noindex><a rel=\"nofollow\" href=\"https:\/\/i.imgur.com\/rliwmNF.png\"><img decoding=\"async\" alt=\"Principles of PIM Protocol Operation\" src=\"\/wp-content\/uploads\/2019\/05\/f7cc9c247cd26a8f9567b170f9b61bbb.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/a><\/noindex><br \/>\nImagine a situation where two routers simultaneously broadcast to one network. They receive the same stream from the source and both broadcast it to one network through interface e0. Therefore, they need to determine who will be the sole broadcaster for this network. Assert messages are used for this purpose. When R2 and R3 detect duplication of multicast traffic, meaning both routers received the multicast they themselves are broadcasting, they realize something is wrong. In this case, the routers send Assert messages that include Administrative Distance and the route metric used to reach the multicast source \u2014 10.1.1.10. The winner is determined as follows:<\/p>\n<ol>\n<li>The one with the lower AD.<\/li>\n<li>If the ADs are equal, then the one with the lower metric.<\/li>\n<li>If there's still a tie, the one with the higher IP address in the network to which they are broadcasting this multicast.<\/li>\n<\/ol>\n<p>\nThe router that wins this voting becomes the Designated Router (DR). Pim Hello messages are also used to select the DR. At the beginning of the article, a PIM Hello message was shown, where the DR field can be noticed. The one with the higher IP address on this link wins.<br \/>\nUseful table:<br \/>\n <noindex><a rel=\"nofollow\" href=\"https:\/\/i.imgur.com\/Et1kP7h.png\"><img decoding=\"async\" alt=\"Principles of PIM Protocol Operation\" src=\"\/wp-content\/uploads\/2019\/05\/d450c9fac2b6d74c5b7414d85910bca4.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/a><\/noindex><br \/>\n<b>MROUTE Table.<\/b><br \/>\nAfter initially reviewing the PIM protocol operation, we need to understand how to work with the multicast routing table. The mroute table stores information about which streams have been requested by clients and which streams are flowing from multicast servers. <br \/>\nFor example, upon receiving an IGMP Membership Report or PIM Join on some interface, a record of type ( *, G ) is added to the routing table:<br \/>\n <noindex><a rel=\"nofollow\" href=\"https:\/\/i.imgur.com\/ufXsgnR.jpg\"><img decoding=\"async\" alt=\"Principles of PIM Protocol Operation\" src=\"\/wp-content\/uploads\/2019\/05\/094d96f36512c3b1b8d179044f354ac1.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/a><\/noindex><br \/>\nThis entry means that a request for traffic has been received from the address 238.38.38.38. The DC flag indicates that multicast will operate in Dense mode, and C means that the recipient is directly connected to the router, meaning the router has received the IGMP Membership Report and the PIM Join.<br \/>\nIf there is an (S,G) entry, it means that we have a multicast stream:<br \/>\n <noindex><a rel=\"nofollow\" href=\"https:\/\/i.imgur.com\/QJCZZwf.jpg\"><img decoding=\"async\" alt=\"Principles of PIM Protocol Operation\" src=\"\/wp-content\/uploads\/2019\/05\/56f2e8376a7f89f3fd3082a098ce42e5.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/a><\/noindex><br \/>\nIn the field S \u2014 192.168.1.11, we have the IP address of the multicast source, which will be checked by the RPF rule. In case of problems, the first thing to check is the unicast table for a route to the source. The Incoming Interface field indicates the interface through which the multicast arrives. In the unicast routing table, the route to the source should point to the interface specified here. The Outgoing Interface indicates where the multicast will be redirected. If it is empty, it means that there were no requests for this traffic sent to the router. More detailed information about all the flags can be found <noindex><a rel=\"nofollow\" href=\"https:\/\/drive.google.com\/file\/d\/1ArBLFJdyN8tCangB5GL2JaS47FEZaad-\/view?usp=sharing\">here<\/a><\/noindex>.<br \/>\n<b>PIM Sparse-mode.<\/b><br \/>\nThe Sparse-mode strategy is the opposite of Dense-mode. When Sparse-mode receives multicast traffic, it will send traffic only through those interfaces where there have been requests for this stream, such as Pim Join or IGMP Report messages requesting this traffic.<br \/>\nSimilar elements in SM and DM:<\/p>\n<ul>\n<li> Neighbor relationships are established the same way as in PIM DM.<\/li>\n<li> The RPF rule is in effect.<\/li>\n<li> The selection of DR is similar.<\/li>\n<li> The Prune Overrides mechanism and Assert messages are analogous.<\/li>\n<\/ul>\n<p>\nTo control who needs what multicast traffic and where in the network, a common information center is required. This center will be the Rendezvous Point (RP). Anyone who wants any multicast traffic or who has started receiving multicast traffic from the source sends it to the RP.<br \/>\nWhen the RP receives multicast traffic, it will send it to those routers that previously requested this traffic. <br \/>\n <noindex><a rel=\"nofollow\" href=\"https:\/\/i.imgur.com\/5AErtbS.jpg\"><img decoding=\"async\" alt=\"Principles of PIM Protocol Operation\" src=\"\/wp-content\/uploads\/2019\/05\/35646434f8b80a8a05253111864de2da.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/a><\/noindex><br \/>\nLet's imagine a topology where the RP is R3. Once R1 receives traffic from S1, it will encapsulate this multicast packet in a unicast PIM Register message and send it to the RP. How does it know who the RP is? In this case, it is statically configured, and we will talk about dynamic RP configuration later. <\/p>\n<blockquote><p>ip pim rp-address 3.3.3.3<\/p><\/blockquote>\n<p>\nThe RP will check if there was any information from someone who wanted to receive this traffic. Let's assume there wasn't. Then, the RP will send R1 a PIM Register-Stop message, meaning that no one needs this multicast, and registration is denied. R1 will not send the multicast. However, the multicast source host will continue to send it, so after receiving the Register-Stop, R1 will start the Register-Suppression timer, set to 60 seconds. Five seconds before this timer expires, R1 will send an empty Register message with the Null-Register bit (i.e., without the encapsulated multicast packet) toward the RP. In turn, the RP will act as follows:<\/p>\n<ul>\n<li> If there were no recipients, it will respond with a Register-Stop message.<\/li>\n<li> If recipients appear, it will not respond to it at all. Not receiving a denial to its registration within 5 seconds, R1 will be happy and send a Register message with the encapsulated multicast to the RP.<\/li>\n<\/ul>\n<p>\nHaving established how the multicast reaches the RP, let's now address how the RP delivers the traffic to the recipients. Here, we need to introduce a new concept \u2014 root-path tree (RPT). The RPT is a tree with its root at the RP, growing toward the recipients, branching at each PIM-SM router. The RP creates it by receiving PIM Join messages and adds a new branch to the tree. Each downstream router does the same. The general rule is as follows:<\/p>\n<ul>\n<li> When a PIM-SM router receives a PIM Join message on any interface other than the interface behind which the RP is hidden, it adds a new branch to the tree.<\/li>\n<li> A branch is also added when a PIM-SM router receives an IGMP Membership Report from a directly connected host. <\/li>\n<\/ul>\n<p>\nImagine we have a multicast client on router R5 for group 228.8.8.8. As soon as R5 receives an IGMP Membership Report from the host, R5 sends a PIM Join toward the RP and adds the interface facing the host to the tree. Next, R4 receives the PIM Join from R5, adds interface Gi0\/1 to the tree, and sends the PIM Join toward the RP. Finally, the RP (R3) receives the PIM Join and adds Gi0\/0 to the tree. Thus, we have a registration for the multicast recipient. A tree is constructed with root R3-Gi0\/0 \u2192 R4-Gi0\/1 \u2192 R5-Gi0\/0.<br \/>\nAfter this, a PIM Join will be sent to R1, and R1 will start sending multicast traffic. It is important to note that if the host requests traffic before the multicast broadcasting starts, the RP will not send a PIM Join and will not send anything to R1 at all.<br \/>\nIf, while the multicast is being sent, the host stops wanting to receive it, as soon as the RP receives a PIM Prune on the Gi0\/0 interface, it will immediately send a PIM Register-Stop directly to R1, and then a PIM Prune message through the Gi0\/1 interface. The PIM Register-Stop is sent unicasted to the address from which the PIM Register was received.<br \/>\nAs we mentioned earlier, as soon as the router sends a PIM Join to another, for example R5 to R4, an entry is added on R4:<br \/>\n <noindex><a rel=\"nofollow\" href=\"https:\/\/i.imgur.com\/msZjbr8.jpg\"><img decoding=\"async\" alt=\"Principles of PIM Protocol Operation\" src=\"\/wp-content\/uploads\/2019\/05\/d1d621bee37e4b912a672690c581617a.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/a><\/noindex><br \/>\nAnd a timer starts, which the R5 must continually reset by sending PIM Join messages, otherwise R4 will exclude it from the outgoing list. R5 will send PIM Join messages every 60 seconds.<br \/>\n<b>Shortest-Path Tree Switchover.<\/b><br \/>\nWe will add an interface between R1 and R5 and see how the traffic flows with this topology. <br \/>\n <noindex><a rel=\"nofollow\" href=\"https:\/\/i.imgur.com\/wLKEyyg.jpg\"><img decoding=\"async\" alt=\"Principles of PIM Protocol Operation\" src=\"\/wp-content\/uploads\/2019\/05\/4b15057a1d30f3b2d6246b8f3b6263eb.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/a><\/noindex><br \/>\nLet's assume that traffic was sent and received using the old scheme R1-R2-R3-R4-R5, and now we have connected and configured an interface between R1 and R5.<br \/>\nFirst, our unicast routing table on R5 will be rebuilt, and now the network 192.168.1.0\/24 is reachable through the R5 Gi0\/2 interface. Now R5, receiving multicast on the Gi0\/1 interface, understands that the RPF rule is not satisfied and it would be more logical to receive multicast on Gi0\/2. It must disconnect from the RPT and build a shorter tree called the Shortest-Path Tree (SPT). For this, it sends a PIM Join to R1 through Gi0\/2, and R1 starts sending multicast also through Gi0\/2. Now R5 needs to unsubscribe from RPT to avoid receiving two copies. To do this, it sends a Prune message specifying the source IP address and inserting a special bit \u2014 the RPT-bit. This means that it does not need traffic sent to it, as it has a better tree. The RP also sends PIM Prune messages towards R1, but does not send a Register-Stop message. Another feature: R5 will now constantly send PIM Prunes to the RP since R1 continues to send PIM Registers to the RP every minute. The RP will respond with refusals until there are new requests for this traffic. R5 notifies the RP that it continues to receive multicast through the SPT.<br \/>\n<b>Dynamic RP Discovery. <br \/>\nAuto-RP.<\/b><br \/>\nThis technology is proprietary to Cisco and is not widely popular, but it is still in use. The operation of Auto-RP consists of two main stages:<br \/>\n1) RP sends RP-Announce messages to the reserved address \u2014 224.0.1.39, announcing itself as the RP either for all or for specific groups. This message is sent every minute.<br \/>\n2) A necessary RP mapping agent sends RP-Discovery messages indicating which RP should be listened to for which groups. It is from this message that regular PIM routers will identify the RP for themselves. The Mapping Agent can be either the RP router itself or a separate PIM router. RP-Discovery is sent to address 224.0.1.40 with a one-minute timer.<br \/>\nLet's take a closer look at the process:<br \/>\nWe will configure R3 as the RP:<\/p>\n<blockquote><p>ip pim send-rp-announce loopback 0 scope 10<\/p><\/blockquote>\n<p>\nR2 as the mapping agent:<\/p>\n<blockquote><p>ip pim send-rp-discovery loopback 0 scope 10<\/p><\/blockquote>\n<p>\nAnd on all others, we will wait for RP through Auto-RP:<\/p>\n<blockquote><p>ip pim autorp listener<\/p><\/blockquote>\n<p>\nOnce we configure R3, it will start sending RP-Announce:<br \/>\n <noindex><a rel=\"nofollow\" href=\"https:\/\/i.imgur.com\/6c4WucN.jpg\"><img decoding=\"async\" alt=\"Principles of PIM Protocol Operation\" src=\"\/wp-content\/uploads\/2019\/05\/3077778bb47731bb02a8e7fc6945aa63.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/a><\/noindex><br \/>\nAnd R2, after being configured as the mapping agent, will start waiting for the RP-Announce messages. Only when it finds at least one RP will it begin sending RP-Discovery:<br \/>\n <noindex><a rel=\"nofollow\" href=\"https:\/\/i.imgur.com\/lw2JuDD.jpg\"><img decoding=\"async\" alt=\"Principles of PIM Protocol Operation\" src=\"\/wp-content\/uploads\/2019\/05\/37eff65f3c359cd3091c47af22220a6b.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/a><\/noindex><br \/>\nThus, as soon as regular routers (PIM RP Listener) receive this message, they will know where to look for the RP.<br \/>\nOne of the main problems with Auto-RP is that to receive RP-Announce and RP-Discovery messages, it is necessary to send PIM Join to the addresses 224.0.1.39-40, and to send, the RP's location must be known. This is the classic chicken and egg problem. To resolve this issue, the PIM Sparse-Dense Mode was invented. If the router does not know the RP, it operates in Dense-mode; if it does know, it operates in Sparse-mode. When PIM Sparse-mode and the command ip pim autorp listener are configured on the interfaces of regular routers, the router will operate in Dense-mode only for the multicast directly related to the Auto-RP protocol (224.0.1.39-40).<br \/>\n<b>BootStrap Router (BSR).<\/b><br \/>\nThis function operates similarly to Auto-RP. Each RP sends a message to the mapping agent, which collects mapping information and then informs all other routers. We will describe the process similarly to Auto-RP:<br \/>\n1) Once we configure R3 as a candidate to be the RP, using the command:<\/p>\n<blockquote><p>ip pim rp-candidate loopback 0<\/p><\/blockquote>\n<p>\nR3 will not do anything; to start sending special messages, it first needs to find the mapping agent. Therefore, we move to the second step.<br \/>\n2) We configure R2 as the mapping agent:<\/p>\n<blockquote><p>ip pim bsr-candidate loopback 0<\/p><\/blockquote>\n<p>\nR2 begins sending PIM Bootstrap messages, designating itself as the mapping agent.<br \/>\n<noindex><a rel=\"nofollow\" href=\"https:\/\/i.imgur.com\/uAj49oT.jpg\"><img decoding=\"async\" alt=\"Principles of PIM Protocol Operation\" src=\"\/wp-content\/uploads\/2019\/05\/2b05ffd64bd33ee5380aa24d5f76df67.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/a><\/noindex><br \/>\nThis message is sent to the address 224.0.0.13, which the PIM protocol uses for its other messages as well. It sends them in all directions, so there's no chicken-and-egg issue as in Auto-RP.<br \/>\n3) As soon as the RP receives a message from the BSR router, it immediately sends a unicast message to the BSR router's address.<br \/>\n<noindex><a rel=\"nofollow\" href=\"https:\/\/i.imgur.com\/qwtXY88.jpg\"><img decoding=\"async\" alt=\"Principles of PIM Protocol Operation\" src=\"\/wp-content\/uploads\/2019\/05\/38547a114a2bca74131c95b95e535fdc.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/a><\/noindex><br \/>\nAfter that, BSR, having received information about the RP, will multicast it to the address 224.0.0.13, which is listened to by all PIM routers. Therefore, there is no equivalent command <i>ip pim autorp listener<\/i> for regular routers in BSR.<br \/>\n<b>Anycast RP with Multicast Source Discovery Protocol (MSDP).<\/b><br \/>\nAuto-RP and BSR allow us to distribute the load on the RP as follows: Each multicast group has only one active RP. It's not possible to distribute the load for a single multicast group across multiple RPs. MSDP does this by providing the RPs with the same IP address with a mask of 255.255.255.255. MSDP learns information using one of the methods: static, Auto-RP, or BSR.<br \/>\n<noindex><a rel=\"nofollow\" href=\"https:\/\/i.imgur.com\/U4aDz5H.png\"><img decoding=\"async\" alt=\"Principles of PIM Protocol Operation\" src=\"\/wp-content\/uploads\/2019\/05\/c0352b5fbc5780f667c6c97ea6dde26d.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/a><\/noindex><br \/>\nIn the diagram, we have an Auto-RP configuration with MSDP. Both RPs are configured with the IP address 172.16.1.1\/32 on the Loopback 1 interface and are used for all groups. During RP-Announce, both routers inform about themselves, referencing this address. The Auto-RP mapping agent, upon receiving this information, broadcasts RP-Discovery about the RP with the address 172.16.1.1\/32. For the network 172.16.1.1\/32, we inform the routers using IGP, and so on. Thus, PIM routers query or register streams from the RP specified as the next-hop in the route to the network 172.16.1.1\/32. The MSDP protocol itself is designed for the RPs to exchange messages about multicast information.<br \/>\nLet's consider the following topology:<br \/>\n<noindex><a rel=\"nofollow\" href=\"https:\/\/i.imgur.com\/zgkGDOP.jpg\"><img decoding=\"async\" alt=\"Principles of PIM Protocol Operation\" src=\"\/wp-content\/uploads\/2019\/05\/e4823362e7a2abc9b4ee9ba954d709b8.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/a><\/noindex><br \/>\nSwitch6 broadcasts traffic to the address 238.38.38.38, and only RP-R1 knows about it so far. Switch7 and Switch8 have requested this group. Routers R5 and R4 will send PIM Join to R1 and R3, respectively. Why? The route to 13.13.13.13 for R5 will point to R1 based on IGP metric, just like R4.<br \/>\nRP-R1 knows about the stream and will start broadcasting it towards R5, while R4 knows nothing about it since R1 won't send it without a request. Hence, MSDP is necessary. We configure it on R1 and R5:<\/p>\n<blockquote><p>ip msdp peer 3.3.3.3 connect-source Loopback1 on R1<\/p><\/blockquote>\n<p><\/p>\n<blockquote><p>ip msdp peer 1.1.1.1 connect-source Loopback3 on R3<\/p><\/blockquote>\n<p>\nThey will establish a session between each other and upon receiving any stream will inform their RP neighbor about it.<br \/>\nAs soon as RP-R1 receives a stream from Switch6, it will immediately send a unicast MSDP Source-Active message containing information such as (S, G) \u2014 information about the source and destination of the multicast. Now, when RP-R3 is aware that there is a source like Switch6, upon receiving a request from R4 for that stream, it will send a PIM Join towards Switch6, guided by the routing table. Consequently, R1 receiving such a PIM Join will start sending traffic towards RP-R3.<br \/>\nMSDP operates over TCP, with RPs sending keepalive messages to each other for viability checks. The timer is set to 60 seconds.<br \/>\nThe function of separating MSDP peers into different domains remains unclear, as the Keepalive and SA messages do not specify belonging to any domain. Additionally, in this topology, a configuration specifying different domains was tested \u2014 there was no difference in operation. <br \/>\nIf anyone can provide clarity, I would be happy to read it in the comments.<br \/>\n<br \/>Source: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/450582\/\">habr.com<\/a><\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u041f\u0440\u043e\u0442\u043e\u043a\u043e\u043b PIM \u2014 \u044d\u0442\u043e \u043d\u0430\u0431\u043e\u0440 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u043c\u0443\u043b\u044c\u0442\u0438\u043a\u0430\u0441\u0442\u0430 \u0432 \u0441\u0435\u0442\u0438 \u043c\u0435\u0436\u0434\u0443 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u0430\u043c\u0438. \u041e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f \u0441\u043e\u0441\u0435\u0434\u0441\u0442\u0432\u0430 \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u043a\u0430\u043a \u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438. PIMv2 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043a\u0430\u0436\u0434\u044b\u0435 30 \u0441\u0435\u043a\u0443\u043d\u0434 Hello \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043d\u0430 \u0437\u0430\u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043c\u0443\u043b\u044c\u0442\u0438\u043a\u0430\u0441\u0442 \u0430\u0434\u0440\u0435\u0441 224.0.0.13 ( All-PIM-Routers ). \u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432 \u0441\u0435\u0431\u0435 Hold Timers \u2014 \u043e\u0431\u044b\u0447\u043d\u043e \u0440\u0430\u0432\u0435\u043d 3.5*Hello Timer, \u0442\u043e \u0435\u0441\u0442\u044c 105 \u0441\u0435\u043a\u0443\u043d\u0434 \u043f\u043e [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":24886,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[688],"tags":[],"class_list":["post-33142","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-administrirovanie"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.1.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u041f\u0440\u043e\u0442\u043e\u043a\u043e\u043b PIM \u2014 \u044d\u0442\u043e \u043d\u0430\u0431\u043e\u0440 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u043c\u0443\u043b\u044c\u0442\u0438\u043a\u0430\u0441\u0442\u0430 \u0432 \u0441\u0435\u0442\u0438 \u043c\u0435\u0436\u0434\u0443 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u0430\u043c\u0438. \u041e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f \u0441\u043e\u0441\u0435\u0434\u0441\u0442\u0432\u0430 \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u043a\u0430\u043a \u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/printsipy-raboty-protokola-pim\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.1.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u041f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 PIM | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u041f\u0440\u043e\u0442\u043e\u043a\u043e\u043b PIM \u2014 \u044d\u0442\u043e \u043d\u0430\u0431\u043e\u0440 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u043c\u0443\u043b\u044c\u0442\u0438\u043a\u0430\u0441\u0442\u0430 \u0432 \u0441\u0435\u0442\u0438 \u043c\u0435\u0436\u0434\u0443 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u0430\u043c\u0438. \u041e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f \u0441\u043e\u0441\u0435\u0434\u0441\u0442\u0432\u0430 \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u043a\u0430\u043a \u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/printsipy-raboty-protokola-pim\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2019-10-31T18:50:58+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2019-10-31T18:50:58+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Principles of the PIM Protocol | ProHoster","description":"The PIM protocol is a set of protocols for transmitting multicast in networks between routers. Neighbors are formed similarly to how they are in dynamic routing protocols.","canonical_url":"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/printsipy-raboty-protokola-pim","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"en_US","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u041f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 PIM | ProHoster","og:description":"\u041f\u0440\u043e\u0442\u043e\u043a\u043e\u043b PIM \u2014 \u044d\u0442\u043e \u043d\u0430\u0431\u043e\u0440 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u043c\u0443\u043b\u044c\u0442\u0438\u043a\u0430\u0441\u0442\u0430 \u0432 \u0441\u0435\u0442\u0438 \u043c\u0435\u0436\u0434\u0443 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u0430\u043c\u0438. \u041e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f \u0441\u043e\u0441\u0435\u0434\u0441\u0442\u0432\u0430 \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u043a\u0430\u043a \u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438.","og:url":"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/printsipy-raboty-protokola-pim","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2019-10-31T18:50:58+00:00","article:modified_time":"2019-10-31T18:50:58+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"33142","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":"2026-01-21 14:06:19","breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-03-01 02:46:23","updated":"2026-01-21 14:06:19","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/33142","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/comments?post=33142"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/33142\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media\/24886"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media?parent=33142"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/categories?post=33142"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/tags?post=33142"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}