Method, apparatus and storage medium for allocating internet protocol address

By directly assigning IP addresses to target communication devices through the target access device and including a stop interaction instruction, the problem of network resource waste caused by multiple interactions in existing technologies is solved, and efficient IP address allocation is achieved.

CN116708371BActive Publication Date: 2026-04-21CHINA UNITED NETWORK COMM GRP CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA UNITED NETWORK COMM GRP CO LTD
Filing Date
2023-07-19
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

In existing technologies, the process of assigning IP addresses to communication devices requires multiple interactions, which increases the consumption of network resources.

Method used

After the target access device generates an IP address allocation request, it directly establishes a link with the target communication device and includes the target IP address and stop message interaction indication information in the configuration request message, so that the target communication device can confirm and use the IP address, reducing the number of interactions.

Benefits of technology

IP address allocation can be completed with a single interaction, reducing network resource consumption and saving network resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116708371B_ABST
    Figure CN116708371B_ABST
Patent Text Reader

Abstract

The application provides an IP address allocation method, device, equipment and storage medium. The method is applied to a target access device, and includes the following steps: generating an IP address allocation request; determining a target IP address for a target communication device after the target communication device establishes a target link; generating a configuration request message based on the target IP address; sending the configuration request message to the target communication device, so as to instruct the target communication device to determine and use the target IP address based on the configuration request message, and generate a configuration response message based on the target link, the target IP address and preset stop message interaction instruction information; in response to receiving the configuration response message sent by the target communication device, controlling not to send a message about IP address allocation to the target communication device according to the stop message interaction instruction information, and determining that the target communication device accesses a network by using the target IP address based on the target IP address.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to communication technology, and more particularly to a method, apparatus, device, and storage medium for allocating Internet Protocol (IP) addresses. Background Technology

[0002] With increasing user demand for communication, providing data transmission links and networks for various communication devices has become a key focus for R&D personnel. Point-to-Point Protocol over Ethernet (PPPoE) is the PPP protocol carried by Ethernet. On a shared Ethernet network, communication devices can connect to access devices to establish links. Then, Internet Protocol (IP) addresses are assigned to the communication devices, enabling data transmission on the corresponding links based on the assigned IP addresses, thus facilitating interaction between users and access devices.

[0003] In existing technologies, IP addresses need to be assigned to communication devices. First, the communication device sends a configuration request message to the target access device. The target access device assigns an IP address to the communication device and generates a configuration partial response message. The communication device then determines the assigned IP address based on the configuration partial response message and generates a configuration agreement request message. The communication device sends the configuration agreement request message to the target access device. The target access device then determines that the communication device is using the assigned IP address, generates a configuration confirmation response message, and sends it to the communication device. This allows the communication device to confirm that the target access device has determined that it is using the assigned IP address to achieve data transmission.

[0004] However, in the existing technology, when assigning an IP address to a communication device, the communication device needs to interact with the target access device multiple times. Since a target access device establishes links with multiple communication devices, the process of assigning an IP address also increases the overall network consumption and wastes network resources. Summary of the Invention

[0005] This application provides a method, apparatus, device, and storage medium for allocating Internet Protocol (IP) addresses, which addresses the problem that the process of allocating IP addresses increases the overall network consumption and wastes network resources.

[0006] In a first aspect, this application provides a method for allocating Internet Protocol (IP) addresses, the method being applied to a target access device, the method comprising:

[0007] In response to the conditions for generating an Internet Protocol (IP) address allocation request being met, an IP address allocation request is generated.

[0008] Based on the allocation request, after establishing a target link with the target communication device, a target IP address is allocated to the target communication device.

[0009] A configuration request message is generated based on the target IP address; the configuration request message includes the target IP address allocated to the target communication device;

[0010] The configuration request message is sent to the target communication device to instruct the target communication device to determine and use the target IP address based on the configuration request message, and to generate a configuration response message based on the target link, the target IP address and the preset stop message interaction indication information; the stop message interaction indication information is an indication information to control the target access device to no longer send back IP address allocation messages;

[0011] In response to receiving a configuration response message from the target communication device, the system controls the system not to send messages regarding IP address allocation to the target communication device according to the stop message interaction indication information, and determines that the target communication device uses the target IP address to access the network and to transmit data through the target link based on the target IP address.

[0012] In one approach, the step of determining the establishment of a target link with the target communication device based on the allocation request includes:

[0013] Target link control protocol authentication is performed based on the allocation request; the target link control protocol is the link control protocol between the target access device and the target communication device.

[0014] In response to the detection that a target link has been established with the target communication device during the execution of target link control protocol authentication, a target link control protocol authentication pass result is generated;

[0015] Based on the authentication result, it is determined that a target link has been established with the target communication device.

[0016] In one approach, allocating a target IP address to the target communication device includes:

[0017] Obtain a preset set of IP addresses; the preset set of IP addresses includes at least one IP address; the at least one IP address included in the preset set of IP addresses has network access permissions;

[0018] Search for an unassigned IP address among the at least one IP address;

[0019] The unassigned IP address is determined as the target IP address assigned to the target communication device.

[0020] In one approach, determining that the target communication device uses the target IP address to access the network and to transmit data via the target link includes:

[0021] Obtain the target IP address and the session identifier corresponding to the target link from the configuration response message;

[0022] The target IP address and the session identifier are bound together as session information, and the session information is stored in the session database of the target access device;

[0023] Data is transmitted through the session information, the network, and the target link.

[0024] In one approach, the data transmission via the session information, the network, and the target link includes:

[0025] In response to any target data needing to be transmitted from the target access device to the target communication device, the session information is retrieved from the session database and incorporated into the target data;

