< Home

Example for Configuring IPv4 PIM-SM in the SSM Model

Networking Requirements

As shown in Figure 1, HostA wants to receive multicast data from S1 and S2, while HostB wants to receive multicast data from S2.

In this scenario, to avoid loops, ensure that all connected interfaces have STP disabled and connected interfaces are removed from VLAN 1. If STP is enabled and VLANIF interfaces of switches are used to construct a Layer 3 ring network, an interface on the network will be blocked. As a result, Layer 3 services on the network cannot run normally.

Figure 1 Network diagram for configuring PIM-SM in the SSM model

Configuration Roadmap

Configure the PIM-SM protocol on the switches to enable them to provide the SSM service for user hosts on the network. Then hosts in a multicast group can receive multicast data sent from specified sources to this group.

  1. Configure an IP address for each interface and a unicast routing protocol. PIM is an intra-domain multicast routing protocol that depends on unicast routing protocols.

  2. Enable the multicast function on switches providing multicast services. Before configuring PIM-SM, you must enable the multicast function.

  3. Enable PIM-SM on all interfaces. You can configure other PIM-SM functions only after PIM-SM is enabled.

  4. Enable IGMP on interfaces that connect the switch and hosts and set the IGMP version to IGMPv3. A receiver can join and leave a multicast group of a specified source by sending IGMP messages. The leaf switches maintain the multicast member relationship through IGMP.

    If both PIM-SM and IGMP need to be configured on interfaces that connect the switch and hosts, you must configure PIM-SM first, and then configure IGMP.

    If IGMPv2 is configured on the switch and receivers want to receive multicast data sent to a group from specified sources, IGMP SSM mapping must be enabled to meet this requirement.

  5. Enable PIM silent on interfaces that connect the switch and hosts to prevent malicious hosts from simulating sending PIM Hello packets. In this manner, security of PIM-SM domain is ensured.

    If the user host network segment connects to multiple switches, do not enable PIM silent on interfaces that connect these switches and user hosts. For example, PIM silent cannot be enabled on SwitchB and Switch C.

  6. Configure the address range for SSM groups on each switch. Ensure that switches in the PIM-SM domain provide services only for multicast groups in the range of SSM group addresses.

    SSM group address range configured on each switch must be the same.

Procedure

  1. Configure an IP address for each interface and a unicast routing protocol.

    # Configure the IP address and mask for each interface shown in Figure 1, and configure OSPF on each switch to ensure that switches can communicate at the network layer and can dynamically update routes through the unicast routing protocol. The configuration details are not provided here. The configuration of SwitchB, SwitchC, SwitchD, SwitchE, and SwitchF are similar to the configuration of SwitchA, and are not mentioned.

    <HUAWEI> system-view
    [HUAWEI] sysname SwitchA
    [SwitchA] vlan batch 10 20 30
    [SwitchA] interface gigabitethernet0/0/1
    [SwitchA-GigabitEthernet0/0/1] port link-type trunk
    [SwitchA-GigabitEthernet0/0/1] port trunk allow-pass vlan 10
    [SwitchA-GigabitEthernet0/0/1] quit
    [SwitchA] interface gigabitethernet0/0/2
    [SwitchA-GigabitEthernet0/0/2] port link-type trunk
    [SwitchA-GigabitEthernet0/0/2] port trunk allow-pass vlan 30
    [SwitchA-GigabitEthernet0/0/2] quit
    [SwitchA] interface gigabitethernet0/0/3
    [SwitchA-GigabitEthernet0/0/3] port link-type trunk
    [SwitchA-GigabitEthernet0/0/3] port trunk allow-pass vlan 20
    [SwitchA-GigabitEthernet0/0/3] quit
    [SwitchA] interface vlanif 10
    [SwitchA-Vlanif10] ip address 192.168.5.1 24
    [SwitchA-Vlanif10] quit
    [SwitchA] interface vlanif 20
    [SwitchA-Vlanif20] ip address 10.110.1.1 24
    [SwitchA-Vlanif20] quit
    [SwitchA] interface vlanif 30
    [SwitchA-Vlanif30] ip address 192.168.1.1 24
    [SwitchA-Vlanif30] quit
    [SwitchA] ospf
    [SwitchA-ospf-1] area 0
    [SwitchA-ospf-1-area-0.0.0.0] network 10.110.1.0 0.0.0.255
    [SwitchA-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
    [SwitchA-ospf-1-area-0.0.0.0] network 192.168.5.0 0.0.0.255
    [SwitchA-ospf-1-area-0.0.0.0] quit
    [SwitchA-ospf-1] quit

  2. Enable multicast, and enable PIM-SM on all interfaces.

    # Enable multicast on all switches and PIM-SM on all interfaces. The configuration of SwitchB, SwitchC, SwitchD, SwitchE, and SwitchF are similar to the configuration of SwitchA, and are not mentioned.

    [SwitchA] multicast routing-enable
    [SwitchA] interface vlanif 10
    [SwitchA-Vlanif10] pim sm
    [SwitchA-Vlanif10] quit
    [SwitchA] interface vlanif 20
    [SwitchA-Vlanif20] pim sm
    [SwitchA-Vlanif20] quit
    [SwitchA] interface vlanif 30
    [SwitchA-Vlanif30] pim sm
    [SwitchA-Vlanif30] quit

  3. Enable IGMP on interfaces that connect the switch and hosts and set the IGMP version to IGMPv3.

    # Enable IGMP on interfaces that connect SwitchA and user hosts. The configuration of SwitchB and SwitchC are similar to the configuration of SwitchA, and are not mentioned here.

    [SwitchA] interface vlanif 20
    [SwitchA-Vlanif20] igmp enable
    [SwitchA-Vlanif20] igmp version 3
    [SwitchA-Vlanif20] quit

  4. Enable PIM silent on interfaces on SwitchA.

    [SwitchA] interface vlanif 20
    [SwitchA-Vlanif20] pim silent
    [SwitchA-Vlanif20] quit

  5. Configure the address range for SSM groups.

    # Set the address of SSM group to range from 232.1.1.0 to 232.1.1.255 on all switches. The configuration of SwitchB, SwitchC, SwitchD, SwitchE and SwitchF are similar to the configuration of SwitchA, and are not mentioned here.

    [SwitchA] acl number 2000
    [SwitchA-acl-basic-2000] rule permit source 232.1.1.0 0.0.0.255 
    [SwitchA-acl-basic-2000] quit
    [SwitchA] pim
    [SwitchA-pim] ssm-policy 2000
    [SwitchA-pim] quit

  6. Verify the configuration.

    # Run the display pim interface command to check the PIM configuration and status. The PIM information on SwitchC is displayed as follows:

    [SwitchC] display pim interface
    VPN-Instance: public net
    Interface      State   NbrCnt   HelloInt   DR-Pri     DR-Address
    Vlanif50        up      1         30         1         192.168.3.2
    Vlanif40        up      1         30         1         10.110.2.2    (local)

    # Run the display pim routing-table command to view the PIM routing table. HostA receives information sent from multicast source 10.110.3.100/24 and 10.110.4.100/24 to the multicast group 232.1.1.1/24. HostB receives information sent from multicast source 10.110.3.100/24 to multicast group 232.1.1.1/24. The following information is displayed.

    [SwitchA] 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: SG_RCVR
         UpTime: 00:13:46
         Upstream interface: Vlanif10
             Upstream neighbor: 192.168.5.2
             RPF prime neighbor: 192.168.5.2
         Downstream interface(s) information:
         Total number of downstreams: 1
             1: Vlanif20
                 Protocol: igmp, UpTime: 00:13:46, Expires:-
     
    (10.110.4.100, 232.1.1.1)
         Protocol: pim-ssm, Flag: SG_RCVR
         UpTime: 00:00:42
         Upstream interface: Vlanif30
             Upstream neighbor: 192.168.1.2
             RPF prime neighbor: 192.168.1.2
        Downstream interface(s) information:
         Total number of downstreams: 1
             1: Vlanif20
                 Protocol: igmp, UpTime: 00:00:42, Expires:-
    [SwitchB] 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: SG_RCVR
         UpTime: 00:10:12
         Upstream interface: Vlanif90
             Upstream neighbor: 192.168.2.2
             RPF prime neighbor: 192.168.2.2
         Downstream interface(s) information: None
    
    [SwitchC] 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: SG_RCVR
         UpTime: 00:01:25
         Upstream interface: Vlanif50
             Upstream neighbor: 192.168.3.2
             RPF prime neighbor: 192.168.3.2
         Downstream interface(s) information:
         Total number of downstreams: 1
             1: Vlanif40
                 Protocol: igmp, UpTime: 00:01:25, Expires:-
    
    [SwitchD] 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: LOC
         UpTime: 00:00:42
         Upstream interface: Vlanif80
             Upstream neighbor: NULL
             RPF prime neighbor: NULL
         Downstream interface(s) information:
         Total number of downstreams: 1
             1: Vlanif60
                 Protocol: pim-ssm, UpTime: 00:00:42, Expires:-
    
    [SwitchE] 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:13:16
         Upstream interface: Vlanif60
             Upstream neighbor: 192.168.4.1
             RPF prime neighbor: 192.168.4.1
         Downstream interface(s) information:
         Total number of downstreams: 3
             1: Vlanif10
                 Protocol: pim-ssm, UpTime: 00:13:16, Expires: 00:02:21
             2: Vlanif50
                 Protocol: pim-ssm, UpTime: 00:13:16, Expires: 00:04:23
             3: Vlanif90
                 Protocol: pim-ssm, UpTime: 00:13:16, Expires: 00:03:22
    
    [SwitchF] 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: LOC
         UpTime: 00:13:16
         Upstream interface: Vlanif70
             Upstream neighbor: NULL
             RPF prime neighbor: NULL
         Downstream interface(s) information:
         Total number of downstreams: 1
             1: Vlanif30
                 Protocol: pim-ssm, UpTime: 00:15:28, Expires: 00:05:21
    

Configuration Files

  • SwitchA configuration file

    #
    sysname SwitchA
    #
    vlan batch 10 20 30
    #
    multicast routing-enable
    #
    acl number 2000
     rule 5 permit source 232.1.1.0 0.0.0.255
    #
    interface Vlanif10
     ip address 192.168.5.1 255.255.255.0
     pim sm
    #
    interface Vlanif20
     ip address 10.110.1.1 255.255.255.0
     pim silent
     pim sm 
     igmp enable
     igmp version 3
    #
    interface Vlanif30
     ip address 192.168.1.1 255.255.255.0
     pim sm
    #
    interface GigabitEthernet0/0/1
     port link-type trunk
     port trunk allow-pass vlan 10
    #
    interface GigabitEthernet0/0/2
     port link-type trunk
     port trunk allow-pass vlan 30
    #
    interface GigabitEthernet0/0/3
     port link-type trunk
     port trunk allow-pass vlan 20
    #
    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
  • SwitchB configuration file

    #
    sysname SwitchB
    #
    vlan batch 40 90
    #
    multicast routing-enable
    #
    acl number 2000
     rule 5 permit source 232.1.1.0 0.0.0.255
    #
    interface Vlanif40
     ip address 10.110.2.1 255.255.255.0
     pim sm 
     igmp enable
     igmp version 3
    #
    interface Vlanif90
     ip address 192.168.2.1 255.255.255.0
     pim sm
    #
    interface GigabitEthernet0/0/1
     port link-type trunk
     port trunk allow-pass vlan 90
    #
    interface GigabitEthernet0/0/2
     port link-type trunk
     port trunk allow-pass vlan 40
    #
    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
  • SwitchC configuration file

    #
    sysname SwitchC
    #
    vlan batch 40 50
    #
    multicast routing-enable
    #
    acl number 2000
     rule 5 permit source 232.1.1.0 0.0.0.255
    #
    interface Vlanif40
     ip address 10.110.2.2 255.255.255.0
     pim sm 
     igmp enable
     igmp version 3
    #
    interface Vlanif50
     ip address 192.168.3.1 255.255.255.0
     pim sm
    #
    interface GigabitEthernet0/0/1
     port link-type trunk
     port trunk allow-pass vlan 40
    #
    interface GigabitEthernet0/0/2
     port link-type trunk
     port trunk allow-pass vlan 50
    #
    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
  • SwitchD configuration file

    #
    sysname SwitchD
    #
    vlan batch 60 80
    #
    multicast routing-enable
    #
    acl number 2000
     rule 5 permit source 232.1.1.0 0.0.0.255
    #
    interface Vlanif60
     ip address 192.168.4.1 255.255.255.0
     pim sm
    #
    interface Vlanif80
     ip address 10.110.3.1 255.255.255.0
     pim sm
    #
    interface GigabitEthernet0/0/1
     port link-type trunk
     port trunk allow-pass vlan 80
    #
    interface GigabitEthernet0/0/4
     port link-type trunk
     port trunk allow-pass vlan 60
    #
    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
  • SwitchE configuration file

    #
    sysname SwitchE
    #
    vlan batch 10 50 60 90
    #
    multicast routing-enable
    #
    acl number 2000
     rule 5 permit source 232.1.1.0 0.0.0.255
    #
    interface Vlanif10
     ip address 192.168.5.2 255.255.255.0
     pim sm
    #
    interface Vlanif50
     ip address 192.168.3.2 255.255.255.0
     pim sm
    #
    interface Vlanif60
     ip address 192.168.4.2 255.255.255.0
     pim sm
    #
    interface Vlanif90
     ip address 192.168.2.2 255.255.255.0
     pim sm
    #
    interface GigabitEthernet0/0/1
     port link-type trunk
     port trunk allow-pass vlan 10
    #
    interface GigabitEthernet0/0/2
     port link-type trunk
     port trunk allow-pass vlan 50
    #
    interface GigabitEthernet0/0/3
     port link-type trunk
     port trunk allow-pass vlan 90
    #
    interface GigabitEthernet0/0/4
     port link-type trunk
     port trunk allow-pass vlan 60
    #
    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
  • SwitchF configuration file

    #
    sysname SwitchF
    #
    vlan batch 30 70
    #
    multicast routing-enable
    #
    acl number 2000
     rule 5 permit source 232.1.1.0 0.0.0.255
    #
    interface Vlanif30
     ip address 192.168.1.2 255.255.255.0
     pim sm
    #
    interface Vlanif70
     ip address 10.110.4.1 255.255.255.0
     pim sm
    #
    interface GigabitEthernet0/0/1
     port link-type trunk
     port trunk allow-pass vlan 70
    #
    interface GigabitEthernet0/0/2
     port link-type trunk
     port trunk allow-pass vlan 30
    #
    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
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >