Wednesday, March 24, 2010

Using IGMPv2 by default in Linux

Modern Linux distributions use IGMPv3 by default. If your network environment supports only IGMPv2 you must change this behaviour. Otherwise your host will not be able to communicate with others which forward multicast traffic.

# tcpdump -i eth0 igmp
10:30:03.070950 IP 192.168.4.10 > IGMP.MCAST.NET: igmp v3 report, 1 group record(s)
10:30:04.072938 IP 192.168.4.10 > IGMP.MCAST.NET: igmp v3 report, 1 group record(s)

To configure an eth0 interface to use IGMPv2 execute the next command:
# echo "2" > /proc/sys/net/ipv4/conf/eth0/force_igmp_version

To configure all interfaces:
# echo "2" > /proc/sys/net/ipv4/conf/all/force_igmp_version

The sysctl settings:
net.ipv4.conf.eth0.force_igmp_version = 2

After the configuration:
# tcpdump -i eth0 igmp
10:30:25.729945 IP 192.168.4.10 > 239.255.128.1: igmp v2 report 239.255.128.1
10:30:31.958912 IP 192.168.4.10 > 239.255.128.1: igmp v2 report 239.255.128.1

0 comments:

Post a Comment