User equipment IP address allocation method and device, equipment and storage medium

By converting the virtual extensible LAN identifier into QINQ identifier in the cloud gateway and encapsulating it in the DHCP request message, the problem that the DHCP request message cannot be sent to a specific server in the prior art is solved, and the network architecture and IP are simplified. Effects of address allocation efficiency.

CN119211199AActive Publication Date: 2024-12-27CHINA MOBILEHANGZHOUINFORMATION TECH CO LTD +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411307596.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-18
Publication Date
2024-12-27
Estimated Expiration
2044-09-18

AI Technical Summary

Technical Problem

In the existing cloud gateway access solution, DHCP request packets are broadcast packets that cannot be sent separately for specific DHCP servers, resulting in the need to configure multiple relay devices to allocate IP addresses, resulting in complex network structure.

Method used

After the cloud gateway establishes a virtual extensible LAN with the optical network device, the target virtual extensible LAN ID is converted into the target QINQ ID and encapsulated in the DHCP request message and sent to the DHCP relay device. The relay device will use the following commands. The QINQ ID determines the target DHCP server address to ensure that the DHCP request message is sent to the correct server for IP address allocation.

Benefits of technology

Simplifies the network architecture, improves management efficiency, enhances the scalability and flexibility of the network, ensures the accuracy and efficiency of DHCP request messages, reduces the complexity of IP address allocation network structure, and improves the IP request of optical network equipment The efficiency of the address.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119211199A_ABST
    Figure CN119211199A_ABST
Patent Text Reader

Abstract

The invention discloses a user equipment IP address allocation method and device, equipment and a storage medium, and relates to the technical field of cloud gateways. The method comprises the following steps: the cloud gateway receives a DHCP request message sent by user equipment and forwarded by optical network equipment; and the cloud gateway converts the target virtual extensible local area network identifier in the request message into a target QINQ identifier, packages the target QINQ identifier in a DHCP request message and sends the target QINQ identifier to the DHCP relay device. And after the DHCP relay equipment receives the target QINQ identifier, generating a target DHCP server address according to the target QINQ identifier, sending a DHCP request message to a DHCP server corresponding to the target DHCP server address, and requesting the DHCP server to allocate an IP address for the user equipment. And the DHCP relay device receives a reply message sent by the DHCP server and sends the reply message to the cloud gateway, the cloud gateway sends the reply message to the optical network device, and the optical network device sends the reply message to the user equipment. The IP address allocation of the user equipment is completed by deploying the DHCP relay equipment, and the network structure complexity of the IP address allocation is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of cloud gateway technology, and in particular, relates to a method, apparatus, device and storage medium for allocating IP addresses to user equipment. Background Art

[0002] In the existing cloud gateway access solution, a virtual extensible LAN (VXLAN) tunnel is established between the optical network unit (ONU) and the cloud gateway. After the user device is connected to the optical network device, it sends a Dynamic Host Configuration Protocol (DHCP) request message to the optical network device. The optical network device transmits the DHCP request to the cloud gateway through the VXLAN tunnel. The cloud gateway then sends the DHCP request message to the DHCP server through the DHCP relay device. After receiving the DHCP request message, the DHCP server allocates a network protocol IP address to the optical network device and replies with a DHCP reply message.

[0003] However, DHCP request messages are all broadcast messages, which are propagated throughout the LAN and cannot be sent to a specific DHCP server. Each DHCP relay device can only send DHCP messages to a specific DHCP server and cannot forward the request message to the corresponding DHCP server according to the needs of the DHCP request message. If multiple optical network devices need to request different DHCP servers, multiple relay devices need to be configured to allocate IP addresses to multiple DHCP servers respectively, making the network structure of IP address allocation complicated. Summary of the invention

[0004] The embodiments of the present application provide a method, apparatus, device and storage medium for allocating IP addresses to user equipment to solve the problem that the prior art requires configuring multiple relay devices to allocate IP addresses and the network structure for IP address allocation is complex.

[0005] In a first aspect, an embodiment of the present application provides a method for allocating an IP address of a user device, which is applied to a cloud gateway, and the method includes:

[0006] When the cloud gateway and the optical network device establish a virtual extensible local area network, a dynamic host configuration protocol DHCP request message sent by the optical network device is received, where the DHCP request message is a request message sent by a user device attached to the optical network device and received by the optical network device, and the DHCP request message includes a target virtual extensible local area network identifier and a user device identifier;

[0007] According to the correspondence between the virtual extensible local area network identifier and the double-label QINQ identifier, the target virtual extensible local area network identifier is converted into a target QINQ identifier, and the target QINQ identifier is encapsulated in a DHCP request message;

[0008] Sending a DHCP request message encapsulating a target QINQ identifier and a user equipment identifier to a DHCP relay device, so that the DHCP relay device determines a target DHCP server address corresponding to the target QINQ identifier according to a correspondence between the QINQ identifier and the DHCP server address, and sending a DHCP request message encapsulating a user equipment identifier to a DHCP server corresponding to the target DHCP server address, so that the DHCP server allocates a network protocol IP address to the user equipment corresponding to the user equipment identifier based on the DHCP request message;

[0009] Receive a DHCP reply message sent by a DHCP relay device, the DHCP reply message includes a target QINQ identifier, a user device identifier, and an IP address allocated to the user device, and the reply message is a message sent by a target DHCP server received by the DHCP relay device;

