Method for determining IPv6 local area network prefixes applied to multiple wide area network interfaces, network equipment and storage medium

By determining the LAN prefix based on IPv6 prefix authorization information in network devices and adopting an appropriate forwarding mode, the problem of unstable LAN prefixes in multi-WAN interface scenarios is solved, thereby improving communication stability and the Internet access performance of terminal devices.

CN118972371APending Publication Date: 2024-11-15TP-LINK
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411364980.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

In existing technologies, when network devices are equipped with multiple WAN interfaces, the IPv6 licensed prefix configuration strategy is not designed for scenarios with multiple WAN interfaces, resulting in unstable LAN prefixes and affecting the communication stability of downstream terminals.

Method used

By using the IPv6 prefix authorization information of each candidate WAN interface, the LAN prefix is ​​determined, the network address of the terminal device is configured, and address translation technology or direct forwarding mode is adopted to ensure the stability and uniqueness of the LAN prefix.

Benefits of technology

It enables stable selection of LAN prefixes in multiple WAN interface scenarios, improving the communication stability of network devices and the internet access stability of terminal devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118972371A_ABST
    Figure CN118972371A_ABST
Patent Text Reader

Abstract

The embodiment of the invention is applicable to the technical field of network equipment, and provides an IPv6 local area network prefix determination method applied to a plurality of wide area network interfaces, network equipment and a storage medium, the method is applied to the network equipment comprising at least two wide area network interfaces, and the method comprises the following steps: based on IPv6 prefix authorization information corresponding to each candidate wide area network interface, determining an IPv6 local area network prefix corresponding to each candidate wide area network interface; determining a local area network prefix; the IPv6 prefix authorization information is used for determining whether gateway equipment connected with the candidate wide area network interface supports prefix authorization or not; based on the local area network prefix, configuring a first network address of terminal equipment accessed to the network equipment; and the terminal equipment is connected with the network equipment through a local area network interface. According to the method provided by the embodiment of the invention, the network equipment can be ensured to determine the local area network prefix from the IPv6 prefix authorization information corresponding to each candidate wide area network interface, so that the stability of the local area network prefix in the network equipment is ensured, and the communication stability of the network equipment is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application belong to the technical field of network equipment, and in particular, relate to a method for determining an IPv6 local area network prefix applied to multiple wide area network interfaces, a network device, and a storage medium. Background Art

[0002] With the rapid development of network technology, more and more network devices support access to the Internet using Internet Protocol Version 6 (IPv6) addresses. In the prior art, since network devices are usually equipped with only one WAN interface, the configuration strategy of the network address using IPv6 is mainly designed for the use scenario of a single WAN interface. For example, after a network device equipped with a single WAN interface obtains an IPv6 address and an IPv6 authorized prefix from an operator server through the WAN interface, the obtained IPv6 address can be used as the address on the WAN interface, and the IPv6 authorized prefix can be allocated to the LAN interface corresponding to the WAN interface. In this way, the network device can directly use the IPv6 authorized prefix obtained by the WAN interface as the LAN prefix to configure the network address for the downstream terminal connected to the LAN interface.

[0003] However, with the development of network equipment, network equipment equipped with multiple WAN interfaces has gradually emerged to meet the increasing bandwidth needs of users. Since the existing configuration strategy of network addresses using IPv6 is not designed for the use scenario of multiple WAN interfaces, the IPv6 authorized prefix is ​​used to configure the network address for the downstream terminal, which can easily lead to the instability of the LAN prefix of the downstream terminal, thereby affecting the communication stability of the downstream terminal. Summary of the invention

[0004] In view of this, an embodiment of the present application provides a method for determining an IPv6 LAN prefix applied to multiple WAN interfaces, a network device and a storage medium, which are used to select a LAN prefix in a network device including multiple WAN interfaces to ensure the stability of the private network prefix, thereby improving the communication stability of the network device.

[0005] A first aspect of an embodiment of the present application provides a method for determining an IPv6 local area network prefix applied to multiple wide area network interfaces, which is applied to a network device including at least two wide area network interfaces, including:

[0006] Determine the local area network prefix based on the IPv6 prefix authorization information corresponding to each candidate wide area network interface; the IPv6 prefix authorization information is used to determine whether the gateway device connected to the candidate wide area network interface supports IPv6 prefix authorization;

[0007] Based on the LAN prefix, a first network address of a terminal device accessing the network device is configured; the terminal device is connected to the network device via a LAN interface.

[0008] In a possible implementation manner of the first aspect, determining the local area network prefix based on the IPv6 prefix authorization information corresponding to each candidate wide area network interface includes:

[0009] If it is determined based on the IPv6 prefix authorization information that at least one gateway device connected to the candidate WAN interface supports IPv6 prefix authorization, the LAN prefix is ​​determined based on an IPv6 authorized prefix returned by at least one gateway device supporting IPv6 prefix authorization.

[0010] In a possible implementation manner of the first aspect, determining the local area network prefix based on an IPv6 authorized prefix returned by at least one gateway device supporting IPv6 prefix authorization includes:

