Network access methods, devices, communication equipment and computer-readable storage media

By exchanging DHCP messages and configuring parameters, the terminal can independently choose between a single-stack or dual-stack IPv6 network environment, which solves the problem of inflexible access methods in the evolution of IPv6 single-stack and realizes efficient and flexible network access and a stable communication system.

CN118984344BActive Publication Date: 2026-04-17CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER
Filing Date
2024-07-19
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

During the evolution of the Internet towards IPv6 single stack, the lack of assessment of IPv6 single stack support capabilities on both the terminal and network sides has resulted in users being unable to flexibly choose access methods and effectively adapt to application environments.

Method used

By exchanging DHCP messages between the terminal and the server, the IPv6 single-stack or dual-stack network environment is dynamically selected. The terminal can independently configure the network environment according to the configuration parameters in the server's feedback message, including enabling the IPv6 communication protocol and disabling the IPv4 communication protocol, and using the DNS64 server and NAT64 device to convert IPv4 packets to IPv6 packets.

Benefits of technology

It improves the flexibility and efficiency of network access, reduces operation and maintenance costs, provides users with a better network connection experience, and enhances the stability and data transmission efficiency of the communication system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118984344B_ABST
    Figure CN118984344B_ABST
Patent Text Reader

Abstract

This application relates to a network access method, apparatus, communication device, and computer-readable storage medium. The method includes: in response to a network connection request initiated by a user through a terminal, the terminal sends a DHCP message carrying a first field to a server, and receives a feedback message generated by the server based on the DHCP message; if the feedback message carries a field value matching the first field, the terminal obtains IPv6 configuration parameters from a second field of the feedback message, and configures an IPv6 single-stack environment using the IPv6 configuration parameters to access the IPv6 single-stack network environment; otherwise, if the feedback message does not carry a field value matching the first field, the terminal configures a dual-stack environment to access the dual-stack network environment. This method can improve network access flexibility and efficiency, while reducing operation and maintenance costs, providing users with a better network connection experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data communication network technology, and in particular to a network access method, apparatus, communication equipment, computer-readable storage medium, and computer program product. Background Technology

[0002] The evolution of the Internet to IPv6 single-stack has become an inevitable trend. Applications and network systems carried by IP networks are also undergoing IPv6 transformation, and current networks have largely entered dual-stack operation. However, this evolution to IPv6 single-stack presents practical deployment challenges.

[0003] Currently, after the introduction of IPv6 single-stack architecture based on IPv4 / IPv6 conversion technology, the terminal side and network side lack the ability to judge the support capability of IPv6 single stack and lack the ability to announce the corresponding DNS service address based on the support status. As a result, users cannot choose between single-stack and dual-stack environments based on the IPv6 single-stack capability support status of the client side. They can only passively access the network according to the pre-configured network, which is not flexible enough and cannot effectively adapt to the application environment. Summary of the Invention

[0004] Therefore, it is necessary to provide a network access method, device, communication equipment, computer-readable storage medium, and computer program product that can flexibly select the access method to address the above-mentioned technical problems.

[0005] In a first aspect, this application provides a network access method applied to a terminal supporting an IPv6 single-stack environment, comprising:

[0006] In response to a network connection request, a DHCP message carrying a first preset field is sent to the server; the server is used to return a feedback message corresponding to the DHCP message to the terminal upon receiving the DHCP message.

[0007] If the feedback message carries a field value that matches the first preset field, the IPv6 configuration parameters are obtained from the second field of the feedback message, and the IPv6 single-stack environment is configured through the IPv6 configuration parameters to access the IPv6 single-stack network environment.

[0008] If the feedback message does not carry a field value that matches the first preset field, configure a dual-stack environment to access the dual-stack network environment.

[0009] In one embodiment, DHCP messages include DHCP discovery messages, and feedback messages include DHCP offer messages;

[0010] In response to a network connection request, a DHCP message carrying a first field is sent to the server, including:

[0011] In response to a network connection request, if the terminal has not pre-bound an IP address, it sends a DHCP Discover message carrying the first field to the server; the server, upon receiving the DHCP Discover message, returns a DHCP Offer message corresponding to the DHCP Discover message to the terminal.

[0012] In one embodiment, the DHCP message includes a DHCP request message, and the feedback message includes a DHCP response message;

[0013] In response to a network connection request, a DHCP message carrying a first field is sent to the server, including:

[0014] In response to a network connection request, if the terminal has already been pre-bound with an IP address, it sends a DHCP request message carrying the first field to the server; the server, upon receiving the DHCP request message, returns a DHCP response message corresponding to the DHCP request message to the terminal.

[0015] In one embodiment, the second field is set with multiple sets of candidate IPv6 configuration parameters;

[0016] The IPv6 configuration parameters are obtained from the second field of the feedback message, including:

[0017] Obtain the priority identifier of each candidate IPv6 configuration parameter from the second field of the feedback message;

[0018] Based on the priority identifier, obtain the IPv6 configuration parameters from each candidate IPv6 configuration parameter.

[0019] In one embodiment, the IPv6 configuration parameters include the IPv6 address parameters of the DNS64 server and the NAT64 prefix parameters;

[0020] Configure an IPv6 single-stack environment using IPv6 configuration parameters, including:

[0021] Enable IPv6 communication protocol and disable IPv4 communication protocol;

[0022] Configure the corresponding DNS64 server according to the IPv6 address parameters of the DNS64 server; the DNS64 server is used to map IPv4 packets to IPv6 packets;