[0010] The DHCP reply message is sent to the optical network device, so that the optical network device sends the DHCP reply message to the user equipment corresponding to the user equipment identifier.

[0011] In a second aspect, an embodiment of the present application provides a method for allocating an IP address to a user device, which is applied to a DHCP relay device. The method includes:

[0012] Receive a DHCP request message encapsulating a target QINQ identifier and a user equipment identifier sent by a cloud gateway;

[0013] Determine the target DHCP server address corresponding to the target QINQ identifier according to the correspondence between the QINQ identifier and the DHCP server address;

[0014] Sending a DHCP request message encapsulating the user equipment identifier to a target DHCP server corresponding to the target DHCP server address, so that the DHCP server allocates an IP address to the user equipment corresponding to the user equipment identifier based on the DHCP request message;

[0015] Receiving a DHCP reply message sent by a target DHCP server, the DHCP reply message including the target DHCP server address, a user equipment identifier, and an IP address allocated to the user equipment;

[0016] Send a DHCP reply message to the cloud gateway, so that the cloud gateway sends the DHCP reply message to the user device through the optical network device.

[0017] In a third aspect, an embodiment of the present application provides a device for allocating an IP address of a user device, which is applied to a cloud gateway, and the device includes:

[0018] A receiving module, used for receiving a Dynamic Host Configuration Protocol DHCP request message sent by the optical network device when the cloud gateway and the optical network device establish a virtual extensible local area network, the DHCP request message is a request message sent by a user device attached to the optical network device and received by the optical network device, and the DHCP request message includes a target virtual extensible local area network identifier and a user device identifier;

[0019] A conversion module, used for converting the target virtual extensible local area network identifier into a target QINQ identifier according to the corresponding relationship between the virtual extensible local area network identifier and the double-label QINQ identifier, and encapsulating the target QINQ identifier in a DHCP request message;

[0020] a sending module, configured to send a DHCP request message encapsulating a target QINQ identifier and a user equipment identifier to a DHCP relay device, so that the DHCP relay device determines a target DHCP server address corresponding to the target QINQ identifier according to a correspondence between the QINQ identifier and the DHCP server address, and sends a DHCP request message encapsulating the user equipment identifier to a DHCP server corresponding to the target DHCP server address, so that the DHCP server allocates a network protocol IP address to the target user equipment corresponding to the user equipment identifier based on the DHCP request message;

[0021] Correspondingly, the receiving module is also used to receive a DHCP reply message sent by the DHCP relay device, the DHCP reply message includes a target QINQ identifier, a user device identifier and an IP address allocated to the user device, and the reply message is a message sent by the DHCP relay device to the target DHCP server;

[0022] Correspondingly, the sending module is further used to send a DHCP reply message to the optical network device, so that the optical network device sends the DHCP reply message to the user equipment corresponding to the user equipment identifier.

[0023] In a fourth aspect, an embodiment of the present application provides a device for allocating an IP address of a user equipment, which is applied to a DHCP relay device, and the device includes:

[0024] A receiving module, used to receive a DHCP request message encapsulating a target QINQ identifier and a user equipment identifier sent by a cloud gateway;

[0025] A determination module, configured to determine a target DHCP server address corresponding to a target QINQ identifier according to a correspondence between the QINQ identifier and the DHCP server address;

[0026] A sending module, used for sending a DHCP request message encapsulating a user equipment identifier to a target DHCP server corresponding to the target DHCP server address, so that the DHCP server allocates an IP address to the user equipment corresponding to the user equipment identifier based on the DHCP request message;

[0027] Correspondingly, the receiving module is also used to receive a DHCP reply message sent by the target DHCP server, the DHCP reply message including the target DHCP server address, the user equipment identifier and the IP address allocated to the user equipment;

[0028] Correspondingly, the sending module is also used to send a DHCP reply message to the cloud gateway, so that the cloud gateway sends the DHCP reply message to the user equipment through the optical network device.

[0029] In a fifth aspect, an embodiment of the present application provides a terminal device, the device comprising: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, it implements the method for allocating IP addresses to a user device as in the first aspect or the method for allocating IP addresses to a user device as in the second aspect.

[0030] In a sixth aspect, an embodiment of the present application provides a computer storage medium having computer program instructions stored thereon, and when the computer program instructions are executed by a processor, the method for allocating an IP address to a user device of the first aspect or the method for allocating an IP address to a user device of the second aspect is implemented.

[0031] In the seventh aspect, an embodiment of the present application provides a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the method for allocating an IP address to a user device of the first aspect or the method for allocating an IP address to a user device of the second aspect.

[0032] The embodiment of the present application provides a method, apparatus, device and storage medium for allocating IP addresses to user devices. The method includes: after a cloud gateway and an optical network device establish a virtual scalable local area network, the cloud gateway receives a DHCP request message sent by a user device forwarded by the optical network device, wherein the DHCP request message includes a target virtual scalable local area network identifier and a user device identifier, and centrally manages the requests of user devices through the cloud gateway, simplifies the network architecture, and improves management efficiency. The cloud gateway converts the target virtual scalable local area network identifier into a target QINQ identifier, and encapsulates the target QINQ identifier in a DHCP request message and sends it to a DHCP relay device, and extends the target virtual scalable local area network identifier through the QINQ identifier, thereby enhancing the scalability and flexibility of the network. After receiving the DHCP request message, the DHCP relay device generates a target DHCP server address according to the target QINQ identifier, which can ensure that the dynamic host configuration protocol search message is sent to the correct DHCP server, thereby improving the accuracy and efficiency of communication. The DHCP relay device sends a DHCP request message encapsulating the user device identifier to the DHCP server corresponding to the target DHCP server address, requesting the DHCP server to allocate an IP address to the user device. The DHCP relay device receives the reply message including the user device IP address sent by the DHCP server and sends it to the cloud gateway. The cloud gateway sends the reply message to the optical network device, so that the optical network device can send the DHCP reply message to the user device. By deploying a DHCP relay device, the optical network device can send the concurrent IP address requests to different servers and allocate IP addresses, reduce the complexity of the network structure for IP address allocation, and improve the efficiency of optical network devices in requesting IP addresses. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0034] Figure 1 It is a structural diagram of a system for allocating IP addresses to user equipment provided in an embodiment of the present application;

[0035] Figure 2 It is a flowchart of a method for allocating IP addresses to user equipment provided in an embodiment of the present application;

[0036] Figure 3 It is a schematic diagram of the conversion relationship between the scalable local area network identifier and the DHCP server provided in the embodiment of the present application;

[0037] Figure 4It is a flowchart of a method for establishing a virtual extensible local area network tunnel provided in an embodiment of the present application;

[0038] Figure 5 It is a structural diagram of an apparatus for allocating IP addresses of user devices applied to a cloud gateway provided in an embodiment of the present application;

[0039] Figure 6 It is a structural diagram of an apparatus for allocating IP addresses of user equipments applied to a DHCP server provided in an embodiment of the present application;

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

[0041] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.

[0042] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0043] In the context of computing network construction, cloud gateway is one of the most important products, which has received widespread attention in the industry. Various companies have launched their own cloud gateway products. In the existing cloud gateway products, in the cloud gateway, the device under the gateway in the user's home no longer obtains an IP address from the optical network device, but sends a DHCP request to the cloud gateway to allocate an IP address by establishing a target virtual extensible local area network VXLAN tunnel on the optical network device. The cloud gateway then sends the DHCP request message to the DHCP server through the DHCP-Relay relay device, allocates an IP address through the DHCP server and returns the IP address to the optical network device according to the original DHCP request path. However, DHCP request messages are all broadcast messages, which are propagated throughout the local area network. It cannot be guaranteed that they are sent to a specific DHCP server when sending a DHCP request. The DHCP relay device can only send DHCP messages to a specific DHCP server, and cannot identify the needs of DHCP request messages and forward the requests to different DHCP servers. If multiple optical network devices need to request different DHCP servers, multiple relay devices need to be configured to correspond to multiple DHCP servers respectively, making the network structure of IP address allocation complicated.

[0044] In order to solve the problems of the prior art, the embodiments of the present application provide a method, device, equipment and storage medium for allocating IP addresses of user equipment. The method includes: after the cloud gateway and the optical network device establish a virtual scalable local area network, the cloud gateway receives a DHCP request message sent by the user equipment forwarded by the optical network device, wherein the DHCP request message includes a target virtual scalable local area network identifier and a user equipment identifier, and the cloud gateway centrally manages the requests of the user equipment, simplifies the network architecture, and improves the management efficiency. The cloud gateway converts the target virtual scalable local area network identifier into a target QINQ identifier, and encapsulates the target QINQ identifier in a DHCP request message and sends it to a DHCP relay device, and extends the target virtual scalable local area network identifier through the QINQ identifier, thereby enhancing the scalability and flexibility of the network. After receiving the DHCP request message, the DHCP relay device generates a target DHCP server address according to the target QINQ identifier, which can ensure that the dynamic host configuration protocol search message is sent to the correct DHCP server, thereby improving the accuracy and efficiency of communication. The DHCP relay device sends a DHCP request message encapsulating the user equipment identifier to the DHCP server corresponding to the target DHCP server address, requesting the DHCP server to allocate an IP address to the user equipment. The DHCP relay device receives the reply message including the user device IP address sent by the DHCP server and sends it to the cloud gateway. The cloud gateway sends the reply message to the optical network device, so that the optical network device can send the DHCP reply message to the user device. By deploying a DHCP relay device, the optical network device can send the concurrent IP address requests to different servers and allocate IP addresses, reduce the complexity of the network structure for IP address allocation, and improve the efficiency of optical network devices in requesting IP addresses.

[0045] The following first introduces the system for allocating IP addresses to user devices provided in an embodiment of the present application.

[0046] Figure 1 FIG. 1 is a schematic diagram showing a structure of a system 100 for allocating IP addresses to user equipment provided by an embodiment of the present application. Figure 1 As shown, the system may include multiple user devices 101 , multiple optical network devices 102 , a cloud gateway 103 , a DHCP relay device 104 , and multiple DHCP servers 105 .

[0047] Each optical network device 102 can be connected to multiple user devices 101 and receive DHCP request messages sent by user devices. All optical network devices 102 are connected to the cloud gateway 103 and send the received DHCP request messages sent by the user devices to the cloud gateway 103. The cloud gateway 103 is connected to the DHCP relay device 104, which acts as an intermediary between the user devices and the DHCP relay device, receives DHCP requests from the optical network devices and forwards the DHCP requests to the DHCP relay device, and receives and forwards DHCP reply messages sent by the DHCP relay device to the optical network devices. The DHCP relay device 104 is connected to multiple DHCP servers 105, and is used to forward DHCP request messages to the corresponding DHCP servers and receive reply messages sent by the DHCP servers that carry the IP addresses of the user devices.

