Example: Changing an RPF route
Network configuration
As shown in Figure 31:
PIM-DM runs on the network.
All switches on the network support multicast.
Switch A, Switch B and Switch C run OSPF.
Typically, the receiver host can receive the multicast data from the source through the path: Switch A to Switch B, which is the same as the unicast route.
Configure the switches so that the multicast data from the source travels to the receiver through the path: Switch A to Switch C to Switch B. This is different from the unicast route.
Figure 31: Network diagram
Procedure
Assign an IP address and subnet mask for each interface, as shown in Figure 31. (Details not shown.)
Configure OSPF on the switches in the PIM-DM domain. (Details not shown.)
Enable IP multicast routing, and enable IGMP and PIM-DM:
# On Switch B, enable IP multicast routing.
<SwitchB> system-view [SwitchB] multicast routing [SwitchB-mrib] quit
# Enable IGMP on the receiver-side interface VLAN-interface 100.
[SwitchB] interface vlan-interface 100 [SwitchB-Vlan-interface100] igmp enable [SwitchB-Vlan-interface100] quit
# Enable PIM-DM on other interfaces.
[SwitchB] interface vlan-interface 101 [SwitchB-Vlan-interface101] pim dm [SwitchB-Vlan-interface101] quit [SwitchB] interface vlan-interface 102 [SwitchB-Vlan-interface102] pim dm [SwitchB-Vlan-interface102] quit
# On Switch A, enable IP multicast routing.
<SwitchA> system-view [SwitchA] multicast routing [SwitchA-mrib] quit
# Enable PIM-DM on each interface.
[SwitchA] interface vlan-interface 200 [SwitchA-Vlan-interface200] pim dm [SwitchA-Vlan-interface200] quit [SwitchA] interface vlan-interface 102 [SwitchA-Vlan-interface102] pim dm [SwitchA-Vlan-interface102] quit [SwitchA] interface vlan-interface 103 [SwitchA-Vlan-interface103] pim dm [SwitchA-Vlan-interface103] quit
# Enable IP multicast routing and PIM-DM on Switch C in the same way Switch A is configured. (Details not shown.)
Display RPF information for the source on Switch B.
[SwitchB] display multicast rpf-info 50.1.1.100 RPF information about source 50.1.1.100: RPF interface: Vlan-interface102, RPF neighbor: 30.1.1.2 Referenced route/mask: 50.1.1.0/24 Referenced route type: igp Route selection rule: preference-preferred Load splitting rule: disable
The output shows that the current RPF route on Switch B is contributed by a unicast routing protocol and the RPF neighbor is Switch A.
Configure a static multicast route on Switch B and specify Switch C as its RPF neighbor on the route to the source.
[SwitchB] ip rpf-route-static 50.1.1.0 24 20.1.1.2
Verifying the configuration
# Display RPF information for the source on Switch B.
[SwitchB] display multicast rpf-info 50.1.1.100 RPF information about source 50.1.1.100: RPF interface: Vlan-interface101, RPF neighbor: 20.1.1.2 Referenced route/mask: 50.1.1.0/24 Referenced route type: multicast static Route selection rule: preference-preferred Load splitting rule: disable
The output shows the following information:
The RPF route on Switch B is the configured static multicast route.
The RPF neighbor of Switch B is Switch C.