Configuring PIM

This chapter describes how to configure the Protocol Independent Multicast (PIM) features on Cisco NX-OS devices in your IPv4 networks.

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 does 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.

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.


Note

Cisco Nexus® 3550-T does not support the following-

  • Cisco Nexus® 3550-T cannot operate as a multicast FHR device.

  • Cisco Nexus® 3550-T does not support the formation of source trees (SG-Tree).


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


Note

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

There is no RPF check done for all the multicast routes installed in the Cisco Nexus 3550-T hardware. Any packet hitting the entry is flooded to all the programed receivers, irrespective of the incoming interface.



Note

In Cisco NX-OS, PIM register messages are rate limited to avoid overwhelming the RP.


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

Cisco Nexus 3550-T does not forward multicast packets to the designated router if there is no direct receiver connected to the Cisco Nexus 3550-T hardware.



Note

PIM-BIDIR mode is not supported in Cisco Nexus 3550-T.



Note

ASM Switchover from Shared Tree to Source Tree is not supported in the Cisco Nexus 3550-T 10.1(2t) release.


Prerequisites for PIM

  • You are logged onto the device.

  • For global commands, you are in the correct virtual routing and forwarding (VRF) mode. The default configuration mode shown in the examples in this chapter applies to the default VRF.


Note

Cisco Nexus 3550-T - 10.1(2t) release, supports only default VRF.


Guidelines and Limitations for PIM

PIM has the following guidelines and limitations:


Note

In Cisco Nexus 3550-T - 10.1(2t) release, PIM is supported only default VRF.


  • Only PIM-ASM mode is supported in the Cisco Nexus® 3550-T switches.

  • Cisco Nexus 3550-T - 10.1(2t) release does not support AutoRP or BSR configuration.

  • Below configuration is recommended since {Vrf,S,G} Routes are not supported –

    • Configure ip pim spt-threshold infinity

    • Disable PIM-SSM.

    • Even though IGMPv3 snooping is Enabled, {S,G} received from IGMPv3 are not installed in the Cisco Nexus 3550-T - 10.1(2t) release.

  • RPF check is not implemented in hardware – hence RPF-failed packet received is forwarded to installed {*,G} route oiflist. Though hardware check is implemented to avoid forward the packet back on incoming L3 port.

  • Cisco Nexus® 3550-T switch does cut-through forwarding; hence there is no MTU- check implemented. Hardware buffering is not designed for jumbo packets and packets beyond regular MTU size 1516 is not supported.

  • L3 Multicast lookup is not enabled on Trunk ports.

  • L3 Multicast has the following scale numbers:

    • L2MCAST - 768 system-wide shared with MAC tabel - {vlan,MAC}

    • EntriesL3MCAST - 384 system-wide {vrf,G,*} Entries only

  • L3 multicast result cannot contain trunk ports as an OIF. Any entry computed to install with Trunk-port OIF is not installed in h/w.

  • L3 Multicast lookup miss packets are not punted to SUP. Hence, Cisco Nexus® 3550-T switch cannot act as FHR; though if {*,G} tree is already installed it will forward multicast along that path.

  • When L3 lookup is done; even the L2 domain multicast receivers receive packets with decremented TTL.

  • Cisco Nexus® 3550-T platform switches does not support MSDP.

  • For most Cisco Nexus devices, RPF failure traffic is dropped and sent to the CPU at a very low rate to trigger PIM asserts. Cisco Nexus® 3550-T switches, do not check for RPF failure and all traffic is forwarded according to the installed route.

  • For first-hop source detection in most Cisco Nexus devices, traffic coming from the first hop is detected based on the source subnet check, and multicast packets are copied to the CPU only if the source belongs to the local subnet. The Cisco Nexus® 3550-T switches do not support FHR function, cannot detect First-hop traffic, hence no multicast packets are sent to the supervisor to learn the local multicast source.

  • Cisco NX-OS PIM do not interoperate with any version of PIM dense mode or PIM Sparse Mode version 1.

Guidelines and Limitations for Hello Messages

The following guidelines and limitations apply to Hello Messages:

  • Default values for the PIM hello interval are recommended and should not be modified.

Guidelines and Limitations for Rendezvous Points

The following guidelines and limitations apply to Rendezvous Points (RP):

  • Cisco Nexus 3550-T - 10.1(2t) release can only operate as a static RP.

Default Settings

This table lists the default settings for PIM parameters.

Table 1. Default PIM Parameters

Parameters

Default

Use shared trees only

Disabled

Flush routes on restart

Disabled

Log neighbor changes

Disabled

Auto-RP message action

Disabled

Note 

