Example: Configuring BIDIR-PIM
Network configuration
As shown in Figure 58:
OSPF runs on the network.
VOD streams are sent to receiver hosts in multicast.
Source 1 and Source 2 send multicast data to multicast group 225.1.1.1.
Host A and Host B are receivers of this multicast group.
VLAN-interface 102 of Switch C acts as the C-BSR. Loopback 0 of Switch C acts as the C-RP.
IGMPv2 runs between Switch B and Host A, and between Switch D and Host B.
Figure 58: Network diagram
Table 12: Interface and IP address assignment
Device | Interface | IP address | Device | Interface | IP address |
---|---|---|---|---|---|
Switch A | Vlan-int100 | 192.168.1.1/24 | Switch D | Vlan-int300 | 192.168.3.1/24 |
Switch A | Vlan-int101 | 10.110.1.1/24 | Switch D | Vlan-int400 | 192.168.4.1/24 |
Switch B | Vlan-int200 | 192.168.2.1/24 | Switch D | Vlan-int103 | 10.110.3.2/24 |
Switch B | Vlan-int101 | 10.110.1.2/24 | Source 1 | — | 192.168.1.100/24 |
Switch B | Vlan-int102 | 10.110.2.1/24 | Source 2 | — | 192.168.4.100/24 |
Switch C | Vlan-int102 | 10.110.2.2/24 | Receiver 1 | — | 192.168.2.100/24 |
Switch C | Vlan-int103 | 10.110.3.1/24 | Receiver 2 | — | 192.168.3.100/24 |
Switch C | Loop0 | 1.1.1.1/32 |
Procedure
Assign an IP address and subnet mask to each interface, as shown in Figure 58. (Details not shown.)
Configure OSPF on the switches in the BIDIR-PIM domain. (Details not shown.)
Enable IP multicast routing, PIM-SM, BIDIR-PIM, and IGMP:
# On Switch A, enable IP multicast routing, enable PIM-SM on each interface, and enable BIDIR-PIM.
<SwitchA> system-view [SwitchA] multicast routing [SwitchA-mrib] quit [SwitchA] interface vlan-interface 100 [SwitchA-Vlan-interface100] pim sm [SwitchA-Vlan-interface100] quit [SwitchA] interface vlan-interface 101 [SwitchA-Vlan-interface101] pim sm [SwitchA-Vlan-interface101] quit [SwitchA] pim [SwitchA-pim] bidir-pim enable [SwitchA-pim] quit
# 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 200).
[SwitchB] interface vlan-interface 200 [SwitchB-Vlan-interface200] igmp enable [SwitchB-Vlan-interface200] quit
# Enable PIM-SM on the other interfaces.
[SwitchB] interface vlan-interface 101 [SwitchB-Vlan-interface101] pim sm [SwitchB-Vlan-interface101] quit [SwitchB] interface vlan-interface 102 [SwitchB-Vlan-interface102] pim sm [SwitchB-Vlan-interface102] quit
# Enable BIDIR-PIM.
[SwitchB] pim [SwitchB-pim] bidir-pim enable [SwitchB-pim] quit
# On Switch C, enable IP multicast routing, enable PIM-SM on each interface, and enable BIDIR-PIM.
<SwitchC> system-view [SwitchC] multicast routing [SwitchC-mrib] quit [SwitchC] interface vlan-interface 102 [SwitchC-Vlan-interface102] pim sm [SwitchC-Vlan-interface102] quit [SwitchC] interface vlan-interface 103 [SwitchC-Vlan-interface103] pim sm [SwitchC-Vlan-interface103] quit [SwitchC] interface loopback 0 [SwitchC-LoopBack0] pim sm [SwitchC-LoopBack0] quit [SwitchC] pim [SwitchC-pim] bidir-pim enable
# On Switch D, enable IP multicast routing.
<SwitchD> system-view [SwitchD] multicast routing [SwitchD-mrib] quit
# Enable IGMP on the receiver-side interface (VLAN-interface 300).
[SwitchD] interface vlan-interface 300 [SwitchD-Vlan-interface300] igmp enable [SwitchD-Vlan-interface300] quit
# Enable PIM-SM on the other interfaces.
[SwitchD] interface vlan-interface 400 [SwitchD-Vlan-interface400] pim sm [SwitchD-Vlan-interface400] quit [SwitchD] interface vlan-interface 103 [SwitchD-Vlan-interface103] pim sm [SwitchD-Vlan-interface103] quit
# Enable BIDIR-PIM.
[SwitchD] pim [SwitchD-pim] bidir-pim enable [SwitchD-pim] quit
On Switch C, configure VLAN interface 102 as a C-BSR, and Loopback 0 as a C-RP for the entire BIDIR-PIM domain.
[SwitchC-pim] c-bsr 10.110.2.2 [SwitchC-pim] c-rp 1.1.1.1 bidir [SwitchC-pim] quit
Verifying the configuration
Display BIDIR-PIM DF information:
# Display BIDIR-PIM DF information on Switch A.
[SwitchA] display pim df-info RP address: 1.1.1.1 Interface State DF-Pref DF-Metric DF-Uptime DF-Address Vlan100 Win 100 2 01:08:50 192.168.1.1 (local) Vlan101 Lose 100 1 01:07:49 10.110.1.2
# Display BIDIR-PIM DF information on Switch B.
[SwitchB] display pim df-info RP address: 1.1.1.1 Interface State DF-Pref DF-Metric DF-Uptime DF-Address Vlan200 Win 100 1 01:24:09 192.168.2.1 (local) Vlan101 Win 100 1 01:24:09 10.110.1.2 (local) Vlan102 Lose 0 0 01:23:12 10.110.2.2
# Display BIDIR-PIM DF information on Switch C.
[SwitchC] display pim df-info RP address: 1.1.1.1 Interface State DF-Pref DF-Metric DF-Uptime DF-Address Loop0 - - - - - Vlan102 Win 0 0 01:06:07 10.110.2.2 (local) Vlan103 Win 0 0 01:06:07 10.110.3.1 (local)
# Display BIDIR-PIM DF information on Switch D.
[SwitchD] display pim df-info RP address: 1.1.1.1 Interface State DF-Pref DF-Metric DF-Uptime DF-Address Vlan300 Win 100 1 01:19:53 192.168.3.1 (local) Vlan400 Win 100 1 00:39:34 192.168.4.1 (local) Vlan103 Lose 0 0 01:21:40 10.110.3.1
Display information about DFs for multicast forwarding:
# Display information about DFs for multicast forwarding on Switch A.
[SwitchA] display multicast forwarding df-info Total 1 RP, 1 matched 00001. RP address: 1.1.1.1 Flags: 0x0 Uptime: 00:08:32 RPF interface: Vlan-interface101 List of 1 DF interfaces: 1: Vlan-interface100
# Display information about DFs for multicast forwarding on Switch B.
[SwitchB] display multicast forwarding df-info Total 1 RP, 1 matched 00001. RP address: 1.1.1.1 Flags: 0x0 Uptime: 00:06:24 RPF interface: Vlan-interface102 List of 2 DF interfaces: 1: Vlan-interface101 2: Vlan-interface200
# Display information about DFs for multicast forwarding on Switch C.
[SwitchC] display multicast forwarding df-info Total 1 RP, 1 matched 00001. RP address: 1.1.1.1 Flags: 0x0 Uptime: 00:07:21 RPF interface: LoopBack0 List of 2 DF interfaces: 1: Vlan-interface102 2: Vlan-interface103
# Display information about DFs for multicast forwarding on Switch D.
[SwitchD] display multicast forwarding df-info Total 1 RP, 1 matched 00001. RP address: 1.1.1.1 Flags: 0x0 Uptime: 00:05:12 RPF interface: Vlan-interface103 List of 2 DF interfaces: 1: Vlan-interface300 2: Vlan-interface400