IGMP - Internet Group Management Protocol ========================================== .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **What is IGMP?** IGMP stands for Internet Group Management Protocol. It's a communication protocol used by devices and routers to manage multicast group memberships on IPv4 networks. It allows devices to join or leave multicast groups, enabling efficient delivery of data to multiple recipients. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Why is IGMP useful?** IGMP is essential for multicast communication, where data is sent to multiple devices simultaneously without sending separate copies to each one. * This is useful for: * Streaming media (like IPTV) * Online gaming * Real-time data feeds (like stock tickers or live sports scores) .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **How it works?** * Device wants to join a multicast group – It sends an IGMP Membership Report to the router. * Router listens – The router keeps track of which devices are interested in which multicast groups. * Multicast data is sent – The router forwards multicast traffic only to the devices that requested it. * Leaving the group – When a device no longer wants the data, it sends a Leave Group message. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Where is IGMP used?** * IPTV and video conferencing – To deliver the same video stream to many viewers efficiently. * Online multiplayer games – For real-time updates to multiple players. * Financial services – For distributing live market data to many clients. * Enterprise networks – For internal broadcasts like training or announcements. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which OSI layer does this protocol belong to?** * Works with IP multicast addresses (Class D addresses: 224.0.0.0 to 239.255.255.255). * Manages group membership for multicast routing. * Interacts directly with routers and IP-level multicast mechanisms. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Is IGMP windows specific?** * No. * IGMP (Internet Group Management Protocol) is a network-layer protocol supported by all major OSes including Windows, Linux, and macOS. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Is IGMP linux specific?** * No. * IGMP is a standard protocol used for managing multicast group memberships on IPv4 networks, and it is platform-independent. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which Transport Protocol is used by IGMP?** * IGMP does not use TCP or UDP. * It operates directly over IPv4 using protocol number 2. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which Port is used by IGMP?** * IGMP does not use transport layer ports (TCP/UDP ports). * It is a network layer protocol and works using IP protocol number. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Is IGMP using client server model?** * No. * IGMP uses a multicast membership management approach rather than a traditional client-server model. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Topics in this section, * :ref:`Learnings in this section ` * :ref:`Terminology ` * :ref:`Version Info ` * :ref:`IGMP Version&RFC Details ` * :ref:`IGMP Basic Setup on Ubuntu using IGMP ` * :ref:`IGMP Protocol Packet Details ` * :ref:`IGMP Usecases ` * :ref:`IGMP Basic Features ` * :ref:`IGMP Feature : Multicast Group Management ` * :ref:`IGMP Feature : Efficient Bandwidth Usage ` * :ref:`IGMP Feature : Host-Router Communication ` * :ref:`IGMP Feature : Dynamic Membership ` * :ref:`IGMP Feature : Version Compatibility ` * :ref:`IGMP Feature : Query and Report Mechanism ` * :ref:`IGMP Feature : Leave Group Notification ` * :ref:`IGMP Feature : Support for Source Filtering ` * :ref:`IGMP Feature : Minimal Overhead ` * :ref:`IGMP Feature : Integration with Multicast Routing Protocols ` * :ref:`Reference links ` .. _IGMP_step1: .. tab-set:: .. tab-item:: Learnings in this section * In this section, you are going to learn .. _IGMP_step2: .. tab-set:: .. tab-item:: Terminology * Terminology .. _IGMP_step3: .. tab-set:: .. tab-item:: Version Info * Version Info .. _IGMP_step5: .. tab-set:: .. tab-item:: IGMP Version&RFC Details .. csv-table:: :file: ./IGMP/IGMP_Version_RFC_details.csv :widths: 10,10,10,30 :header-rows: 1 .. _IGMP_step20: .. tab-set:: .. tab-item:: IGMP Basic Setup on Ubuntu using IGMP **Testcase 1: IGMP Join/Leave/Query Test** * Step-1 : Launch GNS3 and Create Network Topology .. note:: * Use GNS3 to simulate two Ubuntu virtual machines and one Cisco Router (c7200). * A Layer 2 switch is used to connect all devices. 1. Open GNS3 2. Add **two Ubuntu VMs** and **one Cisco c7200 Router** to the canvas 3. Add a **Layer 2 switch** 4. Connect the devices: - Connect **VM1 to Switch** - Connect **VM2 to Switch** - Connect **Router's FastEthernet0/0 to Switch** 5. Start all devices (VMs and Router) * Step-2 : Configure Cisco Router .. code-block:: shell R1> enable R1# configure terminal R1(config)# ip multicast-routing R1(config)# interface FastEthernet0/0 R1(config-if)# ip address 192.168.1.1 255.255.255.0 R1(config-if)# no shutdown R1(config-if)# ip igmp version 2 R1(config-if)# exit R1(config)# exit * Step-3 : Assign Static IP Addresses to VMs .. note:: * Replace `enp0s8` with the actual interface name of your VM (check using `ip a`) .. code-block:: shell # On VM1: $ sudo ifconfig enp0s8 192.168.1.10 up # On VM2: $ sudo ifconfig enp0s8 192.168.1.11 up * Step-4 : Add Multicast Routing on Both VMs .. code-block:: shell $ sudo ip route add 224.0.0.0/4 dev enp0s8 .. note:: * This route ensures that all multicast traffic (224.0.0.0/4) uses interface `enp0s8`. * Step-5 : Start Wireshark Capture * Start packet capture on the **Switch** or any **VM interface** * Use filter: `igmp` to focus on IGMP traffic * Step-6 : Start Multicast Receiver (VM1) .. code-block:: shell $ iperf -s -u -B 239.1.1.1 -i 1 -t 10 .. note:: * `-s` : Run iperf in **server mode** (receiver) * `-u` : Use **UDP** * `-B 239.1.1.1` : Bind to multicast group * `-i 1` : Report every 1 second * `-t 10` : Run for 10 seconds * Expected Packet Captures and Observations 1. **IGMPv2 Membership Report** - **Source** : 192.168.1.10 (VM1) - **Destination** : 239.1.1.1 - Indicates that VM1 is **joining** multicast group 239.1.1.1 2. **IGMPv2 Leave Group** - **Source** : 192.168.1.10 (VM1) - **Destination** : 224.0.0.2 - Sent when `iperf` stops. VM1 is **leaving** the multicast group. 3. **IGMPv2 Membership Query (General)** - **Source** : 192.168.1.1 (Router) - **Destination** : 224.0.0.1 - Router queries **all hosts** to learn about multicast group memberships. 4. **IGMPv2 Membership Query (Group-Specific)** - **Source** : 192.168.1.1 (Router) - **Destination** : 239.1.1.1 - Sent **after receiving Leave message**, to confirm if anyone else is still subscribed to the group. .. note:: * If no Membership Report follows the Group-Specific Query, the router stops forwarding traffic for 239.1.1.1. * Wireshark Capture :download:`Download Wireshark capture ` **Testcase 2: Multiple Hosts Join Same Multicast Group** * Step-1 : Launch GNS3 and Create Network Topology .. note:: * Use GNS3 to simulate two Ubuntu virtual machines and one Cisco Router (c7200). * A Layer 2 switch is used to connect all devices. 1. Open GNS3 2. Add **two Ubuntu VMs** and **one Cisco c7200 Router** to the canvas 3. Add a **Layer 2 switch** 4. Connect the devices: - Connect **VM1 to Switch** - Connect **VM2 to Switch** - Connect **Router's FastEthernet0/0 to Switch** 5. Start all devices (VMs and Router) * Step-2 : Start Multicast Receivers .. code-block:: shell # On VM2 (first): $ iperf -s -u -B 239.1.1.1 -i 1 -t 20 # On VM1 (shortly after VM2, e.g., within 2-3 seconds): $ iperf -s -u -B 239.1.1.1 -i 1 -t 10 .. note:: * Both VMs join the **same multicast group** (239.1.1.1) * `iperf` runs as a UDP server bound to this group * Step-3 : Stop One Receiver (VM1) .. code-block:: shell # Wait approximately 5 seconds after starting VM1’s iperf # Then on VM1, press Ctrl+C to stop iperf manually .. note:: * This simulates one receiver leaving the multicast group early * Step-4 : Start Wireshark Capture * Capture on VM interfaces or Switch * Use display filter: `igmp` * Expected Packet Captures and Observations 1. **IGMPv2 Membership Reports** - **Sources** : 192.168.1.10 (VM1), 192.168.1.11 (VM2) - **Destination** : 239.1.1.1 - Both VMs report joining the same multicast group 2. **IGMPv2 Leave Group (from VM1)** - **Source** : 192.168.1.10 - **Destination** : 224.0.0.2 - VM1 sends leave message when `iperf` is interrupted 3. **IGMPv2 Group-Specific Membership Query** - **Source** : 192.168.1.1 (Router) - **Destination** : 239.1.1.1 - Router checks if any other host still wants the group 4. **VM2 Continues Responding** - VM2 sends Membership Report in response to the query - Router **keeps the group active** 5. **IGMPv2 Leave Group (from VM2)** - **Source** : 192.168.1.11 - **Destination** : 224.0.0.2 - Sent when VM2’s iperf session ends after 20 seconds 6. **IGMPv2 Group-Specific Query (Final)** - Sent by the router to 239.1.1.1 after VM2 leaves - If **no other host responds**, router **stops forwarding** multicast traffic for the group * Wireshark Capture :download:`Download Wireshark capture ` .. note:: * This testcase validates correct IGMPv2 behavior when **multiple receivers join and leave** a multicast group at different times. **Testcase 3: Multicast Source with iperf (Sender)** * Step-1 : Launch GNS3 and Create Network Topology .. note:: * Use GNS3 to simulate two Ubuntu virtual machines and one Cisco Router (c7200). * A Layer 2 switch is used to connect all devices. 1. Open GNS3 2. Add **two Ubuntu VMs** and **one Cisco c7200 Router** to the canvas 3. Add a **Layer 2 switch** 4. Connect the devices: - Connect **VM1 to Switch** - Connect **VM2 to Switch** - Connect **Router's FastEthernet0/0 to Switch** 5. Start all devices (VMs and Router) * Step-2 : Start Multicast Receiver (VM1) .. code-block:: shell # On VM1: $ iperf -s -u -B 239.1.1.1 -i 1 -t 20 .. note:: * VM1 joins multicast group 239.1.1.1 as a receiver * It will listen for UDP packets sent to the group for 20 seconds * Step-3 : Start Multicast Sender (VM2) .. code-block:: shell # On VM2: $ iperf -c 239.1.1.1 -u -t 10 -i 1 -b 512k .. note:: * `-c 239.1.1.1` : Send traffic to the multicast group * `-u` : Use UDP * `-t 10` : Send for 10 seconds * `-i 1` : Report every second * `-b 512k` : Send data at 512 kilobits per second * Step-4 : Monitor with Wireshark * Start Wireshark on VM1, VM2, or switch interface * Expected Results and Observations 1. **UDP Traffic Delivery** - VM1 should receive UDP traffic from VM2 addressed to 239.1.1.1 - `iperf` on VM1 displays throughput reports every second 2. **Group Leave Behavior** - When VM1 finishes its iperf session (after 20s), it leaves the group - Router should send **Group-Specific Membership Query** to 239.1.1.1 3. **Traffic Forwarding Stops** - If no other receivers are present (no Membership Report), router stops forwarding traffic for that multicast group * Wireshark Capture :download:`Download Wireshark capture ` .. note:: * This testcase confirms multicast **data delivery** from a sender to a group, and router behavior when **last receiver leaves**. **Testcase 4: IGMP Query Interval & Timeout Behavior** * Step-1 : Launch GNS3 and Create Network Topology .. note:: * Use GNS3 to simulate two Ubuntu virtual machines and one Cisco Router (c7200). * A Layer 2 switch is used to connect all devices. 1. Open GNS3 2. Add **two Ubuntu VMs** and **one Cisco c7200 Router** to the canvas 3. Add a **Layer 2 switch** 4. Connect the devices: - Connect **VM1 to Switch** - Connect **VM2 to Switch** - Connect **Router's FastEthernet0/0 to Switch** 5. Start all devices (VMs and Router) * Step-2 : Configure IGMP Query Interval on Router .. code-block:: shell R1# configure terminal R1(config)# interface FastEthernet0/0 R1(config-if)# ip igmp query-interval 30 R1(config-if)# exit R1(config)# exit .. note:: * This sets the **IGMP General Query interval** to **30 seconds** * Default interval is typically 125 seconds * Step-3 : Start Multicast Receiver on VM1 .. code-block:: shell $ iperf -s -u -B 239.1.1.10 -i 1 -t 40 .. note:: * VM1 joins multicast group `239.1.1.10` as a listener for 30 seconds * `iperf` runs for 40 seconds and outputs stats every 1 second * Step-4 : Start Wireshark Capture * Expected Packet Captures and Observations 1. **General Membership Query Every 30 Seconds** - **Source** : 192.168.1.1 (Router) - **Destination** : 224.0.0.1 (All IGMP-capable hosts) - Queries should appear at ~30s intervals (verify timestamps in Wireshark) 2. **VM1 Responds with IGMP Membership Report** - Sent in response to the General Query to indicate active group membership 3. **After VM1 Stops (Post 30s)** - No further Membership Reports are sent from VM1 - Router may stop forwarding if no other host responds to future queries * Wireshark Capture :download:`Download Wireshark capture ` .. note:: * This testcase validates the effect of changing the **IGMP query interval** and how it affects multicast group maintenance. .. _IGMP_step6: .. tab-set:: .. tab-item:: IGMP Protocol Packet Details **IGMP Membership Query Packet** .. csv-table:: :file: ./IGMP/IGMP_Packetdetails1.csv :widths: 10,20,30,10 :header-rows: 1 **IGMP Membership Report Packet** .. csv-table:: :file: ./IGMP/IGMP_Packetdetails2.csv :widths: 10,20,30,10 :header-rows: 1 **IGMP Leave Group Packet** .. csv-table:: :file: ./IGMP/IGMP_Packetdetails3.csv :widths: 10,20,30,10 :header-rows: 1 .. _IGMP_step7: .. tab-set:: .. tab-item:: IGMP Usecases .. csv-table:: :file: ./IGMP/IGMP_Use_Cases.csv :widths: 10,20,30 :header-rows: 1 .. _IGMP_step8: .. tab-set:: .. tab-item:: IGMP Basic Features .. csv-table:: :file: ./IGMP/IGMP_Basic_Features.csv :widths: 10,10,30 :header-rows: 1 .. _IGMP_step9: .. tab-set:: .. tab-item:: IGMP Feature : Multicast Group Management **Multicast Group Management - Testcases** .. csv-table:: :file: ./IGMP/IGMP_Feature1_Multicast_Group_Management_TestCases.csv :widths: 10,10,30,20 :header-rows: 1 .. _IGMP_step10: .. tab-set:: .. tab-item:: IGMP Feature : Efficient Bandwidth Usage **Efficient Bandwidth Usage - Testcases** .. csv-table:: :file: ./IGMP/IGMP_Feature2_Efficient_Bandwidth_Usage_TestCases.csv :widths: 10,10,30,20 :header-rows: 1 .. _IGMP_step11: .. tab-set:: .. tab-item:: IGMP Feature : Host-Router Communication **Host-Router Communication - Testcases** .. csv-table:: :file: ./IGMP/IGMP_Feature3_Host_Router_Communication_TestCases.csv :widths: 10,10,30,20 :header-rows: 1 .. _IGMP_step12: .. tab-set:: .. tab-item:: IGMP Feature : Dynamic Membership **Dynamic Membership - Testcases** .. csv-table:: :file: ./IGMP/IGMP_Feature4_Dynamic_Membership_TestCases.csv :widths: 10,10,30,20 :header-rows: 1 .. _IGMP_step13: .. tab-set:: .. tab-item:: IGMP Feature : Version Compatibility **Version Compatibility - Testcases** .. csv-table:: :file: ./IGMP/IGMP_Feature5_Version_Compatibility_TestCases.csv :widths: 10,10,30,20 :header-rows: 1 .. _IGMP_step14: .. tab-set:: .. tab-item:: IGMP Feature : Query and Report Mechanism **Query and Report Mechanism - Testcases** .. csv-table:: :file: ./IGMP/IGMP_Feature6_Query_Report_Mechanism_TestCases.csv :widths: 10,10,30,20 :header-rows: 1 .. _IGMP_step15: .. tab-set:: .. tab-item:: IGMP Feature : Leave Group Notification **Leave Group Notification - Testcases** .. csv-table:: :file: ./IGMP/IGMP_Feature7_Leave_Group_Notification_TestCases.csv :widths: 10,10,30,20 :header-rows: 1 .. _IGMP_step16: .. tab-set:: .. tab-item:: IGMP Feature : Support for Source Filtering **Support for Source Filtering - Testcases** .. csv-table:: :file: ./IGMP/IGMP_Feature8_Support_for_Source_Filtering_TestCases.csv :widths: 10,10,30,20 :header-rows: 1 .. _IGMP_step17: .. tab-set:: .. tab-item:: IGMP Feature : Minimal Overhead **Minimal Overhead - Testcases** .. csv-table:: :file: ./IGMP/IGMP_Feature9_Minimal_Overhead_TestCases.csv :widths: 10,10,30,20 :header-rows: 1 .. _IGMP_step18: .. tab-set:: .. tab-item:: IGMP Feature : Integration with Multicast Routing Protocols **Integration with Multicast Routing Protocols - Testcases** .. csv-table:: :file: ./IGMP/IGMP_Feature10_Integration_with_Multicast_Routing_Protocols_TestCases.csv :widths: 10,10,30,20 :header-rows: 1 .. _IGMP_step19: .. tab-set:: .. tab-item:: Reference links * Reference links