IGMP(4)
π IGMP β the Internet Group Management Protocol π
okay bestie, we're doing the igmp page today, from the Kernel Interfaces Manual (section 4, networking era β¨). this is the protocol your kernel uses to whisper to routers about who wants which multicast streams. let's get into it π«Ά
π SYNOPSIS π
first, the ritual. you include the sacred scrolls:
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <netinet/igmp.h>
and then you open the socket like this, exactly like this, no edits:
int
socket(AF_INET, SOCK_RAW, IPPROTO_IGMP);
raw socket, AF_INET, SOCK_RAW, IPPROTO_IGMP. that's the whole summoning circle π₯
β¨ DESCRIPTION β¨
so like. IGMP is a control plane protocol. it's the thing IPv4 hosts and routers use to pass around multicast group membership info β like, "hey, I'm in this group," "hey, I'm out of this group," that whole vibe π¦
and here's the tea: normally you do not touch this directly. it's basically the kernel's job, and the kernel does it in response to multicast membership requests that user applications make. so your app asks for multicast, kernel handles the IGMP chatter. you're just vibing, it's doing the work π
that said β routing protocols may open a raw socket to directly interact with igmp. so if that's your situation, that's your situation. no cap.
As of FreeBSD 8.0, IGMP version 3 is implemented. and v3 adds support for Source-Specific Multicast (SSM). which means applications can tell upstream multicast routers, "bestie, I only want streams from these particular sources, not whatever random thing shows up." very picky, very demure, extremely valid π
π SYSCTL VARIABLES π
these are your knobs. here's every single one, don't skip π
net.inet.igmp.statsβ an opaque read-only variable. it exposes the stack-wide IGMPv3 protocol statistics tonetstat(1). read-only, opaque, no touching, just looking πnet.inet.igmp.ifinfoβ also opaque, also read-only. this one exposes the per-link IGMPv3 status toifmcstat(8). per-link, so it's the detail view πΈnet.inet.igmp.gsrdelayβ this one sets the time threshold, in seconds, for processing Group-and-Source Specific Queries (GSR). and here's why it matters: processing GSR queries means the host has to maintain state, which can cause memory to be allocated, which means it's a potential attack point for Denial-of-Service (DoS) π so if more than one GSR query shows up within this threshold, it gets dropped, to mitigate that DoS potential. protective queen behavior fr fr.net.inet.igmp.default_versionβ controls the default version of IGMP used on all links. normally set to3by default. slay.net.inet.igmp.legacysuppβ if this is non-zero, then IGMP v1 and v2 membership reports received on a link are allowed to suppress the IGMP v3 state-change reports that this host would otherwise issue. this sysctl is normally enabled by default.net.inet.igmp.v2enableβ if non-zero, IGMP v2 membership queries get processed by this host, and backwards compatibility is enabled until the v2'Old Querier Present'timer expires. normally enabled by default βnet.inet.igmp.v1enableβ same deal but v1: if non-zero, IGMP v1 membership queries are processed by this host, and backwards compatibility stays on until the v1'Old Querier Present'timer expires. normally enabled by default βnet.inet.igmp.sendlocalβ if non-zero, then IGMP state-changes for groups in the224.0.0.0/24link-scope prefix will be issued. this behaviour is recommended if you're deploying FreeBSD in a network environment with layer 2 devices that snoop IGMP traffic, so that multicast propagation throughout the network gets mitigated. normally enabled by default πnet.inet.igmp.sendraβ if non-zero, IGMP v2 and v3 reports will contain the IP Router Alert option. normally enabled by default.net.inet.igmp.recvifkludgeβ if non-zero, received IGMP reports that contain0.0.0.0as their source get rewritten to contain the subnet address. this is useful when there are hosts on-link that haven't been configured with a primary IPv4 address yet. normally enabled by default. the kludge is doing the lord's work π§
ngl, most of these are "normally enabled by default," so if you go messing with them, that's a choice you're making. just saying π
π¦ SEE ALSO π¦
go read these next, bestie, they're all connected:
πΈ HISTORY πΈ
the igmp manual page re-appeared in FreeBSD 8.0. it came back. main character return arc π
β¨
and that's the whole page!! you did it, you read the entire thing, I'm so proud π₯Ήπ this one came from the Debian crew, dated March 9, 2009 β oldie but a goodie, and yes the page header was IGMP(4) in the Kernel Interfaces Manual. go configure something. or don't. either way, mwah ππ«Ά
π¦ where this page comes from
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright (c) 2009 Bruce Simpson
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms