IPV6 message forwarding method and device and computer readable storage medium

By monitoring the neighbor request messages of the wide area network and querying the neighbor table of the lower-level router, the problem of link-local address messages being unable to be forwarded in the IPV6 network is solved, and IPV6 communication in multi-cascade or extended subnet scenarios is realized.

CN120675937APending Publication Date: 2025-09-19西安卓华联盛科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510811984.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-17
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

In an IPv6 network, IPv6 packets with link-local addresses cannot be forwarded by routing devices to other links. This results in IPv6 communication failures when users expand IPv6 subnets or implement multi-cascade scenarios.

Method used

By monitoring neighbor solicitation messages on the WAN, the router queries the neighbor table of the lower-level router to determine whether the target device's device neighbor information exists. If so, the router sends a neighbor advertisement message to the upper-level router. If not, the router sends a modified neighbor solicitation message to all LAN interfaces to obtain neighbor response information, and then assembles a new neighbor advertisement message to reply to the upper-level router.

Benefits of technology

It realizes the effective forwarding of neighbor request messages in the IPV6 message forwarding process, and solves the IPV6 communication problem in multi-cascade or extended subnet scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120675937A_ABST
    Figure CN120675937A_ABST
Patent Text Reader

Abstract

The invention discloses an IPV6 message forwarding method and device and a computer readable storage medium, and the method comprises the steps: monitoring a neighbor request message of a wide area network, and querying a neighbor table of a subordinate router according to the neighbor request message; judging whether equipment neighbor information corresponding to target equipment exists in the neighbor table or not; if the equipment neighbor information exists, replying a neighbor notification message to a superior router; and if the equipment neighbor information does not exist, sending a modified neighbor request message to all local area network interfaces to obtain neighbor response information, assembling a new neighbor notification message, and replying the new neighbor notification message to the superior router. According to the invention, a technical scheme of effectively forwarding the neighbor request message in the IPV6 message forwarding process is realized, and the IPV6 communication problem in a multi-cascade or extended subnet scene is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network communications, and in particular to an IPv6 message forwarding method, device and computer-readable storage medium. Background Art

[0002] In the existing technology, the use of IPV6 not only solves the problem of the number of network address resources, but also solves the obstacles for various access devices to connect to the Internet. With the continuous development of computer networks, the use of IPV6 has gradually demonstrated its advantages, and currently more and more network devices are using IPV6.

[0003] Currently, when a node starts the IPv6 protocol, each interface is automatically configured with a link-local address (an interface identifier formed by its fixed prefix and EUI-64 rules). This mechanism allows two IPv6 nodes connected to the same link to communicate without any configuration. Therefore, link-local addresses are widely used in applications such as neighbor discovery and stateless address configuration. However, IPv6 packets with a link-local address as the source or destination address are not forwarded by routing devices to other links. This leads to the following problems:

[0004] IPv6 packets with link-local addresses as source or destination addresses are not forwarded by routing devices to other links. Therefore, current network devices do not support forwarding or transparent transmission of neighbor multicast messages. As a result, when users use IPv6 network devices to expand IPv6 subnets or in multi-cascade scenarios, connected users cannot communicate over IPv6. Summary of the Invention

[0005] In order to overcome the deficiencies in the prior art, the purpose of the present invention is to provide an IPV6 message forwarding method, device and computer-readable storage medium to solve the problem that when users currently use IPV6 network devices to expand IPV6 subnets or multi-cascade scenarios, the connected users cannot perform IPV6 communication.

[0006] The present invention proposes an IPV6 message forwarding method, which includes:

[0007] Monitor the neighbor solicitation message of the wide area network, and query the neighbor table of the lower-level router according to the neighbor solicitation message;

[0008] Determine whether the neighbor table contains device neighbor information corresponding to the target device;

[0009] If the device neighbor information exists, reply a neighbor advertisement message to the upper-level router;

[0010] If the device neighbor information does not exist, a modified neighbor request message is sent to all LAN interfaces to obtain neighbor response information, and a new neighbor advertisement message is assembled and replied to the upper-level router.

[0011] Optionally, monitoring a neighbor solicitation message of a wide area network specifically includes:

[0012] Create an agent based on the neighbor discovery protocol;

[0013] The neighbor request message received from the wide area network side is monitored by the proxy program.

[0014] Optionally, the sending the modified neighbor solicitation message to all local area network interfaces specifically includes:

[0015] Modifying the neighbor solicitation message according to the query requirements;

[0016] The modified neighbor solicitation message is sent to all LAN interfaces of the lower-level router.

[0017] Optionally, after sending the modified neighbor solicitation message to all local area network interfaces, the method further includes:

[0018] Determining whether the neighbor response information sent by the target device is received;

[0019] If the neighbor response information is received, the physical address of the target device is recorded, and if the neighbor response information is not received, no processing is performed.

[0020] Optionally, assembling a new neighbor advertisement message specifically includes:

[0021] The new neighbor advertisement message is assembled according to the IPV6 global unicast address of the target device, the IPV6 global unicast address of the upper-level router, and the address of the lower-level router.

[0022] Optionally, assembling the new neighbor advertisement message according to the IPv6 global unicast address of the target device, the IPv6 global unicast address of the upper-level router, and the address of the lower-level router specifically includes:

[0023] The new neighbor advertisement message is assembled by using the IPV6 global unicast address of the target device as the source address, the IPV6 global unicast address of the upper router as the destination address, and the address of the lower router as the physical address content of the message.

[0024] Optionally, the replying to the upper-level router specifically includes:

[0025] Sending the assembled new neighbor advertisement message to the upper-level router;

[0026] The new neighbor advertisement message is sent to the core network through the wide area network port of the upper-level router as a response to the neighbor solicitation message.

[0027] Optionally, the method further includes:

[0028] In the constructed neighbor solicitation message, the IPv6 global unicast address of the target device and the IPv6 global unicast address of the upper-level router are used as the destination address and the source address respectively.

[0029] The present invention also proposes an IPV6 message forwarding device, which includes a memory, a processor, and a computer program stored in the memory and runnable on the processor. When the computer program is executed by the processor, the steps of the IPV6 message forwarding method as described in any one of the above items are implemented.

[0030] The present invention also proposes a computer-readable storage medium, which stores an IPV6 message forwarding program. When the IPV6 message forwarding program is executed by a processor, the steps of the IPV6 message forwarding method as described in any one of the above items are implemented.

[0031] The IPV6 message forwarding method, device, and computer-readable storage medium of the present invention monitor neighbor request messages from a wide area network and query the neighbor table of a lower-level router based on the neighbor request message; determine whether the neighbor table contains device neighbor information corresponding to the target device; if the device neighbor information exists, reply a neighbor advertisement message to the upper-level router; if the device neighbor information does not exist, send a modified neighbor request message to all local area network interfaces to obtain neighbor response information, assemble a new neighbor advertisement message, and reply to the upper-level router. The present invention implements a technical solution that can effectively forward neighbor request messages in the IPV6 message forwarding process, solving IPV6 communication problems in multi-cascade or extended subnet scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] The present invention will be further described below with reference to the accompanying drawings and embodiments, in which:

[0033] Figure 1 This is a flow chart of a first embodiment of an IPV6 message forwarding method of the present invention;

[0034] Figure 2 This is a flow chart of a second embodiment of the IPV6 message forwarding method of the present invention;

[0035] Figure 3 Flowchart of the third embodiment of the IPV6 message forwarding method of the present invention;

[0036] Figure 4 Flowchart of the fourth embodiment of the IPV6 message forwarding method of the present invention;

[0037] Figure 5 Flowchart of the fifth embodiment of the IPV6 message forwarding method of the present invention;

[0038] Figure 6 Flowchart of the sixth embodiment of the IPV6 message forwarding method of the present invention;

[0039] Figure 7 This is the current flow chart of IPV6 message forwarding;

[0040] Figure 8 It is a flow chart of the seventh embodiment of the IPV6 message forwarding method of the present invention. DETAILED DESCRIPTION

[0041] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0042] In the subsequent description, suffixes such as "module," "component," or "unit" used to represent elements are only used to facilitate the description of the present invention and have no specific meaning. Therefore, "module," "component," or "unit" can be used interchangeably.

[0043] Example 1

[0044] Figure 1 Flowchart of the first embodiment of the IPV6 message forwarding method of the present invention. An IPV6 message forwarding method, the method comprising:

[0045] S1. Monitor the neighbor solicitation message of the wide area network and query the neighbor table of the lower-level router according to the neighbor solicitation message;

[0046] S2. Determine whether the neighbor table contains device neighbor information corresponding to the target device;

