How can I know if IP Multicast is enabled

  • I have scripts that run IP multicast tests; however, my scripts are failing on a particular linux machine.

    I know that I can look at CONFIG_IP_MULTICAST in the kernel configuration file to determine whether the kernel was compiled with this. However, it would be easier to flag missing requirements in my script if I could look at /proc or sysctl and get the answer.

    Is there a way to find if IP Multicast was compiled into the kernel without looking at CONFIG_IP_MULTICAST?

  • It seems the most kernels(post v1) do support multicast by default or have CONFIG_IP_MULTICAST enabled while compiling. To check whether the compiled and running kernel subscribes to any multicast group, I would use netstat -g.

    It seems the most kernels(post v1) do support multicast by default.

    [[email protected] module]# grep CONFIG_IP_MULTICAST /usr/src/kernels/2.6.18-274.7.1.el5-i686/.config 
    CONFIG_IP_MULTICAST=y
    [[email protected] module]# netstat -g
    IPv6/IPv4 Group Memberships
    Interface       RefCnt Group
    --------------- ------ ---------------------
    lo              1      all-systems.mcast.net
    eth0            1      224.0.0.251
    eth0            1      all-systems.mcast.net
    

    I see that eth0 interface on my host thinks its subscribed 224.0.0.251 basic mcast group . Also alternatively, if I ping the group or the network and then all the known multicast enabled host networks are returned to me, I would say multicast is working on the host. Can you try netstat -g or cat /proc/net/igmp and see if it returns any groups on your host?

    But how do you determine, if the router that box is connected to supports multicast?

    Multicasting -- the sender sends a single datagram from its unicast address to the multicast group address and intermediary routers take care of making copies and sending them to all receivers that have joined the corresponding multicast group.

    If Yes, router needs to support the multicasting then. However, for senders/receivers it works on IGMP and for routers, its Protocol Independent Multicast (PIM). Router that supports PIM, usually enabled, and multicast group -- 224.0.0.0/4. Try putting up another pc listening in group at other end & send data to multicast group & check if receiver at the otherend receives data.Ify,router network does support multicasting.Few tools online: http://imj.ucsb.edu/mcast_detective (windows)

License under CC-BY-SA with attribution


Content dated before 6/26/2020 9:53 AM