Do Not Enable Auto-RP message action since, BSR is not available in Cisco Nexus 3550-T - 10.1(2t) release.

BSR message action

Disabled

Note 

Do not Enable BSR message action since, BSR is not available in Cisco Nexus 3550-T - 10.1(2t) release.

PIM sparse mode

Disabled

Designated router priority

1

Hello authentication mode

Disabled

Domain border

Disabled

Note 

Do not Enable since Domain border is not available in Cisco Nexus 3550-T - 10.1(2t) release.


Note

Cisco Nexus 3550-T - 10.1(2t) release does not support any policy configuration, hence it is disabled.


Configuring PIM


Note

Cisco NX-OS supports only PIM sparse mode version 2. In this publication, “PIM” refers to PIM sparse mode version 2.


You can configure separate ranges of addresses in the PIM domain using the multicast distribution modes described in the table below.

Multicast Distribution Mode

Requires RP Configuration

Description

ASM

Yes

Any source multicast

RPF routes for multicast

No

RPF routes for multicast


Note

RPF check is not supported in Cisco Nexus 3550-T - 10.1(2t) release and the Multicast packets are flooded irrespective of RPF failure to programed receivers.


PIM Configuration Tasks

The following steps configure PIM .

Procedure

  Command or Action Purpose
Step 1

Select the range of multicast groups that you want to configure in each multicast distribution mode.

Step 2

Enable PIM.

Step 3

Follow the configuration steps for the multicast distribution modes that you selected in Step 1.

Step 4

Enabling the PIM Feature

Before you can access the PIM commands, you must enable the PIM feature.

Before you begin

Ensure that you have installed the Enterprise Services license.

Procedure

  Command or Action Purpose
Step 1

configure terminal

Example:

switch# configure terminal
switch(config)#

Enters global configuration mode.

Step 2

feature pim

Example:

switch(config)# feature pim

Enables PIM. By default, PIM is disabled.

Step 3

(Optional) show running-configuration pim

Example:

switch(config)# show running-configuration pim
(Optional)

Shows the running-configuration information for PIM.

Step 4

(Optional) copy running-config startup-config

Example:

switch(config)# copy running-config startup-config
(Optional)

Copies the running configuration to the startup configuration.

Configuring PIM Sparse Mode Parameters

You configure PIM sparse mode on every device interface that you want to participate in a sparse mode domain. You can configure the sparse mode parameters described in the table below.

Table 2. PIM Sparse Mode Parameters

Parameter

Description

Global to the device

Register rate limit

Configures the IPv4 register rate limit in packets per second. The range is from 1 to 65,535. The default is no limit.

Initial holddown period

Configures the IPv4 initial holddown period in seconds. This holddown period is the time it takes for the MRIB to come up initially. If you want faster convergence, enter a lower value. The range is from 90 to 210. Specify 0 to disable the holddown period. The default is 210.

Per device interface

PIM sparse mode

Enables PIM on an interface.

Designated router priority

Sets the designated router (DR) priority that is advertised in PIM hello messages on this interface. On a multi-access network with multiple PIM-enabled routers, the router with the highest DR priority is elected as the DR router. If the priorities match, the software elects the DR with the highest IP address. The DR originates PIM register messages for the directly connected multicast sources and sends PIM join messages toward the rendezvous point (RP) for directly connected receivers. Values range from 1 to 4294967295. The default is 1.

Designated router delay

Delays participation in the designated router (DR) election by setting the DR priority that is advertised in PIM hello messages to 0 for a specified period. During this delay, no DR changes occur, and the current switch is given time to learn all of the multicast states on that interface. After the delay period expires, the correct DR priority is sent in the hello packets, which retriggers the DR election. Values range from 3 to 0xffff seconds.

Hello authentication mode

Enables an MD5 hash authentication key, or password, in PIM hello messages on the interface so that directly connected neighbors can authenticate each other. The PIM hello messages are IPsec encoded using the Authentication Header (AH) option. You can enter an unencrypted (cleartext) key or one of these values followed by a space and the MD5 authentication key:

  • 0—Specifies an unencrypted (cleartext) key

  • 3—Specifies a 3-DES encrypted key

  • 7—Specifies a Cisco Type 7 encrypted key

The authentication key can be up to 16 characters. The default is disabled.

Hello interval

Configures the interval at which hello messages are sent in milliseconds. The range is from 1000 to 18724286. The default is 30000.

Note 

See the Cisco Nexus® 3550-T Verified Scalability Guide for the verified range of this parameter and associated PIM neighbor scale.

Configuring PIM Sparse Mode Parameters

Procedure
  Command or Action Purpose
Step 1

configure terminal

Example:
switch# configure terminal
switch(config)#

