Correct Subnet Mask for 224.0.0.0 – Multicast IP Addressing

ipip addressipv4multicastsubnet

What is the best mask to use to allow computers to use the multicast IP address 224.0.0.0?

I've only seen IP addresses using the lower 8 bits, in my case I just see 22 and 251.

So my firewall uses an entry as follow:

-A INPUT -i eth1 -p udp -m udp -s 192.168.0.0/16 -d 224.0.0.0/24 -j ACCEPT

Now I have found other definitions that use a mask as small as 4 or 5 for the 224.0.0.0 address. What is the right mask according to the use of the 224.0.0.0 address scope definition?

Best Answer

You can't use any addresses from 224.0.0.0 (except for multicast) through 255.255.255.254, and 255.255.255.255 is a Limited Broadcast address.

Multicast addresses are 224.0.0.0/4. Masks are not used in multicast; you subscribe, individually, to multicast groups.

Reserved addresses are 240.0.0.0/4. While named "Class E" in the old class routing scheme, their use is undefined (they can't be used as source or destination addresses, and they can't be forwarded, per RFC 6980).

Related Topic