Neighbor discovery method, device and equipment and computer readable storage medium

By using the global neighbor information table in multi-link scenarios, determining the optimal link for neighbor unreachable detection, the problem that traditional ND protocols cannot share information across links is solved, which improves detection efficiency and reduces resource waste.

CN120583484AActive Publication Date: 2025-09-02FIBERHOME TELECOMMUNICATION TECHNOLOGIES CO LTD +2
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510870225.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-26
Publication Date
2025-09-02
Estimated Expiration
2045-06-26

AI Technical Summary

Technical Problem

During the neighbor discovery process of multimode terminals, traditional ND protocols cannot share information across links, resulting in repeated detection and waste of resources.

Method used

By searching multiple link table entries identified by the same neighbor in the global neighbor information table, the optimal table entries are determined for neighbor unreachable detection, and the link status is updated based on the detection results, and a unified neighbor status database across links is established.

Benefits of technology

It improves the efficiency of neighbor unreachable detection, reduces the number of repeated detections, avoids resource waste, and realizes fast link switching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120583484A_ABST
    Figure CN120583484A_ABST
Patent Text Reader

Abstract

The invention discloses a neighbor discovery method, device and equipment and a computer readable storage medium. The method comprises the following steps: when a first table item of a first link exists in a global neighbor information table and neighbor unreachable detection for the first link is triggered, searching a second table item corresponding to the same neighbor identifier as the first table item from the global neighbor information table; determining an optimal table item from the first table item and the second table item, and performing neighbor unreachable detection by using an optimal link corresponding to the optimal table item to obtain a neighbor unreachable detection result; and updating the first table item and the second table item based on the neighbor unreachable detection result. According to the method and the device, in a multi-link scene, the optimal link is used for performing neighbor unreachable detection, and the neighbor states of the plurality of links linked with the same neighbor are updated based on the detection result, so that the detection efficiency is improved, the number of repeated detection times is reduced, and resource waste is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a neighbor discovery method, apparatus, device, and computer-readable storage medium. Background Art

[0002] When a multimode terminal (supporting Wi-Fi, Ethernet, cellular, and Bluetooth) discovers a neighbor with another multimode terminal, the multilink device must independently run the Neighbor Discovery (ND) protocol on each physical interface. Therefore, the multilink device cannot use the reachability information of other links to assist the current link in identifying neighbor status. Summary of the Invention

[0003] The present application provides a neighbor discovery method, apparatus, device, and computer-readable storage medium, which can solve the technical problem in the prior art that the traditional ND protocol cannot share information across links, resulting in repeated detection and waste of resources.

[0004] In a first aspect, an embodiment of the present application provides a neighbor discovery method, the neighbor discovery method comprising: When a first table entry for a first link exists in the global neighbor information table and neighbor unreachability detection for the first link is triggered, searching the global neighbor information table for a second table entry corresponding to the same neighbor identifier as the first table entry; Determine an optimal entry from the first entry and the second entry, and perform neighbor unreachability detection using an optimal link corresponding to the optimal entry to obtain a neighbor unreachability detection result; The first table entry and the second table entry are updated based on the neighbor unreachable detection result.

[0005] In combination with the first aspect, in one implementation, the neighbor discovery method further includes: When there is a message that needs to be forwarded through the first link, if the neighbor status in the first entry of the first link in the global neighbor information table is not a reachable state, neighbor unreachable detection for the first link is triggered.

[0006] In combination with the first aspect, in one implementation, the neighbor discovery method further includes: When the neighbor state in the first table entry of the first link in the global neighbor information table is the detection state, neighbor unreachability detection for the first link is triggered.

[0007] In conjunction with the first aspect, in one embodiment, determining the optimal entry from the first entry and the second entry includes: An entry with the best link quality is selected as the best entry according to the link quality information of each entry in the first entry and the second entry.

[0008] In conjunction with the first aspect, in one embodiment, the neighbor unreachable detection result includes the latest neighbor status and the latest link quality information, and updating the first table entry and the second table entry based on the neighbor unreachable detection result includes: The neighbor status in the first table entry and the second table entry is updated to the latest neighbor status, and the link quality information in the optimal table entry is updated to the latest link quality information.

[0009] In combination with the first aspect, in one implementation, the neighbor discovery method further includes: For each entry in the global neighbor information table, a quality measurement of the link corresponding to the entry is initiated at a preset time interval, and the link quality information in each entry is updated based on the quality measurement result.

[0010] In combination with the first aspect, in one implementation, the neighbor discovery method further includes: When there is a message that needs to be forwarded through the first link and the first table entry of the first link does not exist in the global neighbor information table, a dummy table entry is created in the global neighbor information table, wherein the neighbor address in the dummy table entry is the next hop address of the route found according to the destination address of the message, and the neighbor identifier, neighbor status, outgoing interface address, opposite end physical link address, and link quality information in the dummy table entry are all default values; Sending an NS message with the next hop address as the target address, and the NS message includes a local device identifier; Receive the NA message sent back by the neighboring device after receiving the NS message; The outbound interface address is obtained based on the port receiving the NA message, the link quality information is determined based on the timestamp and number of NS messages sent and the timestamp and number of NA messages received, and the NA message is parsed to obtain the neighbor ID and the peer physical link address; The fake entry is updated based on the outgoing interface address, link quality information, neighbor identifier, and peer physical link address, and the neighbor status in the fake entry is updated to a reachable state to obtain a first entry. In a second aspect, an embodiment of the present application provides a neighbor discovery device, the neighbor discovery device comprising: a search module configured to, when a first table entry for a first link exists in the global neighbor information table and neighbor unreachability detection for the first link is triggered, search the global neighbor information table for a second table entry corresponding to the same neighbor identifier as the first table entry; A selection module is configured to determine an optimal entry from the first entry and the second entry, and perform neighbor unreachability detection using an optimal link corresponding to the optimal entry to obtain a neighbor unreachability detection result; An updating module, configured to update the first table entry and the second table entry based on the neighbor unreachable detection result In a third aspect, an embodiment of the present application provides a neighbor discovery device, which includes a processor, a memory, and a neighbor discovery program stored on the memory and executable by the processor, wherein when the neighbor discovery program is executed by the processor, the steps of the neighbor discovery method described in the first aspect are implemented.

[0011] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a neighbor discovery program is stored, wherein when the neighbor discovery program is executed by a processor, the steps of the neighbor discovery method described in the first aspect are implemented.

[0012] The beneficial effects of the technical solutions provided in the embodiments of the present application include: In an embodiment of the present application, when a first table entry for a first link exists in the global neighbor information table and a neighbor unreachable detection for the first link is triggered, a second table entry corresponding to the same neighbor identifier as the first table entry is searched from the global neighbor information table; the optimal table entry is determined from the first table entry and the second table entry, and a neighbor unreachable detection is performed using the optimal link corresponding to the optimal table entry to obtain a neighbor unreachable detection result; the first table entry and the second table entry are updated based on the neighbor unreachable detection result. Through an embodiment of the present application, in a multi-link scenario, the optimal link is used to perform neighbor unreachable detection, and the neighbor status of multiple links connected to the same neighbor is updated based on the detection result, which improves detection efficiency and reduces the number of repeated detections, thereby avoiding waste of resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 This is a flowchart of an embodiment of a neighbor discovery method of the present application; Figure 2 This is a schematic diagram of a global neighbor information table in an embodiment of a neighbor discovery method of the present application; Figure 3 Expand the schematic for the device identifier option; Figure 4 This is a schematic diagram of NS message expansion; Figure 5 This is a schematic diagram of NA message expansion; Figure 6 Create a flow chart for the global neighbor information table; Figure 7 This is a flowchart of another embodiment of the neighbor discovery method of the present application; Figure 8 This is a schematic diagram of the functional modules of an embodiment of a neighbor discovery device of the present application; Figure 9 This is a schematic diagram of the hardware structure of the neighbor discovery device involved in the embodiment of the present application. DETAILED DESCRIPTION

[0014] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0015] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.

[0016] In a first aspect, an embodiment of the present application provides a neighbor discovery method.

[0017] In one embodiment, referring to Figure 1 , Figure 1 This is a flow chart of an embodiment of the neighbor discovery method of this application. Figure 1 As shown, the neighbor discovery method includes: Step S10: When a first entry for a first link exists in the global neighbor information table and neighbor unreachability detection for the first link is triggered, searching the global neighbor information table for a second entry corresponding to the same neighbor identifier as the first entry; In this embodiment, refer to Figure 2 , Figure 2 Schematic diagram of a global neighbor information table in an embodiment of the neighbor discovery method of this application. Figure 2 As shown in the figure, each entry in the global neighbor information table includes the neighbor ID, neighbor address, peer physical link address, outbound interface address, neighbor status, and link quality information of the corresponding link. The neighbor ID is used to identify the neighbor device. If the neighbor ID is the same, it means that these entries correspond to different links of the same neighbor. Multi-links use the IPv6 protocol, and the neighbor address is the IPv6 address of the neighbor device. The peer physical link address is the physical address of the network interface of the neighbor device. The outbound interface address is the outbound interface of the packet, which is learned during the ND learning process based on the inbound interface of the NA message. The neighbor status refers to the ND status of the link corresponding to the entry, which mainly includes the following five types: Incomplete, Reachable, Stale, Delay, and Probe. The link quality information is used to characterize the link quality, including delay and packet loss rate.

[0018] Reference Figure 2 , when the neighbor unreachable detection for the first link is triggered, if the first entry corresponding to the first link is Figure 2If the table entry 1 in the sequence number is 1, it means that the first table entry of the first link exists in the global neighbor information table, then the second table entry corresponding to the same neighbor identifier as the table entry 1 is searched from the global neighbor information table. Figure 2 For example, the neighbor identifier corresponding to entry 1 is ID_1, and the neighbor identifiers corresponding to entries 2 and 3 are also ID_1, so the second entry includes entry 2 and entry 3.

[0019] Furthermore, in one embodiment, the neighbor discovery method further includes: When there is a message that needs to be forwarded through the first link, if the neighbor status in the first entry of the first link in the global neighbor information table is not a reachable state, neighbor unreachable detection for the first link is triggered.

[0020] In this embodiment, for the local device, when a message needs to be sent, the routing next hop address is first searched according to the message destination address, and then the neighbor address item of the global neighbor information table is searched according to the next hop address. For example, if the next hop address is Nad_3, refer to Figure 2 , the neighbor address of entry 3 is Nad_3. A table lookup confirms that the first entry is entry 3, meaning that the first link is the link corresponding to entry 3. If the neighbor status S_3 in entry 3 is not reachable, a neighbor unreachable detection is triggered for the first link corresponding to entry 3. Each link corresponds to only one entry.

[0021] Furthermore, in one embodiment, the neighbor discovery method further includes: When the neighbor state in the first table entry of the first link in the global neighbor information table is the detection state, neighbor unreachability detection for the first link is triggered.

[0022] In this embodiment, the state of each entry in the global neighbor information table changes over time and with interactions with neighbors. For example, after the aging time of entry X in the "stale" state expires, it enters the "delay" state. After the "delay" state times out for 5 seconds, it switches to the "detect" state, triggering neighbor unreachability detection for the first link corresponding to entry X.

[0023] Step S20: determining an optimal entry from the first entry and the second entry, and performing neighbor unreachability detection using the optimal link corresponding to the optimal entry to obtain a neighbor unreachability detection result; In this embodiment, referring to the above description, Figure 2 As shown, assuming that the first table item is table item 1 and the second table item includes table item 2 and table item 3, the optimal table item is determined from table item 1, table item 2 and table item 3, and the neighbor unreachability detection is performed using the optimal link corresponding to the optimal table item to obtain the neighbor unreachability detection result.

[0024] Furthermore, in one embodiment, determining the optimal entry from the first entry and the second entry includes: An entry with the best link quality is selected as the best entry according to the link quality information of each entry in the first entry and the second entry.

[0025] In this embodiment, taking the example of link quality information including latency and packet loss rate, assuming that the first table item is table item 1 and the second table items include table items 2 and 3, the latency of table items 1, 2, and 3 can be preferentially compared, and the table item with the smallest latency is selected as the table item with the best link quality. When the latency of table items 1, 2, and 3 are the same, the packet loss rates are compared, and the table item with the smallest packet loss rate is selected as the table item with the best link quality. Alternatively, the latency and packet loss rate of each table item can be normalized, and then a weighted sum of the latency and packet loss rate is performed to obtain a quality representation value for each table item. The optimal table item can then be selected based on the quality representation value of each table item. Based on this, the optimal table item can be determined, and neighbor unreachability detection can be performed on the link corresponding to the optimal table item to obtain the neighbor unreachability detection result.

[0026] Furthermore, in one embodiment, the neighbor discovery method further includes: For each entry in the global neighbor information table, a quality measurement of the link corresponding to the entry is initiated at a preset time interval, and the link quality information in each entry is updated based on the quality measurement result.

[0027] In this embodiment, in a multi-link coordination scenario, to prevent ND detection from always prioritizing a particular link and failing to detect improvements in other links' network conditions, and thus failing to update latency and packet loss rates to improve the probability of selection, the following two solutions can be added for optimization: 1. For each entry in the global neighbor information table, a new network detection timeout timer is added. The default timeout is 60 minutes and can be configured. When the network detection timeout timer times out, the system actively sends packets to measure the delay and packet loss rate of the link corresponding to the entry, and updates the delay and packet loss rate of the entry.

[0028] 2. Link quality analysis functions (such as ping, traceroute, and NQA) are linked to timely analyze the link quality of each entry in the global neighbor information table, thereby updating the link quality information of each entry in the global neighbor information table.

[0029] Step S30: Update the first table entry and the second table entry based on the neighbor unreachable detection result.

[0030] In this embodiment, assuming that the first table entry is table entry 1, the second table entry includes table entry 2 and table entry 3, and the optimal table entry is table entry 3, neighbor unreachability detection is performed based on table entry 3 to determine whether communication with the neighbor is reachable based on the link corresponding to table entry 3. For a terminal device that supports multiple links, for a specific neighbor device, regardless of which link the terminal device uses, as long as the detection is reachable, it indicates that the neighbor is reachable. Therefore, the neighbor status in table entries 1, table entries 2, and table entries 3 can be directly updated based on the neighbor unreachability detection result.

[0031] Furthermore, in one embodiment, the neighbor unreachable detection result includes the latest neighbor status and the latest link quality information, and updating the first table entry and the second table entry based on the neighbor unreachable detection result includes: The neighbor status in the first table entry and the second table entry is updated to the latest neighbor status, and the link quality information in the optimal table entry is updated to the latest link quality information.

[0032] In this embodiment, the process of performing neighbor unreachability detection, i.e., sending NS messages and receiving NA messages, can determine the delay based on the timestamp of sending the NS message and the timestamp of receiving the NA message; the packet loss rate can be determined based on the number of NS messages sent and the number of NA messages received; the latest link quality information is composed of the delay and the packet loss rate; and the latest neighbor status can be determined based on the sending status of the NS message and the receiving status of the NA message. Thus, the neighbor status in the first table item and the second table item can be updated to the latest neighbor status, and the link quality information in the optimal table item can be updated to the latest link quality information. For example, when the first table item is table item 1, the second table item includes table item 2 and table item 3, and the optimal table item is table item 1, the neighbor status in table item 1, table item 2, and table item 3 is updated to the latest neighbor status, and the link quality information in table item 1 is updated to the latest link quality information.

[0033] In an embodiment of the present application, when a first table entry for a first link exists in the global neighbor information table and a neighbor unreachable detection for the first link is triggered, a second table entry corresponding to the same neighbor identifier as the first table entry is searched from the global neighbor information table; the optimal table entry is determined from the first table entry and the second table entry, and a neighbor unreachable detection is performed using the optimal link corresponding to the optimal table entry to obtain a neighbor unreachable detection result; the first table entry and the second table entry are updated based on the neighbor unreachable detection result. Through an embodiment of the present application, in a multi-link scenario, the optimal link is used to perform neighbor unreachable detection, and the status of multiple neighbors linking to the same neighbor is updated based on the detection result, thereby improving detection efficiency and reducing the number of repeated detections, thereby avoiding resource waste.

[0034] Furthermore, in one embodiment, the neighbor discovery method further includes: When there is a message that needs to be forwarded through the first link and the first table entry of the first link does not exist in the global neighbor information table, a fake table entry is established in the global neighbor information table, wherein the neighbor address in the fake table entry is the routing next hop address found according to the destination address of the message, and the neighbor identifier, neighbor status, outgoing interface address, opposite-end physical link address and link quality information in the fake table entry are all default values; an NS message is sent with the next hop address as the target address, and the NS message contains the local device identifier; an NA message fed back by the neighbor device after receiving the NS message is received; the outgoing interface address is obtained based on the port for receiving the NA message, the link quality information is determined based on the timestamp and number of the sent NS messages and the timestamp and number of the received NA messages, and the NA message is parsed to obtain the neighbor identifier and the opposite-end physical link address; the fake table entry is updated based on the outgoing interface address, link quality information, neighbor identifier and opposite-end physical link address, and the neighbor status in the fake table entry is updated to a reachable state to obtain the first table entry.

