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.
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.
Note |
Cisco NX-OS 3550-T
|
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.
You use the PIM global configuration parameters to configure the range of multicast group addresses to be handled by these 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.
For more information about PIM sparse mode and shared distribution trees used by the ASM mode, see RFC 4601.
Hello Messages
The PIM process begins when the router establishes PIM neighbor adjacencies by sending PIM hello messages to the multicast IPv4 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.
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 device detects a PIM failure on that link.
The configured hold-time changes may not take effect on first two hellos sent after enabling or disabling PIM on an interface. For the first two hellos sent on the interface, thereafter, the configured hold times will be used. This may cause the PIM neighbor to set the incorrect neighbor timeout value for the initial neighbor setup until a hello with the correct hold time is received.
For added security, you can configure an MD5 hash value that the PIM software uses to authenticate PIM hello messages with PIM neighbors.
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). The rendezvous point (RP) is the root of a shared tree, which is used by all sources and hosts in the PIM domain in the ASM mode.
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.
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 (*, G) state as follows:
-
(*, G) state creation example—An IGMP (*, G) report triggers the DR to send a (*, G) PIM join message toward the RP.
If the state is not refreshed, 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 device
-
Cisco Nexus® 3550-T only supports and validates Static-RP.
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.
The PIM triggered register is enabled by default.
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 will fail 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:
ip pim register-source loopback 3
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.
Designated Routers
In PIM ASM mode, 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 Hello messages.
In ASM mode, the DR is responsible for unicasting PIM register packets to the RP. When a DR receives an IGMP membership report from a directly connected receiver, the shortest path is formed to the RP, which may or may not go through the DR. The result is a shared tree that connects all sources transmitting on the same multicast group to all receivers of that group.
Note |
PIM Bidir mode is not supported in Cisco Nexus 3550-T Release 10.2(3t). |
ASM Switchover from Shared Tree to Source Tree
Note |
Cisco NX-OS puts the RPF interface into the OIF-list of the MRIB but not into the OIF-list of the MFIB. |
In ASM mode, the DR that is connected to a receiver switches over from the shared tree to the shortest-path tree (SPT) to a source unless you configure the PIM parameter to use shared trees only.
During the switchover, messages on the SPT and shared tree might overlap. These messages are different. The shared tree messages are propagated upstream toward the RP, while SPT messages go toward the source.
For information about SPT switchovers, see the “Last-Hop Switchover to the SPT" section in RFC 4601.