Table of Contents

Config devices for MCAST

Enable mcast on iface

Kernels support MCAT by default. Test

  grep CONFIG_IP_MULTICAST //boot/config*
[root@localhost vm00]# grep CONFIG_IP_MUL /boot/config-3.8.*
/boot/config-3.8.6-203.fc18.x86_64:CONFIG_IP_MULTICAST=y
/boot/config-3.8.6-203.fc18.x86_64:CONFIG_IP_MULTIPLE_TABLES=y
/boot/config-3.8.7-201.fc18.x86_64:CONFIG_IP_MULTICAST=y
/boot/config-3.8.7-201.fc18.x86_64:CONFIG_IP_MULTIPLE_TABLES=y
/boot/config-3.8.8-202.fc18.x86_64:CONFIG_IP_MULTICAST=y
/boot/config-3.8.8-202.fc18.x86_64:CONFIG_IP_MULTIPLE_TABLES=y

Disable Multicast:

 ifconfig eth0 -multicast

Enable Multicast:

 
 ifconfig eth0 multicast

If you want to limit the multicast traffic, you have to add a dedicate route on the network device you have defined :

route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0

Result on routing table :

    route -n

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
78.46.74.27     0.0.0.0         255.255.255.224   U     0      0        0 eth0
224.0.0.0       0.0.0.0             240.0.0.0            U     0      0        0 eth1
0.0.0.0         78.46.74.1         0.0.0.0               UG    0      0        0 eth0

ping

Enable linux device to respons to multicast ping

 echo 0 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts
 ping 224.0.0.1 -Ibr0
 

Useful commands

   cat /proc/net/igmp 	List multicast group to which the host is subscribed. Use "Internet Group Management Protocol". (See /usr/src/linux/net/core/igmp.c)
   cat /proc/net/dev_mcast 	List multicast interfaces. (See /usr/src/linux/net/core/dev_mcast.c)
    ping 224.0.0.1 	All hosts configured for multicast will respond with their IP addresses
    ping 224.0.0.2 	All routers configured for multicast will respond
    ping 224.0.0.3 	All PIM routers configured for multicast will respond
    ping 224.0.0.4 	All DVMRP routers configured for multicast will respond
    ping 224.0.0.5 	All OSPF routers configured for multicast will respond

Show mcast group:

  netstat -g
  ip maddr show    

mcast test

Mcast testing and configuration

To check that multicast is enabled

ifconfig -a

Needed interfaces should have “MULTICAST” indicated

Jini multicast groups:

JINI-ANOUNCEMENT(224.0.1.84)

JINI-REQUEST(224.0.1.85)

Routing tables and multicast groups netstar -rn

netstat -gns

ip maddress list

route -n

If the destination 224.0.0.0 entry is not present you will need to enable multicast routing.

Default multicast group (replies from all multicast enabled hosts)

ping -s 224.0.0.1

ping -c 2 224.0.0.1

Snooping multicast packets

snoop -x 0 -d hme0 224.0.1.84

snoop -x 0 -d hme0 224.0.1.85

Adding the Multicast virtual network to the router table

route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0

route add 224.0.0.0 netmask 240.0.0.0 dev eth0

route add -net 224.0.0.0 -netmask 240.0.0.0 -interface en0 (BSD)

ip route add 224.0.0.0/4 dev eth0 (Linux)

Now, tell Linux to forward packets:

echo 1 > /proc/sys/net/ipv4/ip_forward

On Redhat systems, one can often configure this route statically via the network setup configuration tools. Alternatively, try executing this line as part of a startup script in /etc/rc.d/*.

List multicast group to which the host is subscribed.

cat /proc/net/igmp

List multicast interfaces.

cat /proc/net/dev_mcast

All hosts configured for multicast will respond with their IP addresses

ping 224.0.0.1

All routers configured for multicast will respond

ping 224.0.0.2

All PIM routers configured for multicast will respond

ping 224.0.0.3

All DVMRP routers configured for multicast will respond

ping 224.0.0.4

All OSPF routers configured for multicast will respond

ping 224.0.0.5

IP sockets connections

netstat -f inet -n

What is on port 1023

lsof -i:1023

Other resources