IGMPv1报文格式
IGMP有多个版本,其中IGMPv1版本是由RFC1112定义的。IGMPv1协议主要基于查询和响应机制完成组播组管理,支持查询和加入报文,处理过程与IGMPv2相同。IGMPv1与IGMPv2的不同之处是:主机离开组播组时不主动发送离开报文,收到查询消息后不反馈Report消息,待维护组成员关系的定时器超时后,路由器删除组记录。
一、IGMPv1报文格式
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+---------------------------------------------------------------
|Version| Type | Unused | Checksum |
+---------------------------------------------------------------
| Group Address |
+---------------------------------------------------------------
二、IGMPv1报文格式解释
字段 | 长度 | 描述 |
---|---|---|
Version | 4比特 | IGMP版本号,在IGMPv1中应为0x1。 |
Type | 4比特 | 即IGMP报文类型:
|
Unused | 8比特 | 未使用的字段,发送时必须填0,接收时忽略。 |
Checksum | 16比特 | IGMP消息的校验和。该字段在进行校验计算时设为0。当传送报文的时候,必须计算该校验字并插入到该字段中去。当接收包的时候,该校验字必须在处理该包之前进行检验。 |
Group Address | 32比特 | 组播地址。 |
三、IGMPv1 Membership Report报文示例
Frame 1: 42 bytes on wire (336 bits), 42 bytes captured (336 bits)
Arrival Time: Jan 29, 2016 10:19:17.088956000
Epoch Time: 1454033957.088956000 seconds
[Time delta from previous captured frame: 0.000000000 seconds]
[Time delta from previous displayed frame: 0.000000000 seconds]
[Time since reference or first frame: 0.000000000 seconds]
Frame Number: 1
Frame Length: 42 bytes (336 bits)
Capture Length: 42 bytes (336 bits)
[Frame is marked: False]
[Frame is ignored: False]
[Protocols in frame: eth:ip:igmp]
[Coloring Rule Name: Routing]
[Coloring Rule String: hsrp || eigrp || ospf || bgp || cdp || vrrp || gvrp || igmp || ismp]
Ethernet II, Src: HuaweiTe_26:e9:bf (00:e0:fc:26:e9:bf), Dst: IPv4mcast_00:00:00 (01:00:5e:00:00:00)
Destination: IPv4mcast_00:00:00 (01:00:5e:00:00:00)
Address: IPv4mcast_00:00:00 (01:00:5e:00:00:00)
.... ...1 .... .... .... .... = IG bit: Group address (multicast/broadcast)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
Source: HuaweiTe_26:e9:bf (00:e0:fc:26:e9:bf)
Address: HuaweiTe_26:e9:bf (00:e0:fc:26:e9:bf)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
Type: IP (0x0800)
Internet Protocol Version 4, Src: 10.0.3.100 (10.0.3.100), Dst: 225.0.0.0 (225.0.0.0)
Version: 4
Header length: 20 bytes
Differentiated Services Field: 0xc0 (DSCP 0x30: Class Selector 6; ECN: 0x00: Not-ECT (Not ECN-Capable Transport))
1100 00.. = Differentiated Services Codepoint: Class Selector 6 (0x30)
.... ..00 = Explicit Congestion Notification: Not-ECT (Not ECN-Capable Transport) (0x00)
Total Length: 28
Identification: 0x0000 (0)
Flags: 0x00
0... .... = Reserved bit: Not set
.0.. .... = Don't fragment: Not set
..0. .... = More fragments: Not set
Fragment offset: 0
Time to live: 1
Protocol: IGMP (2)
Header checksum: 0xc0bc [correct]
[Good: True]
[Bad: False]
Source: 10.0.3.100 (10.0.3.100)
Destination: 225.0.0.0 (225.0.0.0)
Internet Group Management Protocol
[IGMP Version: 1]
Type: Membership Report (0x12)
Header checksum: 0x0cff [correct]
Multicast Address: 225.0.0.0 (225.0.0.0)
四、IGMPv1协议栈结构
IGMPv1消息封装在IP报文中。IP头部的Protocol字段值为0x02,用来标识数据部分封装了IGMP消息。
IP报文头的目的地址字段用来标识该IGMP消息的目的接收端。IP报文头的TTL字段值为1,表示IGMP消息只在本地网段传播。
+-------------------------------+
| IGMPv1 |
+-------------------------------+
| IP (Protocol = 0x02) |
+-------------------------------+
| L2 |
+-------------------------------+
| L1 |
+-------------------------------+
发表评论