[0026] The target data carrying the session information is transmitted to the target communication device by accessing the network and the target link using a preset IP address, so as to instruct the target communication device to access the network using the target IP address when replying to the target data, and to transmit the reply data to the target access device based on the network and the target link for data transmission, and to instruct the target communication device to determine whether the target data is secure based on the session information; the preset IP address is the IP address of the target access device that has network access permission.

[0027] In one embodiment, after sending the configuration request message to the target communication device, the method further includes:

[0028] If no configuration response message is received from the target communication device within a preset waiting time, a configuration request message is continued to be sent to the target communication device.

[0029] If no configuration response message is received from the target communication device within the preset waiting time, the allocation request is re-initiated.

[0030] In one embodiment, the method further includes:

[0031] The system receives an active discovery termination message sent by the target communication device; the active discovery termination message is generated when the target communication device meets the generation conditions; the generation conditions are that no data is transmitted between target links through the network within a preset idle time period; the active discovery termination message includes session information.

[0032] The session information is deleted from the session database to disconnect the target link and stop accessing the network using the target IP address.

[0033] Secondly, this application provides an Internet Protocol address allocation device, the device being located in a target access device, the device comprising:

[0034] The generation module is used to generate an IP address allocation request in response to conditions that meet the requirements for generating an Internet Protocol IP address allocation request.

[0035] The allocation module is used to allocate a target IP address to the target communication device after determining, based on the allocation request, that a target link has been established with the target communication device.

[0036] The generation module is further configured to generate a configuration request message based on the target IP address; the configuration request message includes the target IP address allocated to the target communication device;

[0037] The sending module is used to send the configuration request message to the target communication device, so as to instruct the target communication device to determine and use the target IP address based on the configuration request message, and generate a configuration response message based on the target link, the target IP address and the preset stop message interaction indication information; the stop message interaction indication information is an indication information to control the target access device to no longer send back IP address allocation messages;

[0038] The control module is used to respond to a configuration response message sent by the target communication device and control the device not to send a message about IP address allocation to the target communication device according to the stop message interaction indication information. The determination and transmission module is used to determine, based on the target IP address, whether the target communication device uses the target IP address to access the network and to transmit data through the target link.

[0039] Thirdly, this application provides a target access device, including: a processor, and a memory and a transceiver communicatively connected to the processor;

[0040] The memory stores computer-executed instructions; the transceiver is used for sending and receiving data.

[0041] The processor executes computer execution instructions stored in the memory to implement the method as described in the first aspect or any of the above methods.

[0042] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method described in the first aspect or any of the above embodiments.

[0043] This application provides a method, apparatus, device, and storage medium for allocating Internet Protocol (IP) addresses. In this application, the target access device first generates an IP address allocation request, determines that a target link has been established with the target communication device based on the allocation request, and further allocates a target IP address to the target communication device. The target IP address can be used to access the network, thereby enabling data transmission between the target communication device and the target access device. Specifically, the target access device actively generates a configuration request message and sends it to the target communication device. The configuration request message includes the target IP address allocated to the target communication device, thus instructing the target communication device to determine and use the target IP address based on the configuration request message. Further, the target communication device is instructed to generate a configuration response message based on the target link, the target IP address, and preset stop message interaction indication information. The stop message interaction indication information controls the target access device to no longer send back IP address allocation messages. Therefore, when the target access device receives the configuration response message, it can stop the IP address allocation. The message exchange indication information controls itself to stop sending messages about IP address allocation to the target communication device. Therefore, in this application, allocating a target IP address to the target communication device requires only one interaction, eliminating the need for multiple interactions. First, the configuration request message is initiated proactively by the target access device, independent of the target device simultaneously initiating a configuration request to the target access device. Furthermore, the target access device allocates a target IP address to the target communication device when generating the configuration request message. Thus, when the target communication device first receives a message from the target access device, it obtains the target IP address. Once the target communication device confirms and uses the target IP address, the target access device does not need to send further messages about IP address allocation to the target communication device. This ensures the target communication device is aware that the target access device has confirmed and is using the target IP address, reducing network overhead and conserving network resources. Additionally, the target access device determines that the target communication device uses the target IP address to access the network and to achieve data transmission through the target link based on the target IP address. Attached Figure Description

[0044] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0045] Figure 1 An application scenario diagram of an Internet Protocol address allocation method provided in this application;

[0046] Figure 2 An architecture diagram of an Internet Protocol address allocation system provided for this application;

[0047] Figure 3This is a flowchart illustrating an Internet Protocol address allocation method provided in Embodiment 1.

[0048] Figure 4 This is a flowchart illustrating an Internet Protocol address allocation method provided in Embodiment 2.

[0049] Figure 5 This is a flowchart illustrating an Internet Protocol address allocation method provided in Embodiment 3;

[0050] Figure 6 This is a flowchart illustrating an Internet Protocol address allocation method provided in Embodiment 4.

[0051] Figure 7 A schematic diagram of an Internet Protocol address allocation device provided in Embodiment 8;

[0052] Figure 8 This is a schematic diagram of a target access device structure provided in Embodiment 9.

[0053] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0054] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0055] In existing technologies, when an IP address needs to be assigned to a communication device, the communication device first sends a configuration request message containing the communication device's initial IP address of 0.0.0.0 to the target access device. Upon receiving this message, the target access device generates its own configuration request message containing its preset IP address and sends it to the communication device. The communication device then determines the target access device's preset IP address based on the configuration request message containing its own preset IP address, generates a configuration response message, and sends it to the target access device. The target access device then assigns an IP address to the communication device and generates a partial configuration response message containing the assigned target IP address. The communication device then determines the assigned IP address based on the partial configuration response message and generates a configuration agreement request message. This message is then sent to the target access device to confirm that the communication device is using the assigned IP address, generates a configuration confirmation response message, and sends it to the communication device. This ensures that the communication device confirms that the target access device has determined to use the assigned IP address for data transmission.