[0011] Based on the first acquisition time corresponding to each of the IPv6 authorized prefixes, the IPv6 authorized prefix with the earliest first acquisition time is selected from the various IPv6 authorized prefixes as the local area network prefix.

[0012] In a possible implementation manner of the first aspect, after determining the local area network prefix based on the IPv6 authorized prefix returned by at least one gateway device supporting IPv6 prefix authorization, the method includes:

[0013] Setting the working mode of the first wide area network interface to the first working mode; the first wide area network interface is a candidate wide area network interface corresponding to the IPv6 authorized prefix determined as the local area network prefix;

[0014] The working mode of the second WAN interface is set to the second working mode; the second WAN interface is a candidate WAN interface other than the first WAN interface; the second working mode is a working mode for sending and receiving messages through address conversion technology.

[0015] In a possible implementation manner of the first aspect, determining the local area network prefix based on the IPv6 prefix authorization information corresponding to each candidate wide area network interface includes:

[0016] If it is determined based on the IPv6 prefix authorization information that all gateway devices connected to the candidate wide area network interfaces do not support IPv6 prefix authorization, the preset private network prefix is ​​used as the local area network prefix.

[0017] In a possible implementation manner of the first aspect, after configuring the first network address of the terminal device accessing the network device based on the local area network prefix, the method further includes:

[0018] Receiving a network message sent by the terminal device;

[0019] querying a second forwarding table based on the session information in the network message, and determining a target wide area network interface corresponding to the network message from all the candidate wide area network interfaces; the session information includes the first network address of the terminal device and the second network address of the target device to which the network message is sent;

[0020] The network message is sent to the target device through the target wide area network interface.

[0021] In a possible implementation manner of the first aspect, querying the second forwarding table based on the session information in the network message to determine the target wide area network interface corresponding to the network message includes:

[0022] If the target WAN interface corresponding to the session information is not recorded in the second forwarding table, calculating the remaining bandwidth ratio corresponding to each of the candidate WAN interfaces based on a preset bandwidth algorithm;

[0023] Using the candidate WAN interface with the largest remaining bandwidth ratio as the target WAN interface corresponding to the network message;

[0024] The correspondence between the target WAN interface and the session information is written into the second forwarding table.

[0025] In a possible implementation manner of the first aspect, before querying the second forwarding table based on the session information in the network message to determine the target wide area network interface corresponding to the network message, the method includes:

[0026] If the first forwarding table contains the physical address corresponding to the network message, determine the target wide area network interface corresponding to the network message based on the physical address, and send the network message through the target wide area network interface;

[0027] If the target WAN interface corresponding to the physical address is not recorded in the first forwarding table, the second forwarding table is queried based on the session information in the network message to determine the target WAN interface corresponding to the network message.

[0028] In a possible implementation manner of the first aspect, the method includes: receiving interface configuration information sent by the terminal device; the interface configuration information includes the physical address of the terminal device and a target wide area network interface corresponding to the physical address;

[0029] The first forwarding table is updated based on the interface configuration information.

[0030] A second aspect of an embodiment of the present application provides a device for determining an IPv6 local area network prefix applied to multiple wide area network interfaces, including:

[0031] A prefix determination module, configured to determine a local area network prefix based on the IPv6 prefix authorization information corresponding to each candidate wide area network interface; the IPv6 prefix authorization information is used to determine whether the gateway device connected to the candidate wide area network interface supports IPv6 prefix authorization;

[0032] The address configuration module is used to configure the first network address of the terminal device accessing the network device based on the local area network prefix; the terminal device is connected to the network device through a local area network interface.

[0033] A third aspect of an embodiment of the present application provides a network device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for determining an IPv6 local area network prefix applied to multiple wide area network interfaces as described in the first aspect above is implemented.

[0034] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the method for determining the IPv6 local area network prefix applied to multiple wide area network interfaces as described in the first aspect above.

[0035] A fifth aspect of an embodiment of the present application provides a computer program product. When the computer program product runs on a computer, the computer executes the method for determining IPv6 local area network prefixes applied to multiple wide area network interfaces described in the first aspect above.

[0036] Compared with the prior art, the embodiments of the present application have the following advantages:

[0037] In an embodiment of the present application, a network device including at least two WAN interfaces can determine a LAN prefix based on the IPv6 prefix authorization information corresponding to each candidate WAN interface; wherein, the IPv6 prefix authorization information received by any candidate WAN interface can be used to determine whether the gateway device connected to the candidate WAN supports IPv6 prefix authorization; then, the network device can configure the first network address of a terminal device accessing the network device according to the determined LAN prefix; wherein, the terminal device can be connected to the network device through the LAN interface. Through the method provided in this embodiment, a network device configured with multiple WAN interfaces can determine a LAN prefix based on the IPv6 prefix authorization information after receiving the IPv6 prefix authorization information, and configure a first network address for the terminal device based on the determined LAN prefix. Therefore, the embodiment of the present application enables the network device to stably select a LAN prefix, thereby ensuring the communication stability of the network device configured with multiple WAN interfaces. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or prior art descriptions. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0039] Figure 1 It is a schematic diagram of a method for determining an IPv6 local area network prefix applied to multiple wide area network interfaces provided in an embodiment of the present application;

[0040] Figure 2 is a schematic diagram of a network device provided in an embodiment of the present application;

[0041] Figure 3 This is a specific flowchart of a prefix selection provided by an embodiment of the present application;

[0042] Figure 4 It is a schematic diagram of another method for determining an IPv6 local area network prefix applied to multiple wide area network interfaces provided in an embodiment of the present application;

[0043] Figure 5 This is a schematic diagram of a selection process of a wide area network interface provided in an embodiment of the present application;

[0044] Figure 6 It is a schematic diagram of a device for determining an IPv6 local area network prefix applied to multiple wide area network interfaces provided in an embodiment of the present application;

[0045] Figure 7 It is a schematic diagram of a network device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0046] In the following description, specific details such as specific system structures, technologies, etc. are proposed for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from hindering the description of the present application.

[0047] The technical solution of the present application is described below through specific embodiments.

[0048] Reference Figure 1 , shows a schematic diagram of a method for determining an IPv6 LAN prefix applied to multiple WAN interfaces provided by an embodiment of the present application. The method can be applied to a network device configured with at least two WAN interfaces. The network device can be a device with an IPv6 dial-up function, such as a router, a gateway device, a remote access concentrator (RAC), etc. The above-mentioned method for determining an IPv6 LAN prefix applied to multiple WAN interfaces can specifically include the following steps:

[0049] S101. Determine a local area network prefix based on the IPv6 prefix authorization information corresponding to each candidate wide area network interface; the IPv6 prefix authorization information is used to determine whether a gateway device connected to the candidate wide area network interface supports IPv6 prefix authorization.

[0050] In this embodiment, when the network device is started, the network device can simultaneously send a dial-up request to the gateway device or the IPv6 server of the Internet Service Provider (ISP) to which each candidate WAN interface is respectively connected through each candidate WAN interface. After receiving the dial-up request sent by the network device through any candidate WAN interface, the gateway device or the IPv6 server of the ISP can feed back the IPv6 prefix authorization information to the network device through the candidate WAN interface. The network device can determine the LAN prefix according to the IPv6 prefix authorization information received by each candidate WAN interface.

[0051] Among them, the IPv6 prefix authorization information fed back by the gateway device connected to a candidate WAN interface can be used to determine whether the gateway device and / or IPv6 server connected to the candidate WAN interface supports IPv6 prefix authorization. Specifically, supporting IPv6 prefix authorization means that the gateway device and / or IPv6 server supports sending the IPv6 authorization prefix to the downstream network device for use, so that the downstream network device has the same IPv6 authorization prefix in the network address configured for the accessed terminal device. Among them, the IPv6 authorization prefix refers to the prefix information assigned to a specific local area network by the IPv6 server on the wide area network. The gateway device and / or IPv6 server can directly distinguish different local area networks based on the IPv6 authorization prefix. When the terminal device uses the network address configured with the IPv6 authorization prefix to access the Internet, it can directly access the wide area network through the configured network address without going through address conversion.

[0052] Therefore, when the gateway device and the ISP's IPv6 server support IPv6 prefix authorization, the network device can obtain the IPv6 authorized prefix and configure the network address for the terminal device connected to it according to the obtained IPv6 authorized prefix. When the gateway device and the ISP's IPv6 server do not support IPv6 prefix authorization, the network device can configure the network address for the terminal device according to the private network prefix.

[0053] In a possible implementation, the network device may be a router, see Figure 2 , shows a schematic diagram of a network device provided by an embodiment of the present application. Figure 2 As shown, when the network device is a router, the network device may be configured with N candidate WAN interfaces and one LAN interface. Wherein, N may be a positive integer greater than or equal to 2. The terminal device may be connected to the LAN interface in the network device through a wired interface, such as Registered Jack 45 (RJ45 for short), so as to access the network device through the LAN interface. The terminal device may also be connected to the LAN interface in the network device through a wireless interface, so as to access the network device through the LAN interface.

[0054] In some implementations, each candidate WAN interface on the network device can be connected to an optical modem. Each optical modem can be connected to different optical fiber lines to connect to different optical line terminals. Therefore, multiple candidate WAN interfaces on the network device can be connected to IPv6 servers of different ISPs through their corresponding optical modems, so that the network device can access multiple different operator broadbands at the same time.

[0055] When any candidate WAN interface on the network device is connected to the optical modem, the network device can send a dial-up request to the ISP's IPv6 server through each candidate WAN interface connected to the optical modem. The network device can be configured to dial through the IPv6 prefix authorization mode. At this time, the dial-up request generated by the network device can include a prefix acquisition request. Specifically, the network device can generate a prefix acquisition request according to the Dynamic Host Configuration Protocol for IPv6 (DHCPv6) version 6. After receiving the dial-up request sent by the network device, the IPv6 server can feedback dial-up information to the network device according to the received dial-up request. The dial-up information fed back by the IPv6 server can include the IPv6 prefix authorization information corresponding to the IPv6 server. The IPv6 prefix authorization information fed back by a certain IPv6 server can be used to indicate whether the IPv6 server supports IPv6 prefix authorization.

