Introduction to multicast programming under Linux

Source: Internet
Author: User
Tags join reserved switches

Here's how to start our multicast programming:

First, the concept of multicast

Multicast, also known as "multicast", the network of the same business type of host logically grouped, the data sent and received only in the same group, other hosts did not join this group can not send and receive the corresponding data.

When broadcasting on a wide area network, the switches and routers only copy and forward data to the host that needs to obtain the data. A host can request to join or exit a group from a router, and routers and switches in the network selectively replicate and transfer data, transferring data only to hosts within the group. This feature of multicast allows data to be sent to multiple hosts at once, while ensuring that no other communication is affected by other hosts that do not need to be joined to the group.

Compared to the traditional one-to-one unicast, multicasting has the following advantages:

Hosts with the same business join the same data stream, share the same channel, save bandwidth and the advantages of the server, with the advantages of broadcasting and no broadcast required bandwidth.

The total bandwidth of the server is not limited by client bandwidth. Because the multicast protocol is required by the receiver to determine whether to forward the data stream, the server-side bandwidth is constant, regardless of the number of clients.

Like unicast, multicast is allowed to be transmitted over the WAN, the Internet, and broadcasts are only on the same LAN.

The disadvantage of multicast:

Compared with unicast multicast, there is no error correction mechanism, which is difficult to compensate when errors occur, but it can be implemented in the application layer.

Multicast network support is flawed and requires the support of routers and network protocol stacks.

Multicast applications mainly include online video, online conferencing and so on.

Second, WAN multicast

Multicast addresses are specific and Class D addresses are used for multicast. Class D IP address is a multicast IP address, that is, the IP address between 224.0.0.0 and 239.255.255.255, and is divided into local connection multicast addresses, reserved multicast addresses and administrative rights multicast address 3 categories:

Local multicast address: Between 224.0.0.0~224.0.0.255, this is the address reserved for routing protocols and other purposes, and routers do not forward IP packets that belong to this range.

Reserved multicast addresses: Between 224.0.1.0~238.255.255.255, available on a global scale (such as the Internet) or network protocols.

Administrative rights multicast Address: Between 239.0.0.0~239.255.255.255, for use within the organization, similar to private IP address, not to the Internet, can limit multicast scope.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.