9.4.1 IGMPv1
- 实验目的
- 熟悉IGMPv1的应用场景
- 掌握IGMPv1的配置方法
- 实验拓扑
实验拓扑如图9-7所示:
图9-7:IGMPv1
- 实验步骤
(1)配置IP地址
MCS1的配置
MCS1的IP地址配置如图9-8所示:
图9-8:MCS1的配置
MCS1的组播地址配置如图9-9所示:
图9-9:MCS1组播地址的配置
R1的配置
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]undo info-center enable
Info: Information center is disabled.
[Huawei]sysname R1
[R1]interface g0/0/0
[R1-GigabitEthernet0/0/0]ip address 192.168.1.1 24
[R1-GigabitEthernet0/0/0]quit
[R1]interface g0/0/1
[R1-GigabitEthernet0/0/1]ip address 12.1.1.1 24
[R1-GigabitEthernet0/0/1]quit
[R1]interface g0/0/2
[R1-GigabitEthernet0/0/2]ip address 13.1.1.1 24
[R1-GigabitEthernet0/0/2]quit
R2的配置
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]undo info-center enable
Info: Information center is disabled.
[Huawei]sysname R2
[R2]interface g0/0/2
[R2-GigabitEthernet0/0/2]ip address 12.1.1.2 24
[R2-GigabitEthernet0/0/2]quit
[R2]interface g0/0/0
[R2-GigabitEthernet0/0/0]ip address 10.1.1.252 24
[R2-GigabitEthernet0/0/0]quit
R3的配置
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]undo info-center enable
Info: Information center is disabled.
[Huawei]sysname R3
[R3]interface g0/0/3
[R3-GigabitEthernet0/0/3]ip address 13.1.1.3 24
[R3-GigabitEthernet0/0/3]quit
[R3]interface g0/0/0
[R3-GigabitEthernet0/0/0]ip address 10.1.1.253 24
[R3-GigabitEthernet0/0/0]quit
PC1的配置
PC1的IP地址的配置如图9-10所示:
图9-10:配置PC1的IP地址
PC2的配置
PC2的IP地址配置如图9-11所示:
图9-11:配置PC2的IP地址
PC3的配置
PC3的IP地址配置如图9-12所示:
图9-12:配置PC3的IP地址
(2)运行IGP
R1的配置
[R1]ospf router-id 1.1.1.1
[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]network 192.168.1.0 0.0.0.255
[R1-ospf-1-area-0.0.0.0]network 12.1.1.0 0.0.0.255
[R1-ospf-1-area-0.0.0.0]network 13.1.1.0 0.0.0.255
[R1-ospf-1-area-0.0.0.0]quit
R2的配置
[R2]ospf router-id 2.2.2.2
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]network 12.1.1.0 0.0.0.255
[R2-ospf-1-area-0.0.0.0]network 10.1.1.0 0.0.0.255
[R2-ospf-1-area-0.0.0.0]quit
R3的配置
[R3]ospf router-id 3.3.3.3
[R3-ospf-1]area 0
[R3-ospf-1-area-0.0.0.0]network 13.1.1.0 0.0.0.255
[R3-ospf-1-area-0.0.0.0]network 10.1.1.0 0.0.0.255
[R3-ospf-1-area-0.0.0.0]quit
(3)运行PIM-DM
R1的配置
[R1]multicast routing-enable
[R1]interface g0/0/0
[R1-GigabitEthernet0/0/0]pim dm
[R1-GigabitEthernet0/0/0]quit
[R1]interface g0/0/1
[R1-GigabitEthernet0/0/1]pim dm
[R1-GigabitEthernet0/0/1]quit
[R1]interface g0/0/2
[R1-GigabitEthernet0/0/2]pim dm
[R1-GigabitEthernet0/0/2]quit
R2的配置
[R2]multicast routing-enable
[R2]interface g0/0/2
[R2-GigabitEthernet0/0/2]pim dim
[R2-GigabitEthernet0/0/2]quit
[R2]interface g0/0/0
[R2-GigabitEthernet0/0/0]pim dm
[R2-GigabitEthernet0/0/0]quit
R3的配置
[R3]multicast routing-enable
[R3]interface g0/0/3
[R3-GigabitEthernet0/0/3]pim dm
[R3-GigabitEthernet0/0/3]quit
[R3]interface g0/0/0
[R3-GigabitEthernet0/0/0]pim dm
[R3-GigabitEthernet0/0/0]quit
(4)运行IGMP V1
R2的配置
[R2]interface g0/0/0
[R2-GigabitEthernet0/0/0]igmp enable
[R2-GigabitEthernet0/0/0]igmp version 1
[R2-GigabitEthernet0/0/0]quit
R3的配置
[R3]interface g0/0/0
[R3-GigabitEthernet0/0/0]igmp enable
[R3-GigabitEthernet0/0/0]igmp version 1
[R3-GigabitEthernet0/0/0]quit
- 实验调试
(1)查看IGMP的接口信息
[R2]display igmp interface
Interface information of VPN-Instance: public net
GigabitEthernet0/0/0(10.1.1.252):
IGMP is enabled
Current IGMP version is 1 //版本为1
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 //查询间隔时间为60s
Value of other querier timeout for IGMP: 0 s
Value of maximum query response time for IGMP: -最大查询响应时间不能设置为10s
Querier for IGMP: 10.1.1.253 //查询路由器,优选IP地址最大的
Total 1 IGMP Group reported
【技术要点1】查询器的选举原则机制
1、依赖PIM选举接口IP地址大的路由器
2、只有查询器才会发送general query
3、查询器与非查询器均能收到报告报文,生成IGMP表项
华为Datacom网络工程师HCIP全套学习课程(全套理论+实验)-学习视频教程-腾讯课堂
(2)在R2上打开调试信息
<R2>debugging igmp report
<R2>debugging igmp event
<R2>debugging igmp leave
<R2>terminal monitor
<R2>terminal debugging
[R2]info-center enable
(3) 在PC1上点击加入组播224.1.1.1,配置如图9-13所示:
图9-13:配置PC1加入组播224.1.1.1
(4)在R2上显示的信息
<R2>
Jun 30 2022 17:04:08.880.1-08:00 R2 IGMP/7/REPORT:(public net): Received v1 report for group 224.1.1.1 on interface GigabitEthernet0/0/0(10.1.1.252) (G081904)
(5)查看组成员信息
<R2>display igmp group
Interface group report information of VPN-Instance: public net
GigabitEthernet0/0/0(10.1.1.252):
Total 1 IGMP Group reported
Group Address Last Reporter Uptime Expires
224.1.1.1 10.1.1.1 00:27:48 00:02:03
(6)在R2的g0/0/0处抓包
第一个包membership query,它的报文结构如图9-14所示:
图9-14:membership query包文结构
第二个包membership report,它的包文结构如图9-15所示:
图9-15:membership report包文结构