[0056] See also Figure 3 , shows a specific flow chart of a prefix selection provided by an embodiment of the present application. Figure 3 As shown, for any candidate WAN interface on the network device, after the candidate WAN interface establishes a connection with the gateway device, the network device can generate a dial-up request through the IPv6 prefix authorization mode, and send a dial-up request containing a prefix acquisition request to the gateway device through the candidate WAN interface. After receiving the dial-up request sent by the network device through the candidate WAN interface, the gateway device can generate dial-up information containing IPv6 prefix authorization information according to the DHCPv6 protocol, and send the dial-up information to the network device through the candidate WAN interface. The network device can determine whether the WAN interface dials successfully based on the received dial-up information, and determine whether the gateway device supports IPv6 prefix authorization based on the IPv6 prefix authorization information in the dial-up information.

[0057] If the network device determines that the IPv6 prefix authorization information received by the candidate WAN interface does not contain an IPv6 authorized prefix, or contains an invalid IPv6 authorized prefix, the network device can set the message transmission mode of the candidate WAN interface to the second working mode, such as the NAT66 mode. Then, the network device can determine whether the LAN prefix in the current network device is an IPv6 authorized prefix. If the network device determines that the current LAN prefix is ​​not an IPv6 authorized prefix, the network device can further determine whether a private network prefix already exists in the network device as a LAN prefix. If the network device determines that there is no private network prefix as a LAN prefix in the network device, the network device can use a preset private network prefix as the LAN prefix. If the network device determines that the current LAN prefix is ​​an IPv6 authorized prefix, or, there is already a private network prefix as a LAN prefix in the network device, the network device may not update the current LAN prefix.

[0058] If the network device determines that the candidate WAN interface obtains a valid IPv6 authorized prefix, the network device can further determine whether the IPv6 authorized prefix obtained by the candidate WAN interface is the earliest IPv6 authorized prefix with the first acquisition time, that is, the network device can determine whether the current IPv6 authorized prefix is ​​the first valid IPv6 authorized prefix obtained by the network device. If the network device determines that the IPv6 authorized prefix obtained by the candidate WAN interface is the earliest IPv6 authorized prefix with the first acquisition time, that is, the current IPv6 authorized prefix is ​​the first valid IPv6 authorized prefix obtained by the network device, the network device can determine the IPv6 authorized prefix as the LAN prefix. At the same time, the network device can stop sending dial-up requests through other candidate WAN interfaces to obtain IPv6 prefix authorization information. The network device can set the working mode of the candidate WAN interface to the first working mode, and set the working modes of other candidate WAN interfaces except the candidate WAN interface to the second working mode.

[0059] If the network device determines that the IPv6 authorized prefix obtained by the candidate WAN interface is not the earliest IPv6 authorized prefix obtained at the first time, that is, the current IPv6 authorized prefix is ​​not the first valid IPv6 authorized prefix obtained by the network device, then the network device can configure the message transmission mode of the candidate WAN interface to the second working mode, and the network device may not update the LAN prefix.

[0060] Among them, the first working mode in the message transmission mode can be a direct forwarding mode. When the message transmission mode of the candidate WAN interface is the first working mode, the candidate WAN interface can directly forward the received network message without converting the address information such as the source address and / or destination address in the network message. Exemplarily, when the first WAN interface operating in the first working mode receives a network message sent by a terminal device hanging below, the first WAN interface can directly send the received network message to the gateway device. The second working mode can be an address conversion mode. When the message transmission mode of the candidate WAN interface is the second working mode, the candidate WAN interface can send and receive messages through address conversion technology. Specifically, after receiving the network message, the candidate WAN interface in the second working mode can convert the source address and / or destination address in the network message according to the address conversion technology, and then forward the network message after the address conversion. Exemplarily, when the second WAN interface operating in the second working mode receives a network message sent by a downstream terminal device, the second WAN interface can convert the first network address in the network message (i.e., the source address in the network message) into the IPv6 address corresponding to the second WAN interface through address conversion technology, and then send the network message after address conversion to the gateway device.

[0061] Through the method provided in this embodiment, when the network device selects the LAN prefix from the dial-up information corresponding to each candidate WAN interface, the public network prefix will be preferentially selected as the LAN prefix. In addition, the method provided in this embodiment can be compatible with multiple IPv6 gateway devices and server scenarios at the same time. For example, when there are two WAN interfaces on the network device, for the three scenarios that all IPv6 servers connected to the WAN interfaces support IPv6 prefix authorization, only one IPv6 server connected to the WAN interface supports IPv6 prefix authorization, and both IPv6 servers connected to the WAN interfaces do not support IPv6 prefix authorization, the method provided in this embodiment can select a unique and appropriate LAN prefix so that both WAN interfaces can access the Internet based on the unique LAN prefix. Therefore, the method provided in this embodiment can ensure the stability and uniqueness of the LAN prefix of the network device and improve the stability of the terminal device accessing the Internet through IPv6 communication.

[0062] S102. Based on the LAN prefix, configure a first network address of a terminal device accessing the network device; the terminal device is connected to the network device through a LAN interface.