[0023] Configure the corresponding NAT64 device based on the NAT64 prefix parameters; the NAT64 device is used to implement the conversion between IPv4 packets and IPv6 packets.

[0024] Secondly, this application also provides a network access method applied to a server, including:

[0025] Receive a DHCP message carrying the first field; the DHCP message is generated by a terminal that supports an IPv6 single-stack environment in response to a network connection request;

[0026] When the server supports the IPv6 single-stack environment, a first feedback message corresponding to the DHCP message is generated and returned to the terminal. The first feedback message carries a field value that matches the first field and a second field, which is used to instruct the terminal to obtain the IPv6 configuration parameters from the second field of the first feedback message and configure the IPv6 single-stack environment through the IPv6 configuration parameters to access the IPv6 single-stack network environment.

[0027] If the server does not support a single-stack IPv6 environment, a second feedback message corresponding to the DHCP message is generated and returned to the terminal. The second feedback message does not carry a field value that matches the first field and is used to instruct the terminal to configure a dual-stack environment to access the dual-stack network environment.

[0028] In an exemplary embodiment, the DHCP message includes a DHCP discovery message, and the first feedback message and the second feedback message include a DHCP offer message;

[0029] Receive a DHCP message carrying the first field, including:

[0030] Receive a DHCP discovery message carrying the first field; the DHCP discovery message is generated by a terminal that has not been pre-bound an IP address in response to a network connection request;

[0031] The corresponding DHCP offer message is generated based on the DHCP discovery message and returned to the terminal.

[0032] In one embodiment, the DHCP message includes a DHCP request message, and the first feedback message and the second feedback message include DHCP response messages;

[0033] Receiving a DHCP message carrying the first field also includes:

[0034] Receive a DHCP request message carrying the first field; the DHCP request message is generated by a terminal that has been pre-bound with an IP address in response to a network connection request;

[0035] Generate a corresponding DHCP response message based on the DHCP request message and return it to the terminal.

[0036] Thirdly, this application provides a network access device for use in terminals supporting an IPv6 single-stack environment, comprising:

[0037] The message sending module is used to send a DHCP message carrying a first preset field to the server in response to a network connection request; the server is used to return a feedback message corresponding to the DHCP message to the terminal upon receiving the DHCP message.

[0038] The IPv6 single-stack environment configuration module is used to obtain IPv6 configuration parameters from the second field of the feedback message when the feedback message carries a field value that matches the first preset field, and configure the IPv6 single-stack environment through the IPv6 configuration parameters to access the IPv6 single-stack network environment.

[0039] The dual-stack environment configuration module is used to configure a dual-stack environment to access a dual-stack network environment when the feedback message does not carry a field value that matches the first preset field.

[0040] Fourthly, this application also provides a network access device for use with a server, comprising:

[0041] The message receiving module is used to receive DHCP messages carrying the first field; the DHCP message is generated by the terminal supporting the IPv6 single-stack environment in response to the network connection request.

[0042] The first feedback message generation module is used to generate a first feedback message corresponding to the DHCP message and return it to the terminal when the server supports the IPv6 single-stack environment. The first feedback message carries a field value that matches the first field and a second field, which is used to instruct the terminal to obtain the IPv6 configuration parameters from the second field of the first feedback message and configure the IPv6 single-stack environment through the IPv6 configuration parameters to access the IPv6 single-stack network environment.

[0043] The second feedback message generation module is used to generate a second feedback message corresponding to the DHCP message and return it to the terminal when the server does not support the IPv6 single-stack environment. The second feedback message does not carry a field value that matches the first field and is used to instruct the terminal to configure a dual-stack environment to access the dual-stack network environment.

[0044] Fifthly, this application also provides a communication device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0045] In response to a network connection request, a DHCP message carrying a first preset field is sent to the server; the server is used to return a feedback message corresponding to the DHCP message to the terminal upon receiving the DHCP message.

[0046] If the feedback message carries a field value that matches the first preset field, the IPv6 configuration parameters are obtained from the second field of the feedback message, and the IPv6 single-stack environment is configured through the IPv6 configuration parameters to access the IPv6 single-stack network environment.

[0047] If the feedback message does not carry a field value that matches the first preset field, configure a dual-stack environment to access the dual-stack network environment.

[0048] Sixthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:

[0049] In response to a network connection request, a DHCP message carrying a first preset field is sent to the server; the server is used to return a feedback message corresponding to the DHCP message to the terminal upon receiving the DHCP message.

[0050] If the feedback message carries a field value that matches the first preset field, the IPv6 configuration parameters are obtained from the second field of the feedback message, and the IPv6 single-stack environment is configured through the IPv6 configuration parameters to access the IPv6 single-stack network environment.

[0051] If the feedback message does not carry a field value that matches the first preset field, configure a dual-stack environment to access the dual-stack network environment.

[0052] In a seventh aspect, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:

[0053] In response to a network connection request, a DHCP message carrying a first preset field is sent to the server; the server is used to return a feedback message corresponding to the DHCP message to the terminal upon receiving the DHCP message.

[0054] If the feedback message carries a field value that matches the first preset field, the IPv6 configuration parameters are obtained from the second field of the feedback message, and the IPv6 single-stack environment is configured through the IPv6 configuration parameters to access the IPv6 single-stack network environment.

[0055] If the feedback message does not carry a field value that matches the first preset field, configure a dual-stack environment to access the dual-stack network environment.

[0056] The aforementioned network access method, apparatus, communication equipment, computer-readable storage medium, and computer program product, in response to a network connection request initiated by a user through a terminal, involve the terminal sending a DHCP message carrying a first field to a server and receiving a feedback message generated by the server based on the DHCP message. If the feedback message contains a field value matching the first field, IPv6 configuration parameters are obtained from the second field of the feedback message, and an IPv6 single-stack environment is configured using these parameters to access the IPv6 single-stack network environment. Conversely, if the feedback message does not contain a field value matching the first field, a dual-stack environment is configured to access the dual-stack network environment. By dynamically selecting the configuration method and automatically configuring either a single-stack or dual-stack IPv6 environment based on the feedback message content, the terminal improves network access flexibility and efficiency while reducing maintenance costs, providing users with a better network connection experience. Attached Figure Description

[0057] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0058] Figure 1 This is an application environment diagram of a network access method in one embodiment;

[0059] Figure 2 This is a flowchart illustrating a network access method in one embodiment;

[0060] Figure 3 This is a flowchart illustrating a network access method in another embodiment;

[0061] Figure 4 This is a flowchart illustrating the first feedback message return step in one embodiment;

[0062] Figure 5 This is a flowchart illustrating the second feedback message return step in another embodiment;

[0063] Figure 6 This is a schematic diagram of the two-end interaction of a network access method in one embodiment;

[0064] Figure 7 This is a schematic diagram illustrating the content carried by the second field in one embodiment;

[0065] Figure 8 This is a schematic diagram illustrating the workflow of the network access method in another embodiment;

[0066] Figure 9 This is a structural block diagram of a network access device in one embodiment;

[0067] Figure 10 This is a structural block diagram of a network access device in another embodiment;

[0068] Figure 11 This is an internal structural diagram of a communication device in one embodiment. Detailed Implementation

[0069] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0070] The network access method provided in this application embodiment can be applied to, for example, Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or placed on a cloud or other network server. A user initiates a network connection request to server 104 through terminal 102. In response to this request, terminal 102 sends a DHCP message carrying a first field to the server. Upon receiving the DHCP message, server 104 returns a feedback message corresponding to the DHCP message to terminal 102. If the feedback message contains a field value matching the first field, IPv6 configuration parameters are obtained from the second field of the feedback message, and an IPv6 single-stack environment is configured to access the IPv6 single-stack network environment. If the feedback message does not contain a field value matching the first field, a dual-stack environment is configured to access the dual-stack network environment. The terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle systems, and projection devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted displays. Head-mounted displays can be virtual reality (VR) devices, augmented reality (AR) devices, and smart glasses. The server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.

[0071] In one exemplary embodiment, such as Figure 2 As shown, a network access method is provided, which is applied to... Figure 1Taking terminal 102 as an example, the explanation includes the following steps S201 to S203. Wherein:

[0072] Step S201: In response to a network connection request, a DHCP message carrying a first field is sent to the server; the server is used to return a feedback message corresponding to the DHCP message to the terminal upon receiving the DHCP message.

[0073] Among them, the network connection request can be understood as the process by which a user, after selecting the corresponding application and initiating a service request on the application display page when using terminal 102, needs to establish a network connection to obtain the corresponding network resources in order to meet the user's service needs. Normally, terminal 102 is in a dormant state when it does not receive a user's service request, which means it needs to reconnect to the network. The first field can be understood as option 108. The DHCP message can be understood as the message information sent by terminal 102 to server 104 that conforms to the DHCPv4 protocol. The feedback message can be understood as the corresponding DHCP message returned between receiving the DHCP messages sent by the terminal that conforms to the DHCPv4 protocol.

[0074] For example, when a user uses terminal 102, triggering a function of an application requires a network connection to fulfill the user's needs. In response to the terminal's network connection request, it sends a DHCP message carrying a first field to server 104. Upon receiving the DHCP message, server 104 returns a corresponding feedback message to the terminal. Through this interaction between terminal 102 and server 104, terminal 102 can promptly receive feedback data from server 104, ensuring timely processing of user requests and improving the user's service experience.

[0075] Step S202: If the feedback message carries a field value that matches the first field, obtain the IPv6 configuration parameters from the second field of the feedback message, and configure the IPv6 single-stack environment through the IPv6 configuration parameters to access the IPv6 single-stack network environment.

[0076] Step S203: If the feedback message does not carry a field value that matches the first field, configure a dual-stack environment to access the dual-stack network environment.

[0077] In this context, the first field, which matches the value of the field, can be understood as the response of server 104 to option 108. The second field, option 107, is a uniquely defined field in this application, containing a set of parameters necessary for a single-stack IPv6 environment: the IPv6 address of the DNS64 server (Value-DNS64 server address) and the NAT64 prefix information (Value-PREF64). This option can also carry multiple sets of parameters; the IPv6 configuration parameters can be understood as the IPv6 address of the DNS64 server and the NAT64 prefix information carried in option 107. A single-stack IPv6 environment can be understood as the physical infrastructure environment supporting a single-stack IPv6 network, including the necessary equipment and protocols used, where there is only one stack for both data storage and operation execution. Similarly, a dual-stack environment can be understood as the physical infrastructure environment supporting a dual-stack network, where there are two stacks, used to store different types of data or perform different operations.

[0078] Specifically, if terminal 102 determines that the feedback message carries a field value matching the first field, it retrieves IPv6 configuration parameters from the second field of the feedback message for service processing and configures an IPv6 single-stack environment using these parameters to access the IPv6 single-stack network environment. If terminal 102 determines that the feedback message does not carry a field value matching the first field, it configures a dual-stack environment based on its stored parameters to access the dual-stack network environment for service processing. Terminal 102 autonomously judges and selects based on the content of the feedback message sent by server 104. If the preset conditions are met, it configures an IPv6 single-stack environment to access the IPv6 single-stack network; otherwise, it configures a dual-stack environment to access the dual-stack network. This autonomous judgment improves the flexibility of network access, enhances the user's service experience, and improves the overall system's communication stability.

