|Why multicast||Multicast on LAN||Multicast on WAN||What is multicast||Multicast Client||Multicast Server|| ||Programming Documentation||Network Numbering Documentation|
Multicast is useful when you have to transmit the SAME message to more than one host.
Usually the client that send multicast does not know how many
servers will really receive his packets.
When talking about client-server in network, the client sends the request, the server receives the request and might send back an answer.
Since multicast is based UDP, the transmission is by default not reliable.
The advantage of using multicast instead of broadcast is that only
interested hosts will get the message, and the message should be transmitted
only once for many clients (saves a lot of bandwith).
Another advantage is the possibility of sending packets larger than interface MTU
This is topic is quite complex, but we can for simplicity devide LANs in 3 kind:
The first 2 types of LANs are the easiest to explain, since the behaviour for multicast is exactly the same; multicast is transmitted over all network segments.
In the third case where the LAN has IGMP aware switches, and IGMP support is enabled,
multicast packets will be transmitted only on segments where hosts have requested it.
Other segments will not see this kind of traffice until one of the hosts requests it.
Of course packets sent to 18.104.22.168/22.214.171.124 could be observed on all segments, since these addresses have a special meaning ( Reserved Multicast IP addresses)
... Still Working ....
Multicast is a kind of UDP traffic similar to BROADCAST, but only hosts that have explicitly requested to receive this kind of traffic will get it. This means that you have to JOIN a multicast group if you want to receive traffic that belongs to that group.
IP addresses in the range 126.96.36.199 to 188.8.131.52 ( Class D addresses) belongs to multicast. No host can have this as IP address, but every machine can join a multicast address group.
----------- cut here ------------------ ----------- cut here ------------------This is a sample multicast client without error handling
----------- cut here ------------------ ----------- cut here ------------------
Possible differences might be noted between different flavour of Unix.
In some implementation you might need to call setsockopt before calling bind.
Note that we do not BIND the server to a specific interface, but we JOIN the multicast group ( IP_MULTICAST_JOIN ) on a specific interface
The same appens on the client side, we do not BIND to an interface but we set the transmitting interface with IP_MULTICAST_IF.
|Class Name||Address Bits||From ... To||Pourpose|
|Class A||0||0.0.0.0 - 127.255.255.255||Public IP address|
|Class B||10||184.108.40.206 - 220.127.116.11||Public IP address|
|Class C||110||192.0.0.0 - 18.104.22.168||Public IP address|
|Class D||1110||22.214.171.124 - 126.96.36.199||Multicast IP Addresses|
|Class E||11110||240.0.0.0 - 255.255.255.255||Reserved|