Linux 7 Multicast Configuration: Difference between revisions
Line 33: | Line 33: | ||
==Multicast Routing== | ==Multicast Routing== | ||
Configure multicast routing, ensuring the multicast traffic is routed to the appropriate interface. | Configure multicast routing, ensuring the multicast traffic is routed to the appropriate interface. The route we need is 224.0.0.0/4. | ||
<pre> | |||
</pre> | |||
For more details, see [[Linux_Routing_Configuration#Adding_Multicast_Routing_to_a_Specific_Network_Interface|Configure Multicast Routing]]. | |||
* If iptables runs on the system, allow multicast traffic for the interface that will handle multicast traffic: [[Iptables_Command_Line_Tool_Examples#Multicast|Configure iptables to allow Multicast]] | * If iptables runs on the system, allow multicast traffic for the interface that will handle multicast traffic: [[Iptables_Command_Line_Tool_Examples#Multicast|Configure iptables to allow Multicast]] |
Revision as of 17:33, 21 March 2017
Internal
Concepts
Procedure
Multicast at Kernel Level
Make sure multicast is enabled at kernel level.
To compile multicast support into the kernel, CONFIG_IP_MULTICAST must be present in the kernel configuration file. The kernels are usually compiled with multicast support. If netstat -ng shows multicast groups being registered to, it means multicast support is available in kernel. For more details, see Troubleshooting below.
Multicast Support at Interface Level
Verify that the network interface you plan to use for multicast traffic has multicast enabled, and if not, turn it on. This can be done with the ip utility, as described here Change MULTICAST Flag on Device.
ip addr
Look for MULTICAST flag.
To turn on:
ip link set dev <interface-name> multicast on
Multicast Routing
Configure multicast routing, ensuring the multicast traffic is routed to the appropriate interface. The route we need is 224.0.0.0/4.
For more details, see Configure Multicast Routing.
- If iptables runs on the system, allow multicast traffic for the interface that will handle multicast traffic: Configure iptables to allow Multicast
- Test it. For more details see the Troubleshooting section.
/proc
/proc/net/dev_mcast
Contains Layer2 multicast groups which a device is listening to (interface index, label, number of references, number of bound addresses).
/proc/net/igmp
Contains IPv4 multicast groups joined by this host.
/proc/net/igmp6
Contains IPv6 multicast groups joined by this host.
Troubleshooting
Display Multicast Group Membership Information
netstat -g
displays multicast group membership information for IPv4 and IPv6. Optionally use -n to prevent DNS lookups (faster).
The same information can be obtained from /proc:
cat /proc/net/dev_mcast cat /proc/net/igmp cat /proc/net/igmp6
For more details on these files see /proc above.
ip has multicast querying abilities. See:
Ping
Send Multicast Traffic
See
Organizatorium
TODO http://lartc.org/howto/lartc.multicast.html
echo 1 > /proc/sys/net/ipv4/ip_forward