[0063] In this embodiment, after determining the LAN prefix, the network device can configure a first network address for a terminal device accessing the network device according to the determined LAN prefix. The terminal device can be a device that is wired to the network device through a LAN interface. The terminal device can also be a device that is wirelessly connected to a wireless network unit in the network device through a wireless signal. Specifically, after determining the LAN prefix, the network device can automatically generate a first network address corresponding to the terminal device according to the physical address corresponding to each terminal device through the EUI-64 format or the address configuration algorithm. For example, when the LAN prefix of a certain network device is 2001:db8:: / 64, the first network address configured by the network device for a certain terminal device can be 2001:db8::xxxx:xxxx:xxxx:xxxx. The specific content of the xxxx:xxxx:xxxx:xxxx part can be converted by the network device according to the physical address corresponding to the terminal device.

[0064] In a possible implementation, after the terminal device is connected to the network device, the terminal device may send an address request to the network device. The address request sent by the terminal device may include a physical address corresponding to the terminal device. The network device may generate a first network address according to a local area network prefix in response to the address request sent by the terminal device. After generating the first network address corresponding to the terminal device, the network device may send address configuration information including the first network address to the terminal device that initiated the address request, so as to perform address configuration on the terminal device.

[0065] In a possible implementation, after the network device updates the local area network prefix each time, it may also update the first network address of the terminal device accessing the network device according to the updated local area network prefix.

[0066] Through the method provided by this embodiment, after the network device determines the candidate prefixes corresponding to each candidate WAN interface, it can select the LAN prefix from multiple candidate prefixes through the prefix selection algorithm. Therefore, the method provided by this embodiment can ensure that the network device can select a suitable LAN prefix from multiple candidate prefixes to configure the network address for the terminal device. Therefore, the method provided by this embodiment can ensure the prefix stability of the network device, thereby ensuring the communication stability when the network device uses multiple WAN interfaces to access the Internet.

[0067] Figure 4 The specific implementation flow chart of a method S102 for determining an IPv6 local area network prefix applied to multiple wide area network interfaces provided in the second embodiment of the present application is shown. Figure 4 , compared to Figure 2The embodiment, in a method for determining an IPv6 local area network prefix applied to multiple wide area network interfaces provided in this embodiment, further includes, after S102: S401 to S403, which are described in detail as follows:

[0068] S401: Receive a network message sent by a terminal device.

[0069] In this embodiment, after receiving the first network address configured by the network device, the terminal device can respond to the user's Internet access operation and send a network message to the network device. After configuring the first network address for the connected terminal device, the network device can receive the network message containing the first network address sent by the terminal device. Among them, the network device can be configured with a message processing program. After the network device receives the network message sent by the terminal device, the network device can run the pre-configured message processing program to select a target wide area network interface for sending the network message from multiple candidate wide area network interfaces through the message processing program. Exemplarily, when the operating system running in the network device is a Linux system, the network device can be configured with a message processing module (netfilter module). The message processing module can include a message detection point (HOOK) pre-set by the R&D personnel. When the message detection point of the message processing module detects the network message, the message processing module can run the message processing program to select the target wide area network interface for sending the network message.

[0070] S402, querying the second forwarding table based on the session information in the network message, and determining the target WAN interface corresponding to the network message from all candidate WAN interfaces; the session information includes the first network address of the terminal device and the second network address of the target device to which the network message is sent.

[0071] In this embodiment, after receiving the network message sent by the terminal device, the network device can obtain session information from the received network message. Then, the network device can query the second forwarding table according to the obtained session information to determine the target wide area network interface corresponding to the network message from all candidate wide area network interfaces according to the session information. The session information determined by the network device may include the first network address of the terminal device and the second network address of the target device to which the network message is sent.

[0072] In a possible implementation, the session information may include first session information and second session information. The first session information may include a first network address corresponding to the terminal device, a second network address corresponding to the target device, a first port number corresponding to the terminal device, a second port number corresponding to the target device, and a protocol type of the transmission protocol. The second session information may include the first network address corresponding to the terminal device and the second network address corresponding to the target device. Figure 5, shows a schematic diagram of a selection process of a wide area network interface provided by an embodiment of the present application. Figure 5 As shown, after receiving the network message sent by the terminal device, the network device can first determine whether the network message contains the first session information.

[0073] If the network device determines that the currently received network message contains the first session information, the network device can obtain the first session information in the network message, and query the second forwarding table according to the obtained first session information. If the network device determines that the second forwarding table contains the currently obtained first session information, the network device can send the network message through the target WAN interface corresponding to the first session information in the second forwarding table. If the network device determines that the second forwarding table does not contain the currently obtained first session information, the network device can calculate the remaining bandwidth ratio corresponding to each candidate WAN interface on the network device through the bandwidth algorithm pre-set by the R&D personnel. Specifically, the remaining bandwidth ratio corresponding to a candidate WAN interface can be the ratio of the actual remaining bandwidth of the candidate WAN interface to the theoretical bandwidth of the candidate WAN interface. The network device can use the candidate WAN interface with the largest current remaining bandwidth ratio as the target WAN interface corresponding to the current network message, and write the correspondence between the determined target WAN interface and the first session information into the second forwarding table.

