PIM-SM Configuration with Bootstrap Router and Candidate RPs illustrates the PIM of four S- K- and 7100-Series routers. For a PIM-DM configuration:
The PIM-SM configuration is shown in the example scripts below. PIM-SM configuration includes configuring a preferred and a backup BSR for the topology, as well as two RPs for specific multicast groups and a backup RP for all groups.
On this router, IGMP is enabled on VLAN 2, which connects to hosts, and PIM-SM is enabled on all interfaces. IGMP is used to determine host group membership on directly attached subnets. Note that IGMP is enabled in switch mode on S- K- and 7100-Series routers.
VLAN 2 is configured as the backup candidate RP for all multicast groups by using the default RP priority of 192. Note that the C-RP with the smallest priority value is elected.
Alternatively, you could configure a loopback interface as a candidate RP, to avoid the dependency on a particular interface.
R1(su-config)->router id 1.1.1.1 R1(su-config)->interface vlan 2 R1(su-config-intf-vlan.0.2)->ip address 172.1.1.1 255.255.255.0 R1(su-config-intf-vlan.0.2)->no shutdown R1(su-config-intf-vlan.0.2)->exit R1(su)->set igmp enable 2 R1(su)->set igmp enable 3 R1(su)->set igmp enable 4 R1(su)->set igmp query-enable 2 R1(su-config)->ip pim rp-candidate 172.1.1.1 224.0.0.0 240.0.0.0 R1(su-config)->interface vlan 2 R1(su-config-intf-vlan.0.2)->ip pim sparse-mode R1(su-config-intf-vlan.0.2)->exit R1(su-config)->interface vlan 3 R1(su-config-intf-vlan.0.3)->ip address 172.1.2.1 255.255.255.0 R1(su-config-intf-vlan.0.3)->no shutdown R1(su-config-intf-vlan.0.3)->ip pim sparse-mode R1(su-config-intf-vlan.0.3)->exit R1(su-config)->interface vlan 4 R1(su-config-intf-vlan.0.4)->ip address 172.1.3.1 255.255.255.0 R1(su-config-intf-vlan.0.4)->no shutdown R1(su-config-intf-vlan.0.4)->ip pim sparse-mode R1(su-config-intf-vlan.0.4)->exit
On this router, PIM-SM is enabled on all interfaces. VLAN 9 is configured as a candidate BSR and is assigned a priority higher than the default of 0. Note that the C-BSR with the largest priority value is elected.
VLAN 9 is also configured as a candidate RP for the multicast group 224.2.2.0/24. Its priority is set to 2, which will most likely make it the elected RP for that particular group, since the C-RP with the smallest priority value is elected. (Note that Router R3 has an RP candidate priority value of 3 for that group.)
Again, alternatively, you could configure a loopback interface as a candidate BSR or RP, to avoid the dependency on a particular interface.
R2(su)->set igmp enable 3 R2(su)->set igmp enable 9 R1(su)->set igmp enable 8 R1(su)->set igmp enable 5 R2(su-config)->router id 1.1.1.2 R2(su-config)->ip pim bsr-candidate vlan 9 priority 2 R2(su-config)->interface vlan 3 R2(su-config-intf-vlan.0.3)->ip address 172.1.2.2 255.255.255.0 R2(su-config-intf-vlan.0.3)->no shutdown R2(su-config-intf-vlan.0.3)->ip pim sparse-mode R2(su-config-intf-vlan.0.3)->exit R2(su-config)->interface vlan 9 R2(su-config-intf-vlan.0.9)->ip address 172.2.2.2 255.255.255.0 R2(su-config-intf-vlan.0.9)->no shutdown R2(su-config-intf-vlan.0.9)->ip pim sparse-mode R2(su-config-intf-vlan.0.9)->exit R2(su-config)->ip pim rp-candidate 172.2.2.2 224.2.2.0 255.255.255.0 priority 2 R2(su-config)->interface vlan 8 R2(su-config-intf-vlan.0.8)->ip address 172.2.3.2 255.255.255.0 R2(su-config-intf-vlan.0.8)->no shutdown R2(su-config-intf-vlan.0.8)->ip pim sparse-mode R2(su-config-intf-vlan.0.8)->exit R2(su-config)->interface vlan 5 R2(su-config-intf-vlan.0.5)->ip address 172.2.4.2 255.255.255.0 R2(su-config-intf-vlan.0.5)->no shutdown R2(su-config-intf-vlan.0.5)->ip pim sparse-mode R2(su-config-intf-vlan.0.5)->exit
On this router, PIM-SM is enabled on all interfaces. VLAN 10 is configured as a backup candidate BSR, by leaving its priority at the default of 0.
VLAN 10 is also configured as a backup candidate RP for multicast group 224.2.2.0/24, by setting its priority value slightly higher (3) than the priority configured on R2 for the same group (2) (since the C-RP with the smallest priority value is elected).
R3(su)->set igmp enable 4 R3(su)->set igmp enable 8 R3(su)->set igmp enable 10 R3(su)->set igmp enable 6 R3(su)->configure R3(su-config)->router id 1.1.1.3 R3(su-config)->ip pim bsr-candidate vlan 10 R3(su-config)->interface vlan 4 R3(su-config-intf-vlan.0.4)->ip address 172.1.3.3 255.255.255.0 R3(su-config-intf-vlan.0.4)->no shutdown R3(su-config-intf-vlan.0.4)->ip pim sparse-mode R3(su-config-intf-vlan.0.4)->exit R3(su-config)->interface vlan 8 R3(su-config-intf-vlan.0.8)->ip address 172.2.3.3 255.255.255.0 R3(su-config-intf-vlan.0.8)->no shutdown R3(su-config-intf-vlan.0.8)->ip pim sparse-mode R3(su-config-intf-vlan.0.8)->exit R3(su-config)->interface vlan 10 R3(su-config-intf-vlan.0.10)->ip address 172.3.3.3 255.255.255.0 R3(su-config-intf-vlan.0.10)->no shutdown R3(su-config-intf-vlan.0.10)->ip pim sparse-mode R3(su-config-intf-vlan.0.10)->exit R3(su-config)->ip pim rp-candidate 172.3.3.3 224.2.2.0 255.255.255.0 priority 3 R3(su-config)->interface vlan 6 R3(su-config-intf-vlan.0.6)->ip address 172.3.4.3 255.255.255.0 R3(su-config-intf-vlan.0.6)->no shutdown R3(su-config-intf-vlan.0.6)->ip pim sparse-mode R3(su-config-intf-vlan.0.6)->exit
This router does not play any special role in PIM-SM, except that it has hosts directly connected to it. IGMP is enabled on the interface that connects to hosts and PIM-SM is enabled on all interfaces.
R3(su)->set igmp enable 5 R3(su)->set igmp enable 6 R3(su)->set igmp enable 7 R3(su)->configure R4(su-config)->router id 1.1.1.4 R4(su-config)#interface vlan 5 R4(su-config-intf-vlan.0.5)->ip address 172.2.4.4 255.255.255.0 R4(su-config-intf-vlan.0.5)->no shutdown R4(su-config-intf-vlan.0.5)->ip pim sparse-mode R4(su-config-intf-vlan.0.5)->exit R4(su-config)->interface vlan 6 R4(su-config-intf-vlan.0.6)->ip address 172.3.4.4 255.255.255.0 R4(su-config-intf-vlan.0.6)->no shutdown R4(su-config-intf-vlan.0.6)->ip pim sparse-mode R4(su-config-intf-vlan.0.6)->exit R4(su-config)->interface vlan 7 R4(su-config-intf-vlan.0.7)->ip address 172.4.4.4 255.255.255.0 R4(su-config-intf-vlan.0.7)->no shutdown R4(su-config-intf-vlan.0.7)->ip pim sparse-mode R4(su-config-intf-vlan.0.7)->exit