1. IGMP报文
An IGMP type of 1 is a query sent by a multicast router, and 2 is a response sent by a host. The group address is a class D IP address. In a query the group address is set to 0, and in a report it contains the group address being reported.
1) for query
TTL = 1
IGMP组地址 = 0
目的IP地址=224.0.0.1 <= All-Hosts Group
源IP地址=路由器IP地址
2) for report
TTL = 1
IGMP组地址 = 组地址
目的IP地址=组地址
源IP地址=主机IP地址
2. a multicast router doesn't even care which host belongs to a group. It only needs to know that at least one host belongs to a group on a given interface.
3. 一个多播的例子(代码在前一章)
client join group, dest ip is "224.0.0.22 Internet Group Management Protocol (IGMP) Version 3", refer to http://en.wikipedia.org/wiki/Multicast_address
server send msg, dest is the real group address, 224.1.1.1