A Python library that supports interacting with the Linux kernel for multicast routing.
This is a work in progress. Currently, only IPv4 multicast routing is supported. I've also only tested with IGMPv2 on an Ubuntu 22.04.2 LTS (v6.0.0-1013-oem) host.
There are no daemon implementations yet. The only implemented program is an interactive interface.
Coming Soon
Run an interactive terminal for interacting with multicast constructs in the kernel.
sudo python3 pygmp interactive
Install the task utility. This utility is used to standardize build and test processes.
Start the interactive shell. (This will automatically setup the development environment.)
task run
- CI/CD / semantic versioning / create a pip registry
- MLD/IPv6 support
- smcrouted daemon implementation
- pimd daemon implementation
- Dockerized daemon example
- expand testing to other distros
Most new distibutions set the IGMP version to 3. To test with IGMPv2, you'll need to set it to 2 and reboot. Also, make sure mc_forwarding is enabled. Change the values in /etc/sysctl.conf
. Then, reboot.
net.ipv4.ip_forward = 1
net.ipv4.conf.all.force_igmp_version = 2
net.ipv4.conf.default.force_igmp_version = 2
net.ipv4.conf.all.mc_forwarding = 1
net.ipv4.conf.default.mc_forwarding = 1
RFCs often refer to, build upon, or obsolete, previous RFCs. This can lead to a complex web of interrelated documents. This is my collection of RFCs relevant to multicast routing.
IGMP
- RFC 1112 - Host Extensions for IP Multicasting
- RFC 2236 - Internet Group Management Protocol, Version 2
- RFC 3376 - Internet Group Management Protocol, Version 3
MLD
- RFC 2710 - Multicast Listener Discovery (MLD) for IPv6
- RFC 3810 - Multicast Listener Discovery Version 2 (MLDv2) for IPv6
IGMPv3/MLDv2
- RFC 4604 - Using Internet Group Management Protocol Version 3 (IGMPv3) and Multicast Listener Discovery Protocol Version 2 (MLDv2) for Source-Specific Multicast
- RFC 5790 - Lightweight Internet Group Management Protocol Version 3 (IGMPv3) and Multicast Listener Discovery Version 2 (MLDv2) Protocols
TODO
- RFC 6636 - Tuning the Behavior of the Internet Group Management Protocol (IGMP) and Multicast Listener Discovery (MLD) for Routers in Mobile and Wireless Networks
- RFC 7761 - Protocol Independent Multicast - Sparse Mode (PIM-SM): Protocol Specification (Revised)
- RFC 7762 - Protocol Independent Multicast (PIM) MIB
- RFC 7763 - Protocol Independent Multicast - Sparse Mode (PIM-SM) Multicast Routing Security Issues and Enhancements
- RFC 7764 - Protocol Independent Multicast (PIM) over Virtual Private LAN Service (VPLS)
- RFC 7765 - Multicast Considerations over IEEE 802 Wireless Media
- RFC 7766 - Protocol Independent Multicast (PIM) over Ethernet (PIM-E): Protocol Specification