How to join a multicast group

Original link: https://www.zhihu.com/question/27233903 Zhihu User: Che Xiaopang

Multicast is also a kind of IP packet, it also has source IP address, destination IP address, the source IP address is the server IP address of the multicast source, and the destination address is a special IP address, which is located in 224.0.0.0 - 239.255.255.255, because 224.0.0.0/8 is used for local link, i.e. one-hop multicast, and 239.0.0.0/8 is a private multicast address, so the actual multicast address available on the Internet is 225.0.0.0/8 - 238.0.0.0 /8, this multicast address does not belong to any server or individual. It is similar to a WeChat group account. Any member (multicast source) sends a message (multicast data) to the WeChat group (multicast IP), and the members of this group (multicast receivers) will receive this message.

IPTV is the application of multicast:

A TV channel in IPTV corresponds to a multicast IP. Assuming that the multicast IP corresponding to CCTV1 = 238.1.1.1 and the IPTV program source IP = 1.1.1.1, it will be encapsulated and sent with 238.1.1.1 as the destination address. There are two problems to be solved here. solve:

The IPTV multicast source does not know where the users watching this program are?

Users watching this program do not know where the IPTV multicast source is?

The user's IPTV set-top box only knows that the program multicast address is 238.1.1.1, and it is not clear who is the program source (IP=1.1.1.1).

Therefore, an intermediary agency (RP), Rendezvous Point, RP point, and multicast convergence point is introduced, RP IP = 2.2.2.2, and the multicast source sends the multicast 238.1.1.1 to the RP through a unicast tunnel, abbreviated as Registration of multicast sources.

The set-top box is statically configured with RP IP = 2.2.2.2. Knowing that the RP will have multicast data, it applies to the RP ( 2.2.2.2) to join the 238.1.1.1 group, so the RP uses the registered multicast source data it has received. Sent to the set-top box, this is the RP-based tree, RPT.

The set-top box receives the first multicast packet, and after a closer look, the original multicast source is 1.1.1.1, so it sends an application to 1.1.1.1 to join 238.1.1.1, which is the source-based tree, SPT. Now that you have joined SPT, you do not need RPT, you can apply to RP to withdraw.

It is emphasized that once the multicast user (receiver) knows the multicast source, the task of the RP is completed. The existence of the RP is for the multicast receiver to discover the multicast source, and the multicast user will join the SPT with a better path. tree, it will apply for an RPT tree whose exit path is not optimal to avoid receiving two copies of multicast.

The above is the general process of multicast work. IPTV is an application of IGMPv2 and PIM SM mode.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325711474&siteId=291194637