Enters global configuration mode.

Step 2

(Optional) ip pim register-rate-limit rate

Example:
switch(config)# ip pim register-rate-limit 1000
(Optional)

Configures the rate limit in packets per second. The range is from 1 to 65,535. The default is no limit.

Step 3

(Optional) ip pim spt-threshold infinity group-list route-map-name

Example:
switch(config)# ip pim spt-threshold infinity group-list my_route-map-name
(Optional)

Creates the IPv4 PIM (*, G) state only, for the group prefixes defined in the specified route map. Cisco NX-OS Release 3.1 supports up to 1000 route-map entries, and Cisco NX-OS releases prior to 3.1 support up to 500 route-map entries.

Note 

The ip pim use-shared-tree-only group-list command performs the same function as the ip pim spt-threshold infinity group-list command. You can choose to use either command to implement this step.

Step 4

(Optional) [ip | ipv4] routing multicast holddown holddown-period

Example:
switch(config)# ip routing multicast holddown 100
(Optional)

Configures the initial holddown period in seconds. The range is from 90 to 210. Specify 0 to disable the holddown period. The default is 210.

Step 5

(Optional) show running-configuration pim

Example:
switch(config)# show running-configuration pim
(Optional)

Displays PIM running-configuration information.

Step 6

interface interface

Example:
switch(config)# interface ethernet 1/1
switch(config-if)#

Enters interface configuration mode.

Step 7

ip pim sparse-mode

Example:
switch(config-if)# ip pim sparse-mode

Enables PIM sparse mode on this interface. The default is disabled.

Step 8

(Optional) ip pim dr-priority priority

Example:
switch(config-if)# ip pim dr-priority 192
(Optional)

Sets the designated router (DR) priority that is advertised in PIM hello messages. Values range from 1 to 4294967295. The default is 1.

Step 9

(Optional) ip pim dr-delay delay

Example:
switch(config-if)# ip pim dr-delay 3
(Optional)

Delays participation in the designated router (DR) election by setting the DR priority that is advertised in PIM hello messages to 0 for a specified period. During this delay, no DR changes occur, and the current switch is given time to learn all of the multicast states on that interface. After the delay period expires, the correct DR priority is sent in the hello packets, which retriggers the DR election. Values range from 3 to 0xffff seconds.

Note 

This command delays participation in the DR election only upon bootup or following an IP address or interface state change. It is intended for use with multicast-access Layer 3 interfaces only.

Step 10

(Optional) ip pim hello-authentication ah-md5 auth-key

Example:
switch(config-if)# ip pim hello-authentication ah-md5 my_key
(Optional)

Enables an MD5 hash authentication key in PIM hello messages. You can enter an unencrypted (cleartext) key or one of these values followed by a space and the MD5 authentication key:

  • 0—Specifies an unencrypted (cleartext) key

  • 3—Specifies a 3-DES encrypted key

  • 7—Specifies a Cisco Type 7 encrypted key

The key can be up to 16 characters. The default is disabled.

Step 11

(Optional) ip pim hello-interval interval

Example:
switch(config-if)# ip pim hello-interval 25000
(Optional)

Configures the interval at which hello messages are sent in milliseconds. The range is from 1000 to 18724286. The default is 30000.

Note 

The minimum value is 1 millisecond.

Step 12

(Optional) show ip pim interface [interface | brief]

Example:
switch(config-if)# show ip pim interface
(Optional)

Displays PIM interface information.

Step 13

(Optional) copy running-config startup-config

Example:
switch(config-if)# copy running-config startup-config
(Optional)

Copies the running configuration to the startup configuration.

Configuring ASM

To configure ASM mode, you configure sparse mode and the RP selection method, where you indicate the distribution mode and assign the range of multicast groups.

Configuring Static RPs

You can configure an RP statically by configuring the RP address on every router that will participate in the PIM domain.


Note

We recommend that the RP address uses the loopback interface and also the interface with the RP address must have ip pim sparse-mode enabled.


Configuring Static RPs
Before you begin

Ensure that you have installed the Enterprise Services license and enabled PIM.

Procedure
  Command or Action Purpose
Step 1

configure terminal

Example:
switch# configure terminal
switch(config)#

Enters global configuration mode.

Step 2

ip pim rp-address rp-address

Example:
switch(config)# ip pim rp-address 192.0.2.33 

Configures a PIM static RP address for a multicast groups.

You can specify a prefix-list policy name for the static RP address.

The mode is ASM.

Step 3

(Optional) show ip pim group-range [ip-prefix]

Example:
switch(config)# show ip pim group-range
(Optional)

Displays PIM RP information.

Step 4

(Optional) copy running-config startup-config

