A dynamic NC election method
Through the dynamic NC election method, the NC discovery protocol is used to send NCDP messages from the highest priority device, and the low priority device enters the observation cycle, confirming that the high priority device is an NC device, solving the problem that NC cannot be elected in real time in the existing network. It realizes unified management of local area network devices and real-time switching of NC functions.
Patent Information
- Application Number
- CN202211559901.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-06
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2042-12-06
AI Technical Summary
The existing network cannot effectively elect a new network controller (NC) device in real time, resulting in the loss of network control capabilities when there is a problem with the original NC, and the deployment cost is increased by configuring NC separately in small scenarios.
Using the dynamic NC election method, based on the NC discovery protocol, the highest priority device regularly sends NCDP messages. After receiving the low priority device, it enters the observation cycle, confirms that the high priority device is an NC device and accesses through authentication.
It realizes the dynamic selection of equipment with the most suitable resources and performance in the LAN to assume the NC function, ensuring that there is real-time switching when there is a problem with the original NC, and achieves the purpose of unified management of network equipment of the same LAN.
Smart Images

Figure CN115913870B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to network equipment design technology, and in particular to a dynamic NC election technology. Background Art
[0002] Glossary:
[0003] NC - Network Controller, network controller.
[0004] NCDP-Network Controller Discovers Protocols, network controller discovery protocol.
[0005] AP - Access Point.
[0006] NC is one of the more common devices in networking, providing unified management capabilities for the network's wireless APs, switches, routing gateways, etc.
[0007] In existing networks, fixed devices are usually used as NCs for the entire network. When the device is removed from the network or fails, the existing network cannot elect another device from other types of devices to assume the NC function, thus losing the ability to control the entire network. In addition, configuring a separate NC in some small scenarios is tantamount to increasing deployment costs and is not very practical.
[0008] It can be seen that providing a flexible and dynamic virtual network controller solution is an issue that urgently needs to be solved in this field. Summary of the invention
[0009] In view of the problem that an NC cannot be effectively elected in real time in the existing network structure, the purpose of the present invention is to propose a dynamic NC election method to realize the discovery or election of a device to assume the function of a network controller, so as to achieve the purpose of unified management of network devices in the same local area network.
[0010] In order to achieve the above object, the present invention provides a dynamic NC election method, based on the NC discovery protocol, in which the highest priority device periodically sends NCDP messages to the current Layer 2 network to notify the current status of the device, and quickly elects NC devices according to device priority.
[0011] Furthermore, in the election method, after other low-priority devices receive the high-priority NCDP broadcast message, they enter the observation cycle and successfully pass the specified observation period, then confirm that the highest priority device sending the NCDP message is the NC device, and access the NC device through authentication.
[0012] Furthermore, the observation period is an integer multiple of the NCDP message sending interval, and the starting point of the observation period is the time when the high-priority NCDP message is received.
[0013] Furthermore, in the election method, if other low-priority devices do not have a higher-priority device passing their observation period, if they have been connected to the NC, they will maintain the connected state; if they have not been connected to the NC, they will start sending NCDP messages.
[0014] Furthermore, in the election method, if the low-priority device times out receiving the NCDP broadcast message sent by the high-priority device within the time range of the sum of the sending interval time and the quantization time of the device itself, the low-priority device starts to send the NCDP broadcast message.
[0015] Furthermore, in the election method, if the device with the highest priority does not receive an NCDP broadcast message with a higher priority during the period of sending the NCDP broadcast message and reaches a specified time, the device with the highest priority starts the NC service.
[0016] Furthermore, in the election method, if the device with the highest priority receives an NCDP broadcast message with a higher priority while sending an NCDP broadcast message, the device stops sending the NCDP broadcast message and shuts down the NC service at the same time.
[0017] Based on the solution provided by the present invention, a device with the most suitable resources and performance can be dynamically selected in the same layer 2 network to carry the NC function. When a problem occurs with the original NC, the NC function can be switched to other devices in real time, thereby achieving the purpose of unified management of network devices in the same local area network. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments.
[0019] Figure 1 This is an example diagram of the NC election mechanism state machine involved in the example of the present invention;
[0020] Figure 2 This is an example diagram of the NC election mechanism involved in the example of the present invention;
[0021] Figure 3 This is an example diagram of the NCDP message structure involved in the example of the present invention;
[0022] Figure 4 This is an example diagram of the NC election network topology involved in the example of the present invention. DETAILED DESCRIPTION
[0023] In order to make the technical means, creative features, objectives and effects achieved by the present invention easy to understand, the present invention is further explained below with reference to specific diagrams.
[0024] The solution of the present invention constructs a dynamic NC election mechanism by introducing an NC discovery protocol, so as to quickly confirm that a device becomes an NC in a local area network or re-elect a new NC device when the original NC is missing, thereby improving the convenience, security and reliability of networking.
[0025] The NC discovery protocol in this solution is specifically based on the NCDP message to announce the unique identification, priority and other information; and the NC in the local area network is determined according to the priority, that is, the higher the priority, the greater the possibility of becoming the NC.
[0026] Specifically, in the solution of the present invention, based on the NC discovery protocol, the device with the highest priority periodically sends an NCDP message to the current layer 2 network to notify the current state of the device, and quickly elects an NC device according to the device priority.
[0027] On this basis, if other low-priority devices receive high-priority NCDP broadcast messages, enter the observation cycle and successfully pass the specified observation period, they confirm that the highest-priority device sending the NCDP message is the NC device, and access the NC device through authentication.
[0028] If the low-priority device times out receiving the NCDP broadcast message sent by the high-priority device within the specified time, the low-priority device starts sending NCDP broadcast messages.
[0029] The prescribed time here refers to whether the relevant time is within the time range of the sum of the sending interval time and the quantization time of this device (1-the priority of this device / 256).
[0030] If the device with the highest priority does not receive an NCDP broadcast message of a higher priority during the period of sending the NCDP broadcast message, and the specified time is reached, the device with the highest priority starts the NC service.
[0031] If the highest priority device receives a higher priority NCDP broadcast message while sending NCDP broadcast messages, it stops sending NCDP broadcast messages and shuts down the NC service at the same time.
[0032] It should be noted here that the observation period here is an integer multiple of the interval between NCDP message sending, and the starting point of the observation period is the reception of a high-priority NCDP message; a device in the observation period does not send NCDP messages and does not change the access status of the original NC. If it can continuously receive high-priority NCDP messages within the observation period, it is considered to have passed the observation period.
[0033] Furthermore, if other low-priority devices do not have a higher-priority device passing their observation period, if they have been connected to the NC, they will maintain the connected state; if they have not been connected to the NC, they will start sending NCDP messages.
[0034] In some embodiments of the present invention, Figure 1 As shown, when implementing the dynamic NC election solution provided by the present invention, three state machines are defined for corresponding devices in NC election: initial state, active state, and backup state to cooperate in implementing the dynamic election of NC devices.
[0035] Only devices in active state can enable the NC function; devices in backup state elect NC according to priority, and the successfully elected device starts the NC service function, and other devices are connected to the NC device.
[0036] Accordingly, the elected NC device periodically sends NCDP notification messages to all other devices in the backup group to announce their information (priority, etc.) and working status.
[0037] If the NC device stops serving, the NC backup device will re-elect a new NC based on the priority.
[0038] When the original device resumes service or a new device is added, if its priority is higher than that of the current NC, it will actively send NCDP messages to compete for becoming the new NC.
[0039] like Figure 2 As shown in the figure, the process of dynamic NC election based on three state machines is as follows:
[0040] The device initially enters the initial state and creates a timeout timer.
[0041] After entering the backup state from the initial state, it starts to receive NCDP messages.
[0042] If a device in the backup state receives a higher priority NCDP message within the reception timeout period, it continues to remain in the backup state.
[0043] If the device in the backup state does not receive a higher priority NCDP message within the reception timeout period, it enters the active state and starts sending NCDP messages.
[0044] If a higher priority message is received in the active state, the NCDP message is stopped and the state is switched to the backup state.
[0045] As can be seen from the above, in this NC dynamic election scheme, the devices participating in the election define corresponding priorities according to their own capabilities; and determine the role (active device or backup device) of each device in the same layer 2 network element according to the priority; the higher the priority, the more likely it is to become an active device.
[0046] If the priority of the active device is higher than or equal to its own priority, the backup device remains in the backup state.
[0047] If the priority of the active device is lower than that of the backup device, the backup device will switch to the active state.
[0048] If multiple devices switch to the active state at the same time, after the exchange of NCDP notification messages, the device with the lower priority will switch to the backup state, and the device with the highest priority will become the active state device.
[0049] The NCDP message involved in the solution of the present invention is a UDP-based broadcast message. Figure 3 , which shows an example of the structure of the NCDP message in the present invention.
[0050] For example, the NCDP message mainly includes a version field, a type field, a priority field, a MAC field, a seq field, an Rsvd field, an Adver Int maximum notification interval, a Length field, and a Payload field.
[0051] The version field specifies the NDCP protocol version of this packet.
[0052] The type field specifies the type of this NCDP packet.
[0053] The priority field specifies the priority of the device sending the message.
[0054] The MAC field specifies the MAC address of the sending device.
[0055] The seq field specifies the send sequence number of the sending device.
[0056] Rsvd reserved field.
[0057] Adver Int Maximum advertisement interval indicates the time interval between advertisements.
[0058] The Length field specifies the length of the data portion.
[0059] The Payload field has the specified data payload.
[0060] The NCDP message constructed in this way can be effectively used in the current Layer 2 network to notify the unique identification, priority, notification interval and other information of the device externally, and can be extended with some private information through the data field.
[0061] The dynamic NC election scheme provided by the present invention can automatically elect the most suitable device to assume the function of the network controller according to the device status of the local area network, and can also support the real-time master-slave switching function when the network controller is redundantly backed up; it is also an important part of realizing the NC virtualization function of the cross-platform unified communication gateway.
[0062] With respect to the solution provided by the present invention, the specific application of the solution of the present invention is further illustrated by corresponding examples below.
[0063] See also Figure 4 , which shows the network topology involved in the NC election in this example. In this figure, R1, R2, R3, and SW1 are cross-platform unified communication gateways and switches that support NC functions in the same Layer 2 network. The priority order is R1>R2>R3.
[0064] R1, R2, and R3 are connected to the same Layer 2 network. R1 starts to send NCDP messages because it has not received any NCDP messages with a higher priority than that of the device after the waiting period has expired. R2 and R3 are connected to R1 because they have received NCDP messages from R1 with a higher priority, and are subject to the unified management of R1.
[0065] When R1 is working normally, it will send NCDP messages regularly. The sending period is Advertisement_Interval, which defaults to 1 second.
[0066] When R2 and R3 receive NCDP messages from R1, a preset observation time is reached. If the NCDP message of R1 is stable after the observation time, R1 is considered to be in a stable state. The value of the observation time Observe_Interval is: T1*Advertisement_Interval, and the default value of T1 is 2.
[0067] When R1 turns off the NC function, it will send a notification message with a priority of 0 to enable R2 and R3 to quickly switch to the active state. The time for R2 and R3 to switch from the backup state to the active state is calculated as follows: Skew_time = 1-the priority of this device / 256, in seconds. If a higher priority NCDP message is received within the switching time, the device stops switching and continues to remain in the backup state.
[0068] When R1 fails to send notification messages due to a network failure, R2 and R3 cannot immediately know the working status of R1. After the NC_Down_Interval timer times out, R1 is considered to be unable to work properly and the state is switched to active. The NC_Down_Interval is calculated as: Observe_Interval + Skew_time. If a higher priority NCDP message is received within the switching time, the device stops switching and continues to maintain the backup state.
[0069] As can be seen from the above, the NC election scheme provided by the present invention can quickly confirm that a device becomes an NC in a local area network or re-elect a new NC when the original NC is missing, and can ensure that a reliable election method is provided when the device status is unstable.
[0070] The above-mentioned method of the present invention, or a specific system unit, or a part of the same, is a pure software architecture, which can be arranged on a physical medium, such as a hard disk, an optical disk, or any electronic device (such as a smart phone, a computer-readable storage medium) through program code. When the machine loads the program code and executes it (such as a smart phone loading and executing it), the machine becomes a device for implementing the present invention. The above-mentioned method and device of the present invention can also be transmitted in the form of program code through some transmission media, such as cables, optical fibers, or any transmission mode. When the program code is received, loaded and executed by a machine (such as a smart phone), the machine becomes a device for implementing the present invention.
[0071] The above shows and describes the basic principles, main features and advantages of the present invention. It should be understood by those skilled in the art that the present invention is not limited to the above embodiments, and the above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention to be protected. The scope of protection of the present invention is defined by the attached claims and their equivalents.
Claims
1. A dynamic NC election method, characterized in that: Based on the NC discovery protocol, the device with the highest priority periodically sends NCDP messages to the current Layer 2 network to notify the current status of the device and quickly elect the NC device based on the device priority; After other low-priority devices receive high-priority NCDP broadcast messages, they enter the observation period and successfully pass the specified observation period, then the highest priority device sending the NCDP message is confirmed to be the NC device, and access to the NC device is achieved through authentication. The starting point of the observation period is the receipt of the high-priority NCDP message, and the device in the observation period does not send NCDP messages and does not change the access status of the original NC. If it can continuously receive high-priority NCDP messages within the observation period, it is considered to have passed the observation period.
2. The method for selecting a dynamic NC according to claim 1, characterized in that: In the election method, if other low-priority devices do not have a higher-priority device passing their observation period, if they have been connected to the NC, they will maintain the connected state; if they have not been connected to the NC, they will start sending NCDP messages.
3. The method for selecting a dynamic NC according to claim 1 or 2, characterized in that: The observation period is an integer multiple of the NCDP message sending interval.
4. The method for selecting a dynamic NC according to claim 1, characterized in that: In the election method, if the low-priority device times out receiving the NCDP broadcast message sent by the high-priority device within the time range of the sum of the sending interval time and the quantization time of the device itself, the low-priority device starts to send the NCDP broadcast message.
5. The method for selecting a dynamic NC according to claim 1, characterized in that: In the election method, if the device with the highest priority does not receive an NCDP broadcast message with a higher priority during the period of sending the NCDP broadcast message and reaches a specified time, the device with the highest priority starts the NC service.
6. The method for selecting a dynamic NC according to claim 1, characterized in that: In the election method, when the device with the highest priority receives an NCDP broadcast message with a higher priority during the period of sending an NCDP broadcast message, the device stops sending the NCDP broadcast message and shuts down the NC service at the same time.
Citation Information
Patent Citations
Distribution network differential protection method and device
CN114071458A