[0048] The following is an introduction to the method for allocating IP addresses to user devices provided in an embodiment of the present application.

[0049] Figure 2 FIG. 1 is a flow chart showing a method for allocating IP addresses to user equipment provided by an embodiment of the present application. Figure 2 As shown, the method may include the following steps: S201 to S207.

[0050] S201, when a cloud gateway and an optical network device establish a virtual extensible local area network, the cloud gateway receives a Dynamic Host Configuration Protocol DHCP request message sent by the optical network device. The DHCP request message is a request message sent by a user device attached to the optical network device and received by the optical network device. The DHCP request message includes a target virtual extensible local area network identifier and a user device identifier.

[0051] Among them, the Dynamic Host Configuration Protocol DHCP is a standard protocol defined by the RFC 2131 standard specification. The protocol allows the server to dynamically allocate IP addresses and configuration information to the client. The DHCP protocol supports the C / S (user device / server) structure and uses the User Datagram Protocol (UDP) as the transmission protocol.

[0052] In some embodiments, the user device is typically a terminal device such as a PC or a printer in the network.

[0053] In some embodiments, the user equipment identification may include any one of information such as a Media Access Control Address (MAC) address, a serial number of the user equipment, and a key or certificate of the user equipment.

[0054] In some embodiments, an option field may be added to the DHCP request message, and the target virtual extensible LAN identification and user equipment identification information may be stored in the Option field. The Option field in the DHCP message may be used to store control information and parameters not defined in the common protocol.

[0055] By including the target virtual extensible LAN identifier and the user device identifier in the DHCP request message, it is possible to ensure that the user device is accurately identified and located in the network, thereby effectively allocating IP addresses.

[0056] S202: The cloud gateway converts the target virtual extensible local area network identifier into a target QINQ identifier according to the correspondence between the virtual extensible local area network identifier and the double-label QINQ identifier, and encapsulates the target QINQ identifier in a DHCP request message.

[0057] Among them, the QINQ identification is realized by adding a layer of 802.1Q tag on the basis of the original 802.1Q message, which increases the number of virtual scalable LANs to 4K×4K. The inner and outer labels can represent different information. For example, the inner label represents the user and is used to carry user-related information and to identify the operator network.

[0058] In some embodiments, a mapping table of virtual extensible local area network identifiers and QINQ identifiers is set, and the target virtual extensible local area network identifier is converted into a QINQ identifier according to the mapping relationship.

[0059] S203: The cloud gateway sends a DHCP request message encapsulating a target QINQ identifier and a user equipment identifier to the DHCP relay device.

[0060] In some embodiments, when the cloud gateway sends a DHCP request message to the DHCP relay device, the Dynamic Host Configuration Protocol Relay Agent DHCP Relay Agent function can be used to relay the DHCP request message encapsulated with identification information to the target DHCP server.

[0061] S204, the DHCP relay device receives the DHCP request message encapsulating the target QINQ identifier and the user equipment identifier sent by the cloud gateway and determines the target DHCP server address corresponding to the target QINQ identifier according to the correspondence between the QINQ identifier and the DHCP server address.

[0062] In some embodiments, the DHCP relay device may use static configuration or dynamic protocols, such as the security feature DHCP Snooping defense mechanism protocol, to determine the mapping relationship between the target QINQ identifier and the target DHCP server address.

[0063] S205: The DHCP relay device sends a DHCP request message encapsulating the user equipment identifier to a target DHCP server corresponding to the target DHCP server address, so that the DHCP server allocates an IP address to the user equipment corresponding to the user equipment identifier based on the DHCP request message.

[0064] In some embodiments, before the DHCP server allocates an IP address, it queries the correspondence between the recorded user equipment identification and the allocated IP address to prevent IP address allocation conflicts or reserve a specific IP address for a specific device. After the DHCP server allocates an IP address, it records the user equipment and the IP address allocated to the user equipment.

[0065] In some embodiments, each DHCP server corresponds to an optical network device, and each DHCP server is preset with an IP address pool. When receiving a DHCP request sent by a user device connected to the optical network device, the DHCP server selects an unallocated IP address from the preset IP address pool and allocates it to the user device.

[0066] S206: The DHCP relay device receives a DHCP reply message sent by the target DHCP server and sends a DHCP reply message to the cloud gateway. The DHCP reply message includes the target DHCP server address, the user equipment identifier, and the IP address of the user equipment.

[0067] In some embodiments, when the DHCP relay device receives a DHCP reply message sent by a DHCP server, it parses the QINQ identifier according to the relationship between the address of the DHCP server sending the reply message and the QINQ identifier and encapsulates the QINQ identifier in the DHCP reply message.

[0068] S207, the cloud gateway receives the DHCP reply message sent by the DHCP relay device and sends the DHCP reply message to the optical network device, so that the optical network device sends the DHCP reply message to the user device corresponding to the user device identifier, and the DHCP reply message includes the target QINQ identifier, the user device identifier and the IP address of the user device.

[0069] In some embodiments, the cloud gateway receives a reply message sent by the DHCP relay device, obtains the virtual extensible LAN identifier of the optical network device that needs to be sent according to the relationship between the QINQ identifier and the virtual extensible LAN identifier, and forwards the DHCP reply message to the optical network device corresponding to the virtual extensible LAN identifier.

