Internet Group Management Protocol (IGMP)
Internet Group Management Protocol (IGMP), which is used by hosts and routers that support multicasting. It lets all the systems on a physical network know which hosts currently belong to which multicast groups. This information is required by the multicast routers, so they know which multicast datagrams to forward onto which interfaces. IGMP is defined in RFC 1112 [Deering 1989]. Like ICMP, IGMP is considered part of the IP layer. Also like ICMP, IGMP messages are transmitted in IP datagrams. Unlike other protocols that we've seen, IGMP has a fixed-size message, with no optional data.
IGMP messages are used by multicast routers to keep track of group membership on each of the router's physically attached networks. The following rules apply.
1. A host sends an IGMP report when the first process joins a group. If multiple processes on a given host join the same group, only one report is sent, the first time a process joins that group. This report is sent out the same interface on which the process joined the group. 2. A host does not send a report when processes leave a group, even when the last process leaves a group. The host knows that there are no members in a given group, so when it receives the next query next step), it won't report the group. 3. A multicast router sends an IGMP query at regular intervals to see if any hosts still have processes belonging to any groups. The router must send one query out each interface. The group address in the query is 0 since the router expects one response from a host for every group that contains one or more members on that host. 4. A host responds to an IGMP query by sending one IGMP report for each group that still contains at least one process.
Let's see how IGMP messages are used when a host joins a multicast group, and then leaves the group.
1. Start a sock UDP server on hostA1 on port 1234 and join the group 225.1.2.3:
2. Wait for two periodic queries from the multicast router (routerA). This will allow us to see the time between periodic queries..
3. Kill the server. HostA1 will leave the group 225.1.2.3
4.Observe the tcpdump output.
tcpdump output:
15:56:54.770752 00:00:0a:01:00:16 > 01:00:5e:01:02:03, ethertype IPv4 (0x0800), length 46: (tos 0x0, ttl 1, id 4351, offset 0, flags [none], proto IGMP (2), length 32, options (RA))
10.1.1.1 > 225.1.2.3: igmp v2 report 225.1.2.3
15:58:18.509915 00:00:0a:01:00:01 > 01:00:5e:00:00:01, ethertype IPv4 (0x0800), length 42: (tos 0xc0, ttl 1, id 9466, offset 0, flags [none], proto IGMP (2), length 28)
10.1.1.254 > 224.0.0.1: igmp query v2
15:58:19.261373 00:00:0a:01:00:01 > 01:00:5e:00:00:02, ethertype IPv4 (0x0800), length 46: (tos 0x0, ttl 1, id 9474, offset 0, flags [none], proto IGMP (2), length 32, options (RA))
10.1.1.254 > 224.0.0.2: igmp v2 report 224.0.0.2
15:58:20.068186 00:00:0a:01:00:01 > 01:00:5e:00:00:09, ethertype IPv4 (0x0800), length 46: (tos 0x0, ttl 1, id 9475, offset 0, flags [none], proto IGMP (2), length 32, options (RA))
10.1.1.254 > 224.0.0.9: igmp v2 report 224.0.0.9
15:58:23.694320 00:00:0a:01:00:16 > 01:00:5e:01:02:03, ethertype IPv4 (0x0800), length 46: (tos 0x0, ttl 1, id 4352, offset 0, flags [none], proto IGMP (2), length 32, options (RA))
10.1.1.1 > 225.1.2.3: igmp v2 report 225.1.2.3
16:00:23.604641 00:00:0a:01:00:01 > 01:00:5e:00:00:01, ethertype IPv4 (0x0800), length 42: (tos 0xc0, ttl 1, id 9552, offset 0, flags [none], proto IGMP (2), length 28)
10.1.1.254 > 224.0.0.1: igmp query v2
16:00:29.148030 00:00:0a:01:00:01 > 01:00:5e:00:00:09, ethertype IPv4 (0x0800), length 46: (tos 0x0, ttl 1, id 9566, offset 0, flags [none], proto IGMP (2), length 32, options (RA))
10.1.1.254 > 224.0.0.9: igmp v2 report 224.0.0.9
16:00:29.551118 00:00:0a:01:00:16 > 01:00:5e:01:02:03, ethertype IPv4 (0x0800), length 46: (tos 0x0, ttl 1, id 4353, offset 0, flags [none], proto IGMP (2), length 32, options (RA))
10.1.1.1 > 225.1.2.3: igmp v2 report 225.1.2.3
16:00:32.982533 00:00:0a:01:00:01 > 01:00:5e:00:00:02, ethertype IPv4 (0x0800), length 46: (tos 0x0, ttl 1, id 9570, offset 0, flags [none], proto IGMP (2), length 32, options (RA))
10.1.1.254 > 224.0.0.2: igmp v2 report 224.0.0.2
16:02:27.889220 00:00:0a:01:00:01 > 01:00:5e:00:00:01, ethertype IPv4 (0x0800), length 42: (tos 0xc0, ttl 1, id 9627, offset 0, flags [none], proto IGMP (2), length 28)
10.1.1.254 > 224.0.0.1: igmp query v2
16:02:29.382974 00:00:0a:01:00:16 > 01:00:5e:01:02:03, ethertype IPv4 (0x0800), length 46: (tos 0x0, ttl 1, id 4354, offset 0, flags [none], proto IGMP (2), length 32, options (RA))
10.1.1.1 > 225.1.2.3: igmp v2 report 225.1.2.3
16:02:36.428404 00:00:0a:01:00:01 > 01:00:5e:00:00:09, ethertype IPv4 (0x0800), length 46: (tos 0x0, ttl 1, id 9647, offset 0, flags [none], proto IGMP (2), length 32, options (RA))
10.1.1.254 > 224.0.0.9: igmp v2 report 224.0.0.9
16:02:36.630112 00:00:0a:01:00:01 > 01:00:5e:00:00:02, ethertype IPv4 (0x0800), length 46: (tos 0x0, ttl 1, id 9648, offset 0, flags [none], proto IGMP (2), length 32, options (RA))
10.1.1.254 > 224.0.0.2: igmp v2 report 224.0.0.2
16:03:23.474672 00:00:0a:01:00:16 > 01:00:5e:00:00:02, ethertype IPv4 (0x0800), length 46: (tos 0x0, ttl 1, id 4355, offset 0, flags [none], proto IGMP (2), length 32, options (RA))
10.1.1.1 > 224.0.0.2: igmp leave 225.1.2.3
16:03:23.475077 00:00:0a:01:00:01 > 01:00:5e:01:02:03, ethertype IPv4 (0x0800), length 42: (tos 0xc0, ttl 1, id 9673, offset 0, flags [none], proto IGMP (2), length 28)
10.1.1.254 > 225.1.2.3: igmp query v2 [max resp time 10] [gaddr 225.1.2.3]
16:03:24.483108 00:00:0a:01:00:01 > 01:00:5e:01:02:03, ethertype IPv4 (0x0800), length 42: (tos 0xc0, ttl 1, id 9674, offset 0, flags [none], proto IGMP (2), length 28)
10.1.1.254 > 225.1.2.3: igmp query v2 [max resp time 10] [gaddr 225.1.2.3]
Discussion:
Frame 1 is the IGMP join (report) from hostA1. IP destination =225.1.2.3, group address= 225.1.2.3.
Frame 2 is the IGMP general query from routerA. IP destination =224.0.0.1, group address =0.0.0.0.
Frame 3, 4 and 5 are the IGMP reports from the various hosts/routers in reponse to the query in frame 2.
In frame routerA sends a report (to himself and any other multicast router ) that it is a member of 224.0.0.2 ( all multicast routers)
In frame 4 routerA sends a report that it is a member of 224.0.0.9 (RIP routers).
In frame 5 hostA1 sends a report that it is a member if 225.1.2.3.
Frame 6 is another general query. The time interval is 15:58:18. - 16:00:23. = 2 minutes and 5 seconds.
Frame 10 is the ICMP leave message from hostC1. The IP destination is 224.0.0.2 ( all multicast routers) and the group address is 225.1.2.3 ( group leaving).
Frame 11 and 12 are special queries from routerA. The IP destination is 225.1.2.3 and the group address is 225.1.2.3. The maximum response time is 10 seconds. The purpose of these queries is to check if there are any remaining members of the group 225.1.2.3.
Conclusion:
We have observed the operation of IGMP