Computer Network (8)-Multicast and IGMP Protocol

In the transmission of network datagrams, in addition to unicast and broadcast, there is also a multicast. The emergence of multicast has solved the problem of unicast squeezing bandwidth too much and broadcasting accuracy is not enough.

For example, there are 50 hosts in a local area network, of which 30 hosts need to watch the same live broadcast, and the other 20 hosts need to watch another live broadcast. If broadcast transmission is used, the two live broadcasts cannot be distinguished. If unicast is used, the source host needs to transmit 50 video resources at the same time, which is inefficient and has a high congestion rate. Multicast can not only transmit video in a differentiated manner, but can also send only one piece of video data at the source site. When the data is about to reach the local area network, it will be copied and distributed to save bandwidth.

The IGMP protocol is a multicast protocol at the network layer, which runs between the host and the multicast router to effectively manage multicast.

1. Multicast

1. What is multicast

Multicast realizes a point-to-multiple network connection between the sender and each receiver. If a sender transmits the same data to multiple receivers at the same time, only one copy of the same data packet is required. When some specific users in the network require specific information, the multicast source sends the information only once, and the multicast router uses the multicast routing protocol to establish a tree-type route for the multicast data packet, and the transmitted information diverges as far as possible Junkou only began to copy and distribute.

2. The role of multicast

Multicast solves the problem of low unicast and broadcast efficiency, improves data transmission efficiency, and reduces the possibility of congestion in the backbone network.

3. IP multicast address

The IP multicast address allows the source device to send packets to a group of devices. Devices belonging to the multicast group will be assigned a multicast group IP address.

Multicast address-Class D address. In the section on IP addresses, we talked about address classification. Among them, there is a class D address, which is a multicast address.

Since class D addresses all start with 1110, the range of class D addresses is from 224.0.0.0 to 239.255.255.255. A class D address represents a multicast group and can only be used as the destination address of the group. The source address is always unicast. address.

4. Multicast features

​ 1) Multicast datagrams are "best effort delivery" and do not provide reliable delivery. They are used in UDP.

​ 2) ICMP error messages are not generated for multicast datagrams.

​ 3) Not all Class D addresses can be used as multicast addresses

2. IGMP protocol

After understanding the background and role of multicast, we should note that the establishment of multicast requires the host's IP software to perform multicast extensions so that the host can send and receive multicast packets on the local network. However, this alone is not enough, because multicast forwarding across multiple networks must rely on routers. In order to establish a multicast forwarding route, a router must understand the distribution of each group member on the Internet. This requires that the host must be able to notify the local router of the multicast group it is in. This is also the basis for establishing a multicast forwarding route. In order to coordinate and manage all the problems of multicast forwarding, the IGMP protocol came into being. The IGMP protocol is one of the important standards in TCP/IP, and all IP multicast systems must support the IGMP protocol.

IGMP information is encapsulated in IP packets, and its IP protocol number is 2.

If a host wants to receive multicast packets sent to a specific group, it needs to monitor all packets sent to that specific group. In order to solve the path selection of the multicast datagram on the Internet, the host needs to join or leave a group through the multicast router on its subnet, and the multicast uses IGMP to complete this task. In this way, the multicast router can know the members of the multicast group on the network, and thereby decide whether to forward the multicast data packet to their network. When a multicast packet receives a multicast packet, it checks the multicast destination address of the packet and forwards it only if there are members of that group on the interface

IGMP provides the information needed in the final stage of forwarding multicast packets to the destination, and realizes the following bidirectional functions:

  1. The host informs the router through IGMP that it wants to receive or leave a specific multicast group.
    The information needed in the later stage realizes the following two-way functions:

  2. The host informs the router through IGMP that it wants to receive or leave a specific multicast group.

  3. The router periodically queries whether the multicast group members in the LAN are active through IGMP, so as to realize the collection and maintenance of the group membership of the connected network segment.

Guess you like

Origin blog.csdn.net/weixin_44580146/article/details/106938731