[0035] In this embodiment, in order to identify entries for the same neighbor, it is necessary to expand the existing ND message as follows: Added "Device Identifier Option" in ND message: ND messages that support multi-link capabilities must carry a device identification option. Because for multi-links, such as Wi-Fi and cellular networks, IPv6 addresses and MAC addresses (cellular networks use IMEI / MEID) are generally different, the local device cannot distinguish whether they are actually the same neighbor, so a device ID must be added (i.e. Figure 2 neighbor identifiers shown).

[0036] By collecting the device's hardware characteristics (such as device SN and system MAC) and software characteristics (such as operating system version, browser type, screen resolution, time zone, etc.), a unique fingerprint, namely the neighbor ID, can be generated.

[0037] According to RFC4861, the extended option structure in the ND message is as follows: Option Type: 8-bit Option Length: 8-bit (length in 8 bytes) Option Data: variable length (depending on Option Type) like Figure 3 As shown, Figure 3 Expand the DT option Schematic diagram.

[0038] The optional "Device Identifier Option" structure added to the NS and NA messages is as follows: Option Type: 8-bit (for example, 0x0F, representing "Device Identifier") Option Length: 8-bit (length in 8 bytes) Identifier Value: 256-bit (actual device identification value (i.e., neighbor identification), for example, using a mapped 256-bit device fingerprint) Added a new "Multi-Link Capability" field in the ND message: Use the reserved fields of the NS message, such as Figure 4 As shown, Figure 4 The diagram below shows the NS message extension. The original NS message has a 4-byte reserved field. The first bit is named "Multi-Link Capability". When the "Multi-LinkCapability" flag is set to 1, it indicates that the message supports multi-link capability. Use the reserved fields of the NA message: like Figure 5 As shown, Figure 5 Figure 1 shows the NA message extension. The original NA message contains a 29-bit reserved field. Bit 1 is designated the "Multi-Link Capability" flag. When the "Multi-Link Capability" flag is set to 1, it indicates that the message supports multi-link capability.

[0039] Based on the above description, refer to Figure 6 , Figure 6 Create a flow chart for the global neighbor information table. Figure 6 As shown in the figure, in a multi-link scenario, for a specific neighbor, when IPv6 traffic passes through a link, the local device first searches the existing global neighbor information table (GNIT) for an entry corresponding to the link based on the next-hop address of the traffic's preferred matching route as the destination address. If not, a fake entry for the link needs to be created. In the fake entry, the neighbor status is "incomplete", and the neighbor identifier, outbound interface address, peer physical link address, and link quality information are all default values, for example, all Fs by default. At this time, the local device sends an NS message to detect whether the link neighbor is reachable. Because it is a multi-link scenario, the "Multi-Link Capability" flag in the NS message is set to 1. It must carry the local device ID option and record the timestamp of the initial message transmission and the number of detection packets sent. This facilitates calculation of the link's RTT and packet loss rate when receiving the NA reply packet.

[0040] The peer device is also required to support multi-link capabilities. That is, when the peer device receives an NS message, it must first parse the "Multi-Link Capability" flag. If it is set to 1, it indicates a multi-link scenario. In addition to responding with an NA message according to the protocol, the peer device must also add the "Multi-Link Capability" flag to the message and carry the local device ID option.

[0041] When the local device receives an NA response message, it first parses the message fields. If the "Multi-Link Capability" flag is set to 1, it indicates a multi-link scenario. In this case, the local device parses the Device ID option to obtain the peer physical link address and the Device ID value (i.e., the neighbor identifier). It also obtains the outbound interface address based on the port that received the NA message. It also calculates the latency and packet loss rate based on the timestamps of the sent and received messages and the number of packet losses during this period. Based on this information, it updates the corresponding values ​​in the fake entry and updates the neighbor status in the fake entry to reachable, thus creating the first entry.

[0042] Refer to the above instructions to create a global neighbor information table.

[0043] Reference Figure 7 , Figure 7 This is a flow chart of another embodiment of the neighbor discovery method of this application. Figure 7 As shown in the following scenario, when IPv6 traffic passes through a link, the global neighbor information table is searched for a matching ND entry (i.e. Figure 2 ), that is, to check whether there is an ND entry with a neighbor address that is consistent with the next hop; if so, determine whether the ND entry is reachable. If so, forward traffic directly based on the link corresponding to the ND entry; if not, trigger ND detection (i.e., neighbor unreachability detection), which has been explained above and will not be repeated here; if not, perform a fake entry creation process, which has been explained above and will not be repeated here; in case 2, if the ND entry ages out, trigger ND detection (i.e., neighbor unreachability detection), which has been explained above and will not be repeated here.