[0074] If the network device determines that the currently received network message does not contain the first session information, the network device can obtain the second session information in the network message, and query the second forwarding table based on the obtained second session information. If the network device determines that the second forwarding table contains the currently obtained second session information, the network device can send the network message through the target WAN interface corresponding to the second session information in the second forwarding table. If the network device determines that the second forwarding table does not contain the currently obtained second session information, the network device can calculate the remaining bandwidth ratio corresponding to each candidate WAN interface on the network device through a bandwidth algorithm. The network device can use the candidate WAN interface with the largest current remaining bandwidth ratio as the target WAN interface corresponding to the current network message, and write the correspondence between the determined target WAN interface and the second session information into the second forwarding table.

[0075] Through the method provided in this embodiment, the terminal device can preferentially determine the target wide area network interface corresponding to the network message based on the first session information. Since the first session information contains more information than the second session information, the method provided in this embodiment enables the network device to further refine the Internet traffic of the terminal device, thereby making the number of network messages sent by each wide area network interface more balanced, further improving the message transmission rate.

[0076] In a possible implementation, when a user needs to specify a target WAN interface corresponding to a terminal device, that is, when the user needs to specify that all network packets of the terminal device are sent through a certain target WAN interface, the user can send interface configuration information to the network device through the terminal device. Among them, the interface configuration information sent by the terminal device may include the interface identifier corresponding to the target WAN interface to be specified, the physical address of the terminal device, and the address protocol type. Exemplarily, when the user needs to specify the target WAN interface of the terminal device when the first network address is an IPv6 address, the address protocol type in the interface configuration information can be an IPv6 type. When the user needs to specify the target WAN interface of the terminal device when the first network address is an IPv4 address, the address protocol type in the interface configuration information can be an IPv4 type. The network device can receive the interface configuration information sent by the terminal device, and write the correspondence between the physical address in the interface configuration information and the target WAN interface into the first forwarding table for storage.

[0077] When the network device receives a network message, before querying the second forwarding table according to the session information in the network message, the network device can also obtain the physical address in the network message and query the first forwarding table according to the obtained physical address. If the network device determines that the first forwarding table contains the physical address corresponding to the network message, the network device can determine the target wide area network interface corresponding to the network message according to the interface identifier corresponding to the physical address in the first forwarding table, and send the network message by determining the target wide area network interface. If the network device determines that the first forwarding table does not contain the physical address corresponding to the network message, the network device can obtain the session information in the network message, and query the second forwarding table according to the obtained session information to determine the target wide area network interface corresponding to the network message. Among them, the specific method for the network device to determine the target wide area network interface according to the session information please refer to the relevant content in this embodiment, which will not be repeated here.

[0078] Through the method provided in this embodiment, the network device can respond to the interface configuration information sent by the terminal device and send the network message of the terminal device through the target WAN interface specified in the interface configuration information. Therefore, the method provided in this embodiment enables the network device to not only perform bandwidth superposition on the Internet traffic of the terminal device through multiple WAN interfaces, but also send all the network messages of the terminal device through a fixed WAN interface. Therefore, the method provided in this embodiment can improve the availability of the network device.

[0079] S403: Send a network message to the target device through the target WAN interface.

[0080] In this embodiment, after determining the target WAN interface, the network device may send a network message to the target device through the target WAN interface.

[0081] It should be noted that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0082] Through the method provided by this embodiment, after receiving the network message sent by the terminal device, the network device can determine the target WAN interface corresponding to the current network message according to the session information in the network message. Therefore, the method provided by this embodiment enables the network device to use multiple different WAN interfaces to transmit different network messages sent by the same terminal device, thereby realizing the bandwidth superposition of multiple different lines, thereby improving the message transmission rate. Therefore, the method provided by this embodiment can greatly improve the peak Internet performance of a home router containing multiple WAN interfaces.

[0083] Reference Figure 6 , shows a schematic diagram of an apparatus for determining an IPv6 local area network prefix applied to multiple wide area network interfaces provided in an embodiment of the present application, which may specifically include a prefix generation module 601, a prefix selection module 602, and an address configuration module 603, wherein:

[0084] The prefix generation module 601 is used to determine the candidate prefixes corresponding to each candidate WAN interface based on the IPv6 prefix authorization information corresponding to each candidate WAN interface; the IPv6 prefix authorization information is used to determine whether the gateway device connected to the candidate WAN interface supports IPv6 prefix authorization;

[0085] The prefix selection module 602 is used to input the plurality of candidate prefixes into a preset prefix selection algorithm to determine a local area network prefix that is suitable for any of the candidate wide area network interfaces to transmit packets;

[0086] The address configuration module 603 is used to configure the first network address of the terminal device accessing the network device based on the LAN prefix; the terminal device is connected to the network device via a LAN interface.

[0087] The prefix generation module can also be used to send a prefix acquisition request to the gateway device connected to the candidate wide area network interface if it is determined based on the IPv6 prefix authorization information that the gateway device connected to the candidate wide area network interface supports IPv6 prefix authorization; receive the IPv6 authorized prefix returned by the gateway device based on the prefix acquisition request, and use the IPv6 authorized prefix as the candidate prefix corresponding to the candidate wide area network interface.

