Configuring macOS server for multicast streams

If you are sending or receiving multicast streams from a macOS server, multicast fails if the receiving or sending interface is not the macOS default interface. If no default gateway is defined on a macOS server, the default interface is en0. To use a different interface than the default, change the default interface for your server.

Run the following commands:
$ route delete default new_interface_ip
$ route add default new_interface_ip

Example

Multicast Streams diagram
Server Name en0 IP address en5 IP address
a4_1 10.211.1.61 10.215.1.61
a4_2 10.212.1.62 10.216.1.62

In this example, server a4_1 acts as the multicast receiver and sends the stream over UDP to server a4_2. Server a4_2 then broadcasts the multicast streams to waiting receivers. Since both servers are using a nondefault interface (not en0) to receive and send the multicast streams, you must set the interface that receives and sends the multicast streams as the server default interface.

Run the following command on a4_1:
$ route delete default 10.215.0.1
$ route add default 10.215.0.1
Run the following command on a4_2:
$ route delete default 10.216.0.1 
$ route add default 10.216.0.1
Note: The interface IP addresses 10.215.0.1 and 10.216.0.1 routes are the primary gateways and route all 10.215.0.* and 10.216.0.* traffic.