[0070] The embodiment of the present application provides a method for allocating IP addresses to user devices. After a cloud gateway and an optical network device establish a virtual scalable local area network, the cloud gateway receives a DHCP request message sent by a user device forwarded by the optical network device, wherein the DHCP request message includes a target virtual scalable local area network identifier and a user device identifier. The cloud gateway centrally manages user device requests, simplifies the network architecture, and improves management efficiency. The cloud gateway converts the target virtual scalable local area network identifier into a target QINQ identifier, and encapsulates the target QINQ identifier in a DHCP request message and sends it to a DHCP relay device. The target virtual scalable local area network identifier is extended by the QINQ identifier, thereby enhancing the scalability and flexibility of the network. After receiving the DHCP request message, the DHCP relay device generates a target DHCP server address according to the target QINQ identifier, which can ensure that the Dynamic Host Configuration Protocol search message is sent to the correct DHCP server, thereby improving the accuracy and efficiency of communication. The DHCP relay device sends a DHCP request message encapsulating the user device identifier to the DHCP server corresponding to the target DHCP server address, requesting the DHCP server to allocate an IP address to the user device. The DHCP relay device receives the reply message including the user device IP address sent by the DHCP server and sends it to the cloud gateway. The cloud gateway sends the reply message to the optical network device, so that the optical network device can send the DHCP reply message to the user device. By deploying a DHCP relay device, the optical network device can send the concurrent IP address requests to different servers and allocate IP addresses, reduce the complexity of the network structure for IP address allocation, and improve the efficiency of optical network devices in requesting IP addresses.

[0071] In some embodiments, Figure 3 As shown, the 24-bit virtual extensible LAN identifier is converted into a 24-bit QINQ identifier, wherein the QINQ identifier includes a 12-bit inner label and a 12-bit outer label. The 24-bit QINQ identifier is converted into a 24-bit DHCP server address host bit, which is combined with the preset 8-bit network bit to form the HDCP server address.

[0072] In some embodiments, Figure 4 As shown, before receiving the Dynamic Host Configuration Protocol DHCP request message sent by the optical network device, the method may further include the following steps:

[0073] S401, receiving a virtual extensible LAN tunnel establishment request sent by an optical network device, where the virtual extensible LAN tunnel establishment request includes a target IP address of the optical network device and a preset virtual extensible LAN identifier;

[0074] S402, establishing a target virtual extensible LAN tunnel connected to an optical network device corresponding to a target IP address, and configuring a preset virtual extensible LAN identifier for the established target virtual extensible LAN tunnel.

[0075] By establishing a virtual scalable LAN tunnel for each optical network device and assigning different VNIs, an isolated virtual network environment can be created to improve network security; and by establishing a virtual scalable LAN tunnel before a DHCP request, it can ensure that DHCP messages are transmitted through the configured tunnel, thereby optimizing the DHCP processing process.

[0076] In some embodiments, before establishing a target virtual extensible local area network tunnel connected to the optical network device corresponding to the target IP address, the method may further include:

[0077] Authentication is performed based on the target IP address of the optical network device to ensure that only authorized optical network devices can establish virtual scalable LAN tunnels and obtain IP addresses, improving network security.

[0078] In some embodiments, before establishing a target virtual extensible LAN tunnel connected to an optical network device corresponding to a target IP address, the method may further include: the optical network device powers on a wide area network port (WAN) to obtain the target IP address of the optical network device from a broadband access server (BRAS) via a point-to-point protocol (PPPoe).

[0079] In some embodiments, the process of configuring the virtual extensible local area network identifier may add the identifier information to the header or the tail of the tunnel to ensure that the target virtual extensible local area network can be correctly identified during tunnel transmission.

[0080] In some embodiments, the DHCP request message also includes a service provider identifier of the user equipment, the QINQ identifier is an identifier with inner and outer labels, and according to the correspondence between the virtual extensible local area network identifier and the double-label QINQ identifier, the target virtual extensible local area network identifier is converted into a target QINQ identifier. The method may include:

[0081] The target virtual extensible local area network identifier is used as an inner label of the target QINQ identifier, and the service provider identifier of the user equipment is used as an outer label of the target QINQ identifier to generate the target QINQ identifier.

[0082] The QINQ identifier consists of an inner layer and an outer layer, allowing more identification information to be carried in a single Ethernet frame. The unique identifier of the user device is determined by generating the QINQ identifier, and the DHCP server to be requested can be determined based on the QINQ identifier.

[0083] In some embodiments, the service provider identifier is a service provider identifier pre-assigned to the user equipment and is used to identify the service provider to which the user equipment belongs.

[0084] In some embodiments, before using the virtual extensible local area network identifier as an inner label of the QINQ identifier, the method may further include:

[0085] A pointer offset operation is performed on the virtual extensible LAN identifier, and the virtual extensible LAN identifier is adjusted according to a preset pointer offset to obtain an adjusted virtual extensible LAN identifier, wherein the adjusted virtual extensible LAN identifier has the same bit width as the inner label of the QINQ identifier.

[0086] Through pointer offset and bit width adjustment, the compatibility of the virtual extensible LAN identifier and the QINQ inner label can be ensured, and the problems caused by bit width mismatch can be avoided. In addition, by performing pointer offset operation and adjustment on the virtual extensible LAN identifier, the identifier information can be accurately adjusted according to specific needs.

[0087] In an example, when the original bit width of the virtual extensible LAN identifier is 24 bits and the bit width of the inner label of the QINQ identifier is 12 bits, the virtual extensible LAN identifier is shifted rightward by 12 bits to obtain the inner label of the QINQ identifier.

