Communication method of network device, network device and storage medium
By adding an extended field of upstream network device information to the query message, downstream devices can distinguish the communication priority of identifying upstream devices and implement corresponding policies, solving the problems of wasted network bandwidth and the inability to watch multicast videos caused by multiple upstream devices.
Patent Information
- Application Number
- CN202010567922.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-19
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2040-06-19
AI Technical Summary
In the case of multiple upstream network devices, downstream network devices cannot distinguish and identify upstream devices, resulting in multiple forwarding of the same multicast traffic, resulting in wasted network bandwidth, and user terminals may not be able to watch multicast videos.
By adding an extended field to the query message, including information about the upstream network device, the downstream device can determine the communication priority of the upstream device and execute the corresponding communication policy to avoid duplicate forwarding.
It effectively avoids waste of network bandwidth, ensures that user terminals only receive one multicast traffic, and avoids being unable to watch multicast videos because they do not support duplicate processing.
Smart Images

Figure CN113824754B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a communication method for a network device, a network device, and a storage medium. Background Art
[0002] The Multicast Listener Discovery Protocol (MLD) and the Internet Group Management Protocol (IGMP) were originally designed for the discovery and management of multicast users. With the development of technology, their applications have been expanded. For example, in the field of Bit Index Explicit Replication (BIER) technology, MLD and IGMP are used for overlay layer protocols to discover bit forwarding egress routers (BFER) at bit forwarding ingress router (BFIR) nodes.
[0003] When the network environment is simple, the MLD or IGMP querier sender can be directly used as the inbound upstream network device of the downstream network device BFER. However, when there are multiple upstream network devices in the network, if the downstream network device BFER does not distinguish and identify them, multiple upstream network devices will forward multiple copies of the same multicast traffic to the downstream network device BFER, resulting in a waste of network bandwidth. If the user's terminal does not support duplicate processing, it may even lead to the inability to watch multicast video. Summary of the invention
[0004] Based on this, the embodiments of the present application provide a communication method of a network device, a network device and a storage medium, which can distinguish upstream network devices and provide technical support for avoiding waste of network bandwidth and avoiding receiving multiple streams on the user side.
[0005] In a first aspect, the present application provides a communication method for a network device, the method comprising:
[0006] When a multicast source is detected, a query message is sent, wherein the query message includes a Multicast Listening Discovery Protocol MLD query message or an Internet Group Management Protocol IGMP query message, wherein the MLD query message or the IGMP query message includes an extension field, wherein the extension field includes information of an upstream network device for a downstream network device to determine the communication priority and corresponding communication strategy of the upstream network device.
[0007] In a second aspect, the present application provides a communication method for a network device, the method comprising:
[0008] Receiving query messages sent by more than two upstream network devices, the query messages including a Multicast Listening Discovery Protocol MLD query message or an Internet Group Management Protocol IGMP query message, the MLD query message or the IGMP query message including an extension field, and the extension field including information of the upstream network device;
[0009] Determine the communication priorities of two or more upstream network devices according to the information of the upstream network device in the query message;
[0010] According to the communication priorities of the two or more upstream network devices, corresponding communication strategies are respectively executed on the two or more upstream network devices.
[0011] In a third aspect, the present application provides a network device, comprising a communication circuit, a memory, and a processor, wherein the communication circuit is used for communication; the memory is used to store a computer program; the processor is used to execute the computer program and implement the communication method of the network device as described in the first aspect above when executing the computer program.
[0012] In a fourth aspect, the present application provides a network device, comprising a communication circuit, a memory, and a processor, wherein the communication circuit is used for communication; the memory is used to store a computer program; the processor is used to execute the computer program and implement the communication method of the network device as described in the second aspect above when executing the computer program.
[0013] In a fifth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor enables the processor to implement the communication method of the network device as described in the first aspect above.
[0014] In a sixth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor enables the processor to implement the communication method of the network device as described in the second aspect above.
[0015] The embodiment of the present application provides a communication method, a network device and a storage medium, wherein a method of a network device includes: after detecting a multicast source, sending a query message, the query message includes an MLD query message or an IGMP query message, the MLD query message or the IGMP query message includes an extension field, and the extension field includes information of an upstream network device for the downstream network device to determine the communication priority and corresponding communication strategy of the upstream network device. Since the extension field of the query message has the information of the upstream network device, multiple upstream network devices can be distinguished in this way; the information of the upstream network device is used for the downstream network device to determine the communication priority and corresponding communication strategy of the upstream network device, and in this way, half of the technical support is provided for the downstream network device to determine the communication priority and corresponding communication strategy of the upstream network device. Another method of a network device includes: receiving query messages sent by more than two upstream network devices; determining the communication priority of more than two upstream network devices according to the information of the upstream network device in the query message; and executing corresponding communication strategies for the more than two upstream network devices respectively according to the communication priority of the more than two upstream network devices. Since the query message of the upstream network device carries the information of the upstream network device, the downstream network device can determine the communication priority of more than two upstream network devices according to the information of the upstream network device, and then respectively execute the corresponding communication strategy for more than two upstream network devices. In this way, the communication priority of different upstream network devices can be distinguished and identified for the downstream network device, and the corresponding communication strategy can be respectively executed accordingly. The other half of the technical support is provided to avoid the waste of network bandwidth and to avoid the user side receiving multiple streams and the terminal being unable to watch the multicast video due to not supporting repeated processing. For example: for the multicast traffic of the same multicast group or the same multicast source group, the downstream network device can choose to send a join message to the upstream network device with a high communication priority, and send a leave message to other upstream network devices with a low communication priority. In this way, the downstream network device can only receive one multicast traffic, which can avoid the waste of network bandwidth, and only forward one multicast traffic to the terminal, which can avoid the situation where the user side receives multiple streams and the terminal is unable to watch the multicast video due to not supporting repeated processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 It is a flow chart of an embodiment of a communication method of a network device of the present application;
[0017] Figure 2 This is a flow chart of another embodiment of the communication method of the network device of the present application.
[0018] Figure 3 It is a flowchart of another embodiment of the communication method of the network device of the present application;
[0019] Figure 4 It is a schematic diagram of a message extension format of an MLD query message or an IGMP query message in an embodiment of the method of an embodiment of the present application;
[0020] Figure 5 It is a schematic diagram of a message extension format of another embodiment of an MLD query message or an IGMP query message in the method of an embodiment of the present application;
[0021] Figure 6 It is a schematic diagram of multicast topology of an application scenario of method 1 in an embodiment of the present application;
[0022] Figure 7 It is a structural diagram of an embodiment of a network device of the present application;
[0023] Figure 8 It is a structural diagram of another embodiment of the network device of the present application. DETAILED DESCRIPTION
[0024] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0025] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.
[0026] In the subsequent description, the suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present application, and have no special meanings. Therefore, "module", "component" or "unit" can be used in a mixed manner.
[0027] The communication method of the embodiment of the present application includes a communication method of an upstream network device (referred to as the upstream network device-side method) and a communication method of a downstream network device (referred to as the downstream network device-side method). For the convenience of description and to facilitate a better understanding of the communication method of the embodiment of the present application, the upstream network device-side method and the downstream network device-side method are combined and described in detail below.
[0028] It should be noted that, although the upstream network device-side method and the downstream network device-side method are combined and explained together, the upstream network device-side method and the downstream network device-side method are independent of each other. The upstream network device-side method provides half of the technical support for the downstream network device to distinguish and identify the communication priority of the upstream network device and determine the corresponding communication strategy; the downstream network device-side method provides the other half of the technical support for the downstream network device to distinguish and identify the communication priorities of different upstream network devices and execute the corresponding communication strategies accordingly; when the upstream network device-side method and the downstream network device-side method are combined together, the downstream network device can distinguish and identify the communication priorities of different upstream network devices and execute the corresponding communication strategies accordingly, thereby providing technical support for avoiding waste of network bandwidth and avoiding the user side receiving multiple streams and the terminal being unable to watch multicast video due to not supporting repeated processing.
[0029] See also Figures 1 to 3 , Figure 1 is a flow chart of an embodiment of a communication method of a network device of the present application, Figure 2 is a flow chart of another embodiment of the communication method of the network device of the present application, Figure 3 It is a flow chart of another embodiment of the communication method of the network device of the present application. It should be noted that: Figure 1 The method is the upstream network device side method, Figure 2 The method is the downstream network device side method, Figure 3 The method is a method that combines the upstream network device side method and the downstream network device side method.
[0030] The upstream network device side method includes: step S101; the downstream network device side method includes: step S201, step S202 and step S203.
[0031] Upstream network device method:
[0032] Step S101: When a multicast source is detected, a query message is sent, wherein the query message includes a Multicast Listening Discovery Protocol MLD query message or an Internet Group Management Protocol IGMP query message, wherein the MLD query message or the IGMP query message includes an extension field, wherein the extension field includes information of an upstream network device for a downstream network device to determine a communication priority and a corresponding communication strategy of the upstream network device.
[0033] Upstream network devices and downstream network devices include but are not limited to: routers, switches, bridges, gateways, etc. Upstream network devices can discover or detect multicast sources through mechanisms such as multicast traffic or Protocol Independent Multicast (PIM) registration. PIM directly uses the routing information of the unicast routing table to perform reverse path forwarding (RDF) checks on multicast messages, create multicast routing table entries, and forward multicast messages.
[0034] In this embodiment, the query message is a message obtained by improving the existing message, which can simplify the communication process or communication flow and expand the function based on the existing query message. The query message includes an MLD query message or an IGMP query message, and the MLD query message or the IGMP query message includes an extension field, and the extension field includes the information of the upstream network device. When the upstream network device finds or detects the multicast source, it needs to send a query message to determine whether there is a multicast user in the network where the upstream network device is located, and then determine whether forwarding is required. This embodiment extends the function of the query message, and the extension field of the query message also carries the information of the upstream network device for the downstream network device to determine the communication priority and corresponding communication strategy of the upstream network device.
[0035] The information of the upstream network device may be information related to the upstream network device and can help determine the communication priority of the upstream network device, for example: routing information related to the upstream network device, communication priority information of the upstream network device, and so on.
[0036] The communication strategy may be a strategy for the downstream network device to communicate with the upstream network device, corresponding to the communication priority of the upstream network device or the relative communication priority of the upstream network device (i.e., the relative communication priority of the upstream network device obtained by comparing multiple upstream network devices). For example, the communication priority of the upstream network device includes communication priority 1, communication priority 2, and communication priority 3. The communication strategy corresponding to communication priority 1 is that the downstream network device receives and forwards the multicast traffic of the upstream network device. The communication strategy corresponding to communication priority 2 is that the downstream network device receives but does not forward (discards) the multicast traffic of the upstream network device. The communication strategy corresponding to communication priority 3 is that the downstream network device refuses to receive the multicast traffic of the upstream network device.
[0037] In many application scenarios, when a downstream network device finds that there is an upstream network device with which it can communicate, it can communicate with the upstream network device according to normal communication steps or processes. When a downstream network device finds that there are multiple upstream network devices with which it can communicate, it can compare the information of the multiple upstream network devices to obtain the relative communication priority of the upstream network devices, and then determine the corresponding communication strategy based on the relative communication priority of the upstream network devices.
[0038] In the embodiment of the present application, the downstream network device can communicate with multiple upstream network devices, and according to actual needs, the downstream network device can select different communication strategies to communicate with multiple upstream network devices. It should be noted that the downstream network device can flexibly determine the communication strategy according to actual needs.
[0039] Downstream network device side method:
[0040] Step S201: receiving query messages sent by more than two upstream network devices, wherein the query messages include Multicast Listener Discovery Protocol MLD query messages or Internet Group Management Protocol IGMP query messages, and the MLD query messages or IGMP query messages include extension fields, and the extension fields include information of the upstream network devices.
[0041] Step S202: Determine the communication priorities of the two or more upstream network devices according to the information of the upstream network device in the query message.
[0042] Step S203: executing corresponding communication strategies for the two or more upstream network devices respectively according to the communication priorities of the two or more upstream network devices.
[0043] In this embodiment, after the downstream network device receives query messages sent by more than two upstream network devices, it needs to determine the communication priorities of the more than two upstream network devices based on the information of the upstream network devices carried in the query messages, and then execute corresponding communication strategies for the more than two upstream network devices accordingly.
[0044] The method of the upstream network device in the embodiment of the present application includes: after detecting a multicast source, sending a query message, the query message includes an MLD query message or an IGMP query message, the MLD query message or the IGMP query message includes an extension field, and the extension field includes information of the upstream network device for the downstream network device to determine the communication priority and corresponding communication strategy of the upstream network device. Since the query message carries the information of the upstream network device, multiple upstream network devices can be distinguished in this way; the information of the upstream network device is used for the downstream network device to determine the communication priority and corresponding communication strategy of the upstream network device, in this way, half of the technical support is provided for the downstream network device to determine the communication priority and corresponding communication strategy of the upstream network device. The method of the downstream network device includes: receiving query messages from more than two upstream network devices; determining the communication priority of more than two upstream network devices according to the information of the upstream network device of the query message; and executing corresponding communication strategies for the more than two upstream network devices respectively according to the communication priority of the more than two upstream network devices. Since the query message of the upstream network device carries the information of the upstream network device, the downstream network device can determine the communication priority of more than two upstream network devices based on the information of the upstream network device, and then execute corresponding communication strategies for the more than two upstream network devices respectively. In this way, the downstream network device can distinguish and identify the communication priorities of different upstream network devices, and execute corresponding communication strategies accordingly. The other half of the technical support is provided to avoid wasting network bandwidth and to avoid the user side receiving multiple streams and the terminal being unable to watch multicast video due to not supporting repeated processing.
[0045] The information of the upstream network device includes the information of the unicast route from the upstream network device to the multicast source, including but not limited to: unicast routing table, priority information Preference, overhead information Metric, source address, multicast address, etc.
[0046] Further, the information of the unicast route from the upstream network device to the multicast source includes the priority information Preference of the unicast route from the upstream network device to the multicast source. Alternatively, the information of the unicast route from the upstream network device to the multicast source includes the priority information Preference and the cost information Metric of the unicast route from the upstream network device to the multicast source.
[0047] like Figure 4 As shown, Figure 4The diagram is a schematic diagram of the message extension format of an MLD query message or an IGMP query message in an embodiment of the method of the present application. The extended fields of the message include: the priority information Preference and the overhead information Metric of the unicast route from the upstream network device to the multicast source.
[0048] On the downstream network device side, step S202, determining the communication priority of more than two upstream network devices based on the information of the upstream network device in the query message may include: determining the communication priority of more than two upstream network devices based on the information of the unicast route from the upstream network device to the multicast source carried by the query message.
[0049] Among them, step S202, the communication priority of more than two upstream network devices is determined according to the information of the unicast route from the upstream network device to the multicast source carried by the query message, and can also include: determining the communication priority of more than two upstream network devices according to the priority information Preference of the unicast route from the upstream network device to the multicast source carried by the query message; or determining the communication priority of more than two upstream network devices according to the priority information Preference and overhead information Metric of the unicast route from the upstream network device to the multicast source carried by the query message.
[0050] For example: in one embodiment, the communication priorities of two upstream network devices are compared. The priority information Preference and the overhead information Metric in the extended fields of the two query messages can be compared. The comparison order can be: first compare the Preference, and the communication priority of the upstream network device with a smaller Preference can be set to be higher; if the Preference is the same, then compare the Metric, and the communication priority of the upstream network device with a smaller Metric can be set to be higher; if the Metric is the same, then compare the source IP of the query message, and the communication priority of the upstream network device with a larger source IP can be set to be higher.
[0051] The information of the upstream network device includes the communication priority information of the upstream network device. The upstream network device can also set a communication priority for itself, and the downstream network device can determine the communication priority and corresponding communication strategy of the upstream network device according to the communication priority information of the upstream network device.
[0052] like Figure 5 As shown, Figure 5 This is a schematic diagram of the message extension format of another embodiment of the MLD query message or IGMP query message in the method of the embodiment of the present application. The extended field of the message includes: the communication priority information Priority of the upstream network device.
[0053] On the downstream network device side, step S202, determining the communication priority of more than two upstream network devices based on the information of the upstream network device in the query message may include: determining the communication priority of more than two upstream network devices based on the communication priority information of the upstream network device carried in the query message.
[0054] For example: the communication priority information set for one upstream network device is communication priority A, and the communication priority information set for another upstream network device is communication priority B, wherein communication priority A is set to be higher than communication priority B; in an application scenario, one upstream network device is a main upstream network device, and the other upstream network device is a backup upstream network device (i.e., a backup upstream network device). At this time, the main upstream network device can be set to communication priority A, and the backup upstream network device can be set to communication priority B. Since communication priority A is higher than communication priority B, the downstream network devices communicate with the main upstream network device first, and only choose to communicate with the backup upstream network device when the main upstream network device fails or encounters abnormal problems.
[0055] At the downstream network device end, in step S201, when the downstream network device receives two or more query messages, the receiving process is usually in a sequential order.
[0056] If more than two query messages are received within a short period of time (e.g., a preset period of time), it can be considered that the upstream network device receives more than two query messages at the same time. The upstream network device can determine the communication priorities of the more than two upstream network devices based on this, and execute corresponding communication strategies for the more than two upstream network devices respectively.
[0057] For example: if two query messages are received, after comparison, the communication priority of upstream network device 1 is higher than that of upstream network device 2, and the downstream network device chooses to communicate with upstream network device 1, then the downstream network device can respond to the query message of upstream network device 1 and send a response message to upstream network device 1. The downstream network device may not respond to the query message of upstream network device 2 and may not send a response message to upstream network device 2. The downstream network device may also respond to the query message of upstream network device 2 and send a leave message to upstream network device 2.
[0058] At this time, corresponding to the upstream network device end, for the upstream network device 1, after the multicast source is detected, after the query message is sent, step S101 may also include: receiving a join message from the downstream network device in response to the query message. For the upstream network device 2, after the multicast source is detected, after the query message is sent, step S101 may also include: receiving a leave message from the downstream network device in response to the query message, wherein the leave message is sent by the downstream network device when it determines that the communication priority of the upstream network device is low.
[0059] If the interval between receiving two or more query messages is relatively long (e.g., exceeding a preset time period), it can be considered that the downstream network device has received two or more query messages in succession. In many scenarios, the downstream network device receives two or more query messages in succession, for example, the downstream network device receives two or more query messages in succession.
[0060] Take the example that the downstream network device receives two or more query messages respectively and successively. If the downstream network device receives two or more query messages respectively and successively, before step S202, it may also include: if it is determined that there is a first multicast group user or a first multicast source group user locally according to the first query message of the first upstream network device received first, then send a join message to the first upstream network device and save the information of the first upstream network device.
[0061] In this embodiment, the downstream network device first receives the first query message from the first upstream network device, and when it determines that there are first multicast group users or first multicast source group users locally, it sends a join message to the first upstream network device according to the normal communication process and saves the information of the first upstream network device.
[0062] Step S202 is performed only if a second query message from a second upstream network device is subsequently received.
[0063] In one embodiment, if the multicast group user or multicast source group user corresponding to the second query message of the second upstream network device is the same as the multicast group user or multicast source group user corresponding to the first query message of the first upstream network device, it means that the first upstream network device and the second upstream network device are forwarding the same multicast traffic. Obviously, this causes a waste of network bandwidth. At this time, the downstream network device can choose to communicate with one of the upstream network devices with a higher communication priority, and refuse to communicate with the other upstream network device with a lower communication priority. In this way, it is possible to avoid wasting network bandwidth, avoid the user side receiving multiple streams, and forward only one multicast traffic to the terminal, which can avoid the situation where the terminal cannot watch the multicast video due to not supporting repeated processing.
[0064] That is, step S202, determining the communication priority of more than two upstream network devices based on the information of the upstream network device in the query message, may include: if it is determined that there are users of the first multicast group or users of the first multicast source group locally according to the second query message of the second upstream network device received later, then determining the communication priority of the second upstream network device and the first upstream network device according to the information of the second upstream network device and the information of the first upstream network device.
[0065] In this embodiment, when the downstream network device receives the second query message from the second upstream network device and determines that there are first multicast group users or first multicast source group users locally, it means that the first upstream network device and the second upstream network device are forwarding the same multicast traffic. Based on this, the communication priority between the second upstream network device and the first upstream network device can be determined based on the information of the second upstream network device and the saved information of the first upstream network device.
[0066] At this time, step S203, according to the communication priorities of the two or more upstream network devices, respectively executing corresponding communication strategies for the two or more upstream network devices, may include: if the communication priority of the second upstream network device is better than the communication priority of the first upstream network device, sending a join message to the second upstream network device and sending a leave message to the first upstream network device.
[0067] At this time, corresponding to the upstream network device end, for the first upstream network device, step S101, after detecting the multicast source, after sending the query message, also includes: first receiving the join message of the downstream network device in response to the query message, and then receiving the leave message of the downstream network device, wherein the leave message is sent by the downstream network device when it determines that the communication priority of the upstream network device is low.
[0068] After the downstream network device sends a leave message to the first upstream network device, the first upstream network device may stop forwarding multicast traffic to the downstream network device. After the downstream network device sends a join message to the second upstream network device, the second upstream network device may forward multicast traffic to the downstream network device, and the downstream network device may receive and forward the multicast traffic of the second upstream network device.
[0069] In another embodiment, multiple upstream network devices perform load sharing, and the downstream network device locally configures a load sharing strategy. When configuring the load sharing strategy, it can be set that the communication priority of the first upstream network device and the second upstream network device is the same. If the multicast group user or multicast source group user corresponding to the second query message of the second upstream network device is different from the multicast group user or multicast source group user corresponding to the first query message of the first upstream network device, it means that the recipients of the multicast traffic forwarded by the first upstream network device and the second upstream network device are different, and the downstream network device needs to determine whether the communication priorities of the multiple upstream network devices are different, so as to determine whether these multiple upstream network devices perform load sharing.
[0070] That is, step S202, determining the communication priority of more than two upstream network devices based on the information of the upstream network device in the query message, may include: if it is determined that there is a second multicast group user or a second multicast source group user locally based on the second query message of the second upstream network device received later, then determining the communication priority of the second upstream network device and the first upstream network device based on the information of the second upstream network device and the information of the first upstream network device.
[0071] In this embodiment, the second multicast group and the first multicast group can be different multicast groups of the same multicast source, that is, the first upstream network device and the second upstream network device forward multicast traffic of different multicast groups of the same multicast source, that is, the first upstream network device and the second upstream network device are both connected to a multicast source, the multicast source has multiple multicast groups, and the first upstream network device and the second upstream network device forward multicast traffic of different multicast groups. The second multicast source group and the first multicast source group can be different multicast sources, that is, the first upstream network device and the second upstream network device forward multicast traffic of different multicast sources, that is, the first upstream network device and the second upstream network device are respectively connected to two different multicast sources.
[0072] When the downstream network device receives the second query message from the second upstream network device and determines that there is a second multicast group user or a second multicast source group user locally, it means that the recipients of the multicast traffic forwarded by the first upstream network device and the second upstream network device are different. Based on this, the communication priority between the second upstream network device and the first upstream network device can be determined according to the information of the second upstream network device and the saved information of the first upstream network device.
[0073] At this time, step S203, executing corresponding communication strategies on the two or more upstream network devices respectively according to the communication priorities of the two or more upstream network devices, may include:
[0074] (1) If the communication priority of the second upstream network device is the same as the communication priority of the first upstream network device and a load sharing strategy is configured locally, calculation is performed using the traffic feature keywords in the first query message and the second query message.
[0075] (2) Select one of the upstream network devices as the upstream network device of the second multicast group users or the second multicast source group users according to the calculation result.
[0076] (3) Send a join message to one of the selected upstream network devices according to the selection result, and send a leave message to another upstream network device.
[0077] If the communication priority of the second upstream network device is the same as that of the first upstream network device, and a load sharing strategy is configured locally, then the second upstream network device and the first upstream network device can be determined to perform load sharing. At this time, the downstream network device needs to select an upstream network device for the first multicast group user or the first multicast source group user as the upstream network device that forwards the multicast traffic of the group for itself, and select another upstream network device for the second multicast group user or the second multicast source group user as the upstream network device that forwards the multicast traffic of the group for itself. The traffic feature keywords in the first query message and the second query message can be used for calculation, and selection can be made based on the calculation results, and a join message or a leave message can be sent to the two upstream network devices based on the selection results.
[0078] The calculation using the traffic feature keywords in the first query message and the second query message may include: performing hash calculation using the multicast source address or the multicast source address and the group address in the first query message and the second query message. It may be configured that: the one with the largest calculated hash value is selected as the upstream network device of the downstream network device.
[0079] For example: the first upstream network device first sends a first query message, the downstream network device determines that there is a first multicast group user locally, and sends a join message to the first upstream network device; after sending the join message to the first upstream network device, the downstream network device receives and forwards the multicast traffic of the first upstream network device (the multicast traffic may include first multicast traffic whose receiving objects are first multicast group users or first multicast source group users, and may also include second multicast traffic whose receiving objects are second multicast group users or second multicast source group users).
[0080] The second upstream network device then sends a second query message, and the downstream network device determines that there is a second multicast group user locally. After comparison, the first upstream network device and the second upstream network device have the same communication priority, and a load sharing strategy is configured locally. The multicast source address and the group address in the first query message and the second query message are hashed. If the hash value calculated by the multicast source address and the group address in the second query message is larger, a join message is sent to the second upstream network device, and a leave message is sent to the first upstream network device. A join message is sent to the second upstream network device, and a leave message is sent to the first upstream network device (the first upstream network device stops forwarding the second multicast traffic whose receiving object is the second multicast group user or the second multicast source group user to the downstream network device), and the downstream network device receives and forwards the second multicast traffic (corresponding to the second multicast group user or the second multicast source group user) of the second upstream network device, and at the same time continues to receive and forward the first multicast traffic whose receiving object is the first multicast group user or the first multicast source group user of the first upstream network device.
[0081] In another embodiment, multiple upstream network devices have different communication priorities, and the downstream network device is locally configured with a dual-root hot standby strategy, which can implement the dual-root hot standby function. The dual-root hot standby strategy can be that the multiple upstream network devices include a main upstream network device and a backup upstream network device, and the communication priority of the main upstream network device is higher than the communication priority of the backup upstream network device. When the main upstream network device is normal, the traffic of the main upstream network device is selected to be received and forwarded, and the backup upstream network device is used as a backup. When the main upstream network device is abnormal, the traffic of the backup upstream network device is selected to be received and forwarded. In this way, if the main upstream network device is abnormal, it can be switched to the backup upstream network device to forward the traffic, thereby achieving the purpose of fast switching.
[0082] That is, step S202, according to the communication priorities of the two or more upstream network devices, respectively executing corresponding communication strategies for the two or more upstream network devices, may include: if the communication priority of the second upstream network device is better than the communication priority of the first upstream network device, and a dual-root hot standby strategy is locally configured, then sending a join message to the second upstream network device.
[0083] In this embodiment, in order to achieve seamless and rapid switching when the main upstream network device is abnormal, no leave message is sent to the first upstream network device, that is, the traffic of the first upstream network device is still received.
[0084] At this time, the method further includes: receiving the multicast traffic of the first upstream network device and the multicast traffic of the second upstream network device respectively; forwarding the multicast traffic of the second upstream network device, and discarding the multicast traffic of the first upstream network device. That is, the downstream network device receives and forwards the multicast traffic of the second upstream network device, and receives and discards the multicast traffic of the first upstream network device.
[0085] The method further includes: if it is detected that the second upstream network device is abnormal, forwarding the multicast traffic of the first upstream network device and discarding the multicast traffic of the second upstream network device.
[0086] Because when the main upstream network device is normal, the downstream network device receives and forwards the multicast traffic of the second upstream network device, and receives and discards the multicast traffic of the first upstream network device; when the main upstream network device is abnormal, the downstream network device receives and forwards the multicast traffic of the first upstream network device, and receives and discards the multicast traffic of the second upstream network device. In this way, seamless and rapid switching can be achieved.
[0087] The following is a schematic diagram of the multicast topology of the application scenario of method 1 of an embodiment of the present application, and the practical application of the method of the present application is introduced in combination with the multicast topology of the application scenario.
[0088] See also Figure 6 The multicast topology architecture includes a BIER network for forwarding, two upstream network devices BFIR-1 and BFIR-2 at the edge of the BIER network, a downstream network device BFER at the edge of the BIER network, a pre-forwarding network including a multicast source and a network device R1 connected to BFIR-1 and BFIR-2 respectively (simplified as a multicast source and a network device R1 in the figure), and a receiving network including multicast receivers connected to BFER (simplified as a multicast receiver in the figure). It should be noted that Figure 6 The topological architecture is only a topological architecture of an application scenario of the method of the embodiment of the present application, and the application scenario of the method of the embodiment of the present application is not limited to this.
[0089] Embodiment 1:
[0090] This embodiment is an implementation method for a downstream network device BFER to select upstream network devices BFIR-1 and BFIR-2.
[0091] (1) Figure 6 As shown, there are two upstream network devices BFIR-1 and BFIR-2 connected to the BIER network on the multicast source side. After discovering the multicast source through multicast traffic or PIM registration and other mechanisms, these two upstream network devices send specific source group query messages;
[0092] (2) Figure 4As shown, the extended field carried in the query message indicates the unicast route Preference and Metric from the BFIR to the multicast source.
[0093] (3) If BFER receives the above two query messages within a short period of time, it needs to send a join message to check whether there are users in the local multicast group or multicast source group;
[0094] (4) Before sending, it is necessary to compare the route to the specific multicast source S in the current query message with the route to the specific multicast source S that has been learned and queried. The comparison order is: first compare the preference, the smaller one is better; if the preference is the same, then compare the metric, the smaller one is better; if the metric is the same, then compare the source IP of the query message, the larger one is better. Assuming that for the specific multicast source S, the extension field of the BFIR-1 specific source group query message is better than that of BFIR-2, then send a join message to BFIR-1;
[0095] (5) If BFER receives a specific source group query from BFIR-2 first, it queries whether there are users in the multicast group or multicast source group locally, records the preference and metric of BFIR-2's multicast source S, and sends a join message to BFIR-2.
[0096] (6) After receiving the specific source group query sent by BFIR-1, BFER checks whether there are users of this multicast group or multicast source group locally. If it finds that it has received the specific source group query from BFIR-2, it compares the extended fields of the two. If it finds that BFIR-1 is better, it sends a join message to BFIR-1 and a leave message to BFIR-2 at the same time.
[0097] (7) After step 5, for this specific multicast source S, BFER only receives the traffic sent by BFER-1 and discards any traffic coming from other directions.
[0098] Embodiment 2:
[0099] This embodiment is a method for load sharing among multiple upstream network devices.
[0100] (1) Figure 6 As shown, for the multicast source S, there are multiple multicast groups G1-GN; the unicast route Preference and Metric of BFIR-1 and BFIR-2 to the multicast source S are the same, and the BFER is locally configured with the multicast load sharing function;
[0101] (2) After discovering the multicast source through multicast traffic or PIM registration, BFIR-2 sends a specific source group query message carrying the following information: Figure 4 The Preference and Metric extension fields shown;
[0102] (3) After receiving the query message, BFER stores the preference and metric of the message and sends a join message response BFIR-2;
[0103] (4) After BFIR-1 detects a multicast stream, it also sends a query message carrying the Preference and Metric extension fields;
[0104] (5) After receiving the message, BFER compares the Preference and Metric of the BFIR-2 information stored originally and finds that the Preference and Metric of BFIR-1 and BFIR-2 are the same and the load balancing policy is configured locally. Then, it gives the traffic feature keywords, such as the multicast source address and group address, performs hash calculation, selects one of BFIR-1 and BFIR-2 as its upstream network device, sends a join message, and sends a leave message to the other.
[0105] In this embodiment, for the multicast source S, there are multiple multicast groups G1-GN. Through the hash calculation in step 5, part of the traffic is forwarded through BFIR-1, and the other part of the traffic is forwarded through BFIR-2, thereby achieving the purpose of load sharing and reducing the forwarding burden of BFIR.
[0106] Embodiment three:
[0107] This embodiment is an implementation method of dual-root hot standby.
[0108] (1) Enable the dual-root hot standby function on the BFER, and the rest is the same as steps (1) to (5) in Embodiment 1;
[0109] (2) After BFER receives the specific source group query sent by BFIR-1, it finds that it has already received the specific source group query from BFIR-2. It compares the extended fields of the two and finds that BFIR-1 is better. It then sends a specific source group join message to BFIR-1 and continues to send specific source group join messages to respond to BFIR-2.
[0110] (3) On BFER, BFIR-1 serves as the primary root (primary upstream network device). BFER normally receives and forwards traffic from BFIR-1. BFIR-2 serves as the backup root (backup upstream network device). BFER receives and discards traffic forwarded by BFIR-2.
[0111] (4) When BFIR-1 is detected to be abnormal through point-to-multipoint master station (P2MP) bidirectional forwarding detection (BFD) or traffic detection, it switches to receiving and forwarding the forwarding traffic of BFIR-2, thereby achieving the purpose of fast switching.
[0112] Embodiment 4:
[0113] This embodiment is an implementation method for a downstream network device (BFER) to select an upstream network device (BFIR-1, BFIR-2) through communication priority information of the upstream network device.
[0114] (1) Figure 6 As shown, there are two upstream network devices BFIR-1 and BFIR-2 connected to the BIER network on the multicast source side. After discovering the multicast source through multicast traffic or PIM registration and other mechanisms, these two upstream network devices send specific source group query messages;
[0115] (2) Figure 5 As shown, the extended field carried by the above query message, Priority, indicates the communication priority of the upstream network device itself;
[0116] (3) If BFER receives the above two query messages within a short period of time, it needs to send a join message to check whether there are users in the local multicast group or multicast source group;
[0117] (4) Before sending, the communication priorities of the upstream network devices in the two query messages need to be compared. The one with a smaller priority is preferred. If the priorities are the same, the source addresses of the query messages are compared. The one with a larger address is preferred. Assuming that the communication priority of BFIR-1 is higher than that of BFIR-2, a join message is sent to BFIR-1.
[0118] (5) If BFER receives a specific source group query from BFIR-2 first, it queries whether there are users in the multicast group or multicast source group locally, records the priority of BFIR-2, and sends a join message to BFIR-2.
[0119] (6) After receiving the specific source group query sent by BFIR-1, BFER checks whether there are users of this multicast group or multicast source group locally. If it finds that it has received the specific source group query from BFIR-2, it compares the extended field Priority of the two. If it finds that BFIR-1 is better, it sends a join message to BFIR-1 and a leave message to BFIR-2 at the same time.
[0120] (7) After step 5, for this specific multicast source S, BFER only receives the traffic sent by BFER-1 and discards any traffic coming from other directions.
[0121] See also Figure 7 , Figure 7 It is a structural diagram of an embodiment of the network device of the present application. It should be noted that the network device of this embodiment can implement the communication method of the above-mentioned upstream network device end. For detailed description of the relevant content, please refer to the communication method part of the above-mentioned upstream network device end, which will not be repeated here.
[0122] The network device 100 includes a communication circuit 3, a memory 1 and a processor 2, wherein the communication circuit 3 is used for communication; the memory 1 is used to store a computer program; the processor 2 is used to execute the computer program and implement the communication method of the upstream network device end as described in any one of the above items when executing the computer program.
[0123] The processor 2 may be a microcontroller unit, a central processing unit or a digital signal processor, etc. The memory 1 may be a Flash chip, a read-only memory, a disk, an optical disk, a USB disk or a mobile hard disk, etc.
[0124] See also Figure 8 , Figure 8 It is a structural diagram of another embodiment of the network device of the present application. It should be noted that the network device of this embodiment can implement the communication method of the above-mentioned downstream network device end. For detailed description of related contents, please refer to the communication method part of the above-mentioned downstream network device end, which will not be repeated here.
[0125] The network device 200 includes a communication circuit 33, a memory 11 and a processor 22, the communication circuit 33 is used for communication; the memory 11 is used to store computer programs; the processor 22 is used to execute the computer program and implement the communication method of the downstream network device end as described in any one of the above items when executing the computer program.
[0126] The processor 22 may be a microcontroller unit, a central processing unit or a digital signal processor, etc. The memory 11 may be a Flash chip, a read-only memory, a magnetic disk, an optical disk, a USB disk or a mobile hard disk, etc.
[0127] The present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the processor implements the communication method of the upstream network device end as described in any one of the above items.
[0128] The computer-readable storage medium may be an internal storage unit of the upstream network device, such as a hard disk or a memory. The computer-readable storage medium may also be an external storage device of the upstream network device, such as a plug-in hard disk, a smart memory card, a secure digital card, a flash memory card, etc.
[0129] The present application also provides another computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the processor implements the communication method for the downstream network device end as described in any one of the above items.
[0130] The computer-readable storage medium may be an internal storage unit of the downstream network device, such as a hard disk or a memory. The computer-readable storage medium may also be an external storage device of the downstream network device, such as a plug-in hard disk, a smart memory card, a secure digital card, a flash memory card, etc.
[0131] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0132] In hardware implementation, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those of ordinary skill in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0133] The preferred embodiments of the present application are described above with reference to the accompanying drawings, but the scope of the present application is not limited thereby. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present application shall be within the scope of the present application.
Claims
1. A communication method for a network device, characterized in that: The method comprises: When a multicast source is detected, a query message is sent, wherein the query message includes a Multicast Listening Discovery Protocol MLD query message or an Internet Group Management Protocol IGMP query message, wherein the MLD query message or the IGMP query message includes an extension field, wherein the extension field includes information of an upstream network device for a downstream network device to determine the communication priority and corresponding communication strategy of two or more upstream network devices.
2. The method according to claim 1, characterized in that The information of the upstream network device includes information on unicast routes from the two or more upstream network devices to the multicast source, or includes communication priority information of the two or more upstream network devices; the information on unicast routes from the two or more upstream network devices to the multicast source includes priority information Preference of unicast routes from the two or more upstream network devices to the multicast source, or includes priority information Preference and overhead information Metric of unicast routes from the two or more upstream network devices to the multicast source.
3. The method according to claim 1, characterized in that After the multicast source is detected and the query message is sent, the method further includes: receiving a join message from the downstream network device in response to the query message; or, A leave message is received from the downstream network device in response to the query message.
4. A communication method for a network device, characterized in that: The method comprises: Receiving query messages sent by more than two upstream network devices, the query messages including a Multicast Listening Discovery Protocol MLD query message or an Internet Group Management Protocol IGMP query message, the MLD query message or the IGMP query message including an extension field, and the extension field including information of the upstream network device; Determine the communication priorities of the two or more upstream network devices according to the information of the upstream network device in the query message; According to the communication priorities of the two or more upstream network devices, corresponding communication strategies are respectively executed on the two or more upstream network devices.
5. The method according to claim 4, characterized in that Before determining the communication priorities of the two or more upstream network devices according to the information of the upstream network device in the query message, the method further includes: If it is determined that there are first multicast group users or first multicast source group users locally according to the first query message of the first upstream network device received earlier, a join message is sent to the first upstream network device, and the information of the first upstream network device is saved.
6. The method according to claim 5, characterized in that The determining the communication priorities of the two or more upstream network devices according to the information of the upstream network device in the query message includes: If it is determined that there are users of the first multicast group or users of the first multicast source group locally according to the second query message of the second upstream network device received later, the communication priority between the second upstream network device and the first upstream network device is determined according to the information of the second upstream network device and the information of the first upstream network device; The executing corresponding communication strategies on the two or more upstream network devices respectively according to the communication priorities of the two or more upstream network devices comprises: If the communication priority of the second upstream network device is higher than the communication priority of the first upstream network device, sending a join message to the second upstream network device and sending a leave message to the first upstream network device; The method further includes: receiving and forwarding multicast traffic of the second upstream network device.
7. The method according to claim 5, characterized in that The determining the communication priorities of the two or more upstream network devices according to the information of the upstream network device in the query message includes: If it is determined that there are second multicast group users or second multicast source group users locally according to the second query message of the second upstream network device received later, the communication priority between the second upstream network device and the first upstream network device is determined according to the information of the second upstream network device and the information of the first upstream network device; The executing corresponding communication strategies on the two or more upstream network devices respectively according to the communication priorities of the two or more upstream network devices comprises: If the communication priority of the second upstream network device is the same as the communication priority of the first upstream network device, and a load sharing strategy is configured locally, calculation is performed using the traffic feature keywords in the first query message and the second query message; Selecting one of the upstream network devices as the upstream network device of the second multicast group user or the second multicast source group user according to the calculation result; Send a join message to one of the selected upstream network devices according to the selection result, and send a leave message to another upstream network device; The method further comprises: The first multicast traffic of the first upstream network device and the second multicast traffic of the second upstream network device are received and forwarded respectively and in sequence.
8. The method according to claim 5, characterized in that The determining the communication priorities of the two or more upstream network devices according to the information of the upstream network device in the query message includes: If it is determined that there are users of the first multicast group or users of the first multicast source group locally according to the second query message of the second upstream network device received later, the communication priority between the second upstream network device and the first upstream network device is determined according to the information of the second upstream network device and the information of the first upstream network device; The executing corresponding communication strategies on the two or more upstream network devices respectively according to the communication priorities of the two or more upstream network devices comprises: If the communication priority of the second upstream network device is higher than the communication priority of the first upstream network device, and a dual-root hot standby strategy is configured locally, sending a join message to the second upstream network device; The method further comprises: Receiving multicast traffic of the first upstream network device and multicast traffic of the second upstream network device respectively; forwarding the multicast traffic of the second upstream network device and discarding the multicast traffic of the first upstream network device; If it is detected that the second upstream network device is abnormal, the multicast traffic of the first upstream network device is forwarded, and the multicast traffic of the second upstream network device is discarded.
9. The method according to claim 4, characterized in that The information of the upstream network device includes information about the unicast route from the upstream network device to the multicast source, or includes communication priority information of the upstream network device; the information about the unicast route from the upstream network device to the multicast source includes priority information Preference of the unicast route from the upstream network device to the multicast source, or includes priority information Preference and overhead information Metric of the unicast route from the upstream network device to the multicast source.
10. A network device, characterized in that: It comprises a communication circuit, a memory and a processor, wherein the communication circuit is used for communication; the memory is used for storing a computer program; the processor is used for executing the computer program and implementing the communication method of the network device as described in any one of claims 1 to 3 when executing the computer program.
11. A network device, characterized in that: It comprises a communication circuit, a memory and a processor, wherein the communication circuit is used for communication; the memory is used for storing a computer program; the processor is used for executing the computer program and implementing the communication method of the network device as described in any one of claims 4 to 9 when executing the computer program.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the communication method of the network device according to any one of claims 1 to 3.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the communication method of the network device according to any one of claims 4 to 9.
Citation Information
Patent Citations
Method and system for requesting multicast information, method and system for controlling multicast service
CN101296103A
Method and device for multicast users of specific source group to leave quickly
CN101877678A