Example for Configuring a Multicast Static Route to Change the RPF Route
Networking Requirements
In Figure 7-14, RouterA, RouterB, and RouterC run Open Shortest Path First (OSPF) to implement IP interworking, and their interfaces use Protocol Independent Multicast Dense Mode (PIM-DM) to provide multicast services. Data sent from the multicast source (Source) is forwarded to the receiver host (Receiver) through RouterA and RouterB. The link between RouterA and RouterB transmits unicast and multicast services simultaneously. To reduce load on this link, multicast data needs to be transmitted along the path RouterA -> RouterC -> RouterB.
Configuration Roadmap
By configuring a multicast static route, you can change the reverse path forwarding (RPF) interface used to receive multicast data, so that multicast and unicast services are transmitted through different links to reduce load on a single link. The configuration roadmap is as follows:
Configure IP addresses for interfaces and configure a unicast routing protocol (OSPF in this example) on each router. Multicast routing protocols depend on unicast routing protocols.
Enable multicast routing on all routers, PIM-DM on all interfaces, and IGMP on the interface connected to the network segment of the receiver host. After these basic multicast functions are configured, the routers can establish a multicast distribution tree using default parameter settings. Multicast data can then be forwarded to Receiver along the multicast distribution tree.
Configure a multicast RPF static route on RouterB and specify RouterC as the RPF neighbor.
Procedure
- Configure IP addresses for interfaces and configure OSPF on each router. RouterB is used as an example in the following operations. Configurations of the other routers are similar.
# Configure IP addresses and masks for interfaces on the routers.
<Huawei> system-view [Huawei] sysname RouterB [RouterB] interface gigabitethernet 1/0/0 [RouterB-GigabitEthernet1/0/0] ip address 9.1.1.2 24 [RouterB-GigabitEthernet1/0/0] quit [RouterB] interface gigabitethernet 2/0/0 [RouterB-GigabitEthernet2/0/0] ip address 13.1.1.1 24 [RouterB-GigabitEthernet2/0/0] quit [RouterB] interface gigabitethernet 3/0/0 [RouterB-GigabitEthernet3/0/0] ip address 7.1.1.1 24 [RouterB-GigabitEthernet3/0/0] quit
# Configure OSPF.
[RouterB] ospf [RouterB-ospf-1] area 0 [RouterB-ospf-1-area-0.0.0.0] network 7.1.1.0 0.0.0.255 [RouterB-ospf-1-area-0.0.0.0] network 9.1.1.0 0.0.0.255 [RouterB-ospf-1-area-0.0.0.0] network 13.1.1.0 0.0.0.255 [RouterB-ospf-1-area-0.0.0.0] quit [RouterB-ospf-1] quit
- Enable multicast routing on the routers and enable PIM-DM on all interfaces.
# Enable multicast routing globally, PIM-DM on all interfaces, and IGMP on the interface connected to the network segment of the receiver host. (The PIM-DM configurations on the other routers are similar to the PIM-DM configuration on RouterB.)
[RouterB] multicast routing-enable [RouterB] interface gigabitethernet1/0/0 [RouterB-GigabitEthernet1/0/0] pim dm [RouterB-GigabitEthernet1/0/0] quit [RouterB] interface gigabitethernet2/0/0 [RouterB-GigabitEthernet2/0/0] pim dm [RouterB-GigabitEthernet2/0/0] quit [RouterB] interface gigabitethernet3/0/0 [RouterB-GigabitEthernet3/0/0] pim dm [RouterB-GigabitEthernet3/0/0] igmp enable [RouterB-GigabitEthernet3/0/0] quit
# Run the display multicast rpf-info command on RouterB to check the RPF route to Source. The following command output shows that the RPF route originates from a unicast routing protocol, and the RPF neighbor is RouterA.
[RouterB] display multicast rpf-info 8.1.1.2 VPN-Instance: public net RPF information about source 8.1.1.2: RPF interface: GigabitEthernet1/0/0, RPF neighbor: 9.1.1.1 Referenced route/mask: 8.1.1.0/24 Referenced route type: unicast Route selection rule: preference-preferred Load splitting rule: disable
- Configure a multicast static route.
# Configure a multicast RPF static route to Source on RouterB, and configure RouterC as the RPF neighbor.
[RouterB] ip rpf-route-static 8.1.1.0 255.255.255.0 13.1.1.2
- Verify the configuration.
# Run the display multicast rpf-info command on RouterB to check the RPF route to Source. The following command output shows that the unicast RPF route has been replaced with the multicast static route and the RPF neighbor has changed to RouterC.
[RouterB] display multicast rpf-info 8.1.1.2 VPN-Instance: public net RPF information about source 8.1.1.2: RPF interface: GigabitEthernet2/0/0, RPF neighbor: 13.1.1.2 Referenced route/mask: 8.1.1.0/24 Referenced route type: mstatic Route selection rule: preference-preferred Load splitting rule: disable
Configuration Files
RouterA configuration file
# sysname RouterA # multicast routing-enable # interface GigabitEthernet1/0/0 ip address 9.1.1.1 255.255.255.0 pim dm # interface GigabitEthernet2/0/0 ip address 8.1.1.1 255.255.255.0 pim dm # interface GigabitEthernet3/0/0 ip address 12.1.1.1 255.255.255.0 pim dm # ospf 1 area 0.0.0.0 network 8.1.1.0 0.0.0.255 network 9.1.1.0 0.0.0.255 network 12.1.1.0 0.0.0.255 # return
RouterB configuration file
# sysname RouterB # multicast routing-enable # interface GigabitEthernet1/0/0 ip address 9.1.1.2 255.255.255.0 pim dm # interface GigabitEthernet2/0/0 ip address 13.1.1.1 255.255.255.0 pim dm # interface GigabitEthernet3/0/0 ip address 7.1.1.1 255.255.255.0 pim dm igmp enable # ospf 1 area 0.0.0.0 network 7.1.1.0 0.0.0.255 network 9.1.1.0 0.0.0.255 network 13.1.1.0 0.0.0.255 # ip rpf-route-static 8.1.1.0 24 13.1.1.2 # return
RouterC configuration file
# sysname RouterC # multicast routing-enable # interface GigabitEthernet2/0/0 ip address 13.1.1.2 255.255.255.0 pim dm # interface GigabitEthernet3/0/0 ip address 12.1.1.2 255.255.255.0 pim dm # ospf 1 area 0.0.0.0 network 12.1.1.0 0.0.0.255 network 13.1.1.0 0.0.0.255 # return