[0088] In some embodiments, the DHCP server address includes a host bit and a network bit, and according to the correspondence between the QINQ identifier and the DHCP server address, determining the target DHCP server address corresponding to the target QINQ identifier, the method may include:

[0089] The target QINQ identifier is used as the host bit of the target DHCP server address, combined with the preset network bit of the target DHCP server address, to generate the target DHCP server address.

[0090] By directly using the QINQ identifier as the host bit of the DHCP server address, it can be ensured that each QINQ identifier has a clear corresponding DHCP server address, which can more quickly identify and locate the target DHCP server address and reduce the complexity of address resolution.

[0091] In some embodiments, the network bit of the target DHCP server address is a preset network bit of the local area network.

[0092] In an example, the target QINQ identifier is 10101010, the preset network bits of the target DHCP server address are 192.168.1, and the target QINQ identifier is used as the host bit of the target DHCP server address, combined with the preset network bits, to generate a target DHCP server address of 192.168.1.10101010.

[0093] Figure 5 1 is a schematic diagram of a structure of an apparatus 500 for allocating IP addresses of user devices applied to a cloud gateway provided in an embodiment of the present application. Figure 5 As shown, the device may include:

[0094] The receiving module 501 is used to receive a Dynamic Host Configuration Protocol DHCP request message sent by the optical network device when the cloud gateway and the optical network device establish a virtual extensible local area network. The DHCP request message is a request message sent by a user device attached to the optical network device and received by the optical network device. The DHCP request message includes a target virtual extensible local area network identifier and a user device identifier.

[0095] The conversion module 502 is used to convert the target virtual extensible local area network identifier into a target QINQ identifier according to the corresponding relationship between the virtual extensible local area network identifier and the double-label QINQ identifier, and encapsulate the target QINQ identifier in the DHCP request message;

[0096] The sending module 503 is used to send a DHCP request message encapsulating a target QINQ identifier and a user equipment identifier to the DHCP relay device, so that the DHCP relay device determines the target DHCP server address corresponding to the target QINQ identifier according to the correspondence between the QINQ identifier and the DHCP server address, and sends a DHCP request message encapsulating the user equipment identifier to the DHCP server corresponding to the target DHCP server address, so that the DHCP server allocates a network protocol IP address to the user equipment corresponding to the user equipment identifier based on the DHCP request message;

[0097] Correspondingly, the receiving module 501 is also used to receive a DHCP reply message sent by the DHCP relay device, the DHCP reply message includes a target QINQ identifier, a user device identifier and an IP address allocated to the user device, and the reply message is a message sent by the DHCP relay device to the target DHCP server;

[0098] Correspondingly, the sending module 503 is further configured to send a DHCP reply message to the optical network device, so that the optical network device sends the DHCP reply message to the user equipment corresponding to the user equipment identifier.

[0099] In some embodiments, the apparatus 500 for allocating an IP address to a user equipment may further include:

[0100] The receiving module 501 is further configured to receive a virtual extensible LAN tunnel establishment request sent by the optical network device before receiving a dynamic host configuration protocol DHCP request message sent by the optical network device, wherein the virtual extensible LAN tunnel establishment request includes a target IP address of the optical network device and a preset virtual extensible LAN identifier;

[0101] The establishment module is used to establish a target virtual extensible LAN tunnel connected to the optical network device corresponding to the target IP address, and configure a preset virtual extensible LAN identifier for the established target virtual extensible LAN tunnel.

[0102] In some embodiments, the DHCP request message also includes a service provider identifier of the user device, and the QINQ identifier is an identifier with two layers of inner and outer labels. The conversion module 502 is also used to use the target virtual extensible LAN identifier as the inner label of the target QINQ identifier and the service provider identifier of the user device as the outer label of the target QINQ identifier to generate a target QINQ identifier.

[0103] In some embodiments, the device 500 for allocating an IP address to a user device may further include an adjustment module for performing a pointer offset operation on the virtual extensible LAN identifier before using the virtual extensible LAN identifier as an inner label of the QINQ identifier, and adjusting the virtual extensible LAN identifier according to a preset pointer offset to obtain an adjusted virtual extensible LAN identifier, wherein the adjusted virtual extensible LAN identifier has the same bit width as the inner label of the QINQ identifier.

[0104] Figure 5 The various modules in the device shown can be implemented Figure 2 Each step in the above steps can achieve the corresponding technical effect, which will not be repeated here for the sake of brevity.

[0105] Figure 6 6 is a schematic diagram of a structure of a device 600 for allocating IP addresses to a user device and applied to a DHCP relay device provided in an embodiment of the present application. Figure 6 As shown, the device may include:

[0106] The receiving module 601 is used to receive a DHCP request message encapsulating a target QINQ identifier and a user equipment identifier sent by a cloud gateway;

[0107] The determination module 602 is used to determine the target DHCP server address corresponding to the target QINQ identifier according to the correspondence between the QINQ identifier and the DHCP server address;

[0108] The sending module 603 is used to send a DHCP request message encapsulating the user equipment identifier to a target DHCP server corresponding to the target DHCP server address, so that the DHCP server allocates an IP address to the user equipment corresponding to the user equipment identifier based on the DHCP request message;

[0109] Correspondingly, the receiving module is also used to receive a DHCP reply message sent by the target DHCP server, the DHCP reply message including the target DHCP server address, the user equipment identifier and the IP address allocated to the user equipment;