Example:
switch(config)# copy running-config startup-config
(Optional)

Copies the running configuration to the startup configuration.

Configuring Shared Trees Only for ASM

You can configure shared trees only on the last-hop router for Any Source Multicast (ASM) groups, which means that the router never switches over from the shared tree to the SPT when a receiver joins an active group.


Note

The Cisco Nexus® 3550-T supports shared-tree feature only.


Configuring Message Filtering

You can configure filtering of the PIM messages described in the table below.

Table 3. PIM Message Filtering

Message Type

Description

Global to the Device

Log Neighbor changes

Enables syslog messages that list the neighbor state changes to be generated. The default is disabled.

Configuring Message Filtering

Before you begin

Ensure that you have installed the Enterprise Services license and enabled PIM.

Procedure
  Command or Action Purpose
Step 1

configure terminal

Example:
switch# configure terminal
switch(config)#

Enters global configuration mode.

Step 2

(Optional) ip pim log-neighbor-changes

Example:
switch(config)# ip pim log-neighbor-changes
(Optional)
Enables syslog messages that list the neighbor state changes to be generated. The default is disabled.
Step 3

(Optional) show run pim

Example:
switch(config-if)# show run pim
(Optional)

Displays PIM configuration commands.

Step 4

(Optional) copy running-config startup-config

Example:
switch(config-if)# copy running-config startup-config
(Optional)

Copies the running configuration to the startup configuration.

Restarting the PIM Processes

When routes are flushed, they are removed from the Multicast Routing Information Base (MRIB) and the Multicast Forwarding Information Base (MFIB).

When you restart PIM, the following tasks are performed:

  • The PIM database is deleted.

  • The MRIB and MFIB are unaffected and forwarding of traffic continues.

  • The multicast route ownership is verified through the MRIB.

  • Periodic PIM join and prune messages from neighbors are used to repopulate the database.

Restarting the PIM Process

Before you begin

Ensure that you have installed the Enterprise Services license and enabled PIM.

Procedure
  Command or Action Purpose
Step 1

restart pim

Example:
switch# restart pim

Restarts the PIM process.

Note 

Traffic loss might occur during the restart process.

Step 2

configure terminal

Example:
switch# configure terminal
switch(config)#

Enters global configuration mode.

Step 3

ip pim flush-routes

Example:
switch(config)# ip pim flush-routes
Removes routes when the PIM process is restarted. By default, routes are not flushed.
Step 4

(Optional) show running-configuration pim

Example:
switch(config)# show running-configuration pim
(Optional)

Displays the PIM running-configuration information, including the flush-routes command.

Step 5

(Optional) copy running-config startup-config

Example:
switch(config)# copy running-config startup-config
(Optional)

Copies the running configuration to the startup configuration.

Verifying the PIM Configuration

To display the PIM configuration information, perform one of the following tasks.

Command

Description

show ip mroute [ip-address] [detail | summary]

Displays the IP multicast routing table.

The detail option displays detailed route attributes.

The summary option displays route counts and packet rates.

Note 

This command also displays multicast counters for Cisco Nexus® 3550-T switches, if the multicast heavy template is enabled. See sample outputs below.

show ip pim group-range [ip-prefix]

Displays the learned or configured group ranges and modes. For similar information, see the show ip pim rp command.

show ip pim interface [interface | brief ]

Displays information by the interface.

show ip pim neighbor [interface interface | ip-prefix]

Displays neighbors by the interface.

show ip pim oif-list group [source ]

Displays all the interfaces in the outgoing interface (OIF) list.

show ip pim route [source | group [source ]]

Displays information for each multicast route, including interfaces on which a PIM join for that (*, G) has been received.

show ip pim rp [ip-prefix]

Displays rendezvous points (RPs) known to the software, how they were learned, and their group ranges. For similar information, see the show ip pim group-range command.

show running-config pim

Displays the running-configuration information.

show startup-config pim

Displays the startup-configuration information.

show ip pim [detail ]

Displays pim details information.

Displaying Statistics

You can display and clear PIM statistics by using the commands in this section.

Displaying PIM Statistics

You can display the PIM statistics and memory usage using these commands.

Command

Description

show ip pim policy statistics

Displays policy statistics for register, RP, and join-prune message policies.

show ip pim statistics

Displays global statistics.

Clearing PIM Statistics

You can clear the PIM statistics using these commands.

Command

Description

clear ip pim interface statistics interface

Clears counters for the specified interface.

clear ip pim policy statistics

Clears policy counters for register, RP, and join-prune message policies.

clear ip pim statistics

Clears global counters handled by the PIM process.

Related Documents

Related Topic

Document Title

Standards

Standards

Title