[0044] In the existing solution, multi-link devices must independently run the ND protocol on each physical interface, making it impossible to use the reachability information of other links to assist in determining the current link status. This leads to the following problems: 1. Each link needs to perform neighbor unreachability detection and send NS messages. When the network is unstable, the superposition of multiple links will lead to a large number of NS messages being sent, occupying device resources and increasing the burden on the device; 2. When a link fails, it cannot obtain the reachability information of other links and can only perform the full ND process to switch to a reachable link, which also wastes resources.

[0045] Based on the embodiments of the present application, for a terminal device that supports multiple links, for a specific neighbor device, no matter which link the terminal device uses, as long as the detection is reachable, it means that the neighbor is reachable, and there is no need to repeat the detection on each link. It is also possible to perform detection on links with good link status (such as short RTT time, low packet loss rate, etc.) first. According to this idea, it is necessary to establish a unified neighbor status database (i.e., a global neighbor information table) across links to coordinate multiple links. By collaboratively judging the link status based on multi-link neighbor information, the sending of a large number of NS detection messages in multi-link scenarios can be reduced, and the purpose of quickly switching to other links can be achieved when a link fails.

[0046] Regarding the first problem to be solved, the goal is not to reduce the exchange of NS and NA messages when establishing ND entries. Even when establishing a unified neighbor state database across links, the ND protocol requires the exchange of NS and NA messages, making this an essential step. However, in the original scenario before optimization, each link independently ran the ND protocol. According to the protocol, in addition to neighbor detection for newly learned ND entries, ND entry reachability detection must be performed when traffic is triggered in the unreachable state or when the aging time of the old state expires. NS messages are sent to detect whether the peer is reachable. The default number of times NS messages are sent is generally three, but this number can be customized according to the protocol. After optimization, only the preferred link needs to be detected, which can save a large number of NS message detections.

[0047] Regarding the second problem to be solved, before optimization, if a link is performing ND detection and the other end is unreachable, the complete detection process must be performed. That is, if three ND detections are performed and there is no NA message response, it means that the link is unreachable and the ND table entry of this link on the local end is deleted. When traffic is triggered again, the next hop is found according to the target address, and then the ND table entry is found based on the next hop. At this time, switch to another link. If the ND table entry of this link is in an unreachable state, it is necessary to trigger the execution of ND unreachable detection and refresh the ND state to reachable. The entire process takes more than seconds to execute. After optimization, due to the global ND table entry, when the preferred link fails and the other end is unreachable, the global neighbor information table is searched and the ND table entry of the alternative link can be immediately switched to. The entire switching process can be reduced to milliseconds.

[0048] In a second aspect, an embodiment of the present application also provides a neighbor discovery device.

[0049] In one embodiment, referring to Figure 8 , Figure 8 This is a functional module diagram of an embodiment of a neighbor discovery device of the present application. Figure 8 As shown, the neighbor discovery device includes: A search module 10 is configured to search the global neighbor information table for a second entry corresponding to the same neighbor identifier as the first entry when a first entry for the first link exists in the global neighbor information table and neighbor unreachability detection for the first link is triggered; A selection module 20 is configured to determine an optimal entry from the first entry and the second entry, and perform neighbor unreachability detection using an optimal link corresponding to the optimal entry to obtain a neighbor unreachability detection result; The updating module 30 is configured to update the first table entry and the second table entry based on the neighbor unreachable detection result.

[0050] Furthermore, in one embodiment, the neighbor discovery apparatus further includes a triggering module configured to: When there is a message that needs to be forwarded through the first link, if the neighbor status in the first entry of the first link in the global neighbor information table is not a reachable state, neighbor unreachable detection for the first link is triggered.

[0051] Furthermore, in one embodiment, the neighbor discovery apparatus further includes a triggering module configured to: When the neighbor state in the first table entry of the first link in the global neighbor information table is the detection state, neighbor unreachability detection for the first link is triggered.

[0052] Furthermore, in one embodiment, the selection module 20 is configured to: An entry with the best link quality is selected as the best entry according to the link quality information of each entry in the first entry and the second entry.

[0053] Furthermore, in one embodiment, the update module 30 is configured to: The neighbor status in the first table entry and the second table entry is updated to the latest neighbor status, and the link quality information in the optimal table entry is updated to the latest link quality information.