[0110] Correspondingly, the sending module is further used to send a DHCP reply message to the cloud gateway, so that the cloud gateway sends the DHCP reply message to the user equipment corresponding to the user equipment identifier through the optical network device.

[0111] In some embodiments, the DHCP server address includes a host bit and a network bit, and the determination module 602 is further configured to use the target QINQ identifier as the host bit of the target DHCP server address and combine it with the preset network bit of the target DHCP server address to generate the target DHCP server address.

[0112] Figure 6 The various modules in the device shown can be implemented Figure 2 Each step in the above steps can achieve the corresponding technical effect, which will not be repeated here for the sake of brevity.

[0113] Figure 7 A schematic diagram of the hardware structure of a terminal device provided in an embodiment of the present application is shown.

[0114] The terminal device may include a processor 701 and a memory 702 storing computer program instructions.

[0115] Specifically, the processor 701 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0116] The memory 702 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 702 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In one example, the memory 702 may include a removable or non-removable (or fixed) medium, or the memory 702 is a non-volatile solid-state memory. The memory 702 may be inside or outside the integrated gateway disaster recovery device.

[0117] In one example, the memory 702 may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Thus, typically, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method for assigning an IP address to a user device according to the present disclosure.

[0118] The processor 701 reads and executes the computer program instructions stored in the memory 702 to implement Figure 2 The method for allocating IP addresses to user equipment in the illustrated embodiment.

[0119] In one example, the terminal device may further include a communication interface 703 and a bus 704. Figure 7 As shown, the processor 701, the memory 702, and the communication interface 703 are connected via a bus 704 and communicate with each other.

[0120] The communication interface 703 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.

[0121] Bus 704 includes hardware, software or both, and the components of terminal equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (Accelerated Graphics Port, AGP) or other graphics bus, enhanced industry standard architecture (Extended Industry Standard Architecture, EISA) bus, front side bus (Front Side Bus, FSB), Hyper Transport (Hyper Transport, HT) interconnection, industry standard architecture (Industry Standard Architecture, ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 704 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the application considers any suitable bus or interconnection.

[0122] In addition, in combination with the method for allocating IP addresses to user devices in the above embodiments, the embodiments of the present application may provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any method for allocating IP addresses to user devices in the above embodiments is implemented.

[0123] An embodiment of the present application also provides a computer program product, including a computer program, which, when executed, implements any one of the methods for allocating an IP address to a user device in the above embodiments.

[0124] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.

[0125] The functional blocks shown in the structural block diagram described above can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), appropriate firmware, plug-in, function card, etc. When implemented in software, the elements of the present application are programs or text segments used to perform the required tasks. The program or text segment can be stored in a machine-readable medium, or transmitted on a transmission medium or communication link via a data signal carried in a carrier. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, read-only memory (Read-Only Memory, ROM), flash memory, erasable read-only memory (Erasable ReadOnly Memory, EROM), floppy disks, compact disc read-only memory (Compact Disc Read-Only Memory, CD-ROM), optical discs, hard disks, optical fiber media, radio frequency (Radio Frequency, RF) links, etc. The text segment can be downloaded via a computer network such as the Internet, an intranet, etc.

[0126] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.

[0127] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.

[0128] The above is only a specific implementation of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.

Claims

1. A method for allocating IP addresses to user equipment, characterized in that: Applied to a cloud gateway, the method includes: In the case where the cloud gateway and the optical network device establish a virtual extensible local area network, receiving a dynamic host configuration protocol DHCP request message sent by the optical network device, wherein the DHCP request message is a request message sent by a user device attached to the optical network device and received by the optical network device, and the DHCP request message includes a target virtual extensible local area network identifier and a user device identifier; According to the correspondence between the virtual extensible local area network identifier and the double-label QINQ identifier, convert the target virtual extensible local area network identifier into a target QINQ identifier, and encapsulate the target QINQ identifier in a DHCP request message; Sending a DHCP request message encapsulating the target QINQ identifier and the user equipment identifier to the DHCP relay device, so that the DHCP relay device determines the target DHCP server address corresponding to the target QINQ identifier according to the correspondence between the QINQ identifier and the DHCP server address, and sending a DHCP request message encapsulating the user equipment identifier to the DHCP server corresponding to the target DHCP server address, so that the DHCP server allocates a network protocol IP address to the user equipment corresponding to the user equipment identifier based on the DHCP request message; receiving a DHCP reply message sent by the DHCP relay device, wherein the DHCP reply message includes the target QINQ identifier, the user equipment identifier, and the IP address allocated to the user equipment, and the reply message is a message sent by the target DHCP server received by the DHCP relay device; The DHCP reply message is sent to the optical network device, so that the optical network device sends the DHCP reply message to the user equipment corresponding to the user equipment identifier.

2. The method for allocating IP addresses to user equipment according to claim 1, characterized in that: Before receiving the Dynamic Host Configuration Protocol DHCP request message sent by the optical network device, the method further includes: Receiving a virtual extensible local area network tunnel establishment request sent by an optical network device, wherein the virtual extensible local area network tunnel establishment request includes a target IP address of the optical network device and a preset virtual extensible local area network identifier; A target virtual extensible LAN tunnel connected to the optical network device corresponding to the target IP address is established, and a preset virtual extensible LAN identifier is configured for the established target virtual extensible LAN tunnel.