[0088] The prefix generation module can also be used to generate a private network prefix corresponding to the candidate wide area network interface based on a preset network address conversion algorithm if it is determined based on the IPv6 prefix authorization information that the gateway device connected to the candidate wide area network interface does not support IPv6 prefix authorization, and use the private network prefix as the candidate prefix corresponding to the candidate wide area network interface.

[0089] The prefix selection module can also be used for, if at least one IPv6 authorized prefix is ​​included in multiple candidate prefixes, then based on the first acquisition time corresponding to each of the IPv6 authorized prefixes, selecting the IPv6 authorized prefix with the earliest first acquisition time from the at least one IPv6 authorized prefix as the local area network prefix; if all the candidate prefixes are private network prefixes, then based on the second acquisition time corresponding to each of the private network prefixes, selecting the private network prefix with the latest second acquisition time from all of the private network prefixes as the local area network prefix; continuously acquiring the IPv6 prefix authorization information corresponding to each of the candidate wide area network interfaces until there is at least one candidate prefix corresponding to the candidate wide area network interface that is an IPv6 authorized prefix, and performing the operation of selecting the IPv6 authorized prefix with the earliest first acquisition time from the at least one IPv6 authorized prefix as the local area network prefix based on the first acquisition time corresponding to each of the IPv6 authorized prefixes.

[0090] The address configuration module can also be used to receive the network message sent by the terminal device; query the second forwarding table based on the session information in the network message, and determine the target wide area network interface corresponding to the network message from all the candidate wide area network interfaces; the session information includes the first network address of the terminal device and the second network address of the target device to which the network message is sent; and send the network message to the target device through the target wide area network interface.

[0091] The address configuration module can also be used to calculate the remaining bandwidth corresponding to each of the candidate WAN interfaces based on a preset bandwidth algorithm if the target WAN interface corresponding to the session information is not recorded in the second forwarding table; use the candidate WAN interface with the largest remaining bandwidth as the target WAN interface corresponding to the network message; and write the corresponding relationship between the target WAN interface and the session information into the second forwarding table.

[0092] The address configuration module can also be used to determine the target wide area network interface corresponding to the network message based on the physical address if the first forwarding table contains the physical address corresponding to the network message, and send the network message through the target wide area network interface; if the target wide area network interface corresponding to the physical address is not recorded in the first forwarding table, query the second forwarding table based on the session information in the network message to determine the target wide area network interface corresponding to the network message.

[0093] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment part.

[0094] Reference Figure 7 , shows a schematic diagram of a network device provided by an embodiment of the present application. Figure 7 As shown, the network device 700 in the embodiment of the present application includes: a processor 710, a memory 720, and a computer program 721 stored in the memory 720 and executable on the processor 710. When the processor 710 executes the computer program 721, the steps of each embodiment of the above-mentioned method for determining IPv6 local area network prefixes applied to multiple wide area network interfaces are implemented, for example Figure 1 Alternatively, when the processor 710 executes the computer program 721, the functions of each module / unit in the above-mentioned device embodiments are realized, for example Figure 6 Functions of modules 601 to 603 are shown.

[0095] Exemplarily, the computer program 721 may be divided into one or more modules / units, which are stored in the memory 720 and executed by the processor 710 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which may be used to describe the execution process of the computer program 721 in the network device 700. For example, the computer program 721 may be divided into a prefix generation module, a prefix selection module, and an address configuration module, and the specific functions of each module are as follows:

[0096] A prefix generation module, configured to determine candidate prefixes corresponding to each candidate WAN interface based on the IPv6 prefix authorization information corresponding to each candidate WAN interface; the IPv6 prefix authorization information is used to determine whether the gateway device connected to the candidate WAN interface supports IPv6 prefix authorization;

[0097] A prefix selection module, used for inputting a plurality of the candidate prefixes into a preset prefix selection algorithm, and determining a local area network prefix adapted to any of the candidate wide area network interfaces for message transmission;

[0098] The address configuration module is used to configure the first network address of the terminal device connected to the network device based on the local area network prefix; the terminal device is connected to the network device through a local area network interface.

[0099] The network device 700 may be a router, a gateway device, a remote access concentrator, or other device in the aforementioned embodiments. The network device 700 may include, but is not limited to, a processor 710 and a memory 720. Those skilled in the art will appreciate that Figure 7 It is only an example of the network device 700 and does not constitute a limitation of the network device 700. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the network device 700 may also include input and output devices, network access devices, buses, etc.

[0100] The processor 710 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0101] The memory 720 may be an internal storage unit of the network device 700, such as a hard disk or memory of the network device 700. The memory 720 may also be an external storage device of the network device 700, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the network device 700. Further, the memory 720 may also include both an internal storage unit of the network device 700 and an external storage device. The memory 720 is used to store the computer program 721 and other programs and data required by the network device 700. The memory 720 may also be used to temporarily store data that has been output or is to be output.

