IP multicast and multicast protocols

Source: Internet
Author: User

On the Internet, multimedia services such as streaming media, video conferencing, and video on demand are becoming an important part of information transmission. Point-to-point transmission unicast methods cannot adapt to this type of business transmission feature-single-point transmission and multi-point receipt, because the server must provide each receiver with an IP packet copy with the same content, at the same time, packets with the same content are repeatedly transmitted on the network, occupying a large amount of resources. 1.1. Although IP broadcast allows a host to send an IP packet to all hosts in the same network, network resources are wasted because not all hosts need these packets. In this case, multicast came into being. It solves the problem that a host sends messages to multiple specified recipients. In 1989, IETF defined the multicast method on the Internet through RFC1112.
 

Fig 1.1


1. IP Multicast

IP multicast refers to the transmission of an IP packet to a "Host group". A host group containing zero or more hosts is identified by a separate IP address. A host group address is also called a multicast address or a class D address. In addition to the target address, the multicast packet is no different from the common packet. The network tries its best to send the multicast packet, but it does not guarantee delivery.
The members of the Host group can change dynamically. The host has the right to join or exit a host group. A host can be added to multiple host groups or sent to a host group that you are not added. There are two types of host groups: Permanent Group and temporary group. The IP address of the Permanent Group is a reserved IP address assigned by the Internet management organization. Temporary Group addresses use non-reserved Class D addresses except Permanent Group addresses.
IP multicast groups are forwarded over the Internet by vrouters that support multicast. The IP multicast group sent by the host is received by all the host group members in the subnetwork, at the same time, the multicast router directly connected to the subnet forwards the multicast packets to all networks that contain the group members. The range in which a multicast packet is transmitted is determined by the lifetime value (TTL, Time-to-Live) of the message. If the TTL value is equal to or less than the TTL Threshold value of the configured vro port (TTL Threshold ), the router no longer forwards the message.
2. multicast address

IP multicast addresses, or host Group addresses, are marked by Class d ip addresses. The maximum four bits of class d ip addresses are "1110", which ranges from 224.0.0.0 to 239.255.255.255. As mentioned above, some class D addresses are reserved and used as Permanent Group addresses. The address ranges from 224.0.0.0-224.0.0.255. Important addresses include:
224.0.0.1-All multicast-enabled hosts in the CIDR Block
224.0.0.2-All vrouters that support multicast in the CIDR Block
224.0.0.4-All DVMRP routers in the CIDR Block
224.0.0.5-All OSPF Routers
224.0.0.6-All OSPF assigned Routers
224.0.0.9-All r00002 Routers
224.0.0.13-All PIM Routers
The multicast address of the temporary host group is selected by the network administrator. It must be ensured that no other host group uses the multicast address within a certain range.
Layer-3 multicast addresses can be derived from IP multicast addresses. The calculation method is to copy the last 23 bits of the IP address to the last 23 bits of the MAC address, and then set the position above the 23 bits to 0. The first 24 digits of the MAC address must be 0x01-00-5E. For example, if the IP address of the multicast instance is 224.0.1.128, The hexadecimal value is 0xE0-00-01-10, the minimum 23 bits are 0x00-01-10, and the calculated MAC address is 0x01-00-5E-00-01-10.
3. Internet Group Management Protocol (IGMP)

The IGMP protocol evolved from the host Membership Protocol. Currently, there are two versions: IGMPv1RFC1112 and IGMPv2 (RFC2326 ). The host uses the IGMP message to advertise the Host group address of the local multicast router that wants to receive multicast traffic. If the host supports IGMPv2, it can also advertise the multicast router to exit a host group. The multicast router maintains a host group member table for each port through the IGMP protocol, and regularly queries the Host group members in the table to determine whether the host group is alive.

IGMP messages are transmitted in IP packets. The message 1.2 of IGMPv1 is shown. IGMPv1 defines two message types: host member inquiry and host Member report. When a host wants to introduce a multicast traffic, it sends a "host Member Report" message to the local multicast router to notify the multicast address to be received. After receiving the "host Member Report" message, the multicast router adds the host to the specified host group and sets the multicast address to 224.0.0.1 within the specified period (representing all hosts that support multicast) send the "host member inquiry" message. If the host wants to continue receiving multicast traffic, it must send the "host Member Report" message.
 

The message 1.3 of IGMPv2 is shown in. Unlike IGMPv1, it integrates the version field and Message Type field, and makes unused fields the "maximum response time" field. The IGMPv2 Message Type field defines four types of messages:

Fig 1.3


0x11-member inquiry
0x12-IGMPv1 member report
0x16-IGMPv2 member report
0x17-exit the Host group

IGMPv2 is forward compatible with the IGMPv1 protocol. IGMPv1 devices can receive messages that process IGMPv2. In IGMPv2, the router is allowed to perform "member inquiry" on the specified host group address. hosts outside the Group do not have to respond. If a host wants to quit, it can actively send a "" message to the router, instead of passively exiting as in IGMPv1.
4. CGMP Protocol

In a switched network, a layer-2 switch may not know which port has multicast groups, nor can it find the table items of multicast MAC addresses in its source MAC address table. As a result, the vswitch can only forward multicast packets to all ports. The advantage of multicast is greatly reduced. Therefore, Cisco proposes the CGMP protocol to allow the multicast router to configure the multicast forwarding table of the switch, thus completely solving the multicast problem in the switching network.
The full name of CGMP (Cisco Group management protocol) is the Cisco Group management protocol. The CGMP router is used to add the host to or exit the multicast Group IGMP Message notification switch, the vswitch adds or deletes the port of the host from the multicast Forwarding Table Based on the message. Through the use of CGMP protocol, a layer-2 switch can grasp the status of the host that receives multicast, thus improving the performance and Utilization of the entire network.
5. Distribution Tree)

When transmitting multicast groups, assign a vro to construct a tree that connects all multicast group members. Based on this tree, the router obtains a unique path of the forwarding group. This tree is called a distribution tree. The distribution tree must also be dynamically updated because members can dynamically join and exit.
Based on different constructor methods, the Distribution Tree is divided into Source Distribution Tree and Shared Distribution Tree ). The source distribution tree uses the multicast source as the root node to construct a spanning tree for all multicast group members, also known as the shortest path tree SPT ). Shared distribution Tree, also known as RP Tree or core-based Tree CBT, Core_based Tree ). The constructor uses a specified vro in the network as the root node. The vro is called a collection point or a central point. The Node generates a tree containing all group members. When using the shared distribution tree, the multicast source must first send the multicast group to the consortium vro and then forward it to other group members.
6. Multicast Routing Protocol

The main task of the multicast routing protocol is to construct a multicast distribution tree so that multicast groups can be transmitted to the corresponding multicast group members. Based on the distribution and usage of multicast members in the network, multicast routing protocols are divided into two types: dense mode routing protocol (DM) and Sparse Mode routing protocol (SM ).
The DM routing protocol is usually used in a network environment where many multicast members are concentrated and most users of the network have sufficient bandwidth, such as the LAN of a company or campus. Therefore, DM routing uses the method of periodically broadcasting multicast packets to maintain the multicast distribution tree. The DM protocol only uses the source distribution tree SPT). multicast traffic is broadcast to all multicast routers in the network. DM routing protocols include:
DVMRP: Distance Vector multicast routing protocol. This is a multicast routing protocol based on distance vector algorithms. Currently, it has been replaced by PIM and MOSPF.

MOSPF: multicast OSPF protocol.

PIM-DM: Protocol-Independent Multicast Protocol-intensive mode. It does not need an independent multicast protocol. It uses the route table of the unicast routing protocol on the vro for reverse route forwarding check to obtain the multicast distribution tree. Compared with the other two Protocols, the overhead of the PIM-DM is much smaller, which is used in the environment where the Multicast Source and target are very close, the number of receivers is greater than the number of senders, and the multicast traffic is relatively large. In the case of sparse distribution in the network and insufficient bandwidth in the network, such as the WAN environment, the SM routing protocol can be used. Therefore, the SM Routing Protocol sets up and maintains the distribution tree selectively, starting from the empty tree. Only when explicitly requested members are added to the distribution tree is modified. The SM routing protocols include:
CBT: the central distributed tree protocol RFC 2201 ). The protocol constructs a shared distribution tree based on a central router. All multicast traffic is forwarded through this central router.

PIM-SM: Protocol-Independent Multicast Protocol-Sparse Mode. The working principle is similar to that of PIM-DM, but it is specially optimized for sparse environments. This method is applicable to scenarios where the number of receivers in a multicast group is small and the number of multicast traffic is intermittent. Unlike the broadcast mode of the PIM-DM, The PIM-SM defines a set point (RP) where all receivers are registered in the RP and multicast groups are forwarded to the receiver by the RP.

7. Summary

Multicast capabilities that a single data stream can send to multiple clients have become a transmission method for most multimedia applications. Multicast technology uses an IP address to send IP data packets to user groups. IP multicast uses a specially defined destination IP address and destination MAC address. IGMP allows clients to join and exit multicast groups. CGMP enables the vro to configure the multicast forwarding table for the vswitch and informs the current multicast Member of the vswitch. Assign a vro to construct a multicast distribution tree based on the distribution of multicast members in the network and the use of the dense mode DM or Sparse Mode SM multicast routing protocol, the distribution tree identifies a unique path between the source subnet and multicast group to improve data transmission efficiency.


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.