PIM-DM基本概念:
Protocol Independent Multicast-Dense Mode 協議無關組播—密集模式,使用ASM模型,適合規模較小、組播組成員相對比較密集的局域網。通過週期性“擴散-剪枝”維護一棵連接組播源和組成員的單向無環SPT。
PIM-DM拓撲結構:
拓撲圖
PIM-DM基本網絡配置方法:
1、配置路由器接口IP地址和單播路由協議。組播域內路由協議PIM依賴單播路由協議,單播路由正常是組播協議正常工作的基礎。
2、在所有提供組播服務的路由器上使能組播路由功能。使能組播路由功能是配置PIM-DM的前提。
3、在路由器所有接口上使能PIM-DM功能。使能PIM-DM功能之後才能配置PIM-DM的其他功能。
4、在與主機側相連的路由器接口上使能IGMP。IGMP用於維護組成員關係。葉結點路由器通過IGMP協議來維護組成員關係列表。
PIM-DM基本網絡配置步驟:
1、配置各接口的IP地址和單播路由協議。
[Huawei]sysname R1
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 10.1.14.1 24
[R1]int g0/0/1
[R1-GigabitEthernet0/0/1]ip add 192.168.1.1 24
[R1]int g0/0/2
[R1-GigabitEthernet0/0/2]ip add 10.1.15.1 24
[R1]ospf
[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]net 10.1.14.1 0.0.0.0
[R1-ospf-1-area-0.0.0.0]net 10.1.15.1 0.0.0.0
[R1-ospf-1-area-0.0.0.0]net 192.168.1.1 0.0.0.0
[Huawei]sysname R2
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip add 10.1.25.2 24
[R2]int g0/0/1
[R2-GigabitEthernet0/0/1]ip add 192.168.2.2 24
[R2]ospf
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]net 10.1.25.2 0.0.0.0
[R2-ospf-1-area-0.0.0.0]net 192.168.2.2 0.0.0.0
[Huawei]sysname R3
[R3]int g0/0/0
[R3-GigabitEthernet0/0/0]ip add 10.1.35.3 24
[R3]int g0/0/1
[R3-GigabitEthernet0/0/1]ip add 192.168.2.3 24
[R3]ospf
[R3-ospf-1]area 0
[R3-ospf-1-area-0.0.0.0]net 10.1.35.3 0.0.0.0
[R3-ospf-1-area-0.0.0.0]net 192.168.2.3 0.0.0.0
[Huawei]sysname R4
[R4]int g0/0/0
[R4-GigabitEthernet0/0/0]ip add 10.1.14.4 24
[R4]int g0/0/1
[R4-GigabitEthernet0/0/1]ip add 10.1.45.4 24
[R4]int g0/0/2
[R4-GigabitEthernet0/0/2]ip add 192.168.3.4 24
[R4]ospf
[R4-ospf-1]area 0
[R4-ospf-1-area-0.0.0.0]net 192.168.3.4 0.0.0.0
[R4-ospf-1-area-0.0.0.0]net 10.1.45.4 0.0.0.0
[R4-ospf-1-area-0.0.0.0]net 10.1.14.4 0.0.0.0
[Huawei]sysname R5
[R5]int g0/0/0
[R5-GigabitEthernet0/0/0]ip add 10.1.45.5 24
[R5]int g0/0/1
[R5-GigabitEthernet0/0/1]ip add 10.1.25.5 24
[R5]int g0/0/2
[R5-GigabitEthernet0/0/2]ip add 10.1.35.5 24
[R5-ospf-1]int g1/0/0
[R5-GigabitEthernet1/0/0]ip add 10.1.15.5 24
[R5]ospf
[R5-ospf-1]area 0
[R5-ospf-1-area-0.0.0.0]net 10.1.45.5 0.0.0.0
[R5-ospf-1-area-0.0.0.0]net 10.1.25.5 0.0.0.0
[R5-ospf-1-area-0.0.0.0]net 10.1.15.5 0.0.0.0
[R5-ospf-1-area-0.0.0.0]net 10.1.35.5 0.0.0.0
2、開啟組播功能,在各接口上開啟PIM-DM功能
[R1]multicast routing-enable
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]pim dm
[R1]int g0/0/1
[R1-GigabitEthernet0/0/1]pim dm
[R1]int g0/0/2
[R1-GigabitEthernet0/0/2]pim dm
[R2]multicast routing-enable
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]pim dm
[R2]int g0/0/1
[R2-GigabitEthernet0/0/1]pim dm
[R3]multicast routing-enable
[R3]int g0/0/0
[R3-GigabitEthernet0/0/0]pim dm
[R3]int g0/0/1
[R3-GigabitEthernet0/0/1]pim dm
[R4]multicast routing-enable
[R4]int g0/0/0
[R4-GigabitEthernet0/0/0]pim dm
[R4]int g0/0/2
[R4-GigabitEthernet0/0/2]pim dm
[R4]int g0/0/1
[R4-GigabitEthernet0/0/1]pim dm
[R5]multicast routing-enable
[R5]int g0/0/0
[R5-GigabitEthernet0/0/0]pim dm
[R5]int g0/0/1
[R5-GigabitEthernet0/0/1]pim dm
[R5]int g0/0/2
[R5-GigabitEthernet0/0/2]pim dm
[R5]int g1/0/0
[R5-GigabitEthernet1/0/0]pim dm
3、在連接用戶主機的接口上使能IGMP功能
[R1]int g0/0/1
[R1-GigabitEthernet0/0/1]igmp enable
[R2]int g0/0/1
[R2-GigabitEthernet0/0/1]igmp enable
[R3]int g0/0/1
[R3-GigabitEthernet0/0/1]igmp enable
[R4]int g0/0/2
[R4-GigabitEthernet0/0/2]igmp enable
4、查看配置
[R5]dis pim interface
VPN-Instance: public net
InterfaceState NbrCnt HelloInt DR-Pri DR-Address
GE0/0/0 up1 30 1 10.1.45.5(local)
GE0/0/1 up1 30 1 10.1.25.5(local)
GE0/0/2 up1 30 1 10.1.35.5(local)
GE1/0/0 up1 30 1 10.1.15.5(local)
表示接口上的PIM協議已經運行
查看PIM路由
<R1>dis pim routing-table
VPN-Instance: public net
Total 1 (*, G) entry; 0 (S, G) entry
(*, 225.1.1.1)
Protocol: pim-dm, Flag: WC
UpTime: 00:25:41
Upstream interface: NULL
Upstream neighbor: NULL
RPF prime neighbor: NULL
Downstream interface(s) information:
Total number of downstreams: 1
1: GigabitEthernet0/0/1
Protocol: igmp, UpTime: 00:25:41, Expires: never