[0047] S3. If the device neighbor information exists, reply a neighbor advertisement message to the upper-level router;

[0048] S4. If the device neighbor information does not exist, send the modified neighbor request message to all LAN interfaces to obtain neighbor response information, assemble a new neighbor advertisement message, and reply to the upper-level router.

[0049] In this embodiment, combined with Figure 7According to the current IPV6 message forwarding process shown, if, in an IPV6 multi-cascade scenario, a lower-level router does not support IPV6 NS (Neighbor Solicitation) multicast message forwarding or transparent transmission, this may result in users being unable to conduct IPV6 communications when using IPV6 network devices to expand an IPV6 subnet or in a multi-cascade scenario. Specifically, Router A does not support IPV6 INS multicast message forwarding or transparent transmission, while Router B does not support IPV6 NS multicast message forwarding or transparent transmission. At this time, Router A receives a reply message from the core network with the destination address being the PC's global unicast address. Since Router A does not have the PC's neighbor information, it will initiate a Neighbor Solicitation message query downward. At this time, since Router B does not support IPV6 NS multicast message forwarding, the Neighbor Solicitation message cannot be delivered to the PC, and the neighbor query cannot be completed, further leading to communication interruption. Based on the above problems, in this embodiment, in order to solve the above problems in the IPV6 multi-cascade scenario, an improved solution is proposed by modifying the router's response method to the IPV6 neighbor request message, using an IPV6-based NDP (Neighbor Discovery Protocol) agent program, and then monitoring the neighbor request messages received from the WAN (Wide Area Network) side.

[0050] Please refer to Figure 8 In this embodiment, first, an NS (Neighbor Solicitation) message is received from the WAN side, and then the neighbor table of router B is queried. If the neighbor information corresponding to the PC is found, the router directly replies with an NA (Neighbor Advertisement) message. If the neighbor information of the PC is not found, the router sends NS messages on all LAN interfaces of the router to query the PC's neighbor information. Then, it is determined whether a neighbor response message is received. If the neighbor response message (NA message) of the PC is not received, no processing is performed. If the neighbor response message (NA message) of the PC is received, its MAC (Media Access Control Address) is recorded. Finally, router B assembles an NA message. Specifically, the global unicast address of the PC is used as the source address, the global unicast address of router A is used as the destination address, and the MAC content of the NA message is filled with the address of router B. Then, a NS request response is replied to the core network through the WAN port of router A, that is, an NA response is sent.

[0051] Optionally, in this embodiment, if applied to a multi-cascade network consisting of routers such as router A, router B, and router C, first determine the router that the neighbor request message cannot reach, for example, router C, and then run an agent program on this router C to monitor the neighbor request message of the wide area network, thereby sending the modified neighbor request message in the above manner to obtain neighbor response information.

[0052] The beneficial effects of this embodiment are as follows: by monitoring neighbor request messages from the wide area network and querying the neighbor table of the lower-level router based on the neighbor request message; determining whether the neighbor table contains device neighbor information corresponding to the target device; if the device neighbor information exists, replying a neighbor advertisement message to the upper-level router; if the device neighbor information does not exist, sending a modified neighbor request message to all local area network interfaces to obtain neighbor response information, assembling a new neighbor advertisement message, and replying it to the upper-level router. This implements a technical solution that can effectively forward neighbor request messages in the IPV6 message forwarding process, solving IPV6 communication problems in multi-cascade or extended subnet scenarios.

[0053] Example 2

[0054] Figure 2 Flowchart of the second embodiment of the IPV6 message forwarding method of the present invention. Based on the above embodiment, the monitoring of the neighbor solicitation message of the wide area network specifically includes:

[0055] S11. Create an agent program based on the neighbor discovery protocol;

[0056] S12: Monitor the neighbor request message received from the wide area network side through the proxy program.

[0057] In this embodiment, by creating a proxy program based on the neighbor discovery protocol and then receiving neighbor request messages on the wide area network side, the above-mentioned problem that occurs in extended subnet or cascade scenarios is effectively avoided because the link-local address can only be used on the local link and will not be forwarded by the router to other links.

[0058] Optionally, in this embodiment, a router that does not support IPv6 NS multicast message forwarding or transparent transmission is entered into the proxy program, thereby creating a proxy program based on the neighbor discovery protocol, and then receiving neighbor request messages on the wide area network side.

[0059] Optionally, in this embodiment, a proxy program is first created, and then a router that does not support IPV6NS multicast message forwarding or transparent transmission is detected in the proxy program, and then a proxy program based on the neighbor discovery protocol is created based on the router, and then neighbor request messages are received on the wide area network side.

[0060] Example 3

[0061] Figure 3 Flowchart of the third embodiment of the IPv6 message forwarding method of the present invention. Based on the above embodiment, the sending of the modified neighbor solicitation message to all LAN interfaces specifically includes:

[0062] S41, modifying the neighbor solicitation message according to the query requirement;

[0063] S42: Send the modified neighbor solicitation message to all LAN interfaces of the lower-level router.

[0064] In this embodiment, if there are multiple lower-level routers that do not support IPV6 NS multicast message forwarding or transparent transmission in a multi-cascade application scenario, all LAN interfaces of the lower-level routers that do not support IPV6 NS multicast message forwarding or transparent transmission at each level send modified neighbor request messages, thereby ensuring that the above-mentioned request message can reach the final target device.

[0065] Optionally, in this embodiment, the neighbor solicitation message is modified so that the modified neighbor solicitation message can effectively reach the target device.

[0066] Example 4

[0067] Figure 4 Flowchart of the fourth embodiment of the IPv6 message forwarding method of the present invention. Based on the above embodiment, after sending the modified neighbor solicitation message to all LAN interfaces, the method includes:

[0068] S43, determining whether the neighbor response information sent by the target device is received;

[0069] S44: If the neighbor response information is received, the physical address of the target device is recorded; if the neighbor response information is not received, no processing is performed.

[0070] In this embodiment, by determining whether the neighbor response information sent by the target device is received, and then recording the physical address of the target device when the neighbor response information is received, and not processing the neighbor response information when the neighbor response information is not received, the generation of the neighbor advertisement message for the target device is replaced by the lower-level router that does not support IPV6 NS multicast message forwarding or transparent transmission.

[0071] Example 5

[0072] Figure 5 4 is a flow chart of a fifth embodiment of the IPv6 message forwarding method of the present invention. Based on the above embodiment, the assembling of a new neighbor advertisement message specifically includes:

[0073] S45, assembling the new neighbor advertisement message according to the IPV6 global unicast address of the target device, the IPV6 global unicast address of the upper-level router, and the address of the lower-level router;

[0074] S46. In the constructed neighbor solicitation message, the IPv6 global unicast address of the target device and the IPv6 global unicast address of the upper-level router are used as the destination address and the source address respectively.

[0075] In this embodiment, the specific method of reassembly is to use the IPV6 global unicast address of the target device as the source address, the IPV6 global unicast address of the upper-level router as the destination address, and the address of the lower-level router as the physical address content of the filler message to assemble the new neighbor advertisement message, thereby realizing the generation of the neighbor advertisement message of the lower-level router that does not support IPV6 NS multicast message forwarding or transparent transmission.

[0076] Optionally, in this embodiment, the construction method of the neighbor solicitation message is opposite to that of the neighbor advertisement message, that is, the IPV6 global unicast address of the target device and the IPV6 global unicast address of the upper router are used as the destination address and the source address respectively.

[0077] Example 6

[0078] Figure 6 Flowchart of the sixth embodiment of the IPV6 message forwarding method of the present invention. Based on the above embodiment, the reply to the upper-level router specifically includes:

[0079] S47, sending the assembled new neighbor advertisement message to the upper-level router;

[0080] S48. Send the new neighbor advertisement message to the core network through the WAN port of the upper-level router as a response to the neighbor solicitation message.

[0081] In this embodiment, the assembled new neighbor advertisement message is sent to the upper router, so that the upper router sends the new neighbor advertisement message to the core network through its WAN port, thereby achieving a response to the neighbor request message sent by the core network.

[0082] Example 7

[0083] Based on the above embodiments, the present invention also proposes an IPV6 message forwarding device, which includes a memory, a processor, and a computer program stored on the memory and runnable on the processor. When the computer program is executed by the processor, the steps of the IPV6 message forwarding method as described in any one of the above items are implemented.

[0084] It should be noted that the above-mentioned device embodiment and method embodiment belong to the same concept, and their specific implementation process is detailed in the method embodiment, and the technical features in the method embodiment are applicable to the device embodiment, which will not be repeated here.

