# IP Multicast / PIM

## 1. Function Overview

This article describes the multicast routing protocol PIM (Protocol Independent Multicast).

Multicast routing is based on unicast routing, so unicast packets must be routed appropriately within the multicast network.
PIM stands for Protocol Independent Multicast, a multicast routing protocol that does not depend on a specific unicast routing protocol.
This allows you to use any unicast routing protocol, such as RIP or OSPF.

This product supports PIM Dense Mode (PIM-DM) and PIM Sparse Modes (PIM-SM and PIM-SSM).

PIM-DM is a Flood & Prune model that uses a multicast method, where multicast traffic is once flooded to all PIM neighbors.
A PIM router that has no multicast receivers for its multicast group can stop forwarding any further unwanted multicast traffic by sending a Prune message to its PIM neighbors.
PIM-DM floods packets even to networks without multicast receivers, making it effective when multicast receivers are densely concentrated within a limited range on the LAN.
Compared to PIM-SM, which will be discussed later, it also has the advantage of being simpler to configure.

- PIM-DM Operation

PIM-SM is a Explicit Join model that uses a multicast method, where multicast traffic is forwarded only when a multicast receiver requests to join the group.
In PIM-SM, a router called a rendezvous point (RP) manages group information and controls multicast traffic forwarding.
Specifically, a PIM router to which multicast receivers are connected sends a request to the RP to join the multicast group. When an RP receives a join request, it forwards the multicast traffic to that PIM router.
PIM-SM avoids placing unnecessary load on the network by forwarding multicast traffic only as needed, making it effective in situations where multicast receivers are sparsely distributed across the network.

- PIM-SM Operation

## 2. Definition of Terms Used

PIM (Protocol Independent Multicast)

A type of multicast routing protocol that does not depend on a specific unicast routing protocol.

PIM-DM (PIM Dense Mode)

Dense mode for the multicast routing protocol PIM. Multicast packets are forwarded using the Flood & Prune model.

PIM-SM (PIM Sparse Mode)

Sparse mode for the multicast routing protocol PIM. Multicast packets are forwarded using the Explicit Join model.

PIM-SSM (PIM Source Specific Multicast)

By identifying multicast senders and forwarding multicast packets, efficient transmission is possible while preventing the reception of unauthorized multicast packets.
To use SSM, IGMPv3 must be used, but by using the SSM mapping function, SSM can be used even on hosts that only support IGMPv1 or IGMPv2.

ECMP Environment (Equal Cost Multi Path)

An environment where multiple paths of equal cost exist.

DR (Designated Router)

The representative router that forwards multicast packets when there are multiple PIM-SM routers on the same LAN.

RP (Rendezvous Point)

A router that connects multicast senders and receivers and relays multicast traffic in a PIM-SM network.

BSR (Bootstrap Router)

A router that maps between multicast groups and RPs in a PIM-SM network.

Distribution Tree

Multicast packet forwarding is a one-to-many communication, meaning that packets are forwarded from one multicast sender to multiple multicast receivers.
At this point, a single packet is copied at the multicast router, forming a tree-like distribution route. This distribution route is called a distribution tree.

Source Tree

A distribution tree originating from a multicast sender. Used in PIM-DM and PIM-SM.
It is expressed in the form of (S, G), where S is the multicast sender’s IP address and G is the multicast group’s IP address.

Shared Tree

A distribution tree centered around RP. In PIM-DM, it is used in combination with the source tree.
Shared trees are expressed in the form of (*, G) because all multicast senders use a single common tree.

RPF (Reverse Path Forwarding) Check

This process compares the source address of a received multicast packet with the unicast routing table to avoid duplicate receipt or packet looping during multicast forwarding, thereby discarding packets received on interfaces other than the shortest route.

RPF (Reverse Path Forwarding) Interface

An interface that has passed RPF checking and receives multicast packets.

First-Hop Router

A router directly connected to the multicast sender.

Last-Hop Router

A router directly connected to multicast receivers.

## 3. Function Details

### 3.1. PIM-DM

The operating specifications of PIM-DM are outlined below:

#### 3.1.1. Basic Settings for PIM-DM

1. PIM-DM is enabled/disabled on the VLAN interface.
   The initial settings for the default VLAN (VLAN #1) and the initial settings after a VLAN is generated are both disabled.
   The ip pim dense-mode command enables PIM-DM.
   Enabling PIM-DM automatically enables IGMP as well, but we recommend explicitly enabling it using the ip igmp command.
   When enabling PIM-DM, enable the system-wide IP multicast routing function (disabled by default) using the ip multicast-routing command.
   Also, use the multicast command to enable the multicast routing function (enabled by default) for each port.

2. To stop sending and receiving PIM messages on the target VLAN interface, use the ip pim dense-mode passive command.
   This is used when you want to suppress the transmission of PIM messages on an interface with no PIM neighbors and only multicast receivers connected.

3. PIM-DM uses a unicast routing table to forward multicast packets, so you must build the unicast routing table using some method, such as RIP or OSPF.

4. In an ECMP environment, enable multicast routing on all interfaces through which multicast traffic may pass.

#### 3.1.2. Configuring PIM Neighbor Discovery

1. Enabling PIM-DM detects PIM neighbors by sending PIM Hello messages to all PIM routers.
   You can change the following parameters of the PIM Hello message:

   - To configure the hold time for PIM Hello messages, use the ip pim hello-holdtime command.

   - To configure the interval between PIM Hello messages, use the ip pim hello-interval command.

2. The ip pim neighbor-filter command allows you to apply an IP access list to prevent specific PIM routers from forming adjacencies.

#### 3.1.3. Configuring PIM-DM Flooding Suppression Function

1. PIM-DM performs flooding every 180 seconds to maintain the distribution tree, so the State Refresh function for flooding suppression is enabled by default.
   The State Refresh function is a mechanism where the router to which the multicast sender is directly connected sends PIM State Refresh messages every 60 seconds by default, and the PIM router that receives these messages updates the Expire timer for the corresponding group, thereby preventing flooding every 180 seconds.
   To configure the transmission interval for PIM State Refresh messages, use the ip pim state-refresh origination-interval command.

2. When a new multicast receiver connects to an interface where multicast packet transmission has been stopped (pruned) in PIM-DM, a PIM Graft message is sent to the upstream PIM neighbors.
   When a PIM neighbor that received a graft message removes the prune state from an interface, newly added multicast receivers can immediately begin receiving multicast packets.
   By default, Graft messages are retransmitted until they are successfully sent, but you can configure the maximum number of retransmissions using the ip pim graft-retransmit command.

### 3.2. PIM-SM

The operating specifications of PIM-SM are outlined below:

#### 3.2.1. Basic PIM-SM Configuration

1. PIM-SM is enabled/disabled on the VLAN interface.
   The initial settings for the default VLAN (VLAN #1) and the initial settings after a VLAN is generated are both disabled.
   The ip pim sparse-mode command enables PIM-SM.
   Enabling PIM-SM automatically enables IGMP as well, but we recommend explicitly enabling it using the*ip igmp* command.
   When enabling PIM-SM, enable the system-wide IP multicast routing function (disabled by default) using the ip multicast-routing command.
   Also, use the multicast command to enable the multicast routing function (enabled by default) for each port.

2. To stop sending and receiving PIM messages on the target VLAN interface, use the ip pim sparse-mode passive command.
   This is used when you want to suppress the transmission of PIM messages on an interface with no PIM neighbors and only multicast receivers connected.

3. PIM-SM uses a unicast routing table to forward multicast packets, so you must build the unicast routing table using some method, such as RIP or OSPF.

4. In an ECMP environment, enable multicast routing on all interfaces through which multicast traffic may pass.

#### 3.2.2. Configuring PIM Neighbor Discovery

1. Enabling PIM-SM detects PIM neighbors by sending PIM Hello messages to all PIM routers.
   You can change the following parameters of the PIM Hello message:

   - To configure the hold time for PIM Hello messages, use the ip pim hello-holdtime command.

   - To configure the transmission interval for PIM Hello messages, use the ip pim hello-interval command.

2. The ip pim neighbor-filter command allows you to apply an IP access list to prevent specific PIM routers from forming adjacencies.

3. The Hello message includes the Generation ID option by default, but you can exclude the Generation ID option using the*ip pim exclude-genid* command.
   The Generation ID is regenerated each time the multicast interface comes up, and is used to detect failures such as when a PIM neighbor restarts.

#### 3.2.3. DR (Designated Router) Configuration

1. If there are multiple PIM routers on the same VLAN, one of them will be selected as the DR (Designated Router).
   The DR is responsible for forwarding multicast packets on behalf of the other routers within the subnet.
   When selecting a DR, the DR priority values set for each interface are compared and the router with the highest value becomes the DR. If the DR priorities are equal, the router with the higher IP address becomes the DR.
   To set the DR priority, use the ip pim dr-priority command.

#### 3.2.4. RP (Rendezvous Point) Settings

1. In PIM-SM, an RP (Rendezvous Point) must be defined to forward multicast traffic, and an RP is configured for each multicast group.
   When a multicast receiver requests to join a group, information about the router where the multicast receiver resides is registered with the RP at the center of the shared tree.
   Meanwhile, multicast senders announce their presence to the RP, and multicast traffic is forwarded to multicast receivers via the RP.

2. In addition to statically configuring an RP using the ip pim rp address command, you can also define an RP by using a BSR (Boot Strap Router) to automatically map between the multicast group and the RP.
   When using a BSR, you must first select one in the PIM network. Among the C-BSRs (candidate BSRs), the router with the highest BSR priority is selected as the BSR.
   If the BSR priorities are equal, the router with the higher IP address becomes the BSR. When a BSR is elected, the C-RP (candidate RP) notifies the BSR of the C-RP notification.
   If there are multiple C-RPs, the router with the lowest RP priority is selected as the RP, and the RP information is notified to all PIM routers in a BSR message.
   If the RP priorities are equal, the one with the largest hash value is selected. If the hash values are equal, the one with the largest IP address is selected.

3. To statically configure the RP, use the ip pim rp-address command.

4. To enable the router to act as a C-RP (candidate RP) when the BSR automatically maps RPs, use the ip pim rp-candidate command.

5. If you do not specify a multicast group with the ip pim rp-candidate command, a Candidate-RP-Advertisement message with Prefix Count=0 and no group information is sent by dehault.
   To send Candidate-RP-Advertisement messages with Prefix Count=1 and Group=224.0.0.0/4 (all multicast groups), use the ip pim crp-fixed-prefix command.

6. RP information can be checked using the show ip pim rp mapping command.

7. Information about candidate RPs can be checked using the show ip pim rp-hash command.

8. RP information learned from the BSR can be deleted using the clear ip pim sparse-mode bsr rp-set command.

#### 3.2.5. BSR (Bootstrap Router) Configuration

1. To operate as a C-BSR (candidate BSR), use the ip pim bsr-candidate command.

2. When a BSR selects an RP, it compares RP priorities and selects the router with the lowest RP priority as the RP by default.
   To select the RP using a hash function while ignoring RP priority, use the ip pim ignore-rp-set-priority command.

3. To stop sending and receiving BSR messages at a multicast border in a PIM network, use the ip pim bsr-border command.

4. BSR information can be checked using the show ip pim bsr-router command.

#### 3.2.6. Configuring Register Messages

1. The first-hop router to which the multicast sender is connected sends a Register message to the RP to notify the RP of the existence of the multicast sender.
   When sending a Register message, the IP address of the RPF interface to which the multicast sender is connected is used as the source address, but you can also explicitly specify the source address using the ip pim register command.

2. To filter register messages in the RP, use the ip pim accept-register command.
   Filtering is performed by the IPv4 address of the multicast sender using an IP access list.

3. To set the Register message transmission rate (maximum number of packets that can be sent per second), use the ip pim register-rate-limit command.

4. By default, the checksum of a Register message is calculated based only on the header. You can also use the ip pim register-checksum all command to calculate the checksum for the entire packet.

5. When the first-hop router receives a Register-Stop message, it stops sending Register messages for a certain period of time.
   The time before sending another Register message after receiving a Register-Stop message (Register Suppression Timeout) is 60 seconds by default and can be changed using the ip pim register-suppression command.

#### 3.2.7. Settings for Building Multicast Routes

1. PIM routers periodically send Join/Prune messages to build multicast routes.
   The default transmission interval for PIM Join/Prune messages is 60 seconds.
   You can change the transmission interval for Join/Prune messages using the ip pim jp-timer command.

2. The (S, G) entry in the multicast route information has a Keepalive Timer (KAT), and the (S, G) entry is deleted when KAT seconds have passed since there was no data traffic from the multicast sender at the RP.
   This KAT value can be set using the ip pim rp-register-kat command. If the ip pim rp-register-kat command is not configured, the KAT value is automatically calculated.

3. In PIM-SM, when a multicast receiver operates as a last-hop router under an interface, the multicast transmission route can be switched from transmission via the shared tree via the RP to the shortest path tree (SPT).
   BBy default, migration to SPT is enabled.
   To disable the transition to SPT and always forward multicast packets via the RP, use the ip pim spt-disable command.

#### 3.2.8. Configuring PIM-SSM

1. PIM-SSM (PIM Source Specific Multicast) is an extended version of PIM-SM, in which multicast receivers specify specific multicast senders, allowing multicast transmission to be performed via the shortest possible tree without going through the RP.
   To enable PIM-SSM, use the ip pim ssm command.

2. PIM-SSM uses multicast group addresses within the standard SSM range 232.0.0.0/8 (232.0.0.0 to 232.255.255.255), but you can specify any range using the ip pim ssm command.

3. To utilize multicast groups within the SSM range, multicast receivers must support IGMPv3.
   However, by enabling the SSM mapping function of IGMP, IGMPv1/IGMPv2 multicast receivers can also join groups within the SSM range.

#### 3.2.9. Compatibility Settings with Legacy Standards

1. To enable checking of RP-reachability messages used in the legacy standards PIMv1, use the ip pim register-rp-reachability command.
   By default, RP-reachability messages are not checked.

2. To enable sending and receiving unicast BSMs, use the ip pim unicast-bsm command.

## 4. Related Commands

Related commands are indicated below.
For details on the commands, refer to the Command Reference.

- PIM-Related Common Command List

  Operations | Operating commands
  --- | ---
  Setting the Hello message transmission interval | ip pim hello-interval
  Setting the Hello message retention time | ip pim hello-holdtime
  Configuration to Prevent PIM adjacencies | ip pim neighbor-filter
  PIM interface information display | show ip pim interface
  Displaying the PIM multicast routing table | show ip pim mroute
  Show PIM neighbor information | show ip pim neighbor
  Show next-hop information used by PIM | show ip pim nexthop

- PIM-DM-Related Command List

  Operations | Operating commands
  --- | ---
  Enable/disable PIM-DM | ip pim dense-mode
  Setting the State Refresh message transmission interval | ip pim state-refresh origination interval
  Setting the maximum number of retransmissions for PIM Graft messages | ip pim graft-retransmit
  Setting the estimated PIM message forwarding delay time | ip pim propagation-delay

- PIM-SM-Related Command List

  Operations | Operating commands
  --- | ---
  Enable/disable PIM-SM | ip pim sparse-mode
  Setting to exclude GenID from Hello messages | ip pim exclude-genid
  Designated Router priority settings | ip pim dr-priority
  Static RP settings | ip pim rp-address
  Enable/disable C-RP operation | ip pim rp-candidate
  C-RP Advertisement message transmission settings | ip pim crp-fixed-prefix
  Enable/disable C-BSR operation | ip pim bsr-candidate
  Setting to stop sending and receiving BSR messages | ip pim bsr-border
  Setting to select RP solely based on hash function, ignoring RP priority | ip pim ignore-rp-set-priority
  Setting the source IP address for register messages | ip pim register-source
  Enable/disable filtering for Register messages in RP | ip pim accept-register
  Setting the number of Register message packets that can be sent per second | ip pim register-rate-limit
  Setting the checksum calculation method for Register messages | ip pim register-checksum
  Register Suppression Timeout setting | ip pim register-suppression
  Setting the Join/Prune message transmission interval | ip pim jp-timer
  (S,G) entry Keepalive Timer settings | ip pim rp-register-kat
  Disable the transition to SPT | ip pim spt-disable
  Enable/disable PIM-SSM | ip pim ssm
  Enable/disable sending/receiving unicast BSM | ip pim unicast-bsm
  Enable/disable RP-reachability message check | ip pim register-rp-reachability
  Displaying RP information | show ip pim rp mapping
  Show candidate RP information | show ip pim rp-hash
  Displaying bootstrap router information | show ip pim bsr-router
  Deleting RP information learned from BSR | clear ip pim sparse-mode bsr rp-set

## 5. Examples of Command Execution

### 5.1. Configuring PIM-DM

When using PIM-DM, PIM-related settings are the same on all PIM routers.

■ SWX1 Settings

1. Create VLAN #10 and VLAN #20.

       SWX1(config)#vlan database
       SWX1(config-vlan)#vlan 10 (1)
       SWX1(config-vlan)#vlan 20 (2)
       SWX1(config-vlan)#exit

   1 | Create VLAN #10
   2 | Create VLAN #20

2. Assign port1.1 to VLAN #10 and port1.2 to VLAN #20 as access ports.

       SWX1(config)#interface port1.1
       SWX1(config-if)#switchport access vlan 10 (1)
       SWX1(config-if)#exit
       SWX1(confige)#interface port1.2
       SWX1(config-if)#switchport access vlan 20 (2)
       SWX1(config-if)#exit

   1 | Assign port1.1 to VLAN #10
   2 | Assign port1.2 to VLAN #20

3. Set IP addresses for VLAN #10 and VLAN #20.

       SWX1(config)#interface vlan10
       SWX1(config-if)#ip address 192.168.10.1/24 (1)
       SWX1(config-if)#exit
       SWX1(config)#interface vlan20
       SWX1(config-if)#ip address 192.168.20.1/24 (2)
       SWX1(config-if)#exit

   1 | Set the IP address for VLAN #10
   2 | Set the IP address for VLAN #20

4. Enable IP multicast routing.

       SWX(config)# ip multicast-routing

5. Enable IGMP and PIM-DM for VLAN #10 and VLAN #20.

       SWX1(config)#interface vlan10,vlan20
       SWX1(config-if)#ip pim dense-mode (1)
       SWX1(config-if)#ip igmp enable (2)
       SWX1(config-if)#exit

   1 | Enable PIM-DM for VLAN #10 and VLAN #20
   2 | Enable IGMP on VLAN #10 and VLAN #20

6. Configure the unicast route.

       SWX1(config)# ip route 192.168.30.0/24 192.168.20.2

■ SWX2 Settings

1. Create VLAN #20 and VLAN #30.

       SWX2(config)#vlan database
       SWX2(config-vlan)#vlan 20 (1)
       SWX2(config-vlan)#vlan 30 (2)
       SWX2(config-vlan)#exit

   1 | Create VLAN #20
   2 | Create VLAN #30

2. Assign port1.1 to VLAN #30 and port1.2 to VLAN #20 as access ports.

       SWX2(config)#interface port1.1
       SWX2(config-if)#switchport access vlan 30 (1)
       SWX2(config-if)#exit
       SWX2(confige)#interface port1.2
       SWX2(config-if)#switchport access vlan 20 (2)
       SWX2(config-if)#exit

   1 | Assign port1.1 to VLAN #30
   2 | Assign port1.2 to VLAN #20

3. Set IP addresses for VLAN #20 and VLAN #30.

       SWX2(config)#interface vlan20
       SWX2(config-if)#ip address 192.168.20.2/24 (1)
       SWX2(config-if)#exit
       SWX2(config)#interface vlan30
       SWX2(config-if)#ip address 192.168.30.1/24 (2)
       SWX2(config-if)#exit

   1 | Set the IP address for VLAN #20
   2 | Set the IP address for VLAN #30

4. Enable IP multicast routing.

       SWX2(config)# ip multicast-routing

5. Enable IGMP and PIM-DM for VLAN #20 and VLAN #30.

       SWX2(config)#interface vlan20,vlan30
       SWX2(config-if)#ip pim dense-mode (1)
       SWX2(config-if)#ip igmp enable (2)
       SWX2(config-if)#exit

   1 | Enable PIM-DM for VLAN #20 and VLAN #30
   2 | Enable IGMP on VLAN #20 and VLAN #30

6. Configure the unicast route.

       SWX2(config)# ip route 192.168.10.0/24 192.168.20.1

■ Confirmation

1. After the multicast sender sends multicast traffic, check the multicast route on SWX1.

       SWX1#show ip mroute

       IP Multicast Routing Table
       Flags: I - Immediate Stat, T - Timed Stat, F - Forwarder installed
       Timers: Uptime/Stat Expiry
       Interface State: Interface (TTL)

       (192.168.30.100, 239.0.0.1), uptime 00:00:10
       Owner PIM-DM, Flags: F
         Incoming interface: vlan20
         Outgoing interface list:
           vlan10 (1)

### 5.2. Configuring PIM-SM

In PIM-SM, you must configure the RP.
To automatically select an RP, you must configure BSR in addition to the RP. When configuring RP statically, BSR is not required.

#### 5.2.1. PIM-SM Configuration Example (Using BSR)

The following describes a configuration example for PIM-SM when selecting the RP using BSR.
Configure SWX1 as a candidate RP (C-RP) and candidate BSR (C-BSR), and configure SWX2 as an RP and BSR.
It is recommended that you configure RP and BSR candidates on multiple PIM routers for redundancy.

■ SWX1 (C-RP, C-BSR) Settings

1. Create VLAN #10 and VLAN #20.

       SWX1(config)#vlan database
       SWX1(config-vlan)#vlan 10 (1)
       SWX1(config-vlan)#vlan 20 (2)
       SWX1(config-vlan)#exit

   1 | Create VLAN #10
   2 | Create VLAN #20

2. Assign port1.1 to VLAN #10 and port1.2 to VLAN #20 as access ports.

       SWX1(config)#interface port1.1
       SWX1(config-if)#switchport access vlan 10 (1)
       SWX1(config-if)#exit
       SWX1(confige)#interface port1.2
       SWX1(config-if)#switchport access vlan 20 (2)
       SWX1(config-if)#exit

   1 | Assign port1.1 to VLAN #10
   2 | Assign port1.2 to VLAN #20

3. Set IP addresses for VLAN #10 and VLAN #20.

       SWX1(config)#interface vlan10
       SWX1(config-if)#ip address 192.168.10.1/24 (1)
       SWX1(config-if)#exit
       SWX1(config)#interface vlan20
       SWX1(config-if)#ip address 192.168.20.1/24 (2)
       SWX1(config-if)#exit

   1 | Set the IP address for VLAN #10
   2 | Set the IP address for VLAN #20

4. Enable IP multicast routing.

       SWX(config)# ip multicast-routing

5. Enable IGMP and PIM-SM for VLAN #10 and VLAN #20.

       SWX1(config)#interface vlan10,vlan20
       SWX1(config-if)#ip pim sparse-mode (1)
       SWX1(config-if)#ip igmp enable (2)
       SWX1(config-if)#exit

   1 | Enable PIM-SM for VLAN #10 and VLAN #20
   2 | Enable IGMP on VLAN #10 and VLAN #20

6. It will act as a candidate RP and advertise the IP address (192.168.10.1) configured for VLAN #10. At this point, leave the RP priority at its default value.

       SWX(config)# ip pim rp-candidate vlan10

7. Operate as a candidate BSR and advertise the IP address (192.168.10.1) configured for VLAN #10. At this point, leave the BSR priority at its default value.

       SWX(config)# ip pim bsr-candidate vlan10

8. Configure the unicast route.

       SWX1(config)# ip route 192.168.30.0/24 192.168.20.2

■ SWX2 (RP, BSR) Settings

1. Create VLAN #20 and VLAN #30.

       SWX2(config)#vlan database
       SWX2(config-vlan)#vlan 20 (1)
       SWX2(config-vlan)#vlan 30 (2)
       SWX2(config-vlan)#exit

   1 | Create VLAN #20
   2 | Create VLAN #30

2. Assign port1.1 to VLAN #30 and port1.2 to VLAN #20 as access ports.

       SWX2(config)#interface port1.1
       SWX2(config-if)#switchport access vlan 30 (1)
       SWX2(config-if)#exit
       SWX2(confige)#interface port1.2
       SWX2(config-if)#switchport access vlan 20 (2)
       SWX2(config-if)#exit

   1 | Assign port1.1 to VLAN #30
   2 | Assign port1.2 to VLAN #20

3. Set IP addresses for VLAN #20 and VLAN #30.

       SWX2(config)#interface vlan20
       SWX2(config-if)#ip address 192.168.20.2/24 (1)
       SWX2(config-if)#exit
       SWX2(config)#interface vlan30
       SWX2(config-if)#ip address 192.168.30.1/24 (2)
       SWX2(config-if)#exit

   1 | Set the IP address for VLAN #20
   2 | Set the IP address for VLAN #30

4. Enable IP multicast routing.

       SWX2(config)# ip multicast-routing

5. Enable IGMP and PIM-SM for VLAN #20 and VLAN #30.

       SWX2(config)#interface vlan20,vlan30
       SWX2(config-if)#ip pim sparse-mode (1)
       SWX2(config-if)#ip igmp enable (2)
       SWX2(config-if)#exit

   1 | Enable PIM-SM for VLAN #20 and VLAN #30
   2 | Enable IGMP on VLAN #20 and VLAN #30

6. Operate as a candidate RP and advertise the IP address (192.168.30.1) configured on VLAN #30. At this point, set the RP priority to a value lower than the default value of 192 so that it is selected as the RP with priority.

       SWX(config)# ip pim rp-candidate vlan30 priority 190

7. Operate as a candidate BSR and advertise the IP address (192.168.30.1) configured on VLAN #30. At this point, set the BSR priority to a value greater than the default value of 64 so that it is selected as the BSR with priority.

       SWX(config)# ip pim bsr-candidate vlan30 0 70

8. Configure the unicast route.

       SWX2(config)# ip route 192.168.10.0/24 192.168.20.1

■ Confirmation

1. After the multicast sender sends multicast traffic, check the multicast route on SWX1.

       SWX1#show ip mroute

       IP Multicast Routing Table
       Flags: I - Immediate Stat, T - Timed Stat, F - Forwarder installed
       Timers: Uptime/Stat Expiry
       Interface State: Interface (TTL)

       (192.168.30.100, 239.0.0.1), uptime 00:02:46, stat expires 00:03:14
       Owner PIM-SM, Flags: TF
         Incoming interface: vlan20
         Outgoing interface list:
           vlan10 (1)

2. Ensure SWX2 (192.168.30.1) is selected as the RP.

       SWX1#show ip pim rp-hash 239.0.0.1
           RP: 192.168.30.1
           Info source: 192.168.30.1, via bootstrap

#### 5.2.2. PIM-SM Configuration Example (with Static RP Specified)

This section describes an example of a PIM-SM configuration when specifying the RP statically.
When statically specifying the RP, the IP address of the RP must be specified on all PIM routers, and the same settings will apply to all PIM routers.
Instead of using the ip pim rp-candidate and ip pim bsr-candidate commands as in the PIM-SM configuration example for BSR usage, execute the following command on all PIM routers.

1. Specify 192.168.30.1 as the IP address for the RP.

       SWX(config)# ip pim rp-address 192.168.30.1

#### 5.2.3. PIM-SSM Configuration Example

The following describes a configuration example for PIM-SSM:
PIM-SSM requires PIM-SM to be enabled, but as it limits multicast senders, no RP or BSR needs to be specified, and the same configuration applies to all PIM routers.
Note that when using multicast groups outside the SSM range in conjunction with PIM-SSM, RP configuration is required.
Instead of using the ip pim rp-candidate and ip pim bsr-candidate commands as in the PIM-SM configuration example for BSR usage, configure the following commands.
However, note that when using PIM-SSM, the IGMPv3 Report sent by the multicast receiver as a group join request must include the IPv4 address of the multicast sender.

1. Enable PIM-SSM. Use 239.0.0.1 as the SSM range (if you specify the default keyword with the ip pim ssm command, use the standard SSM range 232.0.0.0/8).

       SWX(config)# access-list 1 permit any 239.0.0.1 0.0.0.0 any
       SWX(config)# ip pim ssm range 1

If a multicast receiver operating in IGMPv1/IGMPv2 uses SSM, the IGMP SSM mapping function is used.
By pre-establishing the mapping between multicast groups and multicast senders using an IGMP Querier, it enables (S, G) Join requests for that group.
In the following example, an IGMPv1/IGMPv2 join request for (*, 239.0.0.1) is trreated as an IGMPv3 join request for (192.168.30.1, 239.0.0.1).

1. Enable the IGMP SSM mapping function.

       SWX(config)# ip igmp ssm-map enable

2. Associate multicast group 239.0.0.1 and multicast sender 192.168.30.1.

       SWX(config)# access-list 1 permit any 239.0.0.1 0.0.0.0 any
       SWX(config)# ip igmp ssm-map static 1 192.168.30.1

## 6. Points of Caution

None

## 7. Related Documentation

- IP multicast: IGMP

Search result
No more search results.
There are no topics that match your search query.