< Home

Example for Configuring Anycast RP in a PIM-SM Domain

Networking Requirements

As shown in Figure 1, a PIM-SM domain contains multiple multicast sources and receivers. Rendezvous points (RPs) in the PIM-SM domain need to be configured as MSDP peers to perform load balancing.

Figure 1 Anycast RP network

Configuration Roadmap

Configure Anycast RP to enable receivers to send Join messages to the nearest RP and enable multicast sources to register to the nearest RP. In this way, multiple RPs implement load balancing.

  1. Configure IP addresses for the interfaces on each switch and configure OSPF in the PIM-SM domain.

  2. Enable multicast routing on all switches and PIM-SM on all interfaces, and enable Internet Group Management Protocol (IGMP) on interfaces connected to network segments of receiver hosts.

  3. Configure the same Loopback10 address on SwitchC and SwitchD. Configure Loopback10 as a candidate rendezvous point (C-RP) and Loopback1 as a candidate bootstrap router (C-BSR).

  4. Configure MSDP peers on Loopback0 interfaces of SwitchC and SwitchD. According to RPF rules, the switches receive SA messages from the source RP.

Procedure

  1. Configure IP addresses for interfaces and configure a unicast routing protocol on each switch.

    # According to Figure 1, configure IP addresses and masks for the interfaces in the PIM-SM domain. Configure OSPF between switches. The configuration details are not mentioned here.

  2. Enable multicast routing and configure PIM-SM.

    # Enable multicast routing on all switches and PIM-SM on all interfaces. Enable IGMP on interfaces connected to network segments of receiver hosts. The configurations on other switches are similar to the configuration on SwitchC, and are not mentioned here.

    [SwitchC] multicast routing-enable
    [SwitchC] interface vlanif 104
    [SwitchC-Vlanif104] pim sm
    [SwitchC-Vlanif104] igmp enable
    [SwitchC-Vlanif104] quit
    [SwitchC] interface vlanif 101
    [SwitchC-Vlanif101] pim sm
    [SwitchC-Vlanif101] quit
    [SwitchC] interface vlanif 100
    [SwitchC-Vlanif100] pim sm
    [SwitchC-Vlanif100] quit

  3. Configure Loopback1 interfaces, Loopback10 interfaces, C-BSRs, and C-RPs.

    # Configure Loopback1 addresses and the same Loopback10 address for SwitchC and SwitchD. Configure C-BSRs on Loopback1 interfaces and C-RPs on Loopback10 interfaces. The configuration on SwitchD is similar to the configuration on SwitchC, and is not mentioned here.

    [SwitchC] interface loopback 1
    [SwitchC-LoopBack1] ip address 10.3.3.3 255.255.255.255
    [SwitchC-LoopBack1] pim sm
    [SwitchC-LoopBack1] quit
    [SwitchC] interface loopback 10
    [SwitchC-LoopBack10] ip address 10.1.1.1 255.255.255.255
    [SwitchC-LoopBack10] pim sm
    [SwitchC-LoopBack10] quit
    [SwitchC] pim
    [SwitchC-pim] c-bsr loopback 1
    [SwitchC-pim] c-rp loopback 10
    [SwitchC-pim] quit

  4. Configure MSDP peers on Loopback0 interfaces.

    # Configure an MSDP peer on Loopback0 of SwitchC.

    [SwitchC] interface loopback 0
    [SwitchC-LoopBack0] ip address 10.5.5.5 255.255.255.255
    [SwitchC-LoopBack0] pim sm
    [SwitchC-LoopBack0] quit
    [SwitchC] msdp
    [SwitchC-msdp] originating-rp loopback0
    [SwitchC-msdp] peer 10.2.2.2 connect-interface loopback0
    [SwitchC-msdp] quit

    # Configure an MSDP peer on Loopback0 of SwitchD.

    [SwitchD] interface loopback 0
    [SwitchD-LoopBack0] ip address 10.2.2.2 255.255.255.255
    [SwitchD-LoopBack0] pim sm
    [SwitchD-LoopBack0] quit
    [SwitchD] msdp
    [SwitchD-msdp] originating-rp loopback0
    [SwitchD-msdp] peer 10.5.5.5 connect-interface loopback0
    [SwitchD-msdp] quit

  5. Verify the configuration.

    # Run the display msdp brief command to view MSDP peer information on switches. The following output shows summary information about MSDP peers on SwitchC and SwitchD:

    [SwitchC] display msdp brief
    MSDP Peer Brief Information
      Configured   Up           Listen       Connect      Shutdown     Down
      1            1            0            0            0            0         
      Peer's Address     State     Up/Down time    AS     SA Count   Reset Count
      10.2.2.2            Up        00:10:17        ?      0          0
    [SwitchD] display msdp brief
    MSDP Peer Brief Information
      Configured   Up           Listen       Connect      Shutdown     Down
      1            1            0            0            0            0         
      Peer's Address     State     Up/Down time    AS     SA Count   Reset Count
      10.5.5.5            Up        00:10:18        ?      0          0

    # Run the display pim routing-table command to view the PIM routing table on a switch. When S1 (10.110.5.100/24) in the PIM-SM domain sends multicast data to G (225.1.1.1), User1 (Receiver) joins G and receives the multicast data sent to G. Comparing the PIM routing tables on SwitchC and SwitchD, you can find that SwitchC is the valid RP. S1 registers to SwitchC, and User1 sends a Join message to SwitchC.

    [SwitchC] display pim routing-table
    VPN-Instance: public net
     Total 1 (*, G) entry; 1 (S, G) entry
     
     (*, 225.1.1.1)
         RP: 10.1.1.1 (local)
         Protocol: pim-sm, Flag: WC
         UpTime: 00:28:49
         Upstream interface: Register
             Upstream neighbor: NULL
             RPF prime neighbor: NULL
         Downstream interface(s) information:
         Total number of downstreams: 1
             1: Vlanif104
                 Protocol: igmp, UpTime: 00:28:49, Expires: -
     
     (10.110.5.100, 225.1.1.1)
         RP: 10.1.1.1 (local)
         Protocol: pim-sm, Flag: SPT 2MSDP ACT
         UpTime: 00:02:26
         Upstream interface: Vlanif101
             Upstream neighbor: 10.110.1.2
             RPF prime neighbor: 10.110.1.2
         Downstream interface(s) information:
         Total number of downstreams: 1
             1: Vlanif104
                 Protocol: pim-sm, UpTime: 00:02:26, Expires: -
    
    [SwitchD] display pim routing-table

    Not output is displayed.

    # User1 leaves G, and S1 stops sending multicast data to G. You can run the reset multicast routing-table all and reset multicast forwarding-table all commands to reset multicast routing entries and multicast forwarding entries on SwitchC.

    [SwitchC] quit
    <SwitchC> reset multicast routing-table all
    <SwitchC> reset multicast forwarding-table all

    # User2 joins G, and S2 (10.110.6.100/24) sends multicast data to G. Comparing PIM routing tables on SwitchC and SwitchD, you can find that SwitchD is the valid RP. S2 registers to SwitchD, and User2 sends a Join message to SwitchD.

    <SwitchC> display pim routing-table

    Not output is displayed.

    [SwitchD] display pim routing-table
    VPN-Instance: public net  
    Total 1 (*, G) entry; 1 (S, G) entry
     
    (*, 225.1.1.1)
         RP: 10.1.1.1 (local)
         Protocol: pim-sm, Flag: WC
         UpTime: 00:07:23
         Upstream interface: Register 
             Upstream neighbor: NULL
             RPF prime neighbor: NULL
         Downstream interface(s) information:
         Total number of downstreams: 1
             1: Vlanif103
                 Protocol: igmp, UpTime: 00:07:23, Expires:-
     (10.110.6.100, 225.1.1.1)
         RP: 10.1.1.1 (local)
         Protocol: pim-sm, Flag: SPT 2MSDP ACT
         UpTime: 00:10:20
         Upstream interface: Vlanif102
             Upstream neighbor: 10.110.2.2
             RPF prime neighbor: 10.110.2.2
         Downstream interface(s) information:
         Total number of downstreams: 1
             1: Vlanif103
                 Protocol: pim-sm, UpTime: 00:10:22, Expires: -

