Implementation of multicast and issues needing attention

Source: Internet
Author: User

The implementation of multicast and the issues that need to be paid attention to have studied the problem of Network Multicast for a short period of time. I felt very touched and wrote my own experiences, we hope that we can avoid detours if necessary. Let's talk about the principle first. I think this still needs to be discussed. There are three transmission concepts in the Network: unicast, multicast, broadcast, unicast, and broadcast. We may all know that unicast and connection are one-to-one, broadcast is sent to all users in a network. Here we only talk about multicasting. I will not talk about the benefits of Multicasting and save bandwidth or anything. In fact, I personally think that unicast Multicast can all be viewed as broadcasting in a sense. unicast can be understood as having only one user on the network, multicast can be understood as a restricted set of broadcast users (a specified group of users ). There are five types of IP addresses in the Network: A, B, C, D, and E. The IP addresses are divided into two parts, IP = Category + network number + host number category number network number host number Class A, 0 1 ~ 126 0 ~ 255 0 ~ 255 1 ~ 254B class, 10 128 ~ 191 0 ~ 255 0 ~ 2551 ~ 254C class, 110 192 ~ 223 0 ~ 255 0 ~ 255 1 ~ 254D class, 1110 224 ~ 239 0 ~ 255 0 ~ 255 1 ~ 254E class, 1111 240 ~ 255 0 ~ 255 0 ~ 255 1 ~ 254 typographical layout is not what I want. Check the figure. For Class A addresses, 10.0.0.0 ~ 10.20.255.255 is a private address, 127.0.0.0 ~ 127.255.255.255 is the loopback address. The host ID 0 indicates a network. The host ID 1 indicates the broadcast address. The class B address is 172.16.0.0 ~ 172.31.255.255 is a private address. host ID 0 indicates a network, host ID 1 indicates a broadcast address, and class C address: 192.168.0.0 ~ 192.168.255.255 is a private address (you should be familiar with this). host ID 0 indicates a network, and host ID 1 indicates a broadcast address. MAC address corresponding to multicast: 01-00-5e-xx-xx-xx ing relationship: multicast is only received by the port of interest. How does he know these ports? Class D address. Here, we must understand the concept of multicast groups. Multicast data is sent to a multicast group. In this way, all multicast group members will receive data. Someone asks, there are so many multicast groups on the network, how do I know the group to be sent. Here is the class D address. The class D address acts as the Multicast Group Identifier. Remember, it is only the identifier. It can be understood as the destination address of the multicast group and the ID of the multicast group. All Hosts can be added to multicast groups, that is, they are marked as an ID of the multicast group. How to join multicast groups is a technical issue. The next problem is that if a host in the United States is added to this multicast group, a host in the UK is also added to the same multicast group, my source is a host on the Chinese side, so how did he send it? How to route data packets to a subnet router (group membership protocol between hosts and routers) and to a public network (Multicast Routing Protocol between routers and routers) (forwarding rules), how data is accepted and forwarded by the destination subnet router. First, how can this data packet reach the vro of your subnet? The answer is the IGMP protocol. IGMP (Internet Group Management Protocol) is an Internet multicast Management Protocol. It is the only signaling protocol between the host and the router. There are currently three versions: V1, V2, and V3 (the main difference is that V1, V2, and V2 are automatically removed from multicast groups, while V1 is not ). by testing with wireshark software, you will find that most of the current network's multicast protocol packages are V2. The host sends an IGMP packet to the local router and adds the corresponding multicast address port (defined by yourself ). In this way, the host can be added to multicast, but how does the incoming multicast packet know who to send the packet? Or IGMP! When a packet is found, the local router sends a query packet (IGMP) to the host in the local subnet ), when a host is added to a multicast group, a reply is sent to the router (IGMP packet), which then forwards the packet. What if the host needs to leave the multicast group? IGMP too! The host only needs to send an IGMP packet to the router. After data is sent to a vro, Which router forwards data packets to other routers )? The answer is: the intra-domain multicast routing protocol and the Inter-Domain multicast routing protocol. As a matter of fact, we do not need to distinguish between the domain and the intra-Domain Routing. We only need to care about it. data packets can be freely forwarded on the Internet. What you need to know here is the two domain routing protocols, PIM-SM, PIM-DM, DVMRP (the main difference is the difference between dense mode and sparse mode ). The forwarding between routers requires these routing protocols. I will not talk about the principles of these routing protocols. These protocols are mainly used for forwarding, and the neighbors discover some differences, such as pruning strategies. Multicast forwarding uses a reverse path forwarding policy (RPF). The RPF protocol determines whether to forward packets and discard them. The router checks the source address of the multicast packet. If the information packet arrives on the interface that can return to the source site, RPF checks successfully. If RPF checks fail, the information packet is discarded. At this time, you may have some ideas about this concept. multicast is also amazing. For example, it saves a lot of bandwidth. After all, you only need to send one copy, but it is acceptable to many users. It is much better than unicast, so you may ask, should the multicast application be very wide? The answer is yes. There are many multicast applications, such as multimedia conferences and online games. But there is a problem that is really fatal now! Application condition: this function is not enabled on the vro !!! Generally speaking, we can talk about the process of multicast routing, where data packets are forwarded from the source port through the router (this should be because all routers will pass through, but all Oh ), then, the target multicast member is forwarded to him. At this time, you may find a problem. If multicast is applied on a large scale, there will be a lot of such packets on the network. After all, anyone can create multicast groups and then send them, the router needs to forward data. I originally wanted to implement a multicast function similar to a video conferencing application. However, during the test, I found that data packets cannot be pushed out of the Intranet, it can only be transferred within the LAN (it can be received within the LAN ). Later I found that although the vro has this function, it is disabled by default. I remember when I checked this information, I posted a post on a BBS configured by a router administrator. Someone replied: if the administrator enables this function, he can only say he is ill. As you can see, the vro currently supports multicast. So here, I just want to remind my friends that the vro does not support this well. If you want to do so, consider it more. Maybe I do not understand it. If I have made this, I hope I can provide some ideas.

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.