IGMP Linux Kernel Settings

How to display and modify IGMP kernel settings on Linux

You can check the current settings like so:

$ sysctl net.ipv4.igmp_max_memberships
net.ipv4.igmp_max_memberships = 20

$ sysctl net.ipv4.igmp_max_msf
net.ipv4.igmp_max_msf = 10

net.ipv4.igmp_max_memberships specifies the maximum number of multicast groups the host can subscribe to.

net.ipv4.igmp_max_msf specifies the maximum number of multicast source filters the host will support.

Dynamic Configuration

To change the running configuration, use this command with your desired value:

$ sysctl -w net.ipv4.igmp_max_memberships=NN
$ sysctl -w net.ipv4.igmp_max_msf=NN

You can confirm like so:

$ sysctl net.ipv4.igmp_max_memberships
$ sysctl net.ipv4.igmp_max_msf

Permanent Configuration

To make this setting persistent across reboots, edit the /etc/sysctl.conf file like so, save and quit:

$ vi /etc/sysctl.conf

net.ipv4.igmp_max_memberships = NN
net.ipv4.igmp_max_msf = NN


You can then reboot to check the setting persists, or alternatively, run this command to load them:

$ sysctl -p /etc/sysctl.conf

Note: The sysctl command will read /etc/sysctl.conf by default so it doesn’t need to be specified but I’ve left it there for the sake of clarity and to ensure it’s clear some other file can be specified.

Confirm with this:

$ sysctl net.ipv4.igmp_max_memberships
$ sysctl net.ipv4.igmp_max_msf