Configuration Files

  • SwitchA configuration file

    #
    sysname SwitchA
    #
    vlan batch 101 105
    #
    multicast routing-enable
    #
    interface Vlanif101
     ip address 10.110.1.2 255.255.255.0
     pim sm
    #
    interface Vlanif105
     ip address 10.110.5.1 255.255.255.0
     pim sm
    #
    interface GigabitEthernet0/0/1
     port link-type hybrid
     port hybrid pvid vlan 105
     port hybrid untagged vlan 105
    #
    interface GigabitEthernet0/0/2
     port link-type trunk
     port trunk allow-pass vlan 101
    #
    ospf 1
     area 0.0.0.0
      network 10.110.1.0 0.0.0.255
      network 10.110.5.0 0.0.0.255
    #
    return
  • SwitchB configuration file

    #
    sysname SwitchB
    #
    vlan batch 102 106
    #
    multicast routing-enable
    #
    interface Vlanif102
     ip address 10.110.2.2 255.255.255.0
     pim sm
    #
    interface Vlanif106
     ip address 10.110.6.1 255.255.255.0
     pim sm
    #
    interface GigabitEthernet0/0/1
     port link-type hybrid
     port hybrid pvid vlan 106
     port hybrid untagged vlan 106
    #
    interface GigabitEthernet0/0/2
     port link-type trunk
     port trunk allow-pass vlan 102
    #
    ospf 1
     area 0.0.0.0
      network 10.110.2.0 0.0.0.255
      network 10.110.6.0 0.0.0.255
    #
    return
  • SwitchC configuration file

    #
    sysname SwitchC
    #
    vlan batch 100 to 101 104
    #
    multicast routing-enable
    #
    interface Vlanif100
     ip address 192.168.1.1 255.255.255.0
     pim sm
    #
    interface Vlanif101
     ip address 10.110.1.1 255.255.255.0
     pim sm
    #
    interface Vlanif104
     ip address 10.110.4.1 255.255.255.0
     pim sm
     igmp enable
    #
    interface GigabitEthernet0/0/1
     port link-type trunk
     port trunk allow-pass vlan 100
    #
    interface GigabitEthernet0/0/2
     port link-type trunk
     port trunk allow-pass vlan 101
    #
    interface GigabitEthernet0/0/3
     port link-type hybrid
     port hybrid pvid vlan 104
     port hybrid untagged vlan 104
    #
    interface LoopBack0
     ip address 10.5.5.5 255.255.255.255
     pim sm
    #
    interface LoopBack1
     ip address 10.3.3.3 255.255.255.255
     pim sm
    #
    interface LoopBack10
     ip address 10.1.1.1 255.255.255.255
     pim sm
    #
    ospf 1
     area 0.0.0.0
      network 10.1.1.1 0.0.0.0
      network 10.3.3.3 0.0.0.0
      network 10.5.5.5 0.0.0.0
      network 10.110.1.0 0.0.0.255
      network 10.110.4.0 0.0.0.255
      network 192.168.1.0 0.0.0.255
    #
    pim
     c-bsr LoopBack1
     c-rp LoopBack10
    #
    msdp
     originating-rp LoopBack0
     peer 10.2.2.2 connect-interface LoopBack0
    #
    return
  • SwitchD configuration file

    #
    sysname SwitchD
    #
    vlan batch 102 to 103 300
    #
    multicast routing-enable
    #
    interface Vlanif102
     ip address 10.110.2.1 255.255.255.0
     pim sm
    #
    interface Vlanif103
     ip address 10.110.3.1 255.255.255.0
     pim sm
     igmp enable
    #
    interface Vlanif300
     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 300
    #
    interface GigabitEthernet0/0/2
     port link-type trunk
     port trunk allow-pass vlan 102
    #
    interface GigabitEthernet0/0/3
     port link-type hybrid
     port hybrid pvid vlan 103
     port hybrid untagged vlan 103
    #
    interface LoopBack0
     ip address 10.2.2.2 255.255.255.255
     pim sm
    #
    interface LoopBack1
     ip address 10.4.4.4 255.255.255.255
     pim sm
    #
    interface LoopBack10
     ip address 10.1.1.1 255.255.255.255
     pim sm
    #
    ospf 1
     area 0.0.0.0
      network 10.1.1.1 0.0.0.0
      network 10.2.2.2 0.0.0.0
      network 10.4.4.4 0.0.0.0
      network 10.110.2.0 0.0.0.255
      network 10.110.3.0 0.0.0.255
      network 192.168.3.0 0.0.0.255
    #
    pim
     c-bsr LoopBack1
     c-rp LoopBack10
    #
    msdp
     originating-rp LoopBack0
     peer 10.5.5.5 connect-interface LoopBack0
    #
    return
  • SwitchE configuration file

    #
    sysname SwitchE
    #
    vlan batch 100 300
    #
    multicast routing-enable
    #
    interface Vlanif100
     ip address 192.168.1.2 255.255.255.0
     pim sm
    #
    interface Vlanif300
     ip address 192.168.3.2 255.255.255.0
     pim sm
    #
    interface GigabitEthernet0/0/1
     port link-type trunk
     port trunk allow-pass vlan 300
    #
    interface GigabitEthernet0/0/2
     port link-type trunk
     port trunk allow-pass vlan 100
    #
    ospf 1
     area 0.0.0.0
      network 192.168.1.0 0.0.0.255
      network 192.168.3.0 0.0.0.255
    #
    return
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >