Multicast can be used to send IP packets to a group of interested receivers. Compared with broadcast, the packets are only sent to the members of a multicast group with the help of a multicast router.
Class D addresses (18.104.22.168 – 22.214.171.124) are assigned to multicast. So the first 4 bits of a multicast address should be 1110 and the remaining 28 bits represent different groups. Some addresses are reserved and have been assigned to specified groups. For example,
126.96.36.199 – all hosts group, all hosts configured IP multicast will join this group when an interface starts up.
188.8.131.52 – all multicast routers group
184.108.40.206 – IGMP Multicast router. An IGMP member report will be sent this addresses when a host joins a multicast group, then the multicast router can receive that report and maintain the membership of a group. We can capture the following packet when a program joins the multicast group 220.127.116.11.
Enabling multicast on an IP address
1. To check if multicast is enabled already on an IP address using the “ifconfig” command.
# ifconfig eth0 | grep -i multi UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Note: Please replace ethX with appropriate Ethernet. If multicast is enabled, a flag will be displaying.
2. To disable multicast on a specific ip/interface:
# ifconfig ethX -multicast
3. To enable multicast on a specific ip/interface :
# ifconfig ethX multicast
Listing IPs subscribed to a multicast group
In order to look at the IP address which has subscribed the multicast group, one can take a look at in the content of the following file
/proc/net/igmp. For example:
# cat /proc/net/igmp Idx Device : Count Querier Group Users Timer Reporter 1 lo : 1 V3 010000E0 1 0:00000000 0 2 eth0 : 1 V3 010000E0 1 0:00000000 0
Based on multicast application, IP will be receiving or transferring packets.