igmpgen/README.md
Glenn Y. Rolland 06a1392839
All checks were successful
continuous-integration/drone/push Build is passing
doc: update list of related projects
2023-12-28 09:42:14 +01:00

147 lines
4.1 KiB
Markdown

[![Build Status](https://cicd.apps.glenux.net/api/badges/glenux/igmpgen/status.svg)](https://cicd.apps.glenux.net/glenux/igmpgen)
![License LGPL3.0-or-later](https://img.shields.io/badge/license-LGPL3.0--or--later-blue.svg)
[![Donate on patreon](https://img.shields.io/badge/patreon-donate-orange.svg)](https://patreon.com/glenux)
# IGMP Packet Generator
## Overview
The IGMP Packet Generator (`igmpgen`) is a specialized tool designed for
generating various types of [Internet Group Management Protocol
(IGMP)](https://en.wikipedia.org/wiki/Internet_Group_Management_Protocol)
packets.
This tool is particularly useful for network administrators, developers, and
researchers involved in testing and analyzing multicast network protocols.
## Features
* **Support for Multiple IGMP Versions**: Compatible with IGMPv1, IGMPv2, and
IGMPv3.
* **Variety of IGMP Packets**: Capable of generating Query, Report, Leave, and
other IGMP packet types.
* **Customizable Packet Parameters**: Allows setting of source/destination IPs,
ports, and multicast groups.
* **Router Alert Option**: Implements the Router Alert IP option (IPOPT_RA).
## Requirements
* Unix-like operating system.
* `libnet` library
* CMake for building the project.
For debian/ubuntu, simply type:
```shell-session
sudo apt-get install cmake libnet1-dev gcc rpm
```
## Install
### Clone the Repository (if applicable):
```bash
git clone https://code.apps.glenux.net/glenux/igmpgen
cd igmpgen
```
### Build with CMake:
Run CMake and build the project:
```shell-session
cmake -S . -B _build
cmake --build _build
```
### Install binaries
Either with your favorite packaging system
```shell-session
cpack
```
Or directly
```shell-session
cmake --install _build
```
## Usage
After building, you can run `igmpgen` with the necessary command-line arguments:
### Command-Line Arguments
```bash
IGMP packet generator
Usage: ./igmpgen [options]
Options:
-i <interface> Specify the network interface (e.g., eth0)
-t <type> Specify the IGMP packet type and version (e.g., 1.query)
-g <group> Specify the IGMP group (e.g., 224.0.0.1)
-s <source> Specify the source IP and port (e.g., 192.168.1.1:1234)
-d <destination> Specify the destination IP and port (e.g., 224.0.0.2:5678)
-n <number> Specify delay between packets in seconds (optional)
Available IGMP packet types:
- 1.query
- 1.report
- 1.dvmrp
- 2.query
- 2.report
- 2.leave
- 3.report
```
### Example
Generate an IGMPv2 Membership Report for group `224.0.0.1` on `eth0`:
```bash
./igmpgen -i eth0 -g 224.0.0.1 -t 2.report
```
## Contributing
Contributions to `igmpgen` are welcome. Please feel free to report issues,
suggest features, or submit pull requests.
## License
This project is licensed under the LGPL 3.0-or-later.
## Related projects
* [IGMPproxy (Official Version)](https://github.com/pali/igmpproxy): The
official version of the IGMPproxy tool.
* [IGMPproxy with IGMPv3 & FreeBSD
support](https://github.com/ViToni/igmpproxy/): A version of IGMPproxy with
added support for IGMPv3 and FreeBSD.
* [pierf packet generator and analyzer](https://pierf.sourceforge.net/): A
packet injection tool.
* [Send IGMP](https://sendigmp.com/#examples): A simple command-line tool to
send IGMP packets
* [Ostatino](https://github.com/pstavirs/ostinato): Traffic generator for
network engineers.
* [individuwill/mcast](https://github.com/individuwill/mcast)
* [troglobit/mcjoin](https://github.com/troglobit/mcjoin)
* [troglobit/mrdisc](https://github.com/troglobit/mrdisc)
* [troglobit/mrouted](https://github.com/troglobit/mrouted)
* [scapy](https://scapy.net/)
* <https://itecnote.com/tecnote/python-send-igmp-packets-with-scapy/>
* <https://gist.github.com/sdir/6e44c14f6fd29149689b2f9fe37ba6b9>
* <https://github.com/Abaco-Systems/WinPcap-igmp-join>
## References
* https://www.ietf.org/proceedings/50/I-D/idmr-snoop-00.txt
* https://www.rfc-editor.org/rfc/rfc4541
* [Wikipedia: IGMP Snooping](https://en.wikipedia.org/wiki/IGMP_snooping)
* [Wikipedia: Multicast Listener Discovery](https://en.wikipedia.org/wiki/Multicast_Listener_Discovery)