[0085] Example 8

[0086] Based on the above embodiments, the present invention also proposes a computer-readable storage medium, which stores an IPV6 message forwarding program. When the IPV6 message forwarding program is executed by a processor, the steps of the IPV6 message forwarding method as described in any one of the above items are implemented.

[0087] It should be noted that the above-mentioned medium embodiment and method embodiment belong to the same concept, and their specific implementation process is detailed in the method embodiment, and the technical features in the method embodiment are applicable to the medium embodiment, which will not be repeated here.

[0088] The IPV6 message forwarding method, device, and computer-readable storage medium of the present invention monitor neighbor request messages from a wide area network and query the neighbor table of a lower-level router based on the neighbor request message; determine whether the neighbor table contains device neighbor information corresponding to the target device; if the device neighbor information exists, reply a neighbor advertisement message to the upper-level router; if the device neighbor information does not exist, send a modified neighbor request message to all local area network interfaces to obtain neighbor response information, assemble a new neighbor advertisement message, and reply to the upper-level router. The present invention implements a technical solution that can effectively forward neighbor request messages in the IPV6 message forwarding process, solving IPV6 communication problems in multi-cascade or extended subnet scenarios.

[0089] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.

[0090] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.

[0091] 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, and of course can also be implemented by hardware, but in many cases the former is a better embodiment. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0092] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are protected by the present invention.

Claims

1. An IPV6 message forwarding method, characterized in that: The method comprises: Monitor the neighbor solicitation message of the wide area network, and query the neighbor table of the lower-level router according to the neighbor solicitation message; Determine whether the neighbor table contains device neighbor information corresponding to the target device; If the device neighbor information exists, reply a neighbor advertisement message to the upper-level router; If the device neighbor information does not exist, a modified neighbor request message is sent to all LAN interfaces to obtain neighbor response information, and a new neighbor advertisement message is assembled and replied to the upper-level router.

2. The IPV6 message forwarding method according to claim 1, wherein: The monitoring of the neighbor solicitation message of the wide area network specifically includes: Create an agent based on the neighbor discovery protocol; The neighbor request message received from the wide area network side is monitored by the proxy program.

3. The IPV6 message forwarding method according to claim 1, wherein: The sending of the modified neighbor solicitation message to all local area network interfaces specifically includes: Modifying the neighbor solicitation message according to the query requirements; The modified neighbor solicitation message is sent to all LAN interfaces of the lower-level router.

4. The IPV6 message forwarding method according to claim 1, wherein: After sending the modified neighbor solicitation message to all LAN interfaces, the method further comprises: Determining whether the neighbor response information sent by the target device is received; If the neighbor response information is received, the physical address of the target device is recorded, and if the neighbor response information is not received, no processing is performed.

5. The IPV6 message forwarding method according to claim 1, wherein: The assembling of a new neighbor advertisement message specifically includes: The new neighbor advertisement message is assembled according to the IPV6 global unicast address of the target device, the IPV6 global unicast address of the upper-level router, and the address of the lower-level router.

6. The IPV6 message forwarding method according to claim 5, characterized in that: The assembling of the new neighbor advertisement message according to the IPV6 global unicast address of the target device, the IPV6 global unicast address of the upper-level router, and the address of the lower-level router specifically includes: The new neighbor advertisement message is assembled by using the IPV6 global unicast address of the target device as the source address, the IPV6 global unicast address of the upper router as the destination address, and the address of the lower router as the physical address content of the message.

7. The IPV6 message forwarding method according to claim 1, wherein: The reply to the upper router specifically includes: Sending the assembled new neighbor advertisement message to the upper-level router; The new neighbor advertisement message is sent to the core network through the wide area network port of the upper-level router as a response to the neighbor solicitation message.

8. The IPV6 message forwarding method according to claim 5, wherein: The method further comprises: In the constructed neighbor solicitation message, the IPv6 global unicast address of the target device and the IPv6 global unicast address of the upper-level router are used as the destination address and the source address respectively.

9. An IPV6 message forwarding device, characterized in that: The device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the steps of the IPV6 message forwarding method according to any one of claims 1 to 8 are implemented.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores an IPV6 message forwarding program, and when the IPV6 message forwarding program is executed by the processor, the steps of the IPV6 message forwarding method according to any one of claims 1 to 8 are implemented.