One, the introduction

Three types of IP addresses were provided at the beginning of the IP layer introduction: unicast, broadcast, and multicast. These communication modes are understood as: unicast address is one-to-one communication, broadcast is one-to-many communication, and multicast is one-to-many communication. Multicast is the communication of a specific set of communication agents. Broadcast and multicast only apply to UDP. The typical unicast mode is TCP.

Second, the radio

Sometimes a host sends frames to all other hosts on the network. This is broadcast. There are four address types for broadcast:

  • The broadcast address is 255.255.255.255. This address is used as the destination address of IP packets during host configuration. At this time, the host may not know the network mask of its network, or even its IP address.
  • Broadcast to the network: address with all 1 host numbers.
  • Broadcast to a subnet: an address with all 1 host numbers and a specific subnet number.
  • Broadcast to all subnets: The subnet id and host ID of the broadcast address of all subnets are all 1.

Third, the multicast

Multicast occurs because data needs to be transmitted to multiple destination addresses. Currently, most network cards are configured to receive frames from destination multicast addresses or some subnet multicast addresses. For the Ethernet, if the least significant byte of an address is set to 1, the address is a multicast address, which can be expressed as 01:00:00:00 in hexadecimal notation (Ethernet broadcast address ff:ff:ff:ff:ff:ff is a special case of Ethernet multicast address).

1. Multicast group address

Multicast IP addresses are class D IP addresses, as shown in Figure 1:

For multicast IP address to multicast physical address (MAC) translation as follows:

  • IANA has an Ethernet address block with a high 24bit of 00:00:5E (in hexadecimal notation), which means that the address block has addresses ranging from 00:00:5E :00:00:00 to 00:00:5E :ff:ff:ff. IANA allocates half of these to multicast addresses. To specify a multicast address, the first byte of any Ethernet address must be 01, which means that the Ethernet addresses corresponding to IP multicast range from 01:00:5E :00:00:00 to 01:00:5E :7f:ff:ff
  • This address assignment will map the 23bit in the Ethernet multicast address to the IP multicast group number by mapping the lower 23bit in the multicast group number to the lower 23bit in the Ethernet address.
  • The maximum 5 bits of the multicast group number are ignored during the mapping, so the multicast group corresponding to each Ethernet multicast address is not unique.

Multicast on a single physical network is simple. The multicast process specifies the destination IP address as a multicast address, the device driver translates it into the corresponding Ethernet address, and sends the data out.

Principle 2.

Multicast, also known as “multicast,” means that packets sent by one host can be received by several other qualified hosts at the same time. The host and the qualified hosts form a group, and their communication in the group is broadcast. Multicast works, to a certain host on the network card set to multicast transmission work mode, its not filter with a certain specified multicast delivery address as objective physical address data frame, in this way, the host can receive at the same time in the driver to transfer the multicast address as objective physical address data frame, The drivers of other hosts cannot receive it, and these hosts logically form a “multicast” group. Using this technique, compared with broadcasting, can effectively reduce the burden of other hosts on the network other than the “multicast” group, because the data sent to the “multicast” group will not be transmitted to their drivers for processing, avoiding unnecessary waste of resources.

3. The IGMP protocol

Internet Group Management Protocol (IGMP) A communication Protocol used to manage network Protocol multicast Group members. IP hosts and neighboring routers use IGMP to create group members for multicast groups. Like ICMP for unicast connections, IGMP is an integral part of IP multicast specifications. IGMP is a layer 3 protocol of the Open System Link (OSI) module. It is used by an IP host to report the number of multicast members of the host to a nearby multicast router.

  • This is IGMP version 1
  • IGMP type: 1 indicates the query packet sent by the multicast router. 2 indicates the report packet sent by the host.
  • Checksum: ICMP

See here, do you want to scan the QR code to follow the wechat public account Linwan Village Dragon cat.