Multi-link redundancy control method and system, communication equipment and storage medium
By comparing priority levels between target network devices and configuring message updates, data transmission path optimization in multi-link redundancy control is achieved, solving the problem of multi-link transmission data loss in the prior art, and improving data Transmission reliability and efficiency.
Patent Information
- Application Number
- CN202411597260.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2025-02-18
AI Technical Summary
The prior art is prone to data loss during multi-link transmission. The Smart Link protocol only supports two ports, and the cross-device aggregation MLAG protocol is implemented in a complex manner and has poor compatibility.
The configuration packets are received through each target network device, the configuration packets are compared, the configuration packets are updated, and the configuration packets are broadcasted to all target network devices until the latest priority order is obtained, and the highest priority device is selected for data transmission.
It realizes fast and efficient switching of backup links in multi-link redundancy control, reduces data traffic loss, and improves the reliability and efficiency of data transmission.
Smart Images

Figure CN119484395A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a multi-link redundancy control method, system, communication device and storage medium. Background Art
[0002] In the process of multi-link transmission, Smart Link (backup link or flexible link) protocol or cross-device aggregation MLAG (Multichassis Link Aggregation Group, Chinese name is cross-device link aggregation group, which is a mechanism for realizing cross-device link aggregation) protocol is generally used for data transmission.
[0003] However, each device in the Smart Link protocol can only support two ports, and when a port fails, it is easy to cause traffic loss. Although the cross-device aggregation MLAG protocol can also support multiple ports and cross-devices, it is complex to implement and requires the support of the peer device. When the remote devices are from different manufacturers, the compatibility is poor.
[0004] Therefore the prior art still needs to be improved and enhanced. Summary of the invention
[0005] The main purpose of the present application is to provide a multi-link redundancy control method, system, communication device and storage medium, aiming to solve the problem of data loss that is easily caused when multi-link data is transmitted in the prior art.
[0006] In order to achieve the above objectives, this application adopts the following technical solutions:
[0007] In a first aspect, an embodiment of the present application provides a multi-link redundancy control method, including:
[0008] Using the current target network device to receive a configuration message transmitted from any other target network device in the same user group;
[0009] Comparing the priorities of the current target network device and all forwarding devices in the configuration message, and when the priority of the current target network device is the highest, updating the configuration message using the election information of the current target network device to obtain an updated configuration message;
[0010] Controlling the current target network device to broadcast the updated configuration message to all other target network devices until the latest priority ranking of all target network devices is obtained;
[0011] When the next layer connection device transmits a data message to all the target network devices, the target network device with the highest priority is selected according to the latest priority sorting to transmit the data message to the previous layer connection device.
[0012] In some embodiments, the multi-link redundancy control method further includes:
[0013] When one of the uplink ports of the current target network device fails, after updating the port status in the updated configuration message, the latest configuration message is broadcast to all the other target network devices;
[0014] According to the port priority ranking in the latest priority ranking, controlling the valid uplink port with the next highest priority in the current target network device to transmit the data message to the upper layer connection device;
[0015] When all the uplink ports of the current target network device fail, according to the device priority ranking in the latest priority ranking, controlling the valid target network device with the next highest priority to transmit the data message to the upper layer connection device;
[0016] Among them, the priority of the device priority sorting is higher than that of the port priority sorting.
[0017] In some embodiments, the step of using the current target network device to receive a configuration message transmitted from any other target network device in the same user group also includes:
[0018] Adding the uplink ports of the plurality of target network devices into the same user group, and connecting all the target network devices in the same user group in sequence;
[0019] Wherein, the plurality of target network devices are all connected to the same connection device of the next layer, and are connected to the same connection device of the previous layer through their respective uplink ports.
[0020] In some embodiments, comparing the priorities of the current target network device and all forwarding devices in the configuration message, and when the priority of the current target network device is the highest, updating the configuration message using the election information of the current target network device to obtain an updated configuration message, includes:
[0021] Compare the device priority of the current target network device with the device priorities of all forwarding devices in the configuration message respectively;
[0022] When the device priority of the current target network device is the highest, replacing the election information of the forwarding device of the first priority with the election information of the current target network device to obtain the updated configuration message;
[0023] The election information includes: user group address, device priority, port priority and port status.
[0024] In some embodiments, the comparing the priorities between the current target network device and all forwarding devices in the configuration message further includes:
[0025] When the device priorities of all forwarding devices are not less than the device priority of the current target network device, the election information of the current target network device is added to the configuration message to update the configuration message.
[0026] In some embodiments, the step of obtaining the latest priority ranking of all target network devices includes:
[0027] The latest priority ranking is obtained until the device priority of each target network device is lower than the device priority of the forwarding device with the first priority in the received configuration message.
[0028] In some embodiments, selecting a target network device with the highest priority according to the latest priority sorting to transmit the data message to an upper layer connection device includes:
[0029] According to the device priority sorting and the port priority sorting in the latest priority sorting, the valid uplink port of the first priority on the target network device with the highest priority is controlled to transmit the data message to the upper layer connection device.
[0030] In a second aspect, an embodiment of the present application provides a multi-link redundant control system, including:
[0031] A receiving module, used to use the current target network device to receive a configuration message transmitted from any other target network device in the same user group;
[0032] An updating module, used for comparing the priorities of the current target network device and all forwarding devices in the configuration message, and when the priority of the current target network device is the highest, updating the configuration message using the election information of the current target network device to obtain an updated configuration message;
[0033] A broadcast module, used to control the current target network device to broadcast the updated configuration message to all other target network devices until the latest priority ranking of all target network devices is obtained;
[0034] The transmission module is used to select the target network device with the highest priority according to the latest priority sorting when the next layer connection device transmits the data message to all the target network devices, so as to transmit the data message to the previous layer connection device.
[0035] In a third aspect, an embodiment of the present application provides a communication device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the steps of the multi-link redundancy control method as described above are implemented.
[0036] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the multi-link redundancy control method as described above.
[0037] Compared with the prior art, the present application provides a multi-link redundancy control method, system, communication device and storage medium. The method uses each current target network device to update the configuration message using its election information when comparing the current target network device with the highest priority. After obtaining the updated configuration message, the updated configuration message is broadcast to all other target network devices until the latest priority ranking of all target network devices is obtained, so that the target network device with the highest priority in the latest priority ranking can report the data message, thereby realizing the use of configuration messages to conduct mutual elections among multiple target network devices, and the best reporting link is elected to upload the data message, which can realize fast and efficient switching of backup links, thereby effectively reducing data traffic loss. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0039] Figure 1 A schematic diagram of the Smart Link link in the prior art provided by this application;
[0040] Figure 2 A flowchart of an embodiment of the multi-link redundancy control method provided by the present application;
[0041] Figure 3 An arbitrary multi-link schematic diagram of an embodiment of the multi-link redundancy control method provided in the present application;
[0042] Figure 4 A schematic diagram of multi-point-to-point link redundancy in an embodiment of the multi-link redundancy control method provided in the present application;
[0043] Figure 5 A schematic diagram of a process of obtaining an updated configuration message in an embodiment of the multi-link redundancy control method provided in the present application;
[0044] Figure 6 A schematic diagram of a protocol message frame format of an embodiment of the multi-link redundancy control method provided in the present application;
[0045] Figure 7 A schematic diagram of a process flow for processing a port failure in an embodiment of a multi-link redundancy control method provided by the present application;
[0046] Figure 8 This is an architectural relationship diagram of an embodiment of a multi-link redundant control system provided in the present application. DETAILED DESCRIPTION
[0047] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.
[0048] The components of the embodiments of the present application generally described and shown in the drawings herein may be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0049] Hereinafter, the terms "including", "having" and their cognates used in various embodiments of the present application are intended only to indicate specific features, numbers, steps, operations, elements, components or a combination of the foregoing items, and should not be understood as first excluding the existence of one or more other features, numbers, steps, operations, elements, components or a combination of the foregoing items or increasing the possibility of one or more features, numbers, steps, operations, elements, components or a combination of the foregoing items. In addition, the terms "first", "second", "third" and the like are only used to distinguish descriptions and cannot be understood as indicating or implying relative importance.
[0050] Unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meanings as those generally understood by those skilled in the art to which the various embodiments of the present application belong. The terms (such as those defined in generally used dictionaries) will be interpreted as having the same meanings as the contextual meanings in the relevant technical field and will not be interpreted as having idealized meanings or overly formal meanings unless clearly defined in the various embodiments of the present application.
[0051] In order to facilitate understanding of the embodiments of the present application, the background technology involved in the embodiments of the present application is first introduced here.
[0052] When a downstream device is connected to an upstream device, if a single point failure occurs in the uplink when a single uplink is used, service interruption will occur. If a dual uplink is used, a downstream device is connected to two upstream devices at the same time, which can reduce the impact of a single point failure on the network, provide reliable and efficient backup and fast switching mechanism, and thus improve reliability.
[0053] For example, the Smart Link protocol supports this dual uplink networking mode, as shown in the following diagram: Figure 1 As shown in the figure, each group in the flexible link group contains only two member ports, the master port and the slave port (or secondary port). Under normal circumstances, only one port is in the forwarding (ACTIVE) state, and the other port is blocked and in the standby (STANDBY) state. When a link failure occurs to the port in the forwarding state (including port down, etc.), the Smart Link group will automatically block the port and switch the originally blocked port in the standby state to the forwarding state.
[0054] Although the Smart Link protocol has a reliable and efficient backup and fast switching mechanism, it has a disadvantage: the Smart Link protocol only supports two links, active and standby. When the same connected device has more than two links or multiple devices need to connect to upstream devices for redundancy, it will be restricted, resulting in data redundancy.
[0055] In order to solve the above-mentioned prior art problems, the present application provides a multi-link redundancy control method, system, communication device and storage medium. In the present application, when each current target network device compares and finds that the current target network device has the highest priority, after using its election information to update the configuration message to obtain the updated configuration message, the updated configuration message is broadcast to all other target network devices until the latest priority ranking of all target network devices is obtained, so as to report the data message according to the target network device with the highest priority in the latest priority ranking, realize mutual election among multiple target network devices using the configuration message, and obtain the best reporting link to upload the data message, which can realize fast and efficient switching of the backup link, thereby effectively reducing the loss of data traffic.
[0056] The following describes the design of the multi-link redundancy control method through specific exemplary embodiments. It should be noted that the following embodiments are only used to explain the technical solution of the present application and are not specifically limited:
[0057] See also Figure 2 , the embodiment of the present application provides a multi-link redundancy control method, including steps S100-S400:
[0058] S100: Using the current target network device to receive a configuration message transmitted from any other target network device in the same user group.
[0059] The target network devices include switches or routers.
[0060] Exemplarily, after multiple target network devices are established in the same user group, the target network devices elect each other by sending configuration messages to each other, that is, each target network device sends configuration messages to all other target network devices in the same user group to elect each other and select the priority ranking among the target network devices.
[0061] It can be understood that by transmitting configuration messages to each other, the target network devices in the same user group elect each other, and select the priority ranking between the target network devices to determine the priority transmission path of the data, thereby solving the problem of data redundancy in multiple links and effectively improving the data transmission efficiency.
[0062] Furthermore, step S100 also includes the following steps:
[0063] Add the uplink ports of multiple target network devices to the same user group, and connect all the target network devices in the same user group in sequence.
[0064] Among them, multiple target network devices are connected to the same connection device of the next layer, and are connected to the same connection device of the previous layer through their respective uplink ports; the role of the user group (or protection group) is to ensure that only one link among the multiple links from the downstream device to the upstream device can communicate with the upstream device to prevent link loops. When the link communicating with the upstream fails, the protection group will switch the link according to the priority (block the failed port and the low-priority port, and forward the highest priority port), thereby providing link backup and fast switching mechanism; among them, generally, the network administrator determines the link that needs to be backed up according to the link backup requirements, and adds multiple ports to the same protection group.
[0065] Exemplarily, in a scenario where there are more than two links to the same connected device, such as Figure 3 As shown in the figure, the three ports P1, P2 and P3 of SW1 (SW is the abbreviation of Switch, and its Chinese name is switch) and the P1 port of SW2 are connected to the upstream device SW7 to form a redundant network; since the existing Smart Link protocol only supports up to two ports, it cannot support Figure 3 Topology networking.
[0066] Therefore, first, you can configure the Smart Link protection group to add any number of ports, and set the priority of the network device (including device priority and port priority) to elect the forwarding link according to the priority. Among them, in the priority comparison, first compare the device priority, if the same, then compare the port priority, if the port priority is still the same, then compare the port ID, if the port ID is the same again, then compare the device mac (MAC address (English: Media Access Control Address), literally translated as media access control address, also known as local area network address (LAN Address), MAC address, Ethernet address (Ethernet Address), hardware address (Hardware Address) or physical address (Physical Address) or media access control address) size; and when the port is down (port failure), it does not participate in the election. Then, through the above comparison, you can elect the forwarding port and the blocking port on all ports across devices and non-across devices.
[0067] Among them, the priority is configured by the network administrator, who configures it based on the status of the link, such as bandwidth or signal. Of course, the priority can also be left unconfigured, and the same default value is used at this time. Because the default value is the same, it is impossible to select the blocking port and forwarding port based on the priority, so it is necessary to further compare the priority based on the device's MAC and port ID.
[0068] For example, the default device priority can be configured from 1 to 10, and the port priority can be configured from 1 to 10, and the default value is 5. Assuming that the CPU capability of SW1 device is the strongest, the device priority is configured as 8. If the P1 port of device SW1 is a 10G port and the P2 port is a 1G port, the network administrator will want the P1 port to be a forwarding port, and will configure it higher than the default value, such as 8. Then, in the election, the P1 port of SW1 will be elected as the forwarding port because it has a high priority. When the link failure occurs in P1 of SW1, it will not participate in the election, and will renegotiate that the P2 port of SW1 has a high priority (because SW1 has the highest priority, it will continue to be elected to SW1), and the link will be switched to the P2 port. When the P1 port failure is restored, the P1 port will participate in the election again, and according to the priority, the P1 port will be elected as the forwarding port again, thus achieving the purpose of link backup, failover and recovery switching. Priority can be configured according to device capabilities and link status, making it easier for network administrators to plan the network and select the optimal forwarding port to report data.
[0069] Secondly, in order to achieve cross-device participation in elections, you can Figure 3In the example, one port is selected from the P1, P2 and P3 ports of SW1 and the P1 port of SW2 to forward data. Then, a channel needs to be created between SW1 and SW2, such as connecting the P4 port of SW1 with the P2 port of SW2, and sending Smart Link configuration messages to each other to inform the Smart Link protection group of each device. The notification information includes the protection group ID, the port of the protection group, the device priority, the port priority and the port status, etc., which are used to participate in the election.
[0070] Furthermore, in scenarios where multiple devices need to connect to upstream devices, such as Figure 4 As shown, SW8 uses a multi-link uplink mode to access the Internet through the P1 and P2 ports of the SW9 device, the P1 port of the SW10 device, and the P2 port of the SW11 device, thereby connecting one downstream device to multiple upstream devices at the same time.
[0071] At this time, a multi-link protection group (i.e., Smart Link group, i.e., user group) can be set, and each group contains any number of member ports. These port members can belong to the same connection device or to different devices. In this embodiment, the uplink ports of multiple target network devices are added to the same user group. For example, Figure 4 In the example, add the P1 and P2 ports of SW9, the P1 port of SW10, and the P2 port of SW11 to a user group, and set the same protection group ID as the identifier. At the same time, based on the existing Smart Link protocol, establish an election connection route between devices, that is, connect all target network devices in the same user group in turn to achieve port election between different devices. Figure 4 The P3 port of SW9 and the P2 port of SW10, as well as the P3 port of SW10 and the P1 port of SW11 are connected to send and receive messages for interactive election. Among them, when multiple target network devices have the following characteristics: multiple target network devices are connected to the same connection device of the next layer, and are connected to the same connection device of the previous layer through their respective uplink ports, the multiple target network devices can be set in the same user group.
[0072] Then, under normal circumstances, only one port is in the forwarding (ACTIVE) state, and the other ports are blocked and in the standby (STANDBY) state. When a link failure occurs on a port in the forwarding state (including port down, etc.), the multi-link protection group will automatically block the port and switch the other blocked and available ports in the standby state to the forwarding state, thereby achieving the role of link backup, that is, when a link failure occurs on a port in the forwarding state, it can quickly switch to the backup link, thereby reducing traffic loss.
[0073] It can be understood that in this application, by setting up a multi-link protection group and electing a connection route, more network topologies can be expanded, and a downstream device can be connected to multiple upstream devices at the same time, effectively reducing the impact of single-point failures on the network, providing a reliable and efficient backup and fast switching mechanism, and improving the reliability of data transmission. In addition, it not only supports cross-device connection and can achieve fast switching functions, but also supports any port of a single device, and even multi-port redundant backup links across devices, so as to adapt to more network topologies, thereby effectively solving the problem of protocol incompatibility between devices and the need for the opposite device to support the same communication protocol.
[0074] Please continue reading Figure 2 S200, compare the priorities of the current target network device and all forwarding devices in the configuration message, and when the priority of the current target network device is the highest, update the configuration message using the election information of the current target network device to obtain an updated configuration message.
[0075] Exemplarily, after the current target network device receives the configuration message, the priorities of all forwarding devices corresponding to the forwarding device information stored in the configuration message and the current target network device are compared. If the current target network device has the highest priority, the configuration message is updated with the election information of the current target network device to obtain an updated configuration message.
[0076] It can be understood that by comparing the priorities between the current target network device and all forwarding devices in the configuration message, the configuration message is operated accordingly according to the comparison result. For example, when it is found that the priority of the current target network device is the highest, the configuration message is dynamically updated, thereby improving the accuracy of the election result obtained according to the configuration message.
[0077] For example, in one embodiment, see Figure 5 , step S200 includes:
[0078] S210, comparing the device priority of the current target network device with the device priorities of all forwarding devices in the configuration message;
[0079] S220: When the device priority of the current target network device is the highest, the election information of the forwarding device with the first priority is replaced by the election information of the current target network device to obtain an updated configuration message.
[0080] The election information includes: user group address, device priority, port priority and port status.
[0081] Exemplarily, after the current target network device receives the configuration message, it performs a priority comparison to select a link for forwarding data. First, the device priorities between network devices are compared, that is, the device priority of the current target network device is compared with the device priorities of all forwarding devices in the configuration message:
[0082] If the device priority of the current target network device is greater than the device priority of all forwarding devices, that is, the device priority of the current target network device is the highest, the election information of the current target network device replaces the election information of the forwarding device with the first priority in the configuration message to obtain an updated configuration message.
[0083] It can be understood that by comparing the priorities between the current target network device and all forwarding devices, and when it is found that the current target network device has the highest priority, the forwarding device with the first priority is replaced and retained in the configuration message, that is, by comparing the priorities, the election information of the network device with the first priority is dynamically screened and retained.
[0084] For example, in one implementation, the priorities of the current target network device and all forwarding devices in the configuration message are compared, and then the following steps are further included:
[0085] When the device priorities of all forwarding devices are not less than the device priority of the current target network device, the election information of the current target network device is added to the configuration message to update the configuration message.
[0086] Exemplarily, when comparing the priorities between the current target network device and all forwarding devices:
[0087] If the device priority of all forwarding devices is not less than the device priority of the current target network device, the election information of the current target network device is added to the forwarding device column in the configuration message. For example, the address of the current target network device is written into the "MAC address of the forwarding device" column in the configuration message, and the priority of the current target network device is written into the "Priority of the port of the message sending device participating in the protection group" column in the configuration message. The frame format diagram of the configuration message (or protocol message) is as follows: Figure 6 As shown; among them, DMAC is the destination MAC; SMAC is the source MAC; VLAN: Virtual Local Area Network, the Chinese name is virtual local area network; EtherType is the Ethernet type; Payload is the payload; FCS: Frame Check Sequence, the Chinese name is frame check sequence.
[0088] Among them, Table 1 and Table 2 are used to explain the frame format content of the configuration message:
[0089] Table 1: Frame structure description of protocol message (configuration message)
[0090]
[0091] Among them, Byte is bit; Unsigned is unsigned type; ISO / IEC 8802-3 is the international standard of Ethernet.
[0092] Table 2: Description of the payload in the protocol message
[0093]
[0094]
[0095] Among them, EtherCAT (Ethernet for Control Automation Technology, Chinese name is Ethernet control automation technology) is an open architecture, Ethernet-based fieldbus system; PDU is the abbreviation of Protocol Data Unit, Chinese name is protocol data unit, which is a data unit used for transmission between peer levels in a hierarchical network structure.
[0096] Please continue reading Figure 2 , S300, control the current target network device to broadcast the updated configuration message to all other target network devices until the latest priority ranking of all target network devices is obtained.
[0097] Exemplarily, after obtaining the updated configuration message, the current target network device broadcasts the updated configuration message to all other target network devices through the established election connection route.
[0098] Afterwards, similarly, after other target network devices update the received updated configuration message again, they broadcast to all other target network devices except themselves until the latest priority ranking of all target network devices is obtained, and then stop broadcasting to each other, thereby completing the mutual election of the latest priority ranking.
[0099] It can be understood that in the present application, the configuration message is broadcast to other target network devices, and the latest priority ranking is elected from each other, so that the priority transmission path is elected according to the latest priority ranking, making the transmission simpler, more flexible and efficient.
[0100] For example, in one implementation, until the latest priority ranking of all target network devices is obtained, it includes:
[0101] Until the device priority of each target network device is lower than the device priority of the forwarding device with the first priority in the received configuration message, the latest priority ranking is obtained.
[0102] Exemplarily, in the mutual election process, for each current target network device, after the current target network device updates the received configuration message to obtain the updated configuration message, the current target network device broadcasts the updated configuration message to other target network devices. Similarly, other target network devices will also perform the operation of broadcasting after updating the configuration message, thereby broadcasting and electing each other.
[0103] Finally, when the election is stable, that is, until the device priority of the forwarding device in the configuration message received by each target network device is higher than its own device priority, the mutual election can be considered to be over, and the latest priority ranking between all target network devices and the same target network devices can be obtained.
[0104] S400, when the next layer connection device transmits data packets to all target network devices, the target network device with the highest priority is selected according to the latest priority sorting to transmit the data packets to the previous layer connection device.
[0105] The lower layer connection devices include: switches, routers, servers or computers, etc. The upper layer connection devices include: servers, which are the Internet in this embodiment.
[0106] Exemplarily, after the election is completed and the latest priority ranking is obtained, when the next layer connection device reports a data message to all target network devices in the same user group connected to it, the target network device with the highest priority among all target network devices is elected according to the device priority ranking in the latest priority ranking. Then, the target network device with the highest priority reports the data message to the upper layer connection device.
[0107] It can be understood that by selecting the target network device with the highest priority in the same protection group through the latest priority sorting and using it to report the transmission data, the efficiency and accuracy of data transmission are greatly improved, and the problem of data redundancy is effectively solved.
[0108] For example, in one implementation, according to the latest priority sorting, the target network device with the highest priority is selected to transmit the data message to the upper layer connection device, including:
[0109] According to the device priority sorting and the port priority sorting in the latest priority sorting, the valid uplink port with the first priority on the target network device with the highest priority is controlled to transmit the data message to the upper layer connection device.
[0110] Among them, the highest priority and the first effective priority are both the highest effective priorities under the current circumstances.
[0111] Demonstratively, after the next layer connection device reports the data message to all target network devices, it first selects the currently optimal device, that is, according to the device priority ranking in the latest priority ranking (the port priority ranking exists in the "Priority of message forwarding device" column in the latest configuration message), selects the target network device with the highest priority.
[0112] Then, the currently optimal port is further selected, that is, according to the port priority sorting in the latest priority sorting (the port priority sorting exists in the "Priority of the message sending device participating in the protection group port" column in the latest configuration message), the first priority valid upstream port in the target network device with the highest priority is selected, and finally, the first priority valid upstream port is used to transmit the data message to the upper layer connection device, thereby realizing the selection of the optimal port of the optimal device to report data.
[0113] For further information, see Figure 7 , the multi-link redundancy control method further includes:
[0114] S500, when one of the uplink ports of the current target network device fails, after updating the port status in the updated configuration message, the latest configuration message is broadcast to all other target network devices;
[0115] S600, according to the port priority ranking in the latest priority ranking, controlling the valid uplink port with the next highest priority in the current target network device to transmit the data message to the upper layer connection device;
[0116] S700: When all uplink ports of the current target network device fail, according to the device priority ranking in the latest priority ranking, control the valid target network device with the next highest priority to transmit the data message to the upper layer connection device.
[0117] Among them, the priority of device priority sorting is higher than that of port priority sorting; port priority sorting exists in the "Priority of ports of message sending devices participating in protection group" column in Table 2; device priority sorting exists in the "Priority of message forwarding devices" column in Table 2.
[0118] Exemplarily, during data message transmission, if one of the uplink ports of the current target network device fails, the port state of the uplink port recorded in the configuration message is updated to obtain the latest configuration message, and the latest configuration message is broadcast to all other target network devices in the same user group.
[0119] Then, because the current target network device has been selected to transmit data packets according to the device priority sorting, when the device with a higher priority has not recovered from the fault or does not exist, the port priority sorting in the latest priority sorting is further performed (the port priority sorting exists in the "Priority of the ports of the message sending device participating in the protection group" column in the latest configuration message). At this time, the valid upstream port with the second highest priority in the current target network device (that is, the valid upstream port with the second highest priority compared to the failed upstream port under the current circumstances) is used to transmit the data packet to the upper-layer connection device, that is, in the same network device, when its first-priority valid port fails, its second-priority valid port is switched to transmit data.
[0120] Furthermore, if all upstream ports of the current target network device fail, the valid target network device with the next highest priority (i.e., the valid target network device with the next highest priority compared to the priority of the current target network device under the current circumstances) is controlled according to the device priority sorting in the latest priority sorting to transmit the data packet to the upper-layer connection device.
[0121] See also Figure 8 , an embodiment of the present application provides a multi-link redundant control system, including:
[0122] The receiving module 10 is used to use the current target network device to receive a configuration message transmitted from any other target network device in the same user group.
[0123] The updating module 20 is used to compare the priorities of the current target network device and all forwarding devices in the configuration message, and when the priority of the current target network device is the highest, update the configuration message using the election information of the current target network device to obtain an updated configuration message.
[0124] The broadcast module 30 is used to control the current target network device to broadcast the updated configuration message to all other target network devices until the latest priority ranking of all target network devices is obtained.
[0125] The transmission module 40 is used to select the target network device with the highest priority according to the latest priority sorting when the lower layer connection device transmits the data message to all the target network devices, so as to transmit the data message to the upper layer connection device.
[0126] Exemplarily, the multi-link redundant control system of this embodiment corresponds to the multi-link redundant control method of the above embodiment. The options in the above embodiment are also applicable to this embodiment, so they will not be described repeatedly here.
[0127] The present application also provides a communication device, which may be, for example, a computer, etc. Exemplarily, the communication device includes a processor and a memory, wherein the memory stores a computer program, and the processor runs the computer program, thereby enabling the communication device to execute the functions of each module in the above-mentioned multi-link redundant control method or the above-mentioned multi-link redundant control system.
[0128] Among them, the processor can be an integrated circuit chip with signal processing capabilities. The processor can be a general-purpose processor, including a central processing unit (CPU), a graphics processing unit (GPU) and a network processor (NP), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or at least one of other programmable logic devices, discrete gates or transistor logic devices, and discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc., which can implement or execute the disclosed methods, steps and logic block diagrams in the embodiments of the present application.
[0129] The memory may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), etc. The memory is used to store a computer program, and the processor may execute the computer program accordingly after receiving an execution instruction.
[0130] The present application also provides a computer-readable storage medium for storing the computer program used in the above communication device. For example, the computer-readable storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0131] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and structure diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, program segment or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in an alternative implementation, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the structure diagram and / or the flow diagram, and the combination of boxes in the structure diagram and / or the flow diagram, can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0132] In addition, the functional modules or units in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0133] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a smart phone, a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application.
[0134] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.
Claims
1. A multi-link redundancy control method, characterized in that: include: Using the current target network device to receive a configuration message transmitted from any other target network device in the same user group; Comparing the priorities of the current target network device and all forwarding devices in the configuration message, and when the priority of the current target network device is the highest, updating the configuration message using the election information of the current target network device to obtain an updated configuration message; Controlling the current target network device to broadcast the updated configuration message to all other target network devices until the latest priority ranking of all target network devices is obtained; When the next layer connection device transmits a data message to all the target network devices, the target network device with the highest priority is selected according to the latest priority sorting to transmit the data message to the previous layer connection device.
2. The multi-link redundancy control method according to claim 1, characterized in that: Also includes: When one of the uplink ports of the current target network device fails, after updating the port status in the updated configuration message, the latest configuration message is broadcast to all the other target network devices; According to the port priority ranking in the latest priority ranking, controlling the valid uplink port with the next highest priority in the current target network device to transmit the data message to the upper layer connection device; When all the uplink ports of the current target network device fail, according to the device priority ranking in the latest priority ranking, controlling the valid target network device with the next highest priority to transmit the data message to the upper layer connection device; Among them, the priority of the device priority sorting is higher than that of the port priority sorting.
3. The multi-link redundancy control method according to claim 1, characterized in that: The step of using the current target network device to receive a configuration message transmitted from any other target network device in the same user group also includes: Adding the uplink ports of the plurality of target network devices into the same user group, and connecting all the target network devices in the same user group in sequence; Wherein, the plurality of target network devices are all connected to the same connection device of the next layer, and are connected to the same connection device of the previous layer through their respective uplink ports.
4. The multi-link redundancy control method according to claim 1, characterized in that: The comparing the priorities between the current target network device and all forwarding devices in the configuration message, and when the priority of the current target network device is the highest, updating the configuration message using the election information of the current target network device to obtain an updated configuration message, comprises: Compare the device priority of the current target network device with the device priorities of all forwarding devices in the configuration message respectively; When the device priority of the current target network device is the highest, replacing the election information of the forwarding device of the first priority with the election information of the current target network device to obtain the updated configuration message; The election information includes: user group address, device priority, port priority and port status.
5. The multi-link redundancy control method according to claim 1, characterized in that: The comparing the priorities between the current target network device and all forwarding devices in the configuration message further includes: When the device priorities of all forwarding devices are not less than the device priority of the current target network device, the election information of the current target network device is added to the configuration message to update the configuration message.
6. The multi-link redundancy control method according to claim 1, characterized in that: The step of obtaining the latest priority ranking of all target network devices includes: The latest priority ranking is obtained until the device priority of each target network device is lower than the device priority of the forwarding device with the first priority in the received configuration message.
7. The multi-link redundancy control method according to claim 1, characterized in that: The selecting, according to the latest priority sorting, a target network device with the highest priority to transmit the data message to an upper layer connection device includes: According to the device priority sorting and the port priority sorting in the latest priority sorting, the valid uplink port of the first priority on the target network device with the highest priority is controlled to transmit the data message to the upper layer connection device.
8. A multi-link redundant control system, characterized in that: include: A receiving module, used to use the current target network device to receive a configuration message transmitted from any other target network device in the same user group; An updating module, used for comparing the priorities of the current target network device and all forwarding devices in the configuration message, and when the priority of the current target network device is the highest, updating the configuration message using the election information of the current target network device to obtain an updated configuration message; A broadcast module, used to control the current target network device to broadcast the updated configuration message to all other target network devices until the latest priority ranking of all target network devices is obtained; The transmission module is used to select the target network device with the highest priority according to the latest priority sorting when the next layer connection device transmits the data message to all the target network devices, so as to transmit the data message to the previous layer connection device.
9. A communication device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the steps of the multi-link redundancy control method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: A computer program is stored, and when the computer program is executed by a processor, the steps of the multi-link redundancy control method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
EtherCAT slave station port identification and topology diagnosis system and method
CN120811819A