3. The method for allocating IP addresses to user equipment according to claim 1, characterized in that: The DHCP request message also includes a service provider identifier of the user equipment, the QINQ identifier is an identifier with inner and outer double-layer labels, and the target virtual extensible local area network identifier is converted into a target QINQ identifier according to the correspondence between the virtual extensible local area network identifier and the double-layer label QINQ identifier, including: The target virtual extensible local area network identifier is used as an inner label of the target QINQ identifier, and the service provider identifier of the user equipment is used as an outer label of the target QINQ identifier to generate the target QINQ identifier.

4. The method for allocating IP addresses to user equipment according to claim 3, characterized in that: Before using the virtual extensible local area network identifier as an inner label of the QINQ identifier, the method further includes: A pointer offset operation is performed on the virtual extensible LAN identifier, and the virtual extensible LAN identifier is adjusted according to a preset pointer offset to obtain an adjusted virtual extensible LAN identifier, wherein the adjusted virtual extensible LAN identifier has the same bit width as the inner label of the QINQ identifier.

5. A method for allocating IP addresses to user equipment, characterized in that: Applied to a DHCP relay device, the method comprises: Receive a DHCP request message encapsulating a target QINQ identifier and a user equipment identifier sent by a cloud gateway; Determine the target DHCP server address corresponding to the target QINQ identifier according to the correspondence between the QINQ identifier and the DHCP server address; Sending a DHCP request message encapsulating the user equipment identifier to a target DHCP server corresponding to the target DHCP server address, so that the DHCP server allocates an IP address to the user equipment corresponding to the user equipment identifier based on the DHCP request message; Receiving a DHCP reply message sent by a target DHCP server, wherein the DHCP reply message includes an address of the target DHCP server, a user equipment identifier, and an IP address allocated to the user equipment; The DHCP reply message is sent to the cloud gateway, so that the cloud gateway sends the DHCP reply message to the user equipment corresponding to the user equipment identifier through the optical network device.

6. The method for allocating IP addresses to user equipment according to claim 5, characterized in that: The DHCP server address includes a host bit and a network bit, and determining the target DHCP server address corresponding to the target QINQ identifier according to the correspondence between the QINQ identifier and the DHCP server address includes: The target QINQ identifier is used as the host bit of the target DHCP server address, combined with the preset network bit of the target DHCP server address, to generate the target DHCP server address.

7. A device for allocating IP addresses to user equipment, characterized in that: Applied to a cloud gateway, the device comprises: A receiving module, configured to receive a Dynamic Host Configuration Protocol DHCP request message sent by the optical network device when the cloud gateway and the optical network device establish a virtual extensible local area network, wherein the DHCP request message is a request message sent by a user device attached to the optical network device and received by the optical network device, and the DHCP request message includes a target virtual extensible local area network identifier and a user device identifier; A conversion module, configured to convert the target virtual extensible local area network identifier into a target QINQ identifier according to a correspondence between the virtual extensible local area network identifier and the double-label QINQ identifier, and encapsulate the target QINQ identifier in a DHCP request message; a sending module, configured to send a DHCP request message encapsulating the target QINQ identifier and the user equipment identifier to a DHCP relay device, so that the DHCP relay device determines the target DHCP server address corresponding to the target QINQ identifier according to the correspondence between the QINQ identifier and the DHCP server address, and sends a DHCP request message encapsulating the user equipment identifier to a DHCP server corresponding to the target DHCP server address, so that the DHCP server allocates a network protocol IP address to the user equipment corresponding to the user equipment identifier based on the DHCP request message; The receiving module is further used to receive a DHCP reply message sent by the DHCP relay device, wherein the DHCP reply message includes the target QINQ identifier, the user equipment identifier and the IP address allocated to the user equipment, and the reply message is a message sent by the target DHCP server received by the DHCP relay device; The sending module is further used to send the DHCP reply message to the optical network device, so that the optical network device sends the DHCP reply message to the user equipment corresponding to the user equipment identifier.

8. A device for allocating IP addresses to user equipment, characterized in that: Applied to a DHCP relay device, the device comprises: A receiving module, used to receive a DHCP request message encapsulating a target QINQ identifier and a user equipment identifier sent by a cloud gateway; A determination module, configured to determine a target DHCP server address corresponding to the target QINQ identifier according to a correspondence between the QINQ identifier and the DHCP server address; a sending module, configured to send a DHCP request message encapsulating the user equipment identifier to a target DHCP server corresponding to the target DHCP server address, so that the DHCP server allocates an IP address to the user equipment corresponding to the user equipment identifier based on the DHCP request message; The receiving module is also used to receive a DHCP reply message sent by the target DHCP server, wherein the DHCP reply message includes the target DHCP server address, the user equipment identifier and the IP address allocated to the user equipment; The sending module is further used to send the DHCP reply message to the cloud gateway, so that the cloud gateway sends the DHCP reply message to the user equipment corresponding to the user equipment identifier through the optical network device.

9. A terminal device, characterized in that: The device comprises: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the method for allocating an IP address to a user equipment as claimed in any one of claims 1 to 6 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the method for allocating an IP address to a user equipment as described in any one of claims 1 to 6 is implemented.

11. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the method for allocating an IP address to a user device as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • IP address distribution method and apparatus

    CN105763671A

  • Dynamic IP address allocation method and device

    CN108063837A

  • Message transmission method, networking system and access cloud gateway

    CN116436729A

  • Method and apparatus for processing dynamic host configuration protocol message

    WO2015085788A1