[0054] Furthermore, in one embodiment, the neighbor discovery device further includes a measurement module configured to: For each entry in the global neighbor information table, a quality measurement of the link corresponding to the entry is initiated at a preset time interval, and the link quality information in each entry is updated based on the quality measurement result.

[0055] Furthermore, in one embodiment, the neighbor discovery device further includes a establishing module, configured to: When there is a message that needs to be forwarded through the first link and the first table entry of the first link does not exist in the global neighbor information table, a dummy table entry is created in the global neighbor information table, wherein the neighbor address in the dummy table entry is the next hop address of the route found according to the destination address of the message, and the neighbor identifier, neighbor status, outgoing interface address, opposite end physical link address, and link quality information in the dummy table entry are all default values; Sending an NS message with the next hop address as the target address, and the NS message includes a local device identifier; Receive the NA message sent back by the neighboring device after receiving the NS message; The outbound interface address is obtained based on the port receiving the NA message, the link quality information is determined based on the timestamp and number of NS messages sent and the timestamp and number of NA messages received, and the NA message is parsed to obtain the neighbor ID and the peer physical link address; The fake entry is updated based on the outgoing interface address, link quality information, neighbor identifier, and opposite end physical link address, and the neighbor state in the fake entry is updated to a reachable state, thereby obtaining a first entry.

[0056] Among them, the functional implementation of each module in the above-mentioned neighbor discovery device corresponds to the various steps in the above-mentioned neighbor discovery method embodiment, and its functions and implementation processes will not be repeated here one by one.

[0057] In a third aspect, an embodiment of the present application provides a neighbor discovery device, which may be a device with data processing capabilities, such as a personal computer (PC), a laptop, or a server.

[0058] Reference Figure 9 , Figure 9FIG2 is a schematic diagram of the hardware structure of a neighbor discovery device involved in an embodiment of the present application. In an embodiment of the present application, the neighbor discovery device may include a processor, a memory, a communication interface, and a communication bus.

[0059] The communication bus may be of any type and is used to interconnect the processor, memory, and communication interface.

[0060] Communication interfaces include input / output (I / O) interfaces, physical interfaces, and logical interfaces. These interfaces interconnect components within the neighbor discovery device and connect the neighbor discovery device to other devices, such as other computing devices or user devices. Physical interfaces can be Ethernet, fiber, or ATM interfaces; user devices can include displays and keyboards.

[0061] The memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical storage, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.

[0062] The processor may be a general-purpose processor that can invoke a neighbor discovery program stored in a memory and execute the neighbor discovery method provided in the embodiments of the present application. For example, the general-purpose processor may be a central processing unit (CPU). The method executed when the neighbor discovery program is invoked can be referenced in the various embodiments of the neighbor discovery method of the present application and will not be further described here.

[0063] Those skilled in the art will understand that Figure 9 The hardware structure shown in the figure does not constitute a limitation to the present application and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.

[0064] In a fourth aspect, an embodiment of the present application also provides a computer-readable storage medium.

[0065] The computer-readable storage medium of the present application stores a neighbor discovery program, wherein when the neighbor discovery program is executed by a processor, the steps of the neighbor discovery method as described above are implemented.

[0066] Among them, the method implemented when the neighbor discovery program is executed can refer to the various embodiments of the neighbor discovery method of this application, and will not be repeated here.

[0067] It should be noted that the serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0068] The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices. The terms "first", "second" and "third" are used to distinguish different objects, etc., and do not represent a sequence, nor do they limit the "first", "second" and "third" to different types.

[0069] In the description of the embodiments of this application, the words "exemplary," "for example," or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary," "for example," or "for example" in the embodiments of this application should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary," "for example," or "for example" is intended to present the relevant concepts in a concrete manner.

[0070] In the description of the embodiments of the present application, unless otherwise specified, “ / ” means or, for example, A / B can mean A or B; “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” refers to two or more than two.

[0071] In some processes described in the embodiments of the present application, multiple operations or steps are included that appear in a specific order. However, it should be understood that these operations or steps may not be performed in the order in which they appear in the embodiments of the present application or may be performed in parallel. The sequence numbers of the operations are only used to distinguish between different operations, and the sequence numbers themselves do not represent any order of execution. In addition, these processes may include more or fewer operations, and these operations or steps may be performed in sequence or in parallel, and these operations or steps may be combined.

