Skip to content

Instantly share code, notes, and snippets.

@rafaeltuelho
Last active December 27, 2022 10:53
Show Gist options
  • Select an option

  • Save rafaeltuelho/d5ff9c6db5b37bfbc0cb80559f4af51c to your computer and use it in GitHub Desktop.

Select an option

Save rafaeltuelho/d5ff9c6db5b37bfbc0cb80559f4af51c to your computer and use it in GitHub Desktop.
Linux Multicasting Network troubleshooting...
  • to see mcast group information
ip maddr show
  • to see if mcast is enabled on your current kernel
grep "MULTICAT" /usr/src/kernels/<kernael version>.x86_64/.config
CONFIG_IP_MULTICAST=y
  • Display multicast group membership information
netstat -g
IPv6/IPv4 Group Memberships
Interface       RefCnt Group
--------------- ------ ---------------------
lo              1      all-systems.mcast.net
enp0s25         2      239.255.2.3
enp0s25         1      all-systems.mcast.net
enp0s25         3      224.0.0.251
virbr4          1      224.0.0.251
...
  • to see if mcast is enabled on a given ifc
ip a s <ifc name>
ip a s eth0
# you should see <...,MULTICAST,...>...

# to enable mcast
sudo ifconfig <ifc name> multicast

# to disable mcast
sudo ifconfig <ifc name> -multicast
  • to enable mcast on RHEL 7 Firewalld
sudo firewall-cmd --permanent --runtime --add-rule ipv4 filter INPUT 0 -m pkttype --pkt-type multicast -j ACCEPT 
sudo firewall-cmd --permanent --runtime --add-rule ipv6 filter INPUT 0 -m pkttype --pkt-type multicast -j ACCEPT
sudo firewall-cmd --direct --get-all-rules
sudo firewall-cmd --reload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment