Example for Configuring a PIM-SM (SSM Model) Network
Networking Requirements
As shown in Figure 4-22, configure the PIM-SM protocol on routers to enable them to provide SSM services for user hosts on the network. Then hosts in a multicast group can receive Voice on Demand (VoD) streams sent from specified sources to this group.
Configuration Roadmap
Configure an IP address for each interface on routers and a unicast routing protocol. PIM is an intra-domain multicast routing protocol that depends on a unicast routing protocol. The multicast routing protocol can work normally after the unicast routing protocol works normally.
Enable the multicast function on all routers providing multicast services. Before configuring other PIM-SM functions, you must enable the multicast function.
Enable PIM-SM on all interfaces of the routers. After PIM-SM is enabled, you can configure other PIM-SM functions.
Enable IGMP on interfaces that connect routers to user hosts, and set the IGMP version to IGMPv3. A receiver can join or leave a multicast group by sending IGMP messages. The leaf routers maintain the multicast member relationship using IGMP.
If PIM-SM and IGMP need to be enabled on the same user host, enable PIM-SM, and then enable IGMP.
Configure the interface connected to hosts to be PIM silent to prevent malicious hosts from simulating PIM Hello messages. In this manner, security of the PIM-SM domain is ensured.
If the user network segment is connected to multiple routers, such as RouterB and RouterC in this example, do not enable PIM silent on interfaces that connect routers to user hosts.
Configure the SSM group address range on each router. Ensure that the routers in the PIM-SM domain provide services only for multicast groups in the range of SSM group addresses. In this manner, multicast can be controlled effectively.
The SSM group address range configured on each router must be the same.
Procedure
- Configure an IP address for each interface and configure the unicast routing protocol.
# Configure an IP address and mask for each interface according to Figure 4-22. Configure OSPF on each router to ensure IP connectivity between them, and enable them to dynamically update routing information. The configuration details are not provided here. The configuration of RouterB, RouterC, RouterD, RouterE, and RouterF are similar to the configuration of RouterA, and are not mentioned.
<Huawei> system-view [Huawei] sysname RouterA [RouterA] interface gigabitethernet 1/0/0 [RouterA-GigabitEthernet1/0/0] ip address 192.168.5.1 24 [RouterA-GigabitEthernet1/0/0] quit [RouterA] interface gigabitethernet 2/0/0 [RouterA-GigabitEthernet2/0/0] ip address 10.110.1.1 24 [RouterA-GigabitEthernet2/0/0] quit [RouterA] interface gigabitethernet 3/0/0 [RouterA-GigabitEthernet3/0/0] ip address 192.168.1.1 24 [RouterA-GigabitEthernet3/0/0] quit [RouterA] ospf [RouterA-ospf-1] area 0 [RouterA-ospf-1-area-0.0.0.0] network 10.110.1.0 0.0.0.255 [RouterA-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255 [RouterA-ospf-1-area-0.0.0.0] network 192.168.5.0 0.0.0.255 [RouterA-ospf-1-area-0.0.0.0] quit [RouterA-ospf-1] quit
- Enable multicast routing on all routers and PIM-SM on all interfaces.
# Enable multicast routing on all routers and enable PIM-SM on all interfaces. The configurations of RouterB, RouterC, RouterD, RouterE, and RouterF are similar to the configuration of RouterA, and are not mentioned here.
[RouterA] multicast routing-enable [RouterA] interface gigabitethernet 1/0/0 [RouterA-GigabitEthernet1/0/0] pim sm [RouterA-GigabitEthernet1/0/0] quit [RouterA] interface gigabitethernet 2/0/0 [RouterA-GigabitEthernet2/0/0] pim sm [RouterA-GigabitEthernet2/0/0] quit [RouterA] interface gigabitethernet 3/0/0 [RouterA-GigabitEthernet3/0/0] pim sm [RouterA-GigabitEthernet3/0/0] quit
- Enable IGMP on the router interface connected to user hosts, and set the IGMP version to IGMPv3.
# Enable IGMP on the interface that connects RouterA to user hosts. The configurations of RouterB and RouterC are similar to the configuration of RouterA, and are not mentioned here.
[RouterA] interface gigabitethernet 3/0/0 [RouterA-GigabitEthernet3/0/0] igmp enable [RouterA-GigabitEthernet3/0/0] igmp version 3
- Enable PIM silent on the interface of RouterA.
[RouterA] interface gigabitethernet 3/0/0 [RouterA-GigabitEthernet3/0/0] pim silent
- Configure the SSM group address range.
# Configure the SSM group address range to 232.1.1.0/24 on all routers. The configurations of RouterB, RouterC, RouterD, RouterE, and RouterF are similar to those of RouterA, and the detailed configurations are not mentioned here.
[RouterA] acl number 2000 [RouterA-acl-basic-2000] rule permit source 232.1.1.0 0.0.0.255 [RouterA-acl-basic-2000] quit [RouterA] pim [RouterA-pim] ssm-policy 2000
- Verify the configuration.
# Run the display pim interface command to view the configuration and running status of PIM on the interface. The PIM configuration on RouterC is as follows:
<RouterC> display pim interface VPN-Instance: public net Interface State NbrCnt HelloInt DR-Pri DR-Address GE1/0/0 up 0 30 1 10.110.2.2 (local) GE2/0/0 up 1 30 1 192.168.3.2
# Run the display pim routing-table command to view the PIM multicast routing table on the routers. HostA needs to receive messages sent from multicast groups 10.110.3.100/24 and 10.110.4.100/24 to group 232.1.1.1/24. HostB needs to receive messages sent from only multicast group 10.110.3.100/24 to group 232.1.1.1/24. The command output is as follows:
[RouterA] display pim routing-table VPN-Instance: public net Total 2 (S, G) entries (10.110.3.100, 232.1.1.1) Protocol: pim-ssm, Flag: SPT ACT UpTime: 00:13:46 Upstream interface: GigabitEthernet2/0/0 Upstream neighbor: 192.168.5.2 RPF prime neighbor: 192.168.5.2 Downstream interface(s) information: Total number of downstreams: 1 1: GigabitEthernet3/0/0 Protocol: igmp, UpTime: 00:13:46, Expires:- (10.110.4.100, 232.1.1.1) Protocol: pim-ssm, Flag: SPT ACT UpTime: 00:00:42 Upstream interface: GigabitEthernet1/0/0 Upstream neighbor: 192.168.1.2 RPF prime neighbor: 192.168.1.2 Downstream interface(s) information: Total number of downstreams: 1 1: GigabitEthernet3/0/0 Protocol: igmp, UpTime: 00:00:42, Expires:- [RouterB] display pim routing-table VPN-Instance: public net Total 1 (S, G) entry (10.110.3.100, 232.1.1.1) Protocol: pim-ssm, Flag: SPT ACT UpTime: 00:10:12 Upstream interface: GigabitEthernet1/0/0 Upstream neighbor: 192.168.2.2 RPF prime neighbor: 192.168.2.2 Downstream interface(s) information: Total number of downstreams: 1 1: GigabitEthernet2/0/0 Protocol: igmp, UpTime: 00:10:12, Expires:- [RouterC] display pim routing-table VPN-Instance: public net Total 1 (S, G) entry (10.110.3.100, 232.1.1.1) Protocol: pim-ssm, Flag: UpTime: 00:01:25 Upstream interface: GigabitEthernet2/0/0 Upstream neighbor: 192.168.3.2 RPF prime neighbor: 192.168.3.2 Downstream interface(s) information: Total number of downstreams: 1 1: GigabitEthernet1/0/0 Protocol: igmp, UpTime: 00:01:25, Expires:- [RouterD] display pim routing-table VPN-Instance: public net Total 1 (S, G) entry (10.110.3.100, 232.1.1.1) Protocol: pim-ssm, Flag: SPT ACT UpTime: 00:00:42 Upstream interface: GigabitEthernet1/0/0 Upstream neighbor: 10.110.3.100 RPF prime neighbor: 10.110.3.100 Downstream interface(s) information: Total number of downstreams: 2 1: GigabitEthernet2/0/0 Protocol: pim-ssm, UpTime: 00:00:42, Expires:- [RouterE] display pim routing-table VPN-Instance: public net Total 1 (S, G) entry (10.110.3.100, 232.1.1.1) Protocol: pim-ssm, Flag: SPT ACT UpTime: 00:13:16 Upstream interface: GigabitEthernet4/0/0 Upstream neighbor: 192.168.4.1 RPF prime neighbor: 192.168.4.1 Downstream interface(s) information: Total number of downstreams: 3 1: GigabitEthernet1/0/0 Protocol: pim-ssm, UpTime: 00:13:16, Expires: 00:03:20 2: GigabitEthernet2/0/0 Protocol: pim-ssm, UpTime: 00:13:16, Expires: 00:03:21 3: GigabitEthernet3/0/0 Protocol: pim-ssm, UpTime: 00:13:16, Expires: 00:03:22 [RouterF] display pim routing-table VPN-Instance: public net Total 1 (S, G) entry (10.110.4.100, 232.1.1.1) Protocol: pim-ssm, Flag: SPT ACT UpTime: 00:13:16 Upstream interface: GigabitEthernet1/0/0 Upstream neighbor: 10.110.4.100 RPF prime neighbor: 10.110.4.100 Downstream interface(s) information: Total number of downstreams: 1 1: GigabitEthernet2/0/0 Protocol: pim-ssm, UpTime: 00:15:28, Expires: 00:05:21
Configuration Files
RouterA configuration file
# sysname RouterA # multicast routing-enable # acl number 2000 rule 5 permit source 232.1.1.0 0.0.0.255 # interface GigabitEthernet1/0/0 ip address 192.168.5.1 255.255.255.0 pim sm # interface GigabitEthernet2/0/0 ip address 192.168.1.1 255.255.255.0 pim sm # interface GigabitEthernet3/0/0 ip address 10.110.1.1 255.255.255.0 pim silent pim sm igmp enable igmp version 3 # ospf 1 area 0.0.0.0 network 10.110.1.0 0.0.0.255 network 192.168.1.0 0.0.0.255 network 192.168.5.0 0.0.0.255 # pim ssm-policy 2000 # return
RouterB configuration file
# sysname RouterB # multicast routing-enable # acl number 2000 rule 5 permit source 232.1.1.0 0.0.0.255 # interface GigabitEthernet1/0/0 ip address 192.168.2.1 255.255.255.0 pim sm # interface GigabitEthernet2/0/0 ip address 10.110.2.1 255.255.255.0 pim sm igmp enable igmp version 3 # ospf 1 area 0.0.0.0 network 10.110.2.0 0.0.0.255 network 192.168.2.0 0.0.0.255 # pim ssm-policy 2000 # return
RouterC configuration file
# sysname RouterC # multicast routing-enable # acl number 2000 rule 5 permit source 232.1.1.0 0.0.0.255 # interface GigabitEthernet1/0/0 ip address 10.110.2.2 255.255.255.0 pim sm igmp enable igmp version 3 # interface GigabitEthernet2/0/0 ip address 192.168.3.1 255.255.255.0 pim sm # ospf 1 area 0.0.0.0 network 10.110.2.0 0.0.0.255 network 192.168.3.0 0.0.0.255 # pim ssm-policy 2000 # return
RouterD configuration file
# sysname RouterD # multicast routing-enable # acl number 2000 rule 5 permit source 232.1.1.0 0.0.0.255 # interface GigabitEthernet1/0/0 ip address 10.110.3.1 255.255.255.0 pim sm # interface GigabitEthernet2/0/0 ip address 192.168.4.1 255.255.255.0 pim sm # ospf 1 area 0.0.0.0 network 10.110.3.0 0.0.0.255 network 192.168.4.0 0.0.0.255 # pim ssm-policy 2000 # return
RouterE configuration file
# sysname RouterE # multicast routing-enable # acl number 2000 rule 5 permit source 232.1.1.0 0.0.0.255 # interface GigabitEthernet1/0/0 ip address 192.168.5.2 255.255.255.0 pim sm # interface GigabitEthernet2/0/0 ip address 192.168.3.2 255.255.255.0 pim sm # interface GigabitEthernet3/0/0 ip address 192.168.2.2 255.255.255.0 pim sm # interface GigabitEthernet4/0/0 ip address 192.168.4.2 255.255.255.0 pim sm # ospf 1 area 0.0.0.0 network 192.168.2.0 0.0.0.255 network 192.168.3.0 0.0.0.255 network 192.168.4.0 0.0.0.255 network 192.168.5.0 0.0.0.255 # pim ssm-policy 2000 # return
RouterF configuration file
# sysname RouterF # multicast routing-enable # acl number 2000 rule 5 permit source 232.1.1.0 0.0.0.255 # interface GigabitEthernet1/0/0 ip address 10.110.4.1 255.255.255.0 pim sm # interface GigabitEthernet2/0/0 ip address 192.168.1.2 255.255.255.0 pim sm # ospf 1 area 0.0.0.0 network 10.110.4.0 0.0.0.255 network 192.168.1.0 0.0.0.255 # pim ssm-policy 2000 # return