Solaris 10 multicast interface
déc 13th, 2007 by Prune

By default, applications bind the interface designated by the 224.0.0.0 route to do multicast subscription.
Sometimes you want to change that.
The best solution would be to be able to tell the application on which interface to do multicast. That’s what I did for Darwin Streaming Server (DSS). But sometimes you just can’t.
You can then use the route command to move the route to the right interface.
route -n delete -interface 224.0/4 -gateway 10.16.248.19 route -n add -interface 224.0/4 -gateway 10.16.240.19
For the moment I have no idea how to do this in a Solaris 10 Zone, as it seems you have insufficient privileges.
[EDIT]
My friend Akhen had this problem on a zone. Sun’s support was unaware of this and he ain’t got any answer yet (note to myself : think twice before paying for the next year platinum support fee).
He finaly found a solution : the 224.0.0.0 route is set, by default, to the first created interface. He just changed the order the interfaces are created in the zone, and he got his route on the right interface :
in /etc/zones/myzone.xml <network address="172.16.248.86" physical="e1000g0"> <network address="172.16.0.61" physical="e1000g32001"> <network address="172.16.244.86" physical="e1000g244001">
Now the route for the multicast is bounded to the correct interface:
224.0.0.0 240.0.0.0 172.16.248.43 e1000g0 1500* 0 1 U 0 0
[EDIT]
Just as a reminder, you can check which interface is used for multicast with netstat :
# netstat -rn Routing Table: IPv4 Destination Gateway Flags Ref Use Interface -------------------- -------------------- ----- ----- ------ --------- 10.16.248.0 10.16.248.19 U 1 6 bge0 10.16.240.0 10.16.240.19 U 1 0 aggr543510:1 10.16.244.0 10.16.244.19 U 1 72 aggr544510 10.16.20.0 10.16.20.51 U 1 9 aggr536510:1 172.31.252.0 10.16.251.254 UG 1 6 10.16.4.0 10.16.247.254 UG 1 142 224.0.0.0 10.16.248.19 U 1 0 bge0 default 10.16.23.254 UG 1 6 127.0.0.1 127.0.0.1 UH 3 132 lo0
You can also see which groups are subscribed :
# netstat -g Group Memberships: IPv4 Interface Group RefCnt --------- -------------------- ------ lo0 ALL-SYSTEMS.MCAST.NET 1 lo0:1 ALL-SYSTEMS.MCAST.NET 1 lo0:2 ALL-SYSTEMS.MCAST.NET 1 aggr536510:1 ALL-SYSTEMS.MCAST.NET 1 aggr543510:1 ALL-SYSTEMS.MCAST.NET 1 aggr544510 ALL-SYSTEMS.MCAST.NET 1 bge0 224.2.0.121 1 bge0 ALL-SYSTEMS.MCAST.NET 1