[0102] An embodiment of the present application also discloses a network device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the method for determining the IPv6 local area network prefix applied to multiple wide area network interfaces as described in the aforementioned embodiments.

[0103] An embodiment of the present application also discloses a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the method for determining the IPv6 local area network prefix applied to multiple wide area network interfaces as described in the above embodiments.

[0104] An embodiment of the present application further discloses a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the method for determining the IPv6 local area network prefix applied to multiple wide area network interfaces as described in the aforementioned embodiments.

[0105] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application is described in detail with reference to the above-mentioned embodiments, a person skilled in the art should understand that the technical solutions described in the above-mentioned embodiments can still be modified, or some of the technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.

Claims

1. A method for determining an IPv6 local area network prefix for multiple wide area network interfaces, It is characterized in that Applied to a network device including at least two wide area network interfaces, the determination method includes: Determine the local area network prefix based on the IPv6 prefix authorization information corresponding to each candidate wide area network interface; the IPv6 prefix authorization information is used to determine whether the gateway device connected to the candidate wide area network interface supports IPv6 prefix authorization; Based on the LAN prefix, a first network address of a terminal device accessing the network device is configured; the terminal device is connected to the network device via a LAN interface.

2. The method according to claim 1, It is characterized in that The determining of the local area network prefix based on the IPv6 prefix authorization information corresponding to each candidate wide area network interface includes: If it is determined based on the IPv6 prefix authorization information that at least one gateway device connected to the candidate WAN interface supports IPv6 prefix authorization, the LAN prefix is ​​determined based on an IPv6 authorized prefix returned by at least one gateway device supporting IPv6 prefix authorization.

3. The method according to claim 2, It is characterized in that The determining the local area network prefix based on the IPv6 authorized prefix returned by at least one gateway device supporting IPv6 prefix authorization comprises: Based on the first acquisition time corresponding to each IPv6 authorized prefix, the IPv6 authorized prefix with the earliest first acquisition time is selected from the various IPv6 authorized prefixes as the local area network prefix.

4. The method according to claim 2, It is characterized in that After determining the local area network prefix based on the IPv6 authorized prefix returned by at least one gateway device supporting IPv6 prefix authorization, the method includes: Setting the working mode of the first wide area network interface to the first working mode; the first wide area network interface is a candidate wide area network interface corresponding to the IPv6 authorized prefix determined as the local area network prefix; The working mode of the second WAN interface is set to the second working mode; the second WAN interface is a candidate WAN interface other than the first WAN interface; the second working mode is a working mode for sending and receiving messages through address conversion technology.

5. The method according to claim 1, It is characterized in that The determining of the local area network prefix based on the IPv6 prefix authorization information corresponding to each candidate wide area network interface includes: If it is determined based on the IPv6 prefix authorization information that all gateway devices connected to the candidate wide area network interfaces do not support IPv6 prefix authorization, the preset private network prefix is ​​used as the local area network prefix.

6. The method according to any one of claims 1 to 5, It is characterized in that After configuring the first network address of the terminal device accessing the network device based on the local area network prefix, the method further includes: Receiving a network message sent by the terminal device; querying a second forwarding table based on the session information in the network message, and determining a target wide area network interface corresponding to the network message from all the candidate wide area network interfaces; the session information includes the first network address of the terminal device and the second network address of the target device to which the network message is sent; The network message is sent to the target device through the target wide area network interface.

7. The method according to claim 6, It is characterized in that The querying of the second forwarding table based on the session information in the network message to determine the target wide area network interface corresponding to the network message includes: If the target WAN interface corresponding to the session information is not recorded in the second forwarding table, calculating the remaining bandwidth ratio corresponding to each of the candidate WAN interfaces based on a preset bandwidth algorithm; Using the candidate WAN interface with the largest remaining bandwidth ratio as the target WAN interface corresponding to the network message; The correspondence between the target WAN interface and the session information is written into the second forwarding table.

8. The method according to claim 7, It is characterized in that Before querying the second forwarding table based on the session information in the network message to determine the target wide area network interface corresponding to the network message, the method includes: If the first forwarding table contains the physical address corresponding to the network message, determine the target wide area network interface corresponding to the network message based on the physical address, and send the network message through the target wide area network interface; If the target WAN interface corresponding to the physical address is not recorded in the first forwarding table, the second forwarding table is queried based on the session information in the network message to determine the target WAN interface corresponding to the network message.

9. The method according to claim 8, It is characterized in that include: Receiving interface configuration information sent by the terminal device; the interface configuration information includes the physical address of the terminal device and the target wide area network interface corresponding to the physical address; The first forwarding table is updated based on the interface configuration information.

10. A network device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the method for determining the IPv6 local area network prefix applied to multiple wide area network interfaces as described in any one of claims 1 to 9 is implemented.

11. A computer-readable storage medium storing a computer program. It is characterized in that When the computer program is executed by a processor, the method for determining an IPv6 local area network prefix applied to multiple wide area network interfaces as described in any one of claims 1 to 9 is implemented.

Citation Information

Cited By

  • Data processing method and device based on multiple wide area network ports, equipment and medium

    CN119906669A