In contrast to unicast messages, a sender can use multicast messages to reach more than one receiver. However, unlike with broadcast messages, a selection takes place because each recipient must join a multicast group to receive such messages. A sender does not log in, but it is possible to receive locally at the same time.
Multicast messages save on system resources and bandwidth in the network, especially when an application is involved for which there is only one send direction. Practical application scenarios for multicast messages are file streams, e.g. for music or video, video conferences or news or stock exchange tickers.
Multicast messages are transferred using datagram packets, in other words using an insecure service. The application must therefore guarantee that the data reaches the receiver with its integrity ensured. And it must make sure that the data is only supplied to authorized receivers.
Prerequisites
Separate areas are used for multicast message transfer in both the IPv4 address space and the IPv6 address space. The communications systems used, such as BCAM in BS2000, must permit and support multicast operation.
Multicast operation with the default settings is permitted in BCAM. If there is any doubt, the configuration should be checked, and if necessary intervention should take place on an administrative level. Please refer to the “BCAM Volume 1/2” manual for details.
If the messages are to leave the local area, multicast-capable routers are also required which must be configured accordingly.
SOCKETS functions for multicast support
SOCKETS(BS2000) offers functions for transferring and receiving multicast messages and for logging onto or logging off from multicast groups.
The address range 224.0.0.0 through 239.255.255.255 is provided for IPv4; addresses 224.0.0.0 through 224.0.0.255 are reserved for local applications and are not routed.
The multicast address range in IPv6 begins with the prefix FF, followed by 4-bit flags and a 4-bit scope. The precise assignment is described in the RFC “IP Version 6 Addressing Architecture,” currently RFC 4291.
Reserved multicast addresses in IPv4 and IPv6 can be viewed at the Internet Assigned Numbers Authority (IANA).
Socket options for AF_INET
In the AF_INET address family, the transfer of multicast messages is supported by the following socket options:
IP_ADD_MEMBERSHIP: log on to a multicast group.
After logging on, data of this group is delivered.IP_DROP_MEMBERSHIP: log off from a multicast group
IP_MULTICAST_IF: display or define the sender interface
IP_MULTICAST_TTL: display or define the multicast hop limit
IP_MULTICAST_LOOP: reception is possible on the local sending host
Socket options for AF_INET6
In the AF_INET6 address family, the transfer of multicast messages is supported by the following socket options:
IPV6_JOIN_GROUP: log on to a multicast group.
After logging on, data of this group is delivered.IPV6_LEAVE_GROUP: log off from a multicast group
IPV6_MULTICAST_IF: display or define the index of the sender interface
IPV6_MULTICAST_HOPS: display or define the multicast hop limit
IPV6_MULTICAST_LOOP: reception is possible on the local sending host