[0079] In the aforementioned network access method, in response to a network connection request initiated by a user through a terminal, the terminal sends a DHCP message carrying a first field to the server and receives a feedback message generated by the server based on the DHCP message. If the feedback message carries a field value matching the first field, IPv6 configuration parameters are obtained from the second field of the feedback message, and an IPv6 single-stack environment is configured using these parameters to access the IPv6 single-stack network environment. Conversely, if the feedback message does not carry a field value matching the first field, a dual-stack environment is configured to access the dual-stack network environment. By dynamically selecting the configuration method and automatically configuring either a single-stack or dual-stack IPv6 environment based on the feedback message content, the terminal improves network access flexibility and efficiency while reducing maintenance costs, providing users with a better network connection experience.

[0080] In one embodiment, DHCP messages include DHCP discovery messages, and feedback messages include DHCP offer messages;

[0081] In response to a network connection request, a DHCP message carrying a first field is sent to the server, including: in response to a network connection request, if the terminal has not pre-bound an IP address, sending a DHCP discovery message carrying the first field to the server; the server is used to return a DHCP offer message corresponding to the DHCP discovery message to the terminal upon receiving the DHCP discovery message.

[0082] The DHCP Discover message is also known as the DHCPDISCOVER message, which can be understood as a broadcast message sent by terminal 102 to find server 104, and at the same time, a message requesting IP address allocation after sending the corresponding message to server 104. Correspondingly, the DHCP Offer message is also known as the DHCPOFFER message, which can be understood as a message sent by server 104 after receiving the DHCP Discover message sent by terminal 102, responding to the request in the message and carrying the corresponding IP address information.

[0083] In an exemplary embodiment, in response to a network connection request initiated by a user through terminal 102, and without pre-binding an IP address to terminal 102, a DHCP discovery message carrying a first field is broadcast to server 104. Upon receiving the DHCP discovery message, server 104 returns a DHCP offer message corresponding to the DHCP discovery message to the terminal. Terminal 102 then binds an IP address based on the relevant information in the DHCP offer message. The first field is not sent by terminal 102 using its own bandwidth, but rather by embedding it within regular information exchange. This method of information transmission saves bandwidth resources and reduces network access costs.

[0084] In one embodiment, a DHCP message includes a DHCP request message, and a feedback message includes a DHCP response message;

[0085] In response to a network connection request, a DHCP message carrying a first field is sent to the server, including: in response to a network connection request, if the terminal has been pre-bound to an IP address, sending a DHCP request message carrying the first field to the server; the server is used to return a DHCP response message corresponding to the DHCP request message to the terminal upon receiving the DHCP request message.

[0086] The DHCP request message, also known as the DHCPREQUEST message, can be understood as follows: First, after terminal 102 has bound an IP address, it sends a message to respond to the DHCP offer message from server 104. Second, after terminal 102 restarts and initializes, it sends a message to confirm the previously assigned IP address and other configuration information. Third, after terminal 102 has bound an IP address, it sends a message to extend the IP address lease period. The DHCP reply message, also known as the DHCPACK message, can be understood as a response message to the DHCP request message. The response content can be a simple confirmation message or a notice allowing the extension of the IP address lease period.

[0087] For example, in response to a network connection request initiated by a user through terminal 102, if the terminal has been pre-bound with an IP address, a DHCP request message with the first field is sent to server 104. This message can be used to respond to a DHCP offer message sent by server 104, to determine configuration information such as the IP address, or to extend the lease period of the IP address. After receiving the DHCP request message, server 104 needs to respond by generating a DHCP reply message and returning it to the terminal, completing a closed-loop process of information exchange. Similarly, the first field also follows regular information in content exchange, saving bandwidth resources and reducing the access cost of network access.

[0088] In one exemplary embodiment, the second field is configured with multiple sets of candidate IPv6 configuration parameters;

[0089] The IPv6 configuration parameters are obtained from the second field of the feedback message, including: obtaining the priority identifier of each candidate IPv6 configuration parameter from the second field of the feedback message; and obtaining the IPv6 configuration parameters from each candidate IPv6 configuration parameter according to the priority identifier.

[0090] The priority identifier can be understood as the decision criterion for selecting IPv6 configuration parameters as the configuration basis. This application discloses, but is not limited to, the location of IPv6 configuration parameters. Among them, the priority of IPv6 configuration parameters located at the front end is higher than that of IPv6 configuration parameters in other places.

[0091] Specifically, terminal 102 obtains the priority identifiers of multiple sets of candidate IPv6 configuration parameters from the second field of the feedback message, and selects the IPv6 configuration parameter at the front end from the candidate IPv6 configuration parameters according to the priority identifier to configure the IPv6 single-stack environment. By selecting the IPv6 configuration parameter with higher priority for configuring the IPv6 single-stack environment, the parameter with higher priority has higher stability and better performance, thus the configured IPv6 single-stack environment is more stable, ensuring the communication robustness of the entire communication system.

[0092] In one embodiment, the IPv6 configuration parameters include the IPv6 address parameters and NAT64 prefix parameters of the DNS64 server;

[0093] Configure the IPv6 single-stack environment using IPv6 configuration parameters, including: enabling the IPv6 communication protocol and disabling the IPv4 communication protocol; configuring the corresponding DNS64 server based on the IPv6 address parameters of the DNS64 server; the DNS64 server is used to map IPv4 packets to IPv6 packets; configuring the corresponding NAT64 device based on the NAT64 prefix parameters; the NAT64 device is used to implement the conversion between IPv4 packets and IPv6 packets.

[0094] IPv4, or Internet Protocol version 4, is the most widely used network layer protocol on the Internet. IPv4 addresses are 32 bits long, resulting in a limited IPv4 address space and a shortage of IPv4 addresses.

[0095] IPv6 stands for Internet Protocol version 6, and it is a protocol used to identify and locate devices on the Internet. IPv6 addresses consist of 128 bits, compared to the 32-bit addresses of IPv4, providing more address space and allowing for globally unique addresses to be provided to a wider range of devices.

[0096] IPv6 was proposed to address the problem of IPv4 address space exhaustion and to introduce other enhancements and improvements.

[0097] A DNS64 server can be understood as a special type of DNS server used to handle DNS queries in IPv6 single-stack networks. When devices supporting an IPv6 single-stack environment need to access IPv4 resources, the DNS64 server translates and resolves the DNS queries to enable these devices to access IPv4 resources. A NAT64 (Network Address Translation 64) device can be understood as a network device used to enable communication with the IPv4 internet within an IPv6 single-stack network. The NAT64 device acts as an intermediary between the IPv6 and IPv4 networks, enabling communication between IPv6 single-stack devices and IPv4 resources by translating IPv6 and IPv4 data packets.

[0098] In an exemplary embodiment, the IPv6 communication protocol is first enabled and the IPv4 communication protocol is disabled on the line. Then, a corresponding DNS64 server is configured based on the IPv6 address parameter of the DNS64 server carried in the IPv6 configuration parameters. This server is configured to map IPv4 packets to IPv6 packets. Next, the NAT64 prefix parameter is configured in the corresponding NAT64 device, thereby enabling the conversion between IPv6 and IPv4 packets, and ultimately achieving communication between terminal 102 and IPv4 resources. By configuring the corresponding IPv6 single-stack environment in this way, the utilization of corresponding IPv4 resources is achieved within the IPv6 single-stack environment, avoiding resource waste and reducing service processing costs.

[0099] In one exemplary embodiment, such as Figure 3 As shown, a network access method is provided, which is applied to... Figure 1 Taking server 104 as an example, the explanation includes the following steps S301 to S303. Wherein:

[0100] Step S301: Receive a DHCP message carrying the first field; the DHCP message is generated by a terminal supporting an IPv6 single-stack environment in response to a network connection request.

[0101] Step S302: If the server supports the IPv6 single-stack environment, generate a first feedback message corresponding to the DHCP message and return it to the terminal. The first feedback message carries a field value that matches the first field and a second field, which is used to instruct the terminal to obtain the IPv6 configuration parameters from the second field of the first feedback message and configure the IPv6 single-stack environment through the IPv6 configuration parameters to access the IPv6 single-stack network environment.

[0102] For example, after a user initiates a network connection request through a terminal 102 that supports a single-stack environment, the terminal 102 generates a DHCP message carrying a first field and sends it to the server 104. The server 104 receives the message and retrieves its own configuration information from the data storage system to determine whether it supports the IPv6 single-stack environment. If the server 104 determines that it supports the IPv6 single-stack environment, it generates a first feedback message carrying a field value matching the first field and a second field, and returns it to the terminal 102. The first feedback message instructs the terminal 102 to obtain IPv6 configuration parameters from the second field and configure the IPv6 single-stack environment using the IPv6 configuration parameters to access the IPv6 single-stack network environment. By determining whether the server 104 supports the IPv6 single-stack environment, it decides whether to return the relevant configuration parameters, ensuring the uniformity of the communication protocol throughout the system. This, in turn, ensures the data integrity and validity of the entire communication system during the communication process and improves the efficiency of data transmission.

[0103] In step S303, if the server does not support the IPv6 single-stack environment, a second feedback message corresponding to the DHCP message is generated and returned to the terminal; the second feedback message does not carry a field value that matches the first field, and is used to instruct the terminal to configure a dual-stack environment to access the dual-stack network environment.

[0104] In an exemplary embodiment, if server 104 determines that it does not support an IPv6 single-stack environment, it generates a second feedback message without carrying a field value that matches the first field and returns it to terminal 102. The second feedback message instructs terminal 102 to configure a dual-stack environment in order to access the dual-stack network environment. In other words, regardless of whether server 104 supports an IPv6 single-stack environment, it will return the corresponding feedback message to ensure a closed loop in the message interaction process, achieve the integrity of information interaction, lay the data foundation for terminal 102 to build the environment, and accelerate network access speed.

[0105] In one embodiment, the DHCP message includes a DHCP discovery message, and the first feedback message and the second feedback message include DHCP offer messages; such as Figure 4 As shown, receiving a DHCP message carrying the first field includes steps S401 and S402. Wherein:

[0106] Step S401: Receive a DHCP discovery message carrying the first field; the DHCP discovery message is generated by a terminal that has not been pre-bound with an IP address in response to a network connection request.

[0107] Step 402: Generate the corresponding DHCP offer message based on the DHCP discovery message and return it to the terminal.

[0108] In an exemplary embodiment, server 104 receives a DHCP discovery message carrying a first field. This message is generated by terminal 102, which has not been pre-bound with an IP address, in response to a network connection request initiated by a user through terminal 102. Server 104 then generates a DHCP offer message carrying IP address registration information based on this DHCP discovery message and returns it to the terminal. Through this information exchange process, server 104 sends the allocated IP address to the terminal, laying the data foundation for the terminal to bind an IP address.

