Example: Creating an RPF route
Network configuration
As shown in Figure 32:
PIM-DM runs on the network.
All switches on the network support IP multicast.
Switch B and Switch C run OSPF, and have no unicast routes to Switch A.
Typically, the receiver host receives the multicast data from Source 1 in the OSPF domain.
Configure the switches so that the receiver host receives multicast data from Source 2, which is outside the OSPF domain.
Figure 32: Network diagram
Procedure
Assign an IP address and subnet mask for each interface, as shown in Figure 32. (Details not shown.)
Configure OSPF on Switch B and Switch C. (Details not shown.)
Enable IP multicast routing, and enable IGMP and PIM-DM:
# On Switch C, enable IP multicast routing.
<SwitchC> system-view [SwitchC] multicast routing [SwitchC-mrib] quit
# Enable IGMP on the receiver-side interface VLAN-interface 100.
[SwitchC] interface vlan-interface 100 [SwitchC-Vlan-interface100] igmp enable [SwitchC-Vlan-interface100] quit
# Enable PIM-DM on VLAN-interface 101.
[SwitchC] interface vlan-interface 101 [SwitchC-Vlan-interface101] pim dm [SwitchC-Vlan-interface101] 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 300 [SwitchA-Vlan-interface300] pim dm [SwitchA-Vlan-interface300] quit [SwitchA] interface vlan-interface 102 [SwitchA-Vlan-interface102] pim dm [SwitchA-Vlan-interface102] quit
# Enable IP multicast routing and PIM-DM on Switch B in the same way Switch A is configured. (Details not shown.)
Display RPF information for Source 2 on Switch B and Switch C.
[SwitchB] display multicast rpf-info 50.1.1.100 [SwitchC] display multicast rpf-info 50.1.1.100
No output is displayed because no RPF routes to Source 2 exist on Switch B or Switch C.
Configure a static multicast route:
# Configure a static multicast route on Switch B and specify Switch A as its RPF neighbor on the route to Source 2.
[SwitchB] ip rpf-route-static 50.1.1.0 24 30.1.1.2
# Configure a static multicast route on Switch C and specify Switch B as its RPF neighbor on the route to Source 2.
[SwitchC] ip rpf-route-static 10.1.1.0 24 20.1.1.2
Verifying the configuration
# Display RPF information for Source 2 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: multicast static Route selection rule: preference-preferred Load splitting rule: disable
# Display RPF information for Source 2 on Switch C.
[SwitchC] 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 that the RPF routes to Source 2 exist on Switch B and Switch C. The routes are the configured static routes.