Improvement method and device for NUD state machine of network operating system
By introducing the cooling state NUD_COOLING in the NUD state machine, the problem of excessive address resolution request broadcast messages caused by the non-existence of neighbor table entries in the prior art is solved, and the utilization rate of network bandwidth is improved.
Patent Information
- Application Number
- CN202310323953.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-30
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2043-03-30
AI Technical Summary
When IP traffic is forwarded through routing, if the next neighbor table entry does not exist, the existing NUD state opportunity constantly triggers the address resolution request broadcast message, occupying network bandwidth resources.
Add the cooling state NUD_COOLING in the NUD state machine. When the neighbor entry state is NUD_COOLING, the duplicate IP traffic is discarded to avoid continuously sending address resolution request broadcast messages.
By suppressing the issuance of unnecessary address resolution request broadcast messages, the effective utilization rate of network bandwidth resources in the local network is improved.
Smart Images

Figure CN116248601B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of NUD state machine improvement, and in particular to a method and device for improving a NUD state machine of a network operating system. Background Art
[0002] When IP traffic is forwarded through routing, the MAC address of the next line needs to be obtained through the neighbor protocol. In the existing IP network, two neighbor protocols are used, namely the ARP protocol designed for IPv4 and the Neighbor Discovery protocol (ND) designed for IPv6. In order to reduce system overhead and reduce code duplication between similar services used by neighbor protocols such as ARP and ND, the general network OS (Operation System) provides a general neighbor infrastructure, in which the NUD (Neighbour Unreachability Detection) state mechanism is designed and implemented, such as Figure 1 As shown in the figure, this mechanism can quickly determine the link status of the neighbor. The NUD state machine includes the following states: NUD_INCOMPLETE, NUD_REACHABLE, NUD_DELAY, NUD_PROBE, NUD_STALE, NUD_NOARP, NUD_PERMANENT, NUD_NONE, NUD_FAILED. Among them, NUD_INCOMPLETE, NUD_REACHABLE, NUD_DELAY, and NUD_PROBE are timing states.
[0003] The main drawbacks are:
[0004] Network OS is applied to routers. After IP traffic finds a route, if the next neighbor table entry does not exist, the NUD state machine is triggered to learn the next MAC by sending an address resolution request broadcast message to the local network. If the MAC learning fails, but the IP traffic is continuously received (such as Figure 2 As shown in the figure), the NUD state machine will be continuously triggered to send address resolution request broadcast messages to the local network, and the request broadcast messages will continuously occupy network bandwidth resources. Summary of the invention
[0005] According to an embodiment of the present invention, a method for improving a NUD state machine of a network operating system is provided, comprising the following steps:
[0006] The trigger of receiving IP traffic creates a neighbor entry with the state of NUD_NONE and sends the IP traffic to the message queue of the neighbor entry.
[0007] Send an address resolution request to the local network neighbor and change the state of the neighbor item to NUD_INCOMPLETE;
[0008] The state of the neighbor entry is converted to NUD_COOLING, and the IP traffic in the message queue is discarded; or the state of the neighbor entry is converted to NUD_REACHABLE, and the IP traffic in the message queue is sent to the outside.
[0009] Furthermore, the following steps are included: when the state of the neighbor entry is NUD_COOLING, the same IP traffic is received again and is directly discarded, and the state of the neighbor entry remains unchanged.
[0010] Furthermore, the method further comprises the following steps: when the state of the neighbor item is NUD_FAILED, and during garbage collection processing, the neighbor item is deleted.
[0011] Furthermore, if the reachability confirmation information fed back by the local network neighbor is not received, and the number of times the address resolution request is sent to the local network neighbor has reached the upper limit, the state of the conversion neighbor item is changed to NUD_COOLING.
[0012] Furthermore, if reachability confirmation information is received from the local network neighbor, the state of the neighbor item is converted to NUD_REACHABLE.
[0013] According to another embodiment of the present invention, there is provided a device for improving a NUD state machine of a network operating system, comprising:
[0014] The receiving and creating module is used to receive the trigger of IP traffic, create a neighbor item with the state of NUD_NONE, and send the IP traffic to the message queue of the neighbor item;
[0015] The request sending module is used to send address resolution requests to local network neighbors and convert the state of the neighbor item to NUD_INCOMPLETE;
[0016] A discarding and sending module is used to convert the state of the neighbor item to NUD_COOLING, discard the IP traffic in the message queue, or convert the state of the neighbor item to NUD_REACHABLE, and send the IP traffic in the message queue to the outside;
[0017] Furthermore, it also includes: a secondary discarding module, which is used to directly discard the same IP traffic when the state of the neighbor item is NUD_COOLING, and the state of the neighbor item remains unchanged.
[0018] Furthermore, it also includes: a deletion module, which is used to delete the neighbor item when the state of the neighbor item is NUD_FAILED and during garbage collection processing.
[0019] Furthermore, if the reachability confirmation information fed back by the local network neighbor is not received, and the number of times the address resolution request is sent to the local network neighbor has reached the upper limit, the state of the conversion neighbor item is changed to NUD_COOLING.
[0020] Furthermore, if reachability confirmation information is received from the local network neighbor, the state of the neighbor item is converted to NUD_REACHABLE.
[0021] According to yet another embodiment of the present invention, a device is provided, including: a memory, a processor, and a computer program. The computer program is stored in the memory, and the processor runs the computer program to execute the method for improving the NUD state machine of the network operating system.
[0022] According to a fourth embodiment of the present invention, a readable medium having a non-volatile program code executable by a processor is provided, wherein the program code enables the processor to execute a method for improving a NUD state machine of a network operating system.
[0023] According to an embodiment of the present invention, a method for improving the NUD state machine of a network operating system, after some neighbors in the local network are disconnected, a cooling state NUD_COOLING is added to the NUD state machine to suppress the sending of address resolution request broadcast messages triggered by IP traffic sent to these neighbors, thereby improving the effective utilization of network bandwidth resources in the local network.
[0024] It is to be understood that both the foregoing general description and the following detailed description are exemplary, and are intended to provide further explanation of the technology as claimed. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 Schematic diagram of the NUD state machine of a general network OS.
[0026] Figure 2 This is a schematic diagram of part of the conversion process of the existing NUD state machine of the network OS.
[0027] Figure 3 A processing flow chart of triggering a NUD state machine for a certain IP flow according to an improved method for a network operating system NUD state machine according to an embodiment of the present invention;
[0028] Figure 4 The diagram is a partial conversion process diagram of the NUD state machine of the network OS according to the method for improving the NUD state machine of the network OS according to an embodiment of the present invention.
[0029] Figure 5 The figure is a flow chart of a method for improving a NUD state machine of a network operating system according to an embodiment of the present invention.
[0030] Figure 6The structure diagram of the device for improving the NUD state machine of the network operating system according to an embodiment of the present invention.
[0031] Figure 7 The figure is a structural diagram of a device according to an embodiment of the present invention. Implementation
[0032] The preferred embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings to further illustrate the present invention.
[0033] First, combine Figures 3-5 A method for improving a NUD state machine of a network operating system according to an embodiment of the present invention is described, which is used for improving the NUD state machine and has a wide range of application scenarios.
[0034] like Figures 3-5 As shown, the method for improving the NUD state machine of the network operating system according to the embodiment of the present invention comprises the following steps:
[0035] like Figure 5 As shown, in S1, the NUD state machine receives the trigger of IP traffic, creates a neighbor item with the state of NUD_NONE, and sends the IP traffic to the message queue of the neighbor item.
[0036] like Figure 5 As shown, in S2, the NUD state machine sends an address resolution request to the local network neighbor and simultaneously changes the state of the neighbor item to NUD_INCOMPLETE. In this embodiment, the address resolution request is sent in the form of a broadcast message.
[0037] like Figure 5 As shown, in S3, the NUD state machine transforms the state of the neighbor item into NUD_COOLING, discards the IP traffic in the message queue, or transforms the state of the neighbor item into NUD_REACHABLE, and sends the IP traffic in the message queue to the outside. In this embodiment, if the reachability confirmation information fed back by the local network neighbor is not received, and the number of times the address resolution request is sent to the local network neighbor has reached the upper limit, the state of the transformed neighbor item is NUD_COOLING. If the reachability confirmation information fed back by the local network neighbor is received, the state of the transformed neighbor item is NUD_REACHABLE.
[0038] Furthermore, the method for improving the NUD state machine of the network operating system according to the embodiment of the present invention further comprises the following steps: Figure 5 As shown, in S4, when the state of the neighbor item is NUD_COOLING, the same IP traffic is received again and is directly discarded, and the state of the neighbor item remains unchanged.
[0039] Furthermore, the method for improving the NUD state machine of the network operating system according to the embodiment of the present invention further comprises the following steps: Figure 5 As shown, in S5, the following steps are also included: when the state of the neighbor item is NUD_FAILED, and during garbage collection processing, the neighbor item is deleted.
[0040] As described above, in the method for improving the NUD state machine of the network operating system according to an embodiment of the present invention, after some neighbors in the local network are disconnected, the sending of address resolution request broadcast messages triggered by IP traffic sent to these neighbors is suppressed by adding a cooling state NUD_COOLING in the NUD state machine, thereby improving the effective utilization rate of network bandwidth resources in the local network.
[0041] like Figure 6 As shown, according to another embodiment of the present invention, there is provided an improved device for the NUD state machine of a network operating system, comprising: a receiving creation module 100, a request sending module 200 and a discard sending module 300. The receiving creation module 100 is used to receive a trigger of IP traffic, create a neighbor item with a state of NUD_NONE, and send the IP traffic to the message queue of the neighbor item; the request sending module is used to send an address resolution request to a local network neighbor, and at the same time convert the state of the neighbor item to NUD_INCOMPLETE; the discard sending module is used to convert the state of the neighbor item to NUD_COOLING, discard the IP traffic in the message queue, or convert the state of the neighbor item to NUD_REACHABLE, and send the IP traffic in the message queue to the outside.
[0042] Furthermore, if the reachability confirmation information fed back by the local network neighbor is not received, and the number of times the address resolution request is sent to the local network neighbor has reached the upper limit, the state of the converted neighbor item is NUD_COOLING. If the reachability confirmation information fed back by the local network neighbor is received, the state of the converted neighbor item is NUD_REACHABLE.
[0043] Furthermore, another embodiment of the present invention further includes a secondary discarding module 400 for directly discarding the same IP traffic received again when the state of the neighbor item is NUD_COOLING, and the state of the neighbor item remains unchanged.
[0044] Furthermore, the device for improving the NUD state machine of the network operating system according to another embodiment of the present invention further comprises: a deletion module 500 for deleting the neighbor entry when the state of the neighbor entry is NUD_FAILED and during garbage collection processing.
[0045] The above combined with Figure 6 The value exchange device based on blockchain according to an embodiment of the present invention is described. Furthermore, the present invention can also be applied to a device.
[0046] Specifically, Figure 7 As shown, an embodiment of the present invention provides a device, including: a memory 1, a processor 2 and a computer program 3, wherein the computer program 3 is stored in the memory 1, and the processor 2 runs the computer program 3 to execute the above-mentioned method for improving the NUD state machine of the network operating system.
[0047] An embodiment of the present invention provides a device that executes an improved method for a NUD state machine of a network operating system. When some neighbors in a local network are disconnected, a cooling state NUD_COOLING is added to the NUD state machine to suppress the sending of address resolution request broadcast messages triggered by IP traffic sent to these neighbors, thereby improving the effective utilization rate of network bandwidth resources in the local network.
[0048] The above combined with Figure 7 A device according to an embodiment of the present invention is described. Further, the present invention can also be applied to a readable medium having a non-volatile program code executable by a processor.
[0049] Specifically, an embodiment of the present invention provides a readable medium having a non-volatile program code executable by a processor, and the program code enables the processor to run the above-mentioned method for improving the NUD state machine of the network operating system. Among them, the readable storage medium can be a computer storage medium or a communication medium. The communication medium includes any medium that is convenient for transmitting a computer program from one place to another. The computer storage medium can be any available medium that can be accessed by a general or special computer. For example, the readable storage medium is coupled to the processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in a dedicated integrated circuit. In addition, the dedicated integrated circuit can be located in a device. Of course, the processor and the readable storage medium can also exist in a communication device as discrete components. The readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc. The present invention also provides a program product, which includes an execution instruction, and the execution instruction is stored in a readable storage medium. At least one processor of the device can read the execution instruction from the readable storage medium, and at least one processor executes the execution instruction so that the device implements the value exchange method based on blockchain provided by the above-mentioned various embodiments. In the embodiment of the above-mentioned device, it should be understood that the processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the present invention can be directly embodied as being executed by a hardware processor, or executed by a combination of hardware and software modules in the processor.
[0050] It should be noted that, in this specification, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprises..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0051] Although the content of the present invention has been described in detail through the above preferred embodiments, it should be appreciated that the above description should not be considered as a limitation of the present invention. After reading the above content, it will be apparent to those skilled in the art that various modifications and substitutions of the present invention will occur. Therefore, the protection scope of the present invention should be limited by the appended claims.
Claims
1. A method for improving a NUD state machine of a network operating system, characterized in that: The following steps are included: Receiving a trigger of IP traffic, creating a neighbor item with a state of NUD_NONE, and sending the IP traffic to the message queue of the neighbor item; Send an address resolution request to the local network neighbor and change the state of the neighbor item to NUD_INCOMPLETE; Convert the state of the neighbor item to NUD_COOLING, discard the IP traffic in the message queue, or convert the state of the neighbor item to NUD_REACHABLE, and send the IP traffic in the message queue to the outside; When the state of the neighbor item is NUD_COOLING, if the same IP traffic is received again, it is directly discarded and the state of the neighbor item remains unchanged; When the state of the neighbor item is NUD_FAILED, and during garbage collection, the neighbor item is deleted; If the reachability confirmation information fed back by the local network neighbor is not received, and the number of times the address resolution request is sent to the local network neighbor has reached the upper limit, the state of the neighbor item is converted to NUD_COOLING; If reachability confirmation information fed back by the local network neighbor is received, the state of the neighbor item is converted to NUD_REACHABLE.
2. An improved device for a network operating system NUD state machine, characterized in that: Include: A receiving and creating module, used for receiving a trigger of IP traffic, creating a neighbor item with a state of NUD_NONE, and sending the IP traffic into a message queue of the neighbor item; A request sending module, used for sending an address resolution request to a local network neighbor, and converting the state of the neighbor item to NUD_INCOMPLETE; A discarding and sending module, used to convert the state of the neighbor item to NUD_COOLING, discard the IP traffic in the message queue, or convert the state of the neighbor item to NUD_REACHABLE, and send the IP traffic in the message queue to the outside; A secondary discarding module, used for directly discarding the same IP traffic received again when the state of the neighbor entry is NUD_COOLING, and the state of the neighbor entry remains unchanged; A deletion module, used for deleting the neighbor item when the state of the neighbor item is NUD_FAILED and during garbage collection processing; If the reachability confirmation information fed back by the local network neighbor is not received, and the number of times the address resolution request is sent to the local network neighbor has reached the upper limit, the state of the neighbor item is converted to NUD_COOLING; If reachability confirmation information fed back by the local network neighbor is received, the state of the neighbor item is converted to NUD_REACHABLE.
3. An electronic device, characterized in that: include: A memory, a processor and a computer program, wherein the computer program is stored in the memory, and the processor runs the computer program to execute the method for improving the NUD state machine of a network operating system as claimed in claim 1.
4. A readable medium having a non-volatile program code executable by a processor, characterized in that: The program code enables the processor to execute the method for improving the NUD state machine of a network operating system as claimed in claim 1.
Citation Information
Patent Citations
Method and device for comprehensively testing NUD
CN102404168A
Neighbor table entry processing method and device
CN107547496A