IGMP Internet 组管理协议

1.1         IGMP v1

主机可以加入组播组,没有离开信息(leave messages),路由器使用基于超时的机制去发现其成员不关注的组。

 

1.1.2         配置

1)全局打开组播

xNet#con t

xNet(config)#ip multicast-routing

xNet(config)#end

xNet#

2)在208号机的ge1使能IGMP v1

xNet#con t

xNet(config)#interface ge1

xNet(config-if)#ip address 192.168.4.208/24

xNet(config-if)#ip igmp

xNet(config-if)#ip igmp version 1

xNet(config-if)#end

xNet#

1.1.3         结果

1)在PC-101构造IGMPreport报文加入组播224.1.1.1

2)查看IGMP结果

3)等待超时后,主机自动离开组播组

1.2         IGMP v2

该协议包含了离开信息,允许迅速向路由协议报告组成员终止情况,这对高带宽组播组或易变型组播组成员而言是非常重要的。

1.2.1         拓扑

 

1.2.2         配置

1)在208号机的ge1使能IGMP v2

xNet#con t

xNet(config)#interface ge1

xNet(config-if)#ip igmp version 2

xNet(config-if)#end

xNet#

1.2.3         结果

1)在PC-101构造IGMPreport报文加入组播224.1.1.1和225.1.1.1

2)然后查看IGMP Group状态

xNet#show ip igmp groups

能够看到PC-101加入了两个组

3)在PC-101构造IGMP leave报文离开组播224.1.1.1和225.1.1.1

4)查看IGMP状态,已离开组

1.3         IGMP Snooping

开启IGMP Snooping功能后,只有发送report报文加入该组播组的主机才能收到该组播报文

1.3.1         拓扑

1.3.2         配置

1)把208号机的ge1,ge3,ge5加入vlan2

2)在vlan接口下使能IGMP v1,并静态加入组播组225.1.1.1

xNet#configure terminal

xNet(config)#vlan database

xNet(config-vlan)#vlan 2

xNet(config-vlan)#exit

xNet(config)#interface ge1

xNet(config-if)#switchport

xNet(config-if)#switchport access vlan 2

xNet(config-if)#exit

xNet(config)#interface ge3

xNet(config-if)#switchport

xNet(config-if)#switchport access vlan 2

xNet(config-if)#exit

xNet(config)#interface ge5

xNet(config-if)#switchport

xNet(config-if)#switchport access vlan 2

xNet(config-if)#exit

xNet(config)#interface vlan2

xNet(config-if)#ip igmp

xNet(config-if)#ip igmp static-group 225.1.1.1

xNet(config-if)#ip igmp version 1

xNet(config-if)#end

xNet

3)查看IGMP组

4)使用PC-101发送组播报文,PC-91,PC-115均能收到组播报文

5)当vlan2下取消静态组播组,配置IGMP snooping功能,并只让PC-115加入组播组(225.1.1.1)

6)使PC-101发送组播报文

1.3.3         结果

只有发送report报文加入该组播组的主机才能收到该组播报文

原文地址:https://www.cnblogs.com/niezhongle/p/11075394.html