IGMP is acronym for Internet Group Management Protocol. IGMP is a communication protocol used by hosts and adjacent routers for multicasting communication with IP networks and uses the resources efficiently to transmit the message/data packets.
- Multicast communication can have single or multiple senders and receivers and thus, IGMP can be used in streaming videos, gaming, or web conferencing tools.
- This protocol is used on IPv4 networks and for using this on IPv6, multicasting is managed by Multicast Listener Discovery (MLD).
- Like other network protocols, IGMP is used on network layer.
- MLDv1 is almost same in functioning as IGMPv2 and MLDv2 is almost like IGMPv3.
- The communication protocol, IGMPv1 was developed in 1989 at Stanford University. IGMPv1 was updated to IGMPv2 in year 1997 and again updated to IGMPv3 in year 2002.
IGMP version 1
IGMP
(Internet Group Management Protocol) version 1 is the first version that hosts
can use to announce to a router that they want to receive multicast traffic
from a specific group. It’s a simple protocol that uses only two messages:
- Membership report
- Membership query
When a host
wants to join a multicast group, it will send a membership report to the group
address that it wants to receive. When the multicast-enabled router receives
this message, it will start forwarding the requested multicast traffic on the
interface where it received the IGMP membership report on.
The router
will periodically send a membership query to destination 224.0.0.1 (all hosts
multicast group address). Hosts that receive this message will respond with a
membership report to tell the router that they are still interested in
receiving the multicast traffic. When the router receives the membership
report, it’s expiry timer will be refreshed. When no hosts respond, the router
knows that nobody is interested anymore in the multicast traffic, and it will
then remove the entry once the timer exceeds.
IGMPv1 Packet Format
- Version – Set to 1.
- Type – 1 for Host Membership Query and Host Membership Report.
- Unused – 8-bits of zero which are of no use.
- Checksum – It is the one’s complement of the sum of IGMP messages.
- Group Address – The group address field is zero when sent and ignored when received in membership query message. In a membership report message, the group address field takes the IP host group address of the group being reported.
IGMP version 2
IGMP version 2 is the “enhanced” version of IGMP version 1. One of the major reasons for a new version was to improve the “leave” mechanism. In IGMP version 1, hosts just stop listening to the multicast group address but they never report this to the router. Here are the new features:
- Leave group messages: when a host no longer wants to
listen to a multicast group address then it will report to the router that it
has stopped listening.
- Group specific membership query: the router is now able to send a
membership query for a specific group address. When the router receives a leave
group message, it will use this query to check if there are still any hosts
interested in receiving the multicast traffic.
- MRT (Maximum Response Time) field: this is a new field in query
messages. It specifies how much time hosts must respond to the query.
- Querier election process: when there are two routers in the
same subnet then only one of them should send query messages. The election
ensures only one router becomes the active querier. The router with the lowest
IP address becomes the active querier.
IGMPv2 Packet Format
- Type:
- 0x11 for Membership Query
- 0x12 for IGMPv1 Membership Report
- 0x16 for IGMPv2 Membership Report
- 0x22 for IGMPv3 Membership Report
- 0x17 for Leave Group
- Max Response Time – This field is ignored for message types other than membership query. For membership query type, it is the maximum time allowed before sending a response report. The value is in units of 0.1 seconds.
- Checksum – It is the one’s complement of the sum of IGMP message.
- Group Address – It is set as 0 when sending a general query. Otherwise, multicast address for group-specific or source-specific queries.
IGMP version 3
IGMP version 3 adds support for “source filtering”. IGMP version 1 and version 2 allow hosts to join multicast groups, but they don’t check the source of the traffic. Any source can receive traffic to the multicast group(s) that they joined.
With source filtering, we can join multicast groups but only from specified source addresses. IGMP version 3 is a requirement for SSM (Source Specific Multicast)
Why is this
useful? Let me give you an example:
- Above we have a video server that is streaming multicast traffic on the network using destination address 239.1.1.1. There are four hosts listening to this traffic, life is good. Suddenly something happens:
- An attacker didn’t like the video stream and decided to stream his favorite video to destination address 239.1.1.1.1. Since we don’t check the source address, everyone will receive the traffic from our attacker. It’s also possible to send bogus traffic and create a DoS attack like this.
- IGMP version 1 and 2 don’t have any protection against this.
- With IGMP version 3, our hosts can be configured to receive multicast traffic only from specified source addresses.
IGMPv3 Packet Format
- Max Response Time – This field is ignored for message types other than membership query. For membership query type, it is the maximum time allowed before sending a response report. The value is in units of 0.1 seconds.
- Checksum – It is the one’s complement of the one’s complement of the sum of IGMP message.
- Group Address – It is set as 0 when sending a general query. Otherwise, multicast address for group-specific or source-specific queries.
- Resv – It is set zero of sent and ignored when received.
- S flag – It represents Suppress Router-side Processing flag. When the flag is set, it indicates to suppress the timer updates that multicast routers perform upon receiving any query.
- QRV – It represents Querier’s Robustness Variable. Routers keeps on retrieving the QRV value from the most recently received query as their own value until the most recently received QRV is zero.
- QQIC – It represents Querier’s Query Interval Code.
- Number of sources – It represents the number of source addresses present in the query. For general query or group-specific query, this field is zero and for group-and-source-specific query, this field is non-zero.
- Source Address[i] – It represents the IP unicast address for N fields.
IGMP Filter
- Multicast IGMP membership report messages include the multicast group addresses that our receivers want to join. By default, all multicast groups will be accepted. What if we want to restrict this?
- It is possible to filter certain multicast groups. We can configure IGMP filtering on a multicast router or on a switch where IGMP snooping is enabled.
Multicast
IGMP Proxy
IGMP Proxy allows hosts in a UDLR (Unidirectional Link Routing) topology that are not directly connected to a downstream router to join a multicast group from an upstream router by using a back channel.
To understand IGMP proxy, let’s first look at what a UDL (Unidirectional
Link) is?
A UDL is a link where traffic only goes one way.
Above we have three multicast routers. There’s a router called upstream,
downstream, and R3. The upstream and downstream routers are connected with two links:
- One unidirectional satellite link.
- One regular Internet connection.
This causes issues with routing protocols like OSPF or EIGRP but also with multicast traffic.
Receiving multicast traffic through the satellite link is no problem but our downstream router is unable to let the upstream router know that it wants to receive or prune multicast traffic.
To solve this, we can use a back channel. The back channel is a regular interface, like an Internet connection.
The downstream router can use the back channel to inform the upstream router that it wants to receive certain multicast traffic. It does this by “proxying” an IGMP membership report.
When the upstream router receives the IGMP membership report, it will create a forwarding entry for the UDL interface.
Here’s what you see above:
- H1 (our receiver) wants to join a multicast group so it sends an IGMP join (membership report) to R3.
- R3 processes the IGMP membership report and sends a PIM join to its RP (the downstream router).
- The downstream router receives the PIM join and creates a (*,G) forwarding entry in its multicast routing table.
- The downstream router proxies an IGMP membership report over the back channel to the upstream router.
- The upstream router receives the IGMP membership report and creates a forwarding entry for the UDL link.
- Multicast traffic is now forwarded over the UDL link from the upstream router to the downstream router.