Example for Configuring a Static Multicast Group on an Interface
Networking Requirements
In Figure 2-19, users are located on network segments N1 and N2. On the Protocol Independent Multicast (PIM) network, RouterA connects to network segment N1, whereas RouterB and RouterC connect to network segment N2. The PIM network uses multicast addresses 225.1.1.1 to 225.1.1.5 to transmit video streams.
HostA on N1 and HostC and HostD on N2 want to receive video streams in multicast mode. HostA wants to receive data of group 225.1.1.1 for a long time, whereas HostC and HostD do not have such requirements.
Configuration Roadmap
Based on the requirement of HostA, you need to configure static multicast group 225.1.1.1 on RouterA's interface connected to N1. The configuration roadmap is as follows:
To ensure that data sent from multicast sources can be correctly forwarded to the user network segments, configure a unicast routing protocol on the network to implement IP interworking. Multicast routing protocols are dependent on unicast routing protocols.
To enable the routers to forward video streams to the hosts in multicast mode, configure basic multicast functions on the routers.
To enable HostA to receive data of group 225.1.1.1 in a long time, statically bind RouterA's interface connected to N1 to this group.
Procedure
- Configure IP addresses for interfaces and configure a unicast routing protocol on each Router.
# Configure IP addresses and masks for router interfaces according to Figure 2-19. Configure OSPF on the routers to implement IP interworking and dynamic route update. The configurations of RouterB, RouterC, and RouterD are similar to the configuration of RouterA, and are not mentioned here. See Configuration Files.
<Huawei> system-view [Huawei] sysname RouterA [RouterA] interface gigabitethernet 1/0/0 [RouterA-GigabitEthernet1/0/0] ip address 10.110.1.1 24 [RouterA-GigabitEthernet1/0/0] quit [RouterA] interface gigabitethernet 2/0/0 [RouterA-GigabitEthernet2/0/0] ip address 192.168.1.1 24 [RouterA-GigabitEthernet2/0/0] quit [RouterA] ospf [RouterA-ospf-1] area 0 [RouterA-ospf-1-area-0.0.0.0] network 10.110.1.0 0.0.0.255 [RouterA-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255 [RouterA-ospf-1-area-0.0.0.0] quit [RouterA-ospf-1] quit
- Enable IP multicast routing on all the routers and enable Protocol Independent Multicast Sparse Mode (PIM-SM) on all interfaces.
# Enable IP multicast routing on RouterA and enable PIM-SM on all its interfaces. The configurations of RouterB, RouterC and RouterD are similar to the configuration of RouterA, and are not mentioned here. See Configuration Files.
[RouterA] multicast routing-enable [RouterA] interface gigabitethernet 1/0/0 [RouterA-GigabitEthernet1/0/0] pim sm [RouterA-GigabitEthernet1/0/0] quit [RouterA] interface gigabitethernet 2/0/0 [RouterA-GigabitEthernet2/0/0] pim sm [RouterA-GigabitEthernet2/0/0] quit
- Configure a static rendezvous point (RP).
# Configure a static RP on RouterA. Specify GE4/0/0 of RouterD as the static RP. The configurations of RouterB, RouterC, and RouterD are similar to the configuration of RouterA, and are not mentioned here. See Configuration Files.
[RouterA] pim [RouterA-pim] static-rp 192.168.4.1 [RouterA-pim] quit
- On RouterA, RouterB, and RouterC, enable IGMP on the interfaces connected to the user network segments.
# Enable IGMP on GE1/0/0 of RouterA. The configurations of RouterB and RouterC are similar to the configuration of RouterA, and are not mentioned here. See Configuration Files.
[RouterA] interface gigabitethernet 1/0/0 [RouterA-GigabitEthernet1/0/0] igmp enable [RouterA-GigabitEthernet1/0/0] quit
- Statically bind GE1/0/0 of RouterA to group 225.1.1.1 so that hosts connected to GE1/0/0 can receive stable multicast data sent to this group.
[RouterA] interface gigabitethernet 1/0/0 [RouterA-GigabitEthernet1/0/0] igmp static-group 225.1.1.1 [RouterA-GigabitEthernet1/0/0] quit
- Verify the configuration.
# Run the display igmp interface command to check the IGMP configuration and running status on each interface. The IGMP command output on GE1/0/0 of RouterB is as follows:
<RouterB> display igmp interface gigabitethernet 1/0/0 Interface information of VPN-Instance: public net GigabitEthernet1/0/0(10.110.2.1): IGMP is enabled Current IGMP version is 2 IGMP state: up IGMP group policy: none IGMP limit: - Value of query interval for IGMP (negotiated): - Value of query interval for IGMP(configured): 60 s Value of other querier timeout for IGMP: 0 s Value of maximum query response time for IGMP: 10 s Querier for IGMP: 10.110.2.1 (this router) Total 2 IGMP Groups reported
The command output shows that IGMP is enabled on GE1/0/0 of RouterB.
# Run the display pim routing-table command on RouterA. You can see that GE1/0/0 has been statically bound to multicast group 225.1.1.1. The command output information is as follows:
<RouterA> display pim routing-table VPN-Instance: public net Total 1 (*, G) entry; 0 (S, G) entry (*, 225.1.1.1) RP: 192.168.4.1 Protocol: pim-sm, Flag: WC UpTime: 00:12:17 Upstream interface: GigabitEthernet2/0/0 Upstream neighbor: 192.168.1.2 RPF prime neighbor: 192.168.1.2 Downstream interface(s) information: Total number of downstreams: 1 1: GigabitEthernet1/0/0 Protocol: static, UpTime: 00:12:17, Expires: -
Configuration Files
RouterA configuration file
# sysname RouterA # multicast routing-enable # interface GigabitEthernet1/0/0 ip address 10.110.1.1 255.255.255.0 pim sm igmp enable igmp static-group 225.1.1.1 # interface GigabitEthernet2/0/0 ip address 192.168.1.1 255.255.255.0 pim sm # 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 # pim static-rp 192.168.4.1 # return
RouterB configuration file
# sysname RouterB # multicast routing-enable # interface GigabitEthernet1/0/0 ip address 10.110.2.1 255.255.255.0 pim sm igmp enable # interface GigabitEthernet2/0/0 ip address 192.168.2.1 255.255.255.0 pim sm # 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 static-rp 192.168.4.1 # return
RouterC configuration file
# sysname RouterC # multicast routing-enable # interface GigabitEthernet1/0/0 ip address 10.110.2.2 255.255.255.0 pim sm igmp enable # interface GigabitEthernet2/0/0 ip address 192.168.3.1 255.255.255.0 pim sm # 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 static-rp 192.168.4.1 # return
RouterD configuration file
# sysname RouterD # multicast routing-enable # interface GigabitEthernet1/0/0 ip address 192.168.1.2 255.255.255.0 pim sm # interface GigabitEthernet2/0/0 ip address 192.168.2.2 255.255.255.0 pim sm # interface GigabitEthernet3/0/0 ip address 192.168.3.2 255.255.255.0 pim sm # interface GigabitEthernet4/0/0 ip address 192.168.4.1 255.255.255.0 pim sm # ospf 1 area 0.0.0.0 network 192.168.1.0 0.0.0.255 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 # pim static-rp 192.168.4.1 # return