[0109] In one embodiment, the DHCP message includes a DHCP request message, and the first feedback message and the second feedback message include DHCP response messages; such as Figure 5 As shown, receiving a DHCP message carrying the first field includes steps S501 and S502. Wherein:

[0110] Step S501: Receive a DHCP request message carrying the first field; the DHCP request message is generated by a terminal that has been pre-bound with an IP address in response to a network connection request.

[0111] Step S502: Generate the corresponding DHCP response message based on the DHCP request message and return it to the terminal.

[0112] Specifically, server 104 receives a DHCP request message carrying a first field. This message is generated by terminal 102, which is not pre-bound to an IP address, in response to a network connection request initiated by a user through the terminal. The response message sent by server 104 may be used to determine configuration information such as the IP address, or to extend the IP address lease period. Then, server 104 generates a corresponding confirmation message or a notification message allowing lease extension based on this DHCP request message and returns it to the terminal. Through this information exchange process of returning a confirmed IP address, the reliability of the terminal's currently bound IP address is ensured, and the IP address lease period is extended in a timely manner, thereby preventing sudden disconnections during subsequent use and ensuring the robustness of system communication.

[0113] In one exemplary embodiment, such as Figure 6 The diagram illustrates a two-way interaction method for network access, including a DHCPv4 client, a DHCPv4 server, a DNS system, and a NAT system. Option 108 is the first field, IPv6-only indicates support for a single-stack IPv6 environment, and option 107 is the second field.

[0114] DHCPv4 clients and DHCPv4 servers communicate via option 108 to announce the terminal and network's support capabilities for IPv6 single-stack network environments.

[0115] The DHCPv4 client and DHCPv4 server exchange DNS64 server IPv6 address information and NAT device prefix information via option 107.

[0116] Based on the above information, DHCPv4 selects whether to join the IPv6 single-stack network environment. If it selects to join, it configures the single-stack environment according to the single-stack network parameters in option 107.

[0117] In one embodiment, such as Figure 7 As shown, in the existing DHCPv4 architecture, a new Option 107 is defined (the code number is based on the number assigned by IANA, and the proposed code number resource is 107). This Option defines a set of parameters necessary for IPv6-only networks: the address of the DNS64 server, i.e., Value-DNS64 server address, and the NAT64 prefix information, i.e., Value-PREF64. This Option can also carry multiple sets of parameters.

[0118] The Code field is the type number of this Option. The length of this field is 1 byte, and the corresponding value inside is 107.

[0119] The Length field indicates the length of the parameters following this Option. A unit value of 1 represents the length of the following set of parameters, which is 33 bytes, indicating that there is one set of parameters. The field itself is 1 byte long.

[0120] The Value-DNS64 server address field contains the address of the DNS64 server, typically an IPv6 address. This field has a fixed length of 16 bytes and is used to configure the corresponding DNS64 server to map IPv4 packets to IPv6 packets.

[0121] The Value-PREF64-Length field is the length of Prefix64 in the Value-PREF64 field. The fixed length of this field is 1 byte, and empty bits are padded with zeros.

[0122] The Value-PREF64 field contains the Prefix64 information of the NAT64 device deployed on the network side. This information is used for translating user IPv4 packets. This field has a fixed length of 16 bytes, with empty bits padded with zeros. The Prefix64 is set according to the corresponding NAT64 device to achieve the conversion between IPv4 and IPv6 packets.

[0123] In one exemplary embodiment, such as Figure 8 As shown, a detailed flowchart of a network access method is provided, wherein:

[0124] 1) The client device supports IPv6-only and initiates an Option 108 request to the network side, which may be in a DHCPDISCOVER message or a DHCPREQUEST message.

[0125] 2) The network-side server determines whether it supports IPv6-only. If it does, the server replies to the Option 108 request in the DHCPOFFER (DHCP Offer Message) or DHCPACK (DHCP Reply Message) message, and carries Option 107 to announce the relevant parameters of the IPv6-only environment. If it does not support it, the network-side server ignores the Option in the message and does not reply with the requested parameters.

[0126] 3) The client device determines whether the network supports IPv6-only based on the information replied in 2). If it does, the client selects appropriate parameters from Option 107 to configure an IPv6-only environment, with the front-end parameter group usually having higher priority; if it does not support IPv6, the client device configures a dual-stack environment.

[0127] Compared with the prior art, this application has the following advantages:

[0128] 1) A method based on the DHCPv4 protocol is proposed, in which a new Option is defined and its parameters are defined at the field level, providing parameters for a single-stack IPv6 network in an integrated manner, thereby improving the efficiency of network access and helping to ensure the user's service experience.

[0129] 2) In this method, the terminal plays a dominant role and can choose whether to join the single-stack environment based on the IPv6 single-stack support of the network side, which improves the flexibility of network access.

[0130] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0131] Based on the same inventive concept, this application also provides a network access device for implementing the network access method described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations in one or more network access device embodiments provided below can be found in the limitations of the network access method described above, and will not be repeated here.

[0132] In one exemplary embodiment, such as Figure 9 As shown, a network access device is provided for a terminal supporting an IPv6 single-stack environment, including: a message sending module 901, an IPv6 single-stack environment configuration module 902, and a dual-stack environment configuration module 903, wherein:

[0133] The message sending module 901 is used to send a DHCP message carrying a first preset field to the server in response to a network connection request; the server is used to return a feedback message corresponding to the DHCP message to the terminal upon receiving the DHCP message.

[0134] The IPv6 single-stack environment configuration module 902 is used to obtain IPv6 configuration parameters from the second field of the feedback message when the feedback message carries a field value that matches the first preset field, and configure the IPv6 single-stack environment through the IPv6 configuration parameters to access the IPv6 single-stack network environment.

[0135] The dual-stack environment configuration module 903 is used to configure the dual-stack environment to access the dual-stack network environment when the feedback message does not carry a field value that matches the first preset field.

[0136] In one embodiment, the DHCP message includes a DHCP Discover message, the feedback message includes a DHCP Offer message, and the message sending module 901 is further configured to, in response to a network connection request, send a DHCP Discover message carrying a first field to the server if the terminal has not pre-bound an IP address; the server is configured to, upon receiving the DHCP Discover message, return a DHCP Offer message corresponding to the DHCP Discover message to the terminal.

[0137] In one embodiment, the DHCP message includes a DHCP request message, and the feedback message includes a DHCP response message. The message sending module 901 is further configured to respond to a network connection request by sending a DHCP request message carrying a first field to the server when the terminal has been pre-bound with an IP address. The server is configured to return a DHCP response message corresponding to the DHCP request message to the terminal upon receiving the DHCP request message.

[0138] In an exemplary embodiment, the second field is configured with multiple sets of candidate IPv6 configuration parameters. The IPv6 single-stack environment configuration module 902 is further configured to obtain the priority identifier of each candidate IPv6 configuration parameter from the second field of the feedback message; and to obtain the IPv6 configuration parameter from each candidate IPv6 configuration parameter according to the priority identifier.

[0139] In one embodiment, the IPv6 configuration parameters include the IPv6 address parameters and NAT64 prefix parameters of the DNS64 server. The IPv6 single-stack environment configuration module 902 is further used to enable the IPv6 communication protocol and disable the IPv4 communication protocol; configure the corresponding DNS64 server according to the IPv6 address parameters of the DNS64 server; the DNS64 server is used to map IPv4 packets to IPv6 packets; configure the corresponding NAT64 device based on the NAT64 prefix parameters; the NAT64 device is used to implement the conversion between IPv4 packets and IPv6 packets.

[0140] In one exemplary embodiment, such as Figure 10 As shown, a network access device is provided, applied to a server, including: a message receiving module 1001, a first feedback message generation module 1002, and a second feedback message generation module 1003, wherein:

[0141] The message receiving module 1001 is used to receive DHCP messages carrying a first field; the DHCP message is generated by a terminal that supports an IPv6 single-stack environment in response to a network connection request.

[0142] The first feedback message generation module 1002 is used to generate a first feedback message corresponding to the DHCP message and return it to the terminal when the server supports the IPv6 single-stack environment. The first feedback message carries a field value that matches the first field and a second field, which is used to instruct the terminal to obtain the IPv6 configuration parameters from the second field of the first feedback message and configure the IPv6 single-stack environment through the IPv6 configuration parameters to access the IPv6 single-stack network environment.

[0143] The second feedback message generation module 1003 is used to generate a second feedback message corresponding to the DHCP message and return it to the terminal when the server does not support the IPv6 single-stack environment. The second feedback message does not carry a field value that matches the first field and is used to instruct the terminal to configure a dual-stack environment to access the dual-stack network environment.

[0144] In one embodiment, the DHCP message includes a DHCP discovery message, and the first feedback message and the second feedback message include a DHCP offer message. The message receiving module 1001 is also used to receive the DHCP discovery message carrying the first field. The DHCP discovery message is generated by a terminal that has not pre-bound an IP address in response to a network connection request. A corresponding DHCP offer message is generated based on the DHCP discovery message and returned to the terminal.

[0145] In one embodiment, the DHCP message includes a DHCP request message, and the first feedback message and the second feedback message include DHCP response messages. The message receiving module 1001 is further configured to receive the DHCP request message carrying the first field. The DHCP request message is generated by a terminal that has been pre-bound with an IP address in response to a network connection request. A corresponding DHCP response message is generated based on the DHCP request message and returned to the terminal.

[0146] Each module in the aforementioned network access device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of the communication device in hardware form or independent of it, or stored in the memory of the communication device in software form, so that the processor can call and execute the operations corresponding to each module.

[0147] In one exemplary embodiment, a communication device is provided, which may be a terminal, and its internal structure diagram may be as follows. Figure 11As shown, the communication device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a method. The display unit of the communication device is used to form a visually visible image and can be a display screen, projection device, or virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the communication device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the communication device, or external keyboards, touchpads, or mice, etc.

[0148] Those skilled in the art will understand that Figure 11 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the communication device to which the present application is applied. Specific communication devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0149] In one exemplary embodiment, a communication device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the network access method of the above embodiment.

[0150] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the network access method of the above embodiment.

[0151] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the network access method of the above embodiments.

[0152] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0153] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0154] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0155] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A network access method, characterized in that, Applied to terminals supporting an IPv6 single-stack environment, the method includes: In response to a network connection request, a DHCP message carrying a first field is sent to the server; the server is configured to return a feedback message corresponding to the DHCP message to the terminal upon receiving the DHCP message. If the feedback message carries a field value that matches the first field, the IPv6 configuration parameters are obtained from the second field of the feedback message, and the IPv6 single-stack environment is configured through the IPv6 configuration parameters to access the IPv6 single-stack network environment. If the feedback message does not carry a field value that matches the first field, configure a dual-stack environment to access the dual-stack network environment.

2. The method according to claim 1, characterized in that, The DHCP message includes a DHCP discovery message, and the feedback message includes a DHCP offer message; The step of sending a DHCP message carrying a first field to the server in response to a network connection request includes: In response to the network connection request, if the terminal has not pre-bound an IP address, a DHCP discovery message carrying a first field is sent to the server; Upon receiving the DHCP Discover message, the server is configured to return a DHCP Offer message corresponding to the DHCP Discover message to the terminal.

3. The method according to claim 1, characterized in that, The DHCP message includes a DHCP request message, and the feedback message includes a DHCP response message; The step of sending a DHCP message carrying a first field to the server in response to a network connection request includes: In response to the network connection request, if the terminal has been pre-bound to an IP address, a DHCP request message carrying a first field is sent to the server; Upon receiving the DHCP request message, the server is configured to return a DHCP response message corresponding to the DHCP request message to the terminal.

4. The method according to any one of claims 1 to 3, characterized in that, The second field contains multiple sets of candidate IPv6 configuration parameters; The step of obtaining the IPv6 configuration parameters from the second field of the feedback message includes: Obtain the priority identifier of each candidate IPv6 configuration parameter from the second field of the feedback message; The IPv6 configuration parameters are obtained from each of the candidate IPv6 configuration parameters according to the priority identifier.

5. The method according to claim 4, characterized in that, The IPv6 configuration parameters include the IPv6 address parameters and NAT64 prefix parameters of the DNS64 server; Configuring the IPv6 single-stack environment through the IPv6 configuration parameters includes: Enable IPv6 communication protocol and disable IPv4 communication protocol; Configure the corresponding DNS64 server according to the IPv6 address parameters of the DNS64 server; the DNS64 server is used to map IPv4 packets to IPv6 packets; Configure the corresponding NAT64 device based on the NAT64 prefix parameters; the NAT64 device is used to implement the conversion between IPv4 packets and IPv6 packets.

6. A network access method, characterized in that, Applied to a server, the method includes: Receive a DHCP message carrying a first field; the DHCP message is generated by a terminal supporting an IPv6 single-stack environment in response to a network connection request; When the server supports an IPv6 single-stack environment, a first feedback message corresponding to the DHCP message is generated and returned to the terminal. The first feedback message carries a field value that matches the first field and a second field, which is used to instruct the terminal to obtain IPv6 configuration parameters from the second field of the first feedback message and configure the IPv6 single-stack environment through the IPv6 configuration parameters to access the IPv6 single-stack network environment. If the server does not support a single-stack IPv6 environment, a second feedback message corresponding to the DHCP message is generated and returned to the terminal. The second feedback message does not carry a field value that matches the first field and is used to instruct the terminal to configure a dual-stack environment to access the dual-stack network environment.

7. The method according to claim 6, characterized in that, The DHCP message includes a DHCP discovery message, and the first feedback message and the second feedback message include DHCP offer messages; receiving a DHCP message carrying a first field includes: Receive a DHCP discovery message carrying a first field; the DHCP discovery message is generated by the terminal that has not pre-bound an IP address in response to the network connection request; Based on the DHCP discovery message, a corresponding DHCP offer message is generated and returned to the terminal.

8. The method according to claim 6, characterized in that, The DHCP message includes a DHCP request message, and the first feedback message and the second feedback message include DHCP response messages; receiving the DHCP message carrying the first field further includes: Receive a DHCP request message carrying a first field; the DHCP request message is generated by the terminal, which has been pre-bound with an IP address, in response to the network connection request; Generate a corresponding DHCP response message based on the DHCP request message and return it to the terminal.

9. A network access device, characterized in that, The device, applicable to terminals supporting an IPv6 single-stack environment, includes: The message sending module is used to send a DHCP message carrying a first preset field to the server in response to a network connection request; the server is used to return a feedback message corresponding to the DHCP message to the terminal upon receiving the DHCP message. The IPv6 single-stack environment configuration module is used to obtain IPv6 configuration parameters from the second field of the feedback message when the feedback message carries a field value that matches the first preset field, and configure the IPv6 single-stack environment through the IPv6 configuration parameters to access the IPv6 single-stack network environment. The dual-stack environment configuration module is used to configure a dual-stack environment to access a dual-stack network environment when the feedback message does not carry a field value that matches the first preset field.

10. A network access device, characterized in that, Applied to a server, the device includes: The message receiving module is used to receive DHCP messages carrying a first field; the DHCP message is generated by a terminal supporting an IPv6 single-stack environment in response to a network connection request. The first feedback message generation module is used to generate a first feedback message corresponding to the DHCP message and return it to the terminal when the server supports the IPv6 single-stack environment. The first feedback message carries a field value that matches the first field and a second field, which is used to instruct the terminal to obtain IPv6 configuration parameters from the second field of the first feedback message and configure the IPv6 single-stack environment through the IPv6 configuration parameters to access the IPv6 single-stack network environment. The second feedback message generation module is used to generate a second feedback message corresponding to the DHCP message and return it to the terminal when the server does not support the IPv6 single-stack environment; the second feedback message does not carry a field value that matches the first field and is used to instruct the terminal to configure a dual-stack environment to access the dual-stack network environment.

11. A communication device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 8.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.

13. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Method and gateway for controlling accessing of host of IPoE (IP over Ethernet) dual-stack user

    CN102904863A

  • Dual-stack support for demarc auto configuration (DAC) mechanism in docsis provisioning of EPON (DPOE) network

    US20130238770A1