Information about PIM
PIM, which is used between multicast-capable routers, advertises group membership across a routing domain by constructing multicast distribution trees. PIM builds shared distribution trees on which packets from multiple sources are forwarded, as well as source distribution trees on which packets from a single source are forwarded. For more information about multicast, see the Information About Multicast section.
Cisco NX-OS supports PIM sparse mode for IPv4 networks (PIM). (In PIM sparse mode, multicast traffic is sent only to locations of the network that specifically request it.) You can configure PIM to run simultaneously on a router. You can use PIM global parameters to configure rendezvous points (RPs), message packet filtering, and statistics. You can use PIM interface parameters to enable multicast, identify PIM borders, set the PIM hello message interval, and set the designated router (DR) priority. For more information, see the Configuring PIM Sparse Mode section.
Note |
Cisco Nexus 3600 platform switches do not support PIM dense mode. |
In Cisco NX-OS, multicast is enabled only after you enable the PIM feature on each router and then enable PIM sparse mode on each interface that you want to participate in multicast. You can configure PIM for an IPv4 network. In an IPv4 network, if you have not already enabled IGMP on the router, PIM enables it automatically. For information about configuring IGMP, see .
Note |
Cisco Nexus 3600 platform switches do not support PIM6. |
You use the PIM global configuration parameters to configure the range of multicast group addresses to be handled by each of the two distribution modes:
-
Any Source Multicast (ASM) provides discovery of multicast sources. It builds a shared tree between sources and receivers of a multicast group and supports switching over to a source tree when a new receiver is added to a group. ASM mode requires that you configure an RP.
-
Source-Specific Multicast (SSM) builds a source tree that originates at the designated router on the LAN segment that receives a request to join a multicast source. SSM mode does not require you to configure RPs. Source discovery must be accomplished through other means.
You can combine the modes to cover different ranges of group addresses. For more information, see the Configuring PIM section.
For more information about PIM sparse mode and shared distribution trees used by the ASM mode, see RFC 4601.
For more information about PIM in SSM mode, see RFC 3569.
Note |
Multicast equal-cost multipathing (ECMP) is on by default in the Cisco NX-OS for the Cisco Nexus 3548 Switch; you cannot turn ECMP off. If multiple paths exist for a prefix, PIM selects the path with the lowest administrative distance in the routing table. Cisco NX-OS supports up to 16 paths to a destination. |
PIM SSM with vPC
You can enable PIM SSM on Cisco Nexus 3600 platform switches with an upstream Layer 3 cloud along with the vPC feature. If there are no downstream PIM neighbors, you can form a PIM neighbor relationship between two switches over a vPC VLAN through a vPC peer link.
Hello Messages
The router establishes PIM neighbor adjacencies by sending PIM hello messages to the multicast address 224.0.0.13. Hello messages are sent periodically at the interval of 30 seconds. When all neighbors have replied, the PIM software chooses the router with the highest priority in each LAN segment as the designated router (DR). The DR priority is based on a DR priority value in the PIM hello message. If the DR priority value is not supplied by all routers or the priorities match, the highest IP address is used to elect the DR.
Caution |
If you change the PIM hello interval to a lower value, we recommend that you ensure it is appropriate for your network environment. |
The hello message also contains a hold-time value, which is typically 3.5 times the hello interval. If this hold time expires without a subsequent hello message from its neighbor, the switch detects a PIM failure on that link.
For added security, you can configure an MD5 hash value that the PIM software uses to authenticate PIM hello messages with PIM neighbors. The IGMP snooping software also processes PIM hello messages.
For information about configuring hello message authentication, see the Configuring PIM Sparse Mode section.
Join-Prune Messages
When the DR receives an IGMP membership report message from a receiver for a new group or source, the DR creates a tree to connect the receiver to the source by sending a PIM join message out the interface toward the rendezvous point (ASM mode) or source (SSM mode). The rendezvous point (RP) is the root of a shared tree, which is used by all sources and hosts in the PIM domain in ASM mode. SSM does not use an RP but builds a shortest path tree (SPT) that is the lowest cost path between the source and the receiver.
When the DR determines that the last host has left a group or source, it sends a PIM prune message to remove the path from the distribution tree.
The routers forward the join or prune action hop by hop up the multicast distribution tree to create (join) or tear down (prune) the path.
Note |
In this publication, the terms PIM join message and PIM prune message are used to simplify the action taken when referring to the PIM join-prune message with only a join or prune action. |
Join-prune messages are sent as quickly as possible by the software. You can filter the join-prune messages by defining a routing policy. For information about configuring the join-prune message policy, see the Configuring PIM Sparse Mode section.
You can prebuild the SPT for all known (S, G) in the routing table by triggering PIM joins upstream. To prebuild the SPT for all known (S, G)s in the routing table by triggering PIM joins upstream, even in the absence of any receivers, use the ip pim pre-build-spt command. By default, PIM (S, G) joins are triggered upstream only if the OIF-list for the (S, G) is not empty.
State Refreshes
PIM requires that multicast entries are refreshed within a 3.5-minute timeout interval. The state refresh ensures that traffic is delivered only to active listeners, and it keeps routers from using unnecessary resources.
To maintain the PIM state, the last-hop DR sends join-prune messages once per minute. State creation applies to both (*, G) and (S, G) states as follows:
-
(*, G) state creation example—An IGMP (*, G) report triggers the DR to send a (*, G) PIM join message toward the RP.
-
(S, G) state creation example—An IGMP (S, G) report triggers the DR to send an (S, G) PIM join message toward the source.
If the state is not refreshed within 180 seconds, the PIM software tears down the distribution tree by removing the forwarding paths in the multicast outgoing interface list of the upstream routers.
Rendezvous Points
A rendezvous point (RP) is a router that you select in a multicast network domain that acts as a shared root for a multicast shared tree. You can configure as many RPs as you like, and you can configure them to cover different group ranges.
Static RP
You can statically configure an RP for a multicast group range. You must configure the address of the RP on every router in the domain.
You can define static RPs for the following reasons:
-
To configure routers with the Anycast-RP address
-
To manually configure an RP on a switch
For information about configuring static RPs, see the Configuring Static RPs section.
BSRs
The bootstrap router (BSR) ensures that all routers in the PIM domain have the same RP cache as the BSR. You can configure the BSR to help you select an RP set from BSR candidate RPs. The function of the BSR is to broadcast the RP set to all routers in the domain. You select one or more candidate BSRs to manage the RPs in the domain. Only one candidate BSR is elected as the BSR for the domain.
Caution |
Do not configure both Auto-RP and BSR protocols in the same network. |
The following figure shows where the BSR mechanism, router A, the software-elected BSR, sends BSR messages out all enabled interfaces (shown by the solid lines in the figure). The messages, which contain the RP set, are flooded hop by hop to all routers in the network. Routers B and C are candidate RPs that send their candidate-RP advertisements directly to the elected BSR (shown by the dashed lines in the figure).
The elected BSR receives candidate-RP messages from all the candidate RPs in the domain. The bootstrap message sent by the BSR includes information about all of the candidate RPs. Each router uses a common algorithm to select the same RP address for a given multicast group.
In the RP selection process, the RP address with the best priority is determined by the software. If the priorities match for two or more RP addresses, the software may use the RP hash in the selection process. Only one RP address is assigned to a group.
By default, routers are not enabled to listen or forward BSR messages. You must enable the BSR listening and forwarding feature so that the BSR mechanism can dynamically inform all routers in the PIM domain of the RP set assigned to multicast group ranges.
Note |
The BSR mechanism is a nonproprietary method of defining RPs that can be used with third-party routers. |
For information about configuring BSRs and candidate RPs, see the Configuring BSRs and Configuring Static RPs section.
Auto-RP
Auto-RP is a Cisco protocol that was introduced prior to the Internet standard bootstrap router mechanism. You configure Auto-RP by selecting candidate mapping agents and RPs. Candidate RPs send their supported group range in RP-Announce messages to the Cisco RP-Announce multicast group 224.0.1.39. An Auto-RP mapping agent listens for RP-Announce messages from candidate RPs and forms a Group-to-RP mapping table. The mapping agent multicasts the Group-to-RP mapping table in RP-Discovery messages to the Cisco RP-Discovery multicast group 224.0.1.40.
Caution |
Do not configure both Auto-RP and BSR protocols in the same network. |
The following figure shows the Auto-RP mechanism. Periodically, the RP mapping agent multicasts the RP information that it receives to the Cisco-RP-Discovery group 224.0.1.40 (shown by the solid lines in the figure).
By default, routers are not enabled to listen or forward Auto-RP messages. You must enable the Auto-RP listening and forwarding feature so that the Auto-RP mechanism can dynamically inform routers in the PIM domain of the Group-to-RP mapping.
For information about configuring Auto-RP, see the Configuring Auto-RP section.
Anycast-RP
Anycast-RP has two implementations: one uses Multicast Source Discovery Protocol (MSDP) and the other is based on RFC 4610. This section describes how to configure PIM Anycast-RP.
You can use PIM Anycast-RP to assign a group of routers, called the Anycast-RP set, to a single RP address that is configured on multiple routers. The set of routers that you configure as Anycast-RPs is called the Anycast-RP set. This method is the only RP method that supports more than one RP per multicast group, which allows you to load balance across all RPs in the set. The Anycast RP supports all multicast groups.
PIM register messages are sent to the closest RP and PIM join-prune messages are sent in the direction of the closest RP as determined by the unicast routing protocols. If one of the RPs goes down, unicast routing ensures these message will be sent in the direction of the next-closest RP.
For more information about PIM Anycast-RP, see RFC 4610
For information about configuring Anycast-RPs, see the Configuring a PIM Anycast-RP Set section.
PIM Register Messages
PIM register messages are unicast to the RP by designated routers (DRs) that are directly connected to multicast sources. The PIM register message has the following functions:
-
To notify the RP that a source is actively sending to a multicast group.
-
To deliver multicast packets sent by the source to the RP for delivery down the shared tree.
The DR continues to send PIM register messages to the RP until it receives a Register-Stop message from the RP. The RP sends a Register-Stop message in either of the following cases:
-
The RP has no receivers for the multicast group being transmitted.
-
The RP has joined the SPT to the source but has not started receiving traffic from the source.
You can use the ip pim register-source command to configure the IP source address of register messages when the IP source address of a register message is not a uniquely routed address to which the RP can send packets. This situation might occur if the source address is filtered so that the packets sent to it are not forwarded or if the source address is not unique to the network. In these cases, the replies sent from the RP to the source address fails to reach the DR, resulting in Protocol Independent Multicast sparse mode (PIM-SM) protocol failures.
The following example shows how to configure the IP source address of the register message to the loopback 3 interface of a DR:
switch # configuration terminal
switch(config)# vrf context Enterprise
switch(config-vrf)# ip pim register-source ethernet 2/3
switch(config-vrf)#
Note |
In Cisco NX-OS, PIM register messages are rate limited to avoid overwhelming the RP. |
You can filter PIM register messages by defining a routing policy. For information about configuring the PIM register message policy, see the Configuring Message Filtering section.
Designated Routers
In PIM ASM and SSM modes, the software chooses a designated router (DR) from the routers on each network segment. The DR is responsible for forwarding multicast data for specified groups and sources on that segment.
The DR for each LAN segment is determined as described in the PIM SSM with vPC section.
In SSM mode, the DR triggers (S, G) PIM join messages toward the source. The path from the receiver to the source is determined hop by hop. The source must be known to the receiver or the DR.
In ASM mode, the DR triggers (S, G) or (*, G) PIM join messages toward the source depending on the IGMP membership reports that it receives. When a DR receives an IGMP membership report from a directly connected host or receiver, the shortest path is formed to the RP. Additionally, the DR is responsible for sending PIM register messages to the RP when the source becomes active. The result is a shared tree that connects all sources transmitting to the same multicast group with all the receivers of that group.
For information about configuring the DR priority, see the Configuring PIM Sparse Mode section.
Administratively Scoped IP Multicast
The administratively scoped IP multicast method allows you to set boundaries on the delivery of multicast data. For more information, see RFC 2365.
You can configure an interface as a PIM boundary so that PIM messages are not sent out that interface. For information about configuring the domain border parameter, see the Configuring Message Filtering section.
You can use the Auto-RP scope parameter to set a time-to-live (TTL) value. For more information, see the Configuring Auto-RP section.
Virtualization Support
You can define multiple virtual routing and forwarding (VRF) instances. For each VRF, independent multicast system resources are maintained, including the MRIB.
You can use the PIM show commands with a VRF argument to provide a context for the information displayed. The default VRF is used if no VRF argument is supplied.
For information about configuring VRFs, see the Cisco Nexus 3600 NX-OS Unicast Routing Configuration Guide.