[0072] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, or the part that contributes to the existing technology, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above and includes a number of instructions for enabling a terminal device to execute the methods described in each embodiment of this application.

[0073] The above are only preferred embodiments of the present application and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A neighbor discovery method, characterized in that: The neighbor discovery method includes: When a first table entry for a first link exists in the global neighbor information table and neighbor unreachability detection for the first link is triggered, searching the global neighbor information table for a second table entry corresponding to the same neighbor identifier as the first table entry; Determine an optimal entry from the first entry and the second entry, and perform neighbor unreachability detection using an optimal link corresponding to the optimal entry to obtain a neighbor unreachability detection result; The first table entry and the second table entry are updated based on the neighbor unreachable detection result.

2. The neighbor discovery method according to claim 1, wherein: The neighbor discovery method further includes: When there is a message that needs to be forwarded through the first link, if the neighbor status in the first entry of the first link in the global neighbor information table is not a reachable state, neighbor unreachable detection for the first link is triggered.

3. The neighbor discovery method according to claim 1, wherein: The neighbor discovery method further includes: When the neighbor state in the first table entry of the first link in the global neighbor information table is the detection state, neighbor unreachability detection for the first link is triggered.

4. The neighbor discovery method according to claim 1, wherein: Determining the optimal entry from the first entry and the second entry includes: An entry with the best link quality is selected as the best entry according to the link quality information of each entry in the first entry and the second entry.

5. The neighbor discovery method according to claim 4, wherein: The neighbor unreachable detection result includes the latest neighbor status and the latest link quality information, and updating the first table item and the second table item based on the neighbor unreachable detection result includes: The neighbor status in the first table entry and the second table entry is updated to the latest neighbor status, and the link quality information in the optimal table entry is updated to the latest link quality information.

6. The neighbor discovery method according to claim 4, wherein: The neighbor discovery method further includes: For each entry in the global neighbor information table, a quality measurement of the link corresponding to the entry is initiated at a preset time interval, and the link quality information in each entry is updated based on the quality measurement result.

7. The neighbor discovery method according to any one of claims 1 to 6, characterized in that: The neighbor discovery method further includes: When there is a message that needs to be forwarded through the first link and the first table entry of the first link does not exist in the global neighbor information table, a dummy table entry is created in the global neighbor information table, wherein the neighbor address in the dummy table entry is the next hop address of the route found according to the destination address of the message, and the neighbor identifier, neighbor status, outgoing interface address, opposite end physical link address, and link quality information in the dummy table entry are all default values; Sending an NS message with the next hop address as the target address, and the NS message includes a local device identifier; Receive the NA message sent back by the neighboring device after receiving the NS message; The outbound interface address is obtained based on the port receiving the NA message, the link quality information is determined based on the timestamp and number of NS messages sent and the timestamp and number of NA messages received, and the NA message is parsed to obtain the neighbor ID and the peer physical link address; The fake entry is updated based on the outgoing interface address, link quality information, neighbor identifier, and opposite end physical link address, and the neighbor state in the fake entry is updated to a reachable state, thereby obtaining a first entry.

8. A neighbor discovery device, characterized in that: The neighbor discovery device includes: a search module configured to, when a first table entry for a first link exists in the global neighbor information table and neighbor unreachability detection for the first link is triggered, search the global neighbor information table for a second table entry corresponding to the same neighbor identifier as the first table entry; A selection module is configured to determine an optimal entry from the first entry and the second entry, and perform neighbor unreachability detection using an optimal link corresponding to the optimal entry to obtain a neighbor unreachability detection result; An updating module is used to update the first table entry and the second table entry based on the neighbor unreachable detection result.

9. A neighbor discovery device, characterized in that: The neighbor discovery device includes a processor, a memory, and a neighbor discovery program stored in the memory and executable by the processor, wherein when the neighbor discovery program is executed by the processor, the steps of the neighbor discovery method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a neighbor discovery program, wherein when the neighbor discovery program is executed by a processor, the steps of the neighbor discovery method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Multi-interface fusion method of communication node

    CN101753640A

  • Multi-link network gateway with monitoring and dynamic failover

    US10116539B1

  • Method for selecting communication links in a multi-radio wireless communication system

    US20100278118A1

  • Multiple simultaneous link transmissions for a multi-frequency multi-rate multi-transceiver communications device

    US20140204823A1

  • Method for realizing multi-wireless-mode communication and user equipment

    WO2014101068A1