Introduction of PIM
Protocol Independent Multicast (PIM) as the name suggests, is a multicast routing protocol independent of the unicast routing protocol. It indicates that PIM does not need to maintain dedicated unicast routing information. As a multicast routing solution, it directly uses the routing information of the unicast routing table to perform the Reverse Path Forwarding (RPF) check on the multicast packets. If the RPF check passed, a multicast routing entry and a forwarding table is built for multicast packets forwarding.
As a multicast routing protocol in an IPv4 network, PIM is mainly used to send multicast data streams to multicast devices which is connected to the group members with multicast data requests, implementing route lookup and forwarding of multicast data.
PIM protocol includes two modes: Sparse Mode (PIM-SM) and Dense Mode (PIM-DM). Note that currently, PICOS only supports PIM-SM mode.
This guide provides a brief description and the configuration procedure about PIM-SM in the following section. For details about the working principle of PIM-SM, please refer to RFC standard in 1.4 RFC List.
NOTE:
- PIM protocol supports VRF.
- If PIM is configured on a L3 interface added to a VRF, when delete the VRF or the L3 interface after delete PIM, and then roll back to the original configuration, PIM will not work with no multicast routes generated.
PIM Multicast Routing and Forwarding Table
In the implementation of the PIM multicast protocol, two multicast routing forwarding tables including the Multicast Routing Information Base (MRIB) and Multicast Forwarding Table are used for multicast data forwarding.
- Multicast Routing Information Base (MRIB)
MRIB in PIM-SM protocol provides the next-hop route along a multicast-capable path to each destination subnet which indicates the path that a multicast data packet would take from its origin subnet to the router that has the MRIB information. The MRIB is used to determine the next-hop neighbor to which any PIM Join/Prune message is sent. Data flows along the reverse path of the Join messages. You can use run show pim mrib command to view the detail information of PIM MRIB.
- Multicast Forwarding Table
Multicast Forwarding Table is directly used to control the forwarding of multicast packets. The PIM protocol contains two forwarding entries: (S, G) forwarding entries or (*, G) forwarding entries. S indicates a multicast source, G indicates a multicast group, and * indicates all the Source.
• The (S, G) forwarding entry is mainly used to build an SPT tree in the PIM network.
• The (*, G) forwarding entry is mainly used to build an RPT tree in the PIM network.
You can use the run show pim mfc command to view the Multicast Forwarding Table information. The information used to guide multicast data forwarding in Multicast Forwarding Table are as follows:
• Multicast source address.
• Multicast group address.
• Incoming interface: The interface on the local router that receives multicast data.
• Outgoing interfaces: The interface that forwards multicast data out.
Static RP and Dynamic RP
When the PIM-SM Bootstrap Router mechanism is enabled to dynamically elect an RP, the PICOS switch can receive C-RP advertisement messages sent by other PIM switches. It can then calculate and compare these messages to elect the RP for a specific group from multiple C-RPs. However, the PICOS switch itself does not participate in the election as a BSR or dynamic RP.
Rendezvous Point (RP) is an important PIM-SM router which functions as a conjunction point of the PIM multicast network. RP receives and processes the PIM Register packets from the multicast Source and PIM Join message from the group member to build the PIM Multicast Routing and Forwarding Table for multicast data forwarding.
All PIM routers in the network should know the address of the RP. An RP can serve for multiple multicast Groups at the same time, but a multicast Group can be mapping to one RP. On Pica8 switch, there is two types of RP: static RP and dynamic RP.
- Static RP: Statically configured RP by user to specify the location of the RP. The users should configure the same static RP information (including RP address, RP priority and hash mask length) on all PIM-enabled routers in the network.
- Dynamic RP: PIM BootStrap Router mechanism is utilized to dynamically elect an RP for the PIM-SM domain. When dynamic RP is deployed, BSR router is responsible for collecting Candidate RP (C-RP) information and summarizing C-RP information into an RP-set. The RP-set is then encapsulated in a BootStrap message and advertised to all the devices in the PIM-SM domain. When received the RP-set, each router in the network selects a corresponding RP for a specific multicast group from among multiple C-RPs provided by the RP-Set.
A PIM-SM router must either run the PIM-SM BootStrap Router mechanism to dynamically elect an RP, or have some RPs configured as static RP settings.
Both the static RP and the dynamic RP participate in the RP election if both are configured. PIM routers elects an RP from multiple C-RPs and the static RPs according to the following rules:
- The C-RP or static RP with highest priority wins.
- If multiple C-RPs or static RPs have the same priority, the C-RP or static RP with the largest hash value wins.
- If all the preceding factors are the same, the C-RP or static RP with the largest address wins.
PIM-SM and PIM-SSM
PIM-SM is widely used in large-scale networks with sparsely distributed group members. The key mechanisms of PIM-SM include Neighbor Discovery, DR Election, RP Discovery, RPT Tree Building, Multicast Source Registration, SPT Switchover and Assertion.
PIM Source-Specific Multicast (PIM-SSM) model uses part of the PIM-SM mode technology in practical deployment to provide a solution for source-specific multicast. It maintains the relationship between the host and the router through IGMPv3.
Since the receiver has already known the location of the multicast source in PIM-SSM mode, there is no need for an RP in the SSM model, no need to build an RPT tree, and the multicast source registration process is not required. The PIM-SSM model uses three working mechanisms of PIM-SM: Neighbor Discovery, DR Election and SPT Tree Building to implement multicast forwarding tasks in the PIM domain.
NOTE: Enable IGMPv3 on the L3 interfaces of the PIM router connected to the receiver when configuring PIM-SSM. |
Copyright © 2024 Pica8 Inc. All Rights Reserved.