[0056] However, in the existing technology, when assigning an IP address to a communication device, the communication device needs to interact with the target access device multiple times. Since a target access device establishes links with multiple communication devices, the process of assigning an IP address also increases the overall network consumption and wastes network resources.

[0057] To address the shortcomings of existing technologies, the inventors of this solution have creatively designed a new approach. This solution provides a method for allocating Internet Protocol (IP) addresses. To solve the problem of increased network consumption and wasted network resources due to the lengthy IP address allocation process, this solution involves the target access device generating an allocation request and establishing a target link with the target communication device based on the request. This allows the target communication device to be allocated a target IP address, and a configuration request message is generated and sent to the target communication device. This instructs the target communication device to determine and use the target IP address according to the configuration request message. The target communication device then generates a configuration response message, which includes a stop message interaction instruction. This prevents the target access device from sending IP address allocation messages to the target communication device. Therefore, only one interaction is required between the target communication device and the target access device to allocate the target IP address. Compared to existing technologies, this reduces the IP address allocation process and thus saves network resources.

[0058] The following describes the application scenarios of the Internet Protocol address allocation method, apparatus, device, and storage medium provided by this application.

[0059] Figure 1 This diagram illustrates an application scenario for an Internet Protocol (IP) address allocation method provided in this application. For example... Figure 1 As shown in the diagram, the application scenario includes target access device 101 and target communication device 102.

[0060] A link can be established between the target access device 101 and the target communication device 102. The target access device 101 includes an Internet Protocol address allocation device.

[0061] In this context, the target communication device 102 can be any communication device, such as a mobile phone or a computer, and there are no restrictions here.

[0062] Specifically, when the target access device 101 determines that the conditions for generating an Internet Protocol IP address allocation request are met, the target access device 101 generates an IP address allocation request. Then, based on the allocation request, after determining that a target link has been established with the target communication device 102, the target access device 101 allocates a target IP address to the target communication device, generates a configuration request message based on the allocated target IP address, and sends it to the target communication device 102.

[0063] Furthermore, the target communication device 102 receives the configuration request message and determines and uses the target IP address based on the configuration request message.

[0064] Furthermore, the target communication device 102 generates a configuration response message, which is generated based on the target link, the target IP address, and preset stop message interaction indication information. The target communication device 102 sends the configuration response message to the target access device 101.

[0065] Furthermore, upon receiving the configuration response message, the target access device 101 controls the device not to send messages regarding IP address allocation to the target communication device based on the stop message interaction instruction. Simultaneously, the target access device 101 determines that the target communication device 102 uses the target IP address to access the network and to transmit data via the target link.

[0066] It should be noted that the message regarding IP address allocation can refer to the configuration confirmation response message in the prior art. Therefore, in this application, after the target access device 101 receives the configuration response message sent by the target communication device, it knows that the target communication device has determined and is using the target IP address. Thus, the target access device 101 chooses not to continue sending IP address allocation messages to the target communication device. These IP address allocation messages can be configuration confirmation response messages, thereby reducing interaction between the two devices. Furthermore, when the target communication device receives the configuration request message, it can confirm and use the target IP address itself. Therefore, after completing the entire process of allocating the target IP address, when the target communication device needs to send data to the target access device, it can directly access the network through the target IP address, thereby achieving data transmission.

[0067] 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. Furthermore, the collection, use and processing of the relevant data must comply with relevant laws, regulations and standards, and corresponding operation entry points are provided for users to choose to authorize or refuse.

[0068] Figure 2 This application provides an architecture diagram of an Internet Protocol address allocation system. Figure 2 As shown, it includes a target communication device 201 and a target access device 202.

[0069] It should be noted that the following describes the principle of data transmission between two target communication devices. Assuming that target communication device 201 corresponds to target access device 202, and another target communication device A corresponds to another target access device A, to transmit data from target communication device 201 to target communication device A, the data is actually sent from target communication device 201 to the corresponding target access device 202, then target access device 202 sends the data to target access device A, and finally target access device A sends the data to target communication device A, thus realizing the data transmission between the two communication devices.

[0070] It is understandable that a link is established between the target communication device 201 and the target access device 202, but a network is also required for data transmission. Both the target communication device 201 and the target access device 202 need valid IP addresses to access the network, thus enabling data transmission between them based on the network and the link.

[0071] It should be noted that the PPPoE protocol includes two phases: the discovery phase and the session phase. This application primarily simplifies the interaction process of the session phase. The discovery phase refers to finding a suitable access device for the target communication device, thereby enabling the establishment of a target link between the target communication device and the target access device. The session phase includes two protocols: the Link Control Protocol (LCP) and the Network Control Protocol (NCP). This application primarily performs NCP authentication after LCP authentication; therefore, it simplifies the NCP process.

[0072] like Figure 2 As shown in this application, the target access device 202 sends a configuration request message to the target communication device 201. The configuration request message includes a target IP address allocated to the target communication device 201 and a preset IP address, wherein the preset IP address is the IP address corresponding to the target access device 202.

[0073] Furthermore, the target communication device 201 determines and uses the target IP address, and generates a configuration response message and sends it to the target access device 202, thereby the target access device 202 determines that the target communication device 201 uses the target IP address to access the network.

[0074] It is understandable that both the target IP address and the preset IP address have network access permissions, enabling the target communication device 201 to access the network using the target IP address, and the target access device 202 to access the network using the preset IP address. This, in turn, allows data to be transmitted between target links under the network's influence. The target link refers to the established link between the target communication device 201 and the target access device 202.

[0075] It should be noted that the message in this application may also include the session identifier corresponding to the target link created during the discovery phase and the Media Access Control Address (MAC) corresponding to each device, or other information, which is not limited here.

[0076] It should be noted that after assigning a target IP address to the target communication device, you can set up periodic handshake operations.

[0077] This application provides a method for allocating Internet Protocol addresses, which aims to solve the above-mentioned technical problems in the prior art.

[0078] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0079] Example 1

[0080] The subject of this application is an Internet Protocol address allocation device (hereinafter referred to as the allocation device), which is located in the target access device. The method of this application is applied in the target access device.

[0081] Among them, the target access device can be a Broadband Remote Access Server (BRAS), which is a new type of access gateway for broadband network applications. It refers to a network device used to manage and control bandwidth access users, and can also be called a broadband remote access server.

[0082] Figure 3 This is a schematic flowchart illustrating an Internet Protocol (IP) address allocation method provided in Embodiment 1. Figure 3 As shown, the specific steps are as follows.

[0083] S301, in response to the conditions for generating an Internet Protocol IP address allocation request being met, an IP address allocation request is generated.

[0084] Among them, an IP address allocation request refers to a request for the allocation of an IP address.

[0085] In one approach, the user may trigger an IP address allocation component through the target access device, thereby the target access device determining that the conditions for generating an IP address allocation request are met, and then generating an IP address allocation request.

[0086] In one approach, the target access device determines that the PPPoE protocol has completed the first discovery phase, which means that the conditions for generating an IP address allocation request are met. As a result, the target access device generates an IP address allocation request, and the target access device will enter the session phase of the PPPoE protocol.

[0087] S302, after determining that a target link has been established with the target communication device based on the allocation request, allocate a target IP address to the target communication device.

[0088] The target IP address refers to a usable, legal, and secure IP address assigned to the target communication device. It should be noted that any communication or network device needs an IP address to achieve data transmission. Therefore, this step first assigns a target IP address to the target communication device to enable network access and thus facilitate data transmission.

[0089] In one approach, the target access device determines the target link based on the allocation request. If the target link is determined to be established, the device then selects an IP address from at least one IP address as the target IP address for the target communication device.

[0090] The target link refers to the link established between the target communication device and the target access device.

[0091] S303, Generate a configuration request message based on the target IP address; the configuration request message includes the target IP address assigned to the target communication device.

[0092] Furthermore, the target access device loads the allocated IP address into the configuration request message, thus generating the configuration request message based on the target IP address.

[0093] It should be noted that the configuration request message in this application may also include the preset IP address or other information corresponding to other target access devices, and there are no restrictions here.

[0094] S304, a configuration request message is sent to the target communication device to instruct the target communication device to determine and use the target IP address based on the configuration request message, and to generate a configuration response message based on the target link, the target IP address and the preset stop message interaction indication information; the stop message interaction indication information is an indication information to control the target access device to no longer send back IP address allocation messages.

[0095] Furthermore, the configuration request message is sent to the target communication device, which then determines and uses the target IP address. Further, the target communication device generates a configuration response message based on the target link, the target IP address, and the preset stop message interaction indication information.

[0096] The preset stop message interaction indication information can be a field in the configuration response message, used to instruct the target access device not to send any more IP address allocation messages during the current allocation request's process of allocating the target IP address. Therefore, in this application, based on the stop message interaction information, the target access device, after receiving the configuration response message, will no longer send any other IP address allocation messages to the target communication device, thereby reducing the interaction between the two devices. Here, the two devices refer to the target communication device and the target access device.

[0097] The configuration response message includes the target IP address and other information.

[0098] S305, in response to receiving a configuration response message sent by the target communication device, controls the device not to send messages about IP address allocation to the target communication device according to the stop message interaction indication information, and determines that the target communication device uses the target IP address to access the network and to transmit data through the target link based on the target IP address.

[0099] In one approach, upon receiving a configuration response message, the target access device reads the relevant stop field in the stop message interaction indication information, thereby preventing itself from sending messages regarding IP address allocation to the target communication device.

[0100] Understandably, under the current allocation request, the target access device controls itself not to send a message about IP address allocation to the target communication device according to the stop message exchange instruction information. However, under the next allocation request, the process of allocating the target IP address will still continue normally.

[0101] Furthermore, after receiving the configuration response message, the target access device reads the target IP address, thereby determining that the target communication device agrees to use the target IP address to access the network and transmit data through the target link.

[0102] This embodiment provides a method for allocating Internet Protocol (IP) addresses. In this application, the target access device first generates an IP address allocation request. Based on the allocation request, it determines that a target link has been established with the target communication device. Further, it allocates a target IP address to the target communication device. The target IP address can be used to access the network, thereby enabling data transmission between the target communication device and the target access device. Specifically, the target access device actively generates a configuration request message and sends it to the target communication device. The configuration request message includes the target IP address allocated to the target communication device, thus instructing the target communication device to determine and use the target IP address based on the configuration request message. Further, it instructs the target communication device to generate a configuration response message based on the target link, the target IP address, and a preset stop message interaction indication. The stop message interaction indication controls the target access device to no longer send feedback on IP address allocation messages. Therefore, when the target access device receives... After configuring the response message, the target access device can control itself not to continue sending messages about IP address allocation to the target communication device according to the stop message interaction instruction information. Therefore, in this application, the allocation of the target IP address to the target communication device can be achieved with only one interaction, without the need for multiple interactions. First, the configuration request message is initiated by the target access device, which does not depend on the target device simultaneously initiating a configuration request to the target access device. At the same time, the target access device allocates a target IP address to the target communication device when generating the configuration request message. Therefore, it is equivalent to the target communication device obtaining the target IP address when it first receives the message sent by the target access device. And after the target communication device confirms and uses the target IP address, the target access device does not need to continue sending messages about IP address allocation to the target communication device. This allows the target communication device to confirm that the target access device is aware that it has confirmed and is using the target IP address, thus reducing network overhead and saving network resources.

[0103] Example 2

[0104] This embodiment is a further refinement of any of the above embodiments. This embodiment is an optional method for determining the steps of establishing a target link with the target communication device based on the allocation request.

[0105] Figure 4 This is a schematic flowchart illustrating an Internet Protocol address allocation method provided in Embodiment 2. Figure 4 As shown, the specific steps are as follows.

[0106] S401, Execute target link control protocol authentication based on allocation request; the target link control protocol is the link control protocol between the target access device and the target communication device.

[0107] In PPP communication, the Link Control Protocol (LCP) refers to the mechanism by which the sending and receiving ends use LCP packets to determine necessary information for data transmission. The LCP packets check whether the link is intact and whether it can support data transmission at the expected speed.

[0108] It should be noted that the target access device begins performing target link control protocol authentication for the link between the target access device and the target communication device based on the allocation request.

[0109] S402, in response to the detection that a target link has been established with the target communication device during the execution of target link control protocol authentication, a target link control protocol authentication pass result is generated. Specifically, during the execution of the target link control protocol, if the target access device determines that a target link has been established with the target communication device and the connection is intact, then the target link control protocol authentication is determined to be successful, and a target link control protocol authentication pass result is generated.

[0110] It should be noted that this step of checking the target link also includes determining whether the link can support the expected transmission speed. If it can, the authentication is successful.

[0111] S403, based on the authentication result, determines that a target link has been established with the target communication device.

[0112] Furthermore, the target access device determines that it has established a target link with the target communication device based on the authentication result.

[0113] This embodiment provides a method for allocating Internet Protocol (IP) addresses. In this embodiment, the target access device first performs target link control protocol (TRAC) authentication. After performing TRAC authentication, it is checked that a target link has been established with the target communication device, and only then can an authentication pass result be generated. Therefore, this embodiment can accurately determine that a target link has been established with the target communication device based on the TRAC.

[0114] Example 3

[0115] This embodiment is a further refinement of any of the above embodiments, and this embodiment is an optional method for allocating a target IP address to a target communication device.

[0116] Figure 5 This is a schematic flowchart illustrating an Internet Protocol (IP) address allocation method provided in Embodiment 3. Figure 5 As shown, the specific steps are as follows.

[0117] S501, Obtain a preset IP address set; the preset IP address set includes at least one IP address; at least one IP address included in the preset IP address set has network access permission.

[0118] The preset IP address set includes at least one IP address, and at least one IP address is a usable, legal and secure IP address, so that at least one IP address has the right to access the network.

[0119] The preset IP address set can be pre-stored in the target access device or stored in a database independent of the target access device.

[0120] In one approach, after establishing a target link with the target communication device, a preset set of IP addresses is retrieved from its own storage area.

[0121] S502, find an unassigned IP address among at least one IP address.

[0122] It should be noted that there is at least one IP address in the preset IP address set. Each IP address has its own corresponding state, which can include "assigned state" and "unassigned state". Some IP addresses may have been assigned, so they are in the "assigned state", while others are still in the unassigned idle state, so they are in the "unassigned state".

[0123] Specifically, the target access device searches for the status of each IP address in at least one IP address, determines a status of "unassigned", and identifies the IP address corresponding to the "unassigned" status as an unassigned IP address.

[0124] It should be noted that at least one IP address in the preset IP address set can be stored in sequence. When the target access device searches for at least one IP address, it can search in the order of the search. When the first IP address is found to be in the "unassigned" state, the IP address corresponding to the first "unassigned" state is determined to be an unassigned IP address.

[0125] S503 determines the unassigned IP address as the target IP address assigned to the target communication device.

[0126] Furthermore, unassigned IP addresses are identified as target IP addresses.

[0127] This embodiment provides a method for allocating Internet Protocol (IP) addresses. In this embodiment, a preset set of IP addresses is first obtained, and an unassigned IP address is searched from at least one IP address. Therefore, this embodiment can accurately find an unassigned IP address and never determine the unassigned IP address as the target IP address.

[0128] Example 4

[0129] This embodiment is a further refinement of any of the above embodiments. This embodiment is an optional method for determining the target communication device to access the network using the target IP address and to transmit data through the target link based on the target IP address.

[0130] Figure 6 This is a schematic flowchart illustrating an Internet Protocol (IP) address allocation method provided in Embodiment 4. Figure 6 As shown, the specific steps are as follows.

[0131] S601 obtains the target IP address and the session identifier corresponding to the target link from the configuration response message.

[0132] In this embodiment, the configuration response message includes the target IP address and the session identifier corresponding to the target link. The session identifier is created by the target access device during the discovery phase and is used to identify the target link.

[0133] In one approach, after the target access device receives the configuration response message and reads the target IP address, it determines that the target communication device agrees to use the target IP address to access the network.

[0134] S602 binds the target IP address and session identifier as session information and stores the session information in the session database of the target access device.

[0135] It should be noted that in practical applications, the target IP address and session identifier need to be bound to achieve a one-to-one correspondence. For example, if the target IP address of the target communication device is the first IP address, and the session identifier corresponding to the target link between the target communication device and the target access device is the first session identifier, then the first IP address is bound to the first session identifier; it cannot be bound to any other session identifier. It is understood that for the target link corresponding to the first session identifier, the target communication device can currently only use the first IP address to access the network and transmit data through that target link.

[0136] It should be noted that session information needs to be included in the data during transmission to ensure the accuracy and security of the data source.

[0137] Among them, a session database is a type of database that stores information related to sessions.

[0138] S603 transmits data via session information, network, and target link.

[0139] Furthermore, the target access device will transmit data through session information, the accessed network, and the target link.

[0140] This embodiment provides a method for allocating Internet Protocol (IP) addresses. In this embodiment, the target access device obtains the target IP address and session identifier from the configuration response message and binds them as session information, which is beneficial for subsequent data transmission.

[0141] Example 5

[0142] This embodiment is a further refinement of any of the above embodiments. This embodiment is an optional method for data transmission through session information, network, and target link, and the specific content is as follows.

[0143] In response to any target data needing to be transmitted from the target access device to the target communication device, session information is retrieved from the session database and carried into the target data.

[0144] For example, assuming any target data is "The weather is nice today," when this target data is transmitted from the target access device to the target communication device, the target access device obtains the session information corresponding to the target communication device from the session data, and then incorporates the session information into the target data. Assume that this session information consists of a first IP address and a first session identifier.

[0145] The target data carrying session information is transmitted to the target communication device by accessing the network and the target link through a preset IP address. This instructs the target communication device to access the network using the target IP address when replying to the target data, and to transmit the reply data to the target access device based on the network and the target link for data transmission. The target communication device is also instructed to determine whether the target data is secure based on the session information. The preset IP address is the IP address of the target access device that has network access permissions.

[0146] For example, the target access device accesses the network using a preset IP address. With the help of this network, it transmits target data carrying session information to the target communication device via the target link. This instructs the target communication device to access the network using the target IP address and transmit the reply data ("The weather is very nice today") to the target access device via the target link. The reply data is a response to the target data and could be something like "Indeed, it's very nice." Therefore, data transmission is achieved based on session information, the network, and the target link.

[0147] Furthermore, when a target communication device receives target data carrying session information, it will also determine whether the target data is secure using the session information. For example, the target communication device identifies the target IP address and session identifier in the session information, and then matches them with the target IP address and the session identifier corresponding to the target link that it has stored and agreed to use. If the target IP address stored in its own memory is also the first IP address, and the session identifier is also the first session identifier, then it determines that the first IP address and the first session identifier match the first IP address and the first session identifier in the session information, and thus the target communication device determines that the target data is secure. If they do not match, then it is insecure.

[0148] It should be noted that when the target access device receives the reply data, the reply data also carries the target IP address and session identifier. Therefore, when the target access device receives the reply data, it can also determine whether the reply data is secure based on the target IP address and session identifier carried in the reply data. This will not be elaborated on here.

[0149] This embodiment provides a method for allocating Internet Protocol (IP) addresses. In this embodiment, when a target access device responds to the need to send any target data from the target access device to the target communication device, it carries session information into the target data and uses a preset IP address to access the network and the target link to transmit the target data to the target communication device. Furthermore, it instructs the target communication device to use the target IP address to access the network and the target link to transmit the reply data to the target access device, thus enabling data transmission through the network.

[0150] Example 6

[0151] This embodiment is a further refinement of any of the above embodiments. This embodiment is an optional method after the configuration request message is sent to the target communication device, and the specific content is as follows.

[0152] If no configuration response message is received from the target communication device within a preset waiting time, a configuration request message will continue to be sent to the target communication device.

[0153] The preset waiting time refers to the duration for which the target access device waits for the target communication device to send a configuration response message. For example, it could be 2 minutes or other durations; no specific limitation is made here.

[0154] For example, after the target access device sends a configuration request message to the target communication device, it starts waiting to receive a configuration response message from the target communication device. Suppose that the target access device waits for a preset waiting time (say 2 minutes) and does not receive a configuration response message within the preset waiting time, the target access device continues to send configuration request messages to the target communication device, and then the target access device continues to wait.

[0155] If no configuration response message is received from the target communication device within the preset waiting time, the allocation request is re-initiated.

[0156] Specifically, if the target access device continues to wait for a preset waiting time and still does not receive a configuration response message from the target communication device within the preset waiting time, then the target access device will re-initiate the allocation request.

[0157] This embodiment provides a method for allocating Internet Protocol (IP) addresses. In this embodiment, corresponding measures are taken for situations where no configuration response message is received within a preset waiting time and a further preset waiting time, thereby prompting the target communication device to send a configuration response message.

[0158] Example 7

[0159] This embodiment is a further refinement of any of the above embodiments, and the specific content is as follows.

[0160] Receive an active discovery termination message sent by the target communication device; the active discovery termination message is generated when the target communication device meets the generation conditions; the generation conditions are that no data is transmitted between the target links through the network within a preset idle time period; the active discovery termination message includes session information.

[0161] The PPPoE Active Discovery Terminate (PADT) message is a message used to terminate a PPP session, specifically between the target communication device and the target access device. A PPP session refers to data transmission implemented under the PPPoE protocol.

[0162] The generation condition is that no data is transmitted between the target links via the network within a preset idle time period. The preset idle time period refers to a pre-defined quiet period between the two devices, meaning that there is no data transmission between the target communication device and the target access device during this time. For example, the preset idle time period can be 30 minutes or one hour; there is no limitation here.

[0163] In one approach, the generation condition can also be that the target access device and / or the target communication device leaves the network coverage area, so the target access device and / or the target communication device cannot use the network for data transmission, and thus the target communication device can generate an active discovery termination message.

[0164] In one approach, the proactively discovered termination message can also be generated by the target access device.

[0165] Delete the session information from the session database to disconnect the target link and stop accessing the network using the target IP address.

[0166] Specifically, the target access device deletes the session information corresponding to the target communication device from the session database, thereby cutting off the target link with the target communication device and stopping the target communication device from accessing the network using the target IP address.

[0167] This embodiment provides a method for allocating Internet Protocol (IP) addresses. In this embodiment, when there is no data transmission on the target link within a preset idle time period, the target communication device generates an active discovery termination message, which enables the target access device to delete the session, disconnect the target link, and stop using the target IP address to access the network, thereby releasing the target IP address and session identifier. Therefore, it can release resources, which is beneficial for establishing links with subsequent communication devices and using the network to realize data transmission.

[0168] Example 8

[0169] The following is an embodiment of the apparatus described in this application. Figure 7 This is a schematic diagram of an Internet Protocol address allocation device provided in Embodiment 8. Figure 7 As shown, the distribution device 700 is located in the target access device, and the distribution device 700 includes the following modules.

[0170] Generation module 701 is used to generate an IP address allocation request in response to meeting the conditions for generating an Internet Protocol IP address allocation request;

[0171] The allocation module 702 is used to allocate a target IP address to the target communication device after determining, based on the allocation request, that a target link has been established with the target communication device.

[0172] The generation module 701 is also used to generate a configuration request message based on the target IP address; the configuration request message includes the target IP address assigned to the target communication device;

[0173] The sending module 703 is used to send a configuration request message to the target communication device, so as to instruct the target communication device to determine and use the target IP address based on the configuration request message, and generate a configuration response message based on the target link, the target IP address and the preset stop message interaction indication information; the stop message interaction indication information is an indication information to control the target access device to no longer send back IP address allocation messages;

[0174] The control module 704 is used to respond to the configuration response message sent by the target communication device and control not to send a message about IP address allocation to the target communication device according to the stop message interaction indication information. The determination and transmission module 705 is used to determine whether the target communication device uses the target IP address to access the network and to transmit data through the target link based on the target IP address.

[0175] In one embodiment, the allocation module 702, when determining the step of establishing a target link with the target communication device based on the allocation request, is specifically used for:

[0176] Target link control protocol authentication is performed based on the allocation request; the target link control protocol is the link control protocol between the target access device and the target communication device.

[0177] In response to the detection that a target link has been established with the target communication device during the target link control protocol authentication process, a target link control protocol authentication pass result is generated;

[0178] Based on the successful authentication result, it is determined that a target link has been established with the target communication device.

[0179] In one embodiment, the allocation module 702, when allocating a target IP address to the target communication device, is specifically used for:

[0180] Obtain a preset set of IP addresses; the preset set of IP addresses includes at least one IP address; at least one IP address included in the preset set of IP addresses has network access permissions;

[0181] Find an unassigned IP address among at least one IP address;

[0182] The unassigned IP address is determined as the target IP address to be assigned to the target communication device.

[0183] In one embodiment, the determination and transmission module 705, when determining whether the target communication device uses the target IP address to access the network and to transmit data through the target link, is specifically used for:

[0184] Obtain the target IP address and the session identifier corresponding to the target link from the configuration response message;

[0185] The target IP address and session identifier are bound as session information, and the session information is stored in the session database of the target access device;

[0186] Data is transmitted via session information, network, and target link.

[0187] In one embodiment, the determination and transmission module 705, when transmitting data via session information, network, and target link, is specifically used for:

[0188] In response to any target data needing to be transmitted from the target access device to the target communication device, session information is retrieved from the session database and incorporated into the target data;

[0189] The target data carrying session information is transmitted to the target communication device by accessing the network and the target link through a preset IP address. This instructs the target communication device to access the network using the target IP address when replying to the target data, and to transmit the reply data to the target access device based on the network and the target link for data transmission. The target communication device is also instructed to determine whether the target data is secure based on the session information. The preset IP address is the IP address of the target access device that has network access permissions.

[0190] In one approach, after sending a configuration request message to the target communication device, this embodiment provides an Internet Protocol address allocation device, which further includes: an initiation module;

[0191] The sending module 703 is further configured to continue sending a configuration request message to the target communication device in response to not receiving a configuration response message from the target communication device within a preset waiting time; the initiating module is configured to re-initiate the allocation request in response to not receiving a configuration response message from the target communication device within the preset waiting time.

[0192] In one embodiment, this invention provides an Internet Protocol address allocation device, which further includes a receiving module and a deletion module;

[0193] The receiving module is used to receive the active discovery termination message sent by the target communication device. The active discovery termination message is generated when the target communication device meets the generation conditions. The generation conditions are that no data is transmitted between the target links through the network within a preset idle time. The active discovery termination message includes session information.

[0194] The deletion module is used to delete session information in the session database to disconnect the target link and stop accessing the network using the target IP address.

[0195] Example 9

[0196] Figure 8 This is a schematic diagram of a target access device structure provided in Embodiment Nine. Figure 8 As shown, the target access device 800 may include: a processor 801, and a memory 802 and a transceiver 803 communicatively connected to the processor 801. The memory 802 stores computer-executable instructions; the transceiver 803 is used for sending and receiving data; the processor 801 executes the computer-executable instructions stored in the memory 802 to implement any of the method embodiments in Examples 1 to 7 above. The specific implementation methods and technical effects are similar, and will not be repeated here.

[0197] In this embodiment, the transceiver 803, memory 802, and processor 801 are connected via a bus. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 8 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0198] Example 10

[0199] This application provides a computer-readable storage medium storing computer-executable instructions. When executed by a processor, the computer-executable instructions are used to implement any one of the method embodiments 1 to 7 described above. The specific implementation methods and technical effects are similar and will not be repeated here.

[0200] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.

[0201] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

Claims

1. A method for allocating Internet Protocol (IP) addresses, characterized in that, The method is applied to a target access device, and the method includes: In response to the conditions for generating an Internet Protocol (IP) address allocation request being met, an IP address allocation request is generated. Based on the allocation request, after establishing a target link with the target communication device, a target IP address is allocated to the target communication device. A configuration request message is generated based on the target IP address; the configuration request message includes the target IP address allocated to the target communication device; The configuration request message is sent to the target communication device to instruct the target communication device to determine and use the target IP address based on the configuration request message, and to generate a configuration response message based on the target link, the target IP address and the preset stop message interaction indication information; the stop message interaction indication information is an indication information to control the target access device to no longer send back IP address allocation messages; In response to receiving a configuration response message from the target communication device, the system controls the system not to send messages about IP address allocation to the target communication device according to the stop message interaction indication information, and determines that the target communication device uses the target IP address to access the network and to transmit data through the target link based on the target IP address. The steps for determining the establishment of a target link with the target communication device based on the allocation request include: Target link control protocol authentication is performed based on the allocation request; the target link control protocol is the link control protocol between the target access device and the target communication device. In response to the detection that a target link has been established with the target communication device during the execution of target link control protocol authentication, a target link control protocol authentication pass result is generated; Based on the authentication result, it is determined that a target link has been established with the target communication device.

2. The method according to claim 1, characterized in that, Assigning a target IP address to the target communication device includes: Obtain a preset set of IP addresses; the preset set of IP addresses includes at least one IP address; the at least one IP address included in the preset set of IP addresses has network access permissions; Search for an unassigned IP address among the at least one IP address; The unassigned IP address is determined as the target IP address assigned to the target communication device.

3. The method according to claim 1, characterized in that, The step of determining, based on the target IP address, that the target communication device uses the target IP address to access the network and to transmit data through the target link includes: Obtain the target IP address and the session identifier corresponding to the target link from the configuration response message; The target IP address and the session identifier are bound together as session information, and the session information is stored in the session database of the target access device; Data is transmitted through the session information, the network, and the target link.

4. The method according to claim 3, characterized in that, The data transmission via the session information, the network, and the target link includes: In response to any target data needing to be transmitted from the target access device to the target communication device, the session information is retrieved from the session database and incorporated into the target data; The target data carrying the session information is transmitted to the target communication device by accessing the network and the target link using a preset IP address, so as to instruct the target communication device to access the network using the target IP address when replying to the target data, and to transmit the reply data to the target access device based on the network and the target link for data transmission, and to instruct the target communication device to determine whether the target data is secure based on the session information; the preset IP address is the IP address of the target access device that has network access permission.

5. The method according to claim 1, characterized in that, After sending the configuration request message to the target communication device, the method further includes: If no configuration response message is received from the target communication device within a preset waiting time, a configuration request message is continued to be sent to the target communication device. If no configuration response message is received from the target communication device within the preset waiting time, the allocation request is re-initiated.

6. The method according to any one of claims 1-5, characterized in that, The method further includes: The system receives an active discovery termination message sent by the target communication device; the active discovery termination message is generated when the target communication device meets the generation conditions; the generation conditions are that no data is transmitted between target links through the network within a preset idle time period; the active discovery termination message includes session information. The session information is deleted from the session database to disconnect the target link and stop accessing the network using the target IP address.

7. An Internet Protocol address allocation device, characterized in that, The device is located in the target access device, and the device includes: The generation module is used to generate an IP address allocation request in response to conditions that meet the requirements for generating an Internet Protocol IP address allocation request. The allocation module is used to allocate a target IP address to the target communication device after determining, based on the allocation request, that a target link has been established with the target communication device. The generation module is further configured to generate a configuration request message based on the target IP address; the configuration request message includes the target IP address allocated to the target communication device; The sending module is used to send the configuration request message to the target communication device, so as to instruct the target communication device to determine and use the target IP address based on the configuration request message, and generate a configuration response message based on the target link, the target IP address and the preset stop message interaction indication information; the stop message interaction indication information is an indication information to control the target access device to no longer send back IP address allocation messages; The control module is used to respond to receiving a configuration response message sent by the target communication device, and control not to send a message about IP address allocation to the target communication device according to the stop message interaction indication information. The determination and transmission module is used to determine, based on the target IP address, whether the target communication device uses the target IP address to access the network and to perform data transmission through the target link. The allocation module, in determining the step of establishing a target link with the target communication device based on the allocation request, is specifically used for: Target link control protocol authentication is performed based on the allocation request; the target link control protocol is the link control protocol between the target access device and the target communication device. In response to the detection that a target link has been established with the target communication device during the execution of target link control protocol authentication, a target link control protocol authentication pass result is generated; Based on the authentication result, it is determined that a target link has been established with the target communication device.

8. A target access device, comprising: A processor, and a memory and a transceiver communicatively connected to the processor; The memory stores computer-executed instructions; The transceiver is used for sending and receiving data; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Method and device for fast address allocation

    CN108933847A