Methods, apparatus, devices and storage media for allocating user equipment IP addresses

By establishing a virtual scalable LAN between the cloud gateway and the optical network device and encapsulating DHCP request messages using the QINQ identifier, the problem of complex configuration of multiple relay devices in the prior art is solved, and accurate DHCP server selection and efficient IP address allocation are achieved.

CN119211199BActive Publication Date: 2025-10-31CHINA MOBILEHANGZHOUINFORMATION TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In existing technologies, cloud gateway access solutions require the configuration of multiple relay devices to send DHCP request messages to different DHCP servers, resulting in a complex network structure for IP address allocation.

Method used

After establishing a virtual scalable local area network between the cloud gateway and the optical network device, DHCP request messages are encapsulated with the QinQ identifier, and the DHCP relay device determines the target DHCP server address based on the QinQ identifier, thereby achieving accurate forwarding of DHCP requests.

Benefits of technology

It simplifies the network architecture, improves management efficiency and communication accuracy, reduces the complexity of network structure for IP address allocation, and improves the efficiency of optical network devices requesting IP addresses.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119211199B_ABST
    Figure CN119211199B_ABST
Patent Text Reader

Abstract

This application discloses a method, apparatus, device, and storage medium for allocating IP addresses for user equipment, relating to the field of cloud gateway technology. The method includes: a cloud gateway receiving a DHCP request message sent by a user equipment, forwarded by an optical network device. The cloud gateway converts the target Virtual Extensible LAN identifier in the request message into a target QinQ identifier, encapsulates it in the DHCP request message, and sends it to a DHCP relay device. Upon receiving the message, the DHCP relay device generates a target DHCP server address based on the target QinQ identifier and sends a DHCP request message to the DHCP server corresponding to the target DHCP server address, requesting the DHCP server to allocate an IP address for the user equipment. The DHCP relay device receives a reply message from the DHCP server and sends it to the cloud gateway. The cloud gateway then sends the reply message to the optical network device, which in turn sends the reply message to the user equipment. This method achieves IP address allocation for user equipment by deploying a single DHCP relay device, reducing the network structure complexity of IP address allocation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] In existing cloud gateway access solutions, a Virtual Extensible LAN (VXLAN) tunnel is established between the Optical Network Unit (ONU) and the cloud gateway. After the user equipment connects to the ONU, it sends a Dynamic Host Configuration Protocol (DHCP) request message to the ONU. The ONU then 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 a DHCP relay device. After receiving the DHCP request message, the DHCP server assigns a network protocol IP address to the ONU and replies with a DHCP reply message.

[0003] However, DHCP request messages are broadcast messages, which propagate throughout the entire local area network and cannot be sent specifically to a particular DHCP server. Each DHCP relay device can only send DHCP messages to a specific DHCP server; it cannot forward request messages to corresponding DHCP servers as needed. If multiple optical network devices need to request different DHCP servers, multiple relay devices need to be configured to assign IP addresses to multiple DHCP servers, making the network structure for IP address allocation complex. Summary of the Invention

[0004] This application provides a method, apparatus, device, and storage medium for allocating user equipment IP addresses, in order to solve the problem that the prior art requires the configuration of multiple relay devices for IP address allocation, resulting in a complex network structure for IP address allocation.

[0005] In a first aspect, embodiments of this application provide a method for allocating user equipment IP addresses, applied to a cloud gateway, the method comprising:

[0006] When a virtual scalable local area network is established between the cloud gateway and the optical network device, the system receives Dynamic Host Configuration Protocol (DHCP) request messages sent by the optical network device. The DHCP request message is a request message sent by the user equipment connected to the optical network device and received by the optical network device. The DHCP request message includes the target virtual scalable local area network identifier and the user equipment identifier.

[0007] Based on the correspondence between the Virtual Scalable Local Area Network (VLAN) identifier and the Double Label QinQ identifier, the target VLAN identifier is converted into the target QinQ identifier, and the target QinQ identifier is encapsulated in the DHCP request message.

[0008] Send a DHCP request message encapsulating the target QinQ identifier and the user equipment identifier to the DHCP relay device. The DHCP relay device determines the target DHCP server address corresponding to the target QinQ identifier based on the mapping between QinQ identifiers and DHCP server addresses. Then, it sends a DHCP request message encapsulating the user equipment identifier to the DHCP server corresponding to the target DHCP server address. 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] The DHCP relay device receives DHCP reply messages from the DHCP relay device. The DHCP reply message includes the target QinQ identifier, the user equipment identifier, and the IP address assigned to the user equipment. The reply message is a message that the DHCP relay device receives from the target DHCP server.

[0010] Send a DHCP reply message to the optical network device so that the optical network device can send the DHCP reply message to the user equipment corresponding to the user equipment identifier.

[0011] Secondly, embodiments of this application provide a method for allocating user equipment IP addresses, applied to a DHCP relay device, the method comprising:

[0012] Receive a DHCP request message sent by the cloud gateway, which encapsulates the target QinQ identifier and the user equipment identifier;

[0013] Based on the mapping between QinQ identifiers and DHCP server addresses, determine the target DHCP server address corresponding to the target QinQ identifier;

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

[0015] Receive DHCP reply messages sent by the target DHCP server. The DHCP reply message includes the target DHCP server address, user equipment identifier, and IP address assigned to the user equipment.

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

[0017] Thirdly, embodiments of this application provide a user equipment IP address allocation apparatus, applied to a cloud gateway, the apparatus comprising:

[0018] The receiving module is used to receive Dynamic Host Configuration Protocol (DHCP) request messages sent by the optical network device when a virtual scalable local area network is established between the cloud gateway and the optical network device. The DHCP request message is a request message sent by the user equipment connected to the optical network device and received by the optical network device. The DHCP request message includes the target virtual scalable local area network identifier and the user equipment identifier.

[0019] The conversion module is used to convert the target Virtual Scalable Local Area Network (VPN) identifier into the target QinQ identifier according to the correspondence between the VPN identifier and the QinQ identifier, and to encapsulate the target QinQ identifier in the DHCP request message.

[0020] The sending module is used to send a DHCP request message encapsulating the target QinQ identifier and the user equipment identifier to the DHCP relay device. This allows the DHCP relay device to determine the target DHCP server address corresponding to the target QinQ identifier based on the mapping between the QinQ identifier and the DHCP server address, and then send a DHCP request message encapsulating the user equipment identifier to the DHCP server corresponding to the target DHCP server address. This allows the DHCP server to allocate 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 DHCP reply messages sent by the DHCP relay device. The DHCP reply message includes the target QinQ identifier, the user equipment identifier, and the IP address assigned to the user equipment. The reply message is a message sent by the target DHCP server to the DHCP relay device.

[0022] Correspondingly, the sending module is also used to send DHCP reply messages to the optical network device, so that the optical network device can send the DHCP reply messages to the user equipment corresponding to the user equipment identifier.

[0023] Fourthly, embodiments of this application provide an apparatus for allocating user equipment IP addresses, applied to a DHCP relay device, the apparatus comprising:

[0024] The receiving module is used to receive DHCP request messages sent by the cloud gateway, which encapsulate the target QinQ identifier and the user equipment identifier.

[0025] The determination module is used to determine the target DHCP server address corresponding to the target QinQ identifier based on the mapping relationship between QinQ identifiers and DHCP server addresses.

[0026] The sending module is used to send a DHCP request message encapsulating the user equipment identifier to the target DHCP server corresponding to the target DHCP server address, so that the DHCP server can allocate 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 DHCP reply messages sent by the target DHCP server. The DHCP reply message includes the target DHCP server address, the user equipment identifier, and the IP address assigned to the user equipment.

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

[0029] Fifthly, embodiments of this application provide a terminal device, the device including: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, it implements the user equipment IP address allocation method of the first aspect or the user equipment IP address allocation method of the second aspect.

[0030] Sixthly, embodiments of this application provide a computer storage medium storing computer program instructions, which, when executed by a processor, implement the user equipment IP address allocation method of the first aspect or the user equipment IP address allocation method of the second aspect.

[0031] In a seventh aspect, embodiments of this application provide a computer program product in which instructions, when executed by a processor of an electronic device, cause the electronic device to perform a user equipment IP address allocation method as described in the first aspect or the user equipment IP address allocation method as described in the second aspect.

[0032] This application provides a method, apparatus, device, and storage medium for allocating user equipment (UE) IP addresses. The method includes: after a cloud gateway establishes a Virtual Scalable Local Area Network (VLAN) with an optical network device, the cloud gateway receives a DHCP request message forwarded by the optical network device from a UE. The DHCP request message includes a target VLAN identifier and a UE identifier. The cloud gateway centrally manages UE requests, simplifying the network architecture and improving management efficiency. The cloud gateway converts the target VLAN identifier into a target QinQ identifier and encapsulates the target QinQ identifier in the DHCP request message, sending it to a DHCP relay device. Extending the target VLAN identifier with the QinQ identifier enhances network scalability and flexibility. After receiving the DHCP request message, the DHCP relay device generates a target DHCP server address based on the target QinQ identifier, ensuring that Dynamic Host Configuration Protocol (DHCP) lookup messages are sent to the correct DHCP server, improving communication accuracy and efficiency. The DHCP relay device sends a DHCP request message encapsulating the UE identifier to the DHCP server corresponding to the target DHCP server address, requesting the DHCP server to allocate an IP address to the UE. The DHCP relay device receives the reply message containing the user equipment's IP address from the DHCP server and forwards it to the cloud gateway. The cloud gateway then forwards the reply message to the optical network device, which in turn forwards the DHCP reply message to the user equipment. This achieves the goal of sending concurrent IP address requests from optical network devices to different servers for IP address allocation by deploying a single DHCP relay device. This reduces the network structure complexity of IP address allocation and improves the efficiency of IP address requests from optical network devices. Attached Figure Description

[0033] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0034] Figure 1 This is a schematic diagram of the structure of the user equipment IP address allocation system provided in the embodiments of this application;

[0035] Figure 2 This is a flowchart illustrating the method for allocating user equipment IP addresses provided in an embodiment of this application;

[0036] Figure 3 This is a schematic diagram illustrating the conversion relationship between the Scalable Local Area Network Identifier and the DHCP server provided in an embodiment of this application;

[0037] Figure 4This is a flowchart illustrating the method for establishing a virtual scalable local area network tunnel provided in an embodiment of this application;

[0038] Figure 5 This is a schematic diagram of the device for allocating user equipment IP addresses to a cloud gateway, as provided in an embodiment of this application.

[0039] Figure 6 This is a schematic diagram of the structure of the device for allocating user equipment IP addresses to a DHCP server provided in an embodiment of this application;

[0040] Figure 7 This is a schematic diagram of the structure of the terminal device provided in the embodiments of this application. Detailed Implementation

[0041] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.

[0042] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.

[0043] In the context of building computing networks, cloud gateways are a crucial product, attracting widespread attention in the industry, with various companies launching their own cloud gateway products. In existing cloud gateway products, devices connected to the user's home gateway no longer obtain IP addresses directly from the optical network equipment. Instead, they establish a target Virtual Extensible Local Area Network (VXLAN) tunnel on the optical network equipment to send DHCP requests to the cloud gateway for IP address allocation. The cloud gateway then forwards the DHCP request message to the DHCP server via a DHCP-Relay device. The DHCP server allocates IP addresses and returns them to the optical network equipment following the original DHCP request path. However, DHCP request messages are broadcast messages, propagating throughout the entire local area network, and cannot guarantee that a DHCP request is sent specifically to a particular DHCP server. Furthermore, DHCP relay devices can only send DHCP messages to specific DHCP servers and cannot identify the needs of DHCP request messages and forward 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, making the network structure for IP address allocation complex.

[0044] To address the problems in existing technologies, this application provides a method, apparatus, device, and storage medium for allocating user equipment (UE) IP addresses. The method includes: after a cloud gateway establishes a Virtual Scalable Local Area Network (VLAN) with an optical network device, the cloud gateway receives a DHCP request message forwarded by the optical network device from a UE. The DHCP request message includes a target VLAN identifier and a UE identifier. The cloud gateway centrally manages UE requests, simplifying the network architecture and improving management efficiency. The cloud gateway converts the target VLAN identifier into a target QinQ identifier and encapsulates the target QinQ identifier in the DHCP request message before sending it to a DHCP relay device. Extending the target VLAN identifier with the QinQ identifier enhances network scalability and flexibility. After receiving the DHCP request message, the DHCP relay device generates a target DHCP server address based on the target QinQ identifier, ensuring that Dynamic Host Configuration Protocol (DHCP) lookup messages are sent to the correct DHCP server, improving communication accuracy and efficiency. The DHCP relay device then sends a DHCP request message encapsulating the UE identifier to the DHCP server corresponding to the target DHCP server address, requesting the DHCP server to allocate an IP address to the UE. The DHCP relay device receives the reply message containing the user equipment's IP address from the DHCP server and forwards it to the cloud gateway. The cloud gateway then forwards the reply message to the optical network device, which in turn forwards the DHCP reply message to the user equipment. This achieves the goal of sending concurrent IP address requests from optical network devices to different servers for IP address allocation by deploying a single DHCP relay device. This reduces the network structure complexity of IP address allocation and improves the efficiency of IP address requests from optical network devices.

[0045] The system for allocating user equipment IP addresses provided in the embodiments of this application will be introduced first below.

[0046] Figure 1 This diagram illustrates the structure of a user equipment IP address allocation system 100 according to an embodiment of this 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 connect to multiple user equipments 101 and receive DHCP request messages sent by the user equipments. All optical network devices 102 are connected to a cloud gateway 103, and forward the DHCP request messages received from the user equipments to the cloud gateway 103. The cloud gateway 103 is connected to a DHCP relay device 104, acting as an intermediary between the user equipments and the DHCP relay device. It receives DHCP requests from the optical network devices and forwards them to the DHCP relay device. When the DHCP relay device sends a DHCP reply message, it receives and forwards it 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 carrying the IP addresses of the user equipments sent by the DHCP servers.

[0048] The method for allocating user equipment IP addresses provided in the embodiments of this application is described below.

[0049] Figure 2 A flowchart illustrating a method for allocating user equipment IP addresses according to an embodiment of this application is shown. Figure 2 As shown, the method may include the following steps: S201 to S207.

[0050] S201, when a virtual scalable local area network (VSDLAN) is established between the cloud gateway and the optical network device, 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 equipment (UE) connected to the optical network device and received by the optical network device. The DHCP request message includes the target VSDLAN identifier and the UE identifier.

[0051] Dynamic Host Configuration Protocol (DHCP) is a standard protocol defined by RFC 2131. This protocol allows servers to dynamically assign IP addresses and configuration information to clients. DHCP supports a client / server (C / S) architecture and uses User Datagram Protocol (UDP) as its transport protocol.

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

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

[0054] In some embodiments, an Option field can be added to the DHCP request message. The Option field stores the target virtual scalable local area network identifier and user equipment identifier information. The Option field in the DHCP message can be used to store control information and parameters that are not defined in ordinary protocols.

[0055] By including the target VLAN identifier and user equipment identifier in the DHCP request message, user equipment can be accurately identified and located in the network, thereby enabling effective IP address allocation.

[0056] S202, the cloud gateway converts the target VLAN identifier into the target QINQ identifier based on the correspondence between the VLAN identifier and the dual-label QINQ identifier, and encapsulates the target QINQ identifier in the DHCP request message.

[0057] The QinQ identifier is implemented by adding an 802.1Q label on top 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, such as the inner label representing the user and carrying user-related information, and the inner label identifying the operator's network.

[0058] In some embodiments, a mapping table between Virtual Scalable Local Area Network (VPN) identifiers and QinQ identifiers is set up, and the target VPN identifier is converted into a QinQ identifier according to the mapping relationship.

[0059] S203, the cloud gateway sends a DHCP request message to the DHCP relay device, which encapsulates the target QINQ identifier and the user equipment identifier.

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

[0061] S204, the DHCP relay device receives a DHCP request message sent by the cloud gateway, which encapsulates the target QinQ identifier and the user equipment identifier, and determines the target DHCP server address corresponding to the target QinQ identifier based on the mapping relationship 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 DHCPSnooping 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 the target DHCP server corresponding to the target DHCP server address, so that the DHCP server can allocate an IP address to the user equipment corresponding to the user equipment identifier based on the DHCP request message.

[0064] In some embodiments, before assigning an IP address, the DHCP server queries the recorded mapping between user equipment identifiers and assigned IP addresses to prevent IP address allocation conflicts or reserve specific IP addresses for specific devices. After assigning an IP address, the DHCP server records the user equipment and the IP address assigned to that user equipment.

[0065] In some embodiments, each DHCP server corresponds to an optical network device, and each DHCP server has a preset IP address pool. When it receives a DHCP request sent by a user device connected to the optical network device, the DHCP server selects an unassigned IP address from the preset IP address pool and assigns it to the user device.

[0066] S206, the DHCP relay device receives the 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 user equipment's IP address.

[0067] In some embodiments, when a DHCP relay device receives a DHCP reply message sent by a DHCP server, it resolves the QinQ identifier based on the relationship between the DHCP server address that sent the reply message and the QinQ identifier, and encapsulates it 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 can send the DHCP reply message to the user equipment corresponding to the user equipment identifier. The DHCP reply message includes the target QinQ identifier, the user equipment identifier and the IP address of the user equipment.

[0069] In some embodiments, the cloud gateway receives a reply message from a DHCP relay device, obtains the virtual Scalable Local Area Network (VLAN) identifier of the optical network device to be sent based on the relationship between the QinQ identifier and the VLAN identifier, and forwards the DHCP reply message to the optical network device corresponding to the VLAN identifier.

[0070] This application provides a method for allocating user equipment (UE) IP addresses. After a virtual scalable local area network (VLAN) is established between a cloud gateway and an optical network device, the cloud gateway receives DHCP request messages forwarded by the optical network device from UEs. These DHCP request messages include a target VLAN identifier and a UE identifier. The cloud gateway centrally manages UE requests, simplifying the network architecture and improving management efficiency. The cloud gateway converts the target VLAN identifier into a target QinQ identifier and encapsulates this QinQ identifier within the DHCP request message before sending it to a DHCP relay device. Extending the target VLAN identifier with the QinQ identifier enhances network scalability and flexibility. Upon receiving the DHCP request message, the DHCP relay device generates a target DHCP server address based on the target QinQ identifier. This ensures that Dynamic Host Configuration Protocol (DHCP) lookup messages are sent to the correct DHCP server, improving communication accuracy and efficiency. The DHCP relay device then sends a DHCP request message encapsulating the UE identifier to the DHCP server corresponding to the target DHCP server address, requesting the DHCP server to allocate an IP address to the UE. The DHCP relay device receives the reply message containing the user equipment's IP address from the DHCP server and forwards it to the cloud gateway. The cloud gateway then forwards the reply message to the optical network device, which in turn forwards the DHCP reply message to the user equipment. This achieves the goal of sending concurrent IP address requests from optical network devices to different servers for IP address allocation by deploying a single DHCP relay device. This reduces the network structure complexity of IP address allocation and improves the efficiency of IP address requests from optical network devices.

[0071] In some embodiments, such as Figure 3 As shown, the 24-bit Virtual Scalable Local Area Network (VLAN) identifier is converted into a 24-bit QinQ identifier, which includes a 12-bit inner label and a 12-bit outer label. The 24-bit QinQ identifier is then converted into 24 bits of the DHCP server address host bits, which are combined with the preset 8-bit network bits to form the DHCP server address.

[0072] In some embodiments, such as 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, Receive a Virtual Scalable Local Area Network (VLAN) Tunnel Establishment Request sent by the optical network device. The VLAN Tunnel Establishment Request includes the target IP address of the optical network device and a preset VLAN identifier.

[0074] S402, establish a target virtual scalable local area network tunnel connected to the optical network device corresponding to the target IP address, and configure a preset virtual scalable local area network identifier for the established target virtual scalable local area network tunnel.

[0075] By establishing a virtual scalable LAN tunnel for each optical network device and assigning a different VNI, an isolated virtual network environment can be created, improving network security. Furthermore, establishing a virtual scalable LAN tunnel before DHCP requests ensures that DHCP messages are transmitted through the configured tunnel, thereby optimizing the DHCP processing flow.

[0076] In some embodiments, before establishing a target virtual scalable local area network tunnel connecting to an 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, ensuring that only authorized optical network devices can establish virtual scalable LAN tunnels and obtain IP addresses, thereby improving network security.

[0078] In some embodiments, before establishing a target virtual scalable local area network tunnel connecting the optical network device to the target IP address, the method may further include: the optical network device powering on its wide area network (WAN) port obtaining the target IP address of the optical network device from a broadband remote access server (BRAS) via a point-to-point protocol over Ethernet (PPPoE).

[0079] In some embodiments, the process of configuring a Virtual Scalable Local Area Network (VLAN) identifier may add identifier information to the beginning or end of the tunnel to ensure that the target VLAN can be correctly identified during tunnel transmission.

[0080] In some embodiments, the DHCP request message further includes the service provider identifier of the user equipment, and the QINQ identifier is an identifier with inner and outer labels. Based on the correspondence between the Virtual Scalable Local Area Network (VPN) identifier and the dual-labeled QINQ identifier, the target VPN identifier is converted into the target QINQ identifier. This method may include:

[0081] The target QinQ identifier is generated by using the target Virtual Scalable Local Area Network (VLAN) identifier as the inner label of the target QinQ identifier and the service provider identifier of the user equipment as the outer label of the target QinQ identifier.

[0082] The QINQ identifier consists of an inner and an outer layer, allowing more identification information to be carried in a single Ethernet frame. By generating the QINQ identifier, a unique identifier for the user equipment is determined, 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 to identify the service provider to which the user equipment belongs.

[0084] In some embodiments, the method may further include, before using the Virtual Extensible LAN identifier as an inner label of the QinQ identifier:

[0085] Perform a pointer offset operation on the Virtual Scalable Local Area Network (VLAN) identifier. Adjust the VLAN identifier according to the preset pointer offset to obtain the adjusted VLAN identifier. The adjusted VLAN identifier has the same bit width as the inner label of the QinQ identifier.

[0086] By offsetting the pointer and adjusting the bit width, the compatibility between the VLAN ID and the QinQ inner label can be ensured, avoiding problems caused by bit width mismatch. Furthermore, by offsetting and adjusting the pointer of the VLAN ID, the ID information can be precisely adjusted according to specific needs.

[0087] In one example, when the original bit width of the Virtual Scalable LAN identifier is 24 bits and the bit width of the inner label of the QinQ identifier is 12 bits, the Virtual Scalable LAN identifier is shifted 12 bits to the right to obtain the inner label of the QinQ identifier.

[0088] In some embodiments, the DHCP server address includes host bits and network bits. The method for determining the target DHCP server address corresponding to the target QinQ identifier based on the mapping between QinQ identifiers and DHCP server addresses may include:

[0089] The target DHCP server address is generated by using the target QinQ identifier as the host bit of the target DHCP server address and combining it with the network bit of the preset target DHCP server address.

[0090] By using the QinQ identifier directly as the host bit of the DHCP server address, it can be ensured that each QinQ identifier has a clearly 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 the network bit of the local area network in the preset area.

[0092] In one example, the target QinQ identifier is 10101010, and the network part of the preset target DHCP server address is 192.168.1. The target QinQ identifier is used as the host part of the target DHCP server address, and combined with the preset network part, the target DHCP server address is generated as 192.168.1.10101010.

[0093] Figure 5 This is a schematic diagram of a user equipment IP address allocation device 500 applied to a cloud gateway, as provided in an embodiment of this 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 a virtual scalable local area network is established between the cloud gateway and the optical network device. The DHCP request message is a request message sent by a user equipment connected to the optical network device and received by the optical network device. The DHCP request message includes the target virtual scalable local area network identifier and the user equipment identifier.

[0095] The conversion module 502 is used to convert the target Virtual Scalable Local Area Network (VLAN) identifier into the target QinQ identifier according to the correspondence between the VLAN identifier and the dual-label QinQ identifier, and to encapsulate the target QinQ identifier in the DHCP request message;

[0096] The sending module 503 is used to send 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 can 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, and send 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 can allocate 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 DHCP reply messages sent by the DHCP relay device. The DHCP reply message includes the target QINQ identifier, the user equipment identifier, and the IP address assigned to the user equipment. The reply message is a message sent by the target DHCP server to the DHCP relay device.

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

[0099] In some embodiments, the user equipment IP address allocation apparatus 500 may further include:

[0100] The receiving module 501 is also used to receive a Virtual Scalable Local Area Network (VLAN) tunnel establishment request sent by the optical network device before receiving the Dynamic Host Configuration Protocol (DHCP) request message sent by the optical network device. The VLAN tunnel establishment request includes the target IP address of the optical network device and a preset VLAN identifier.

[0101] The module is used to establish a target virtual scalable local area network (VSDLAN) tunnel that connects to the optical network device corresponding to the target IP address, and to configure a preset VSDLAN identifier for the established target VSDLAN tunnel.

[0102] In some embodiments, the DHCP request message also includes the service provider identifier of the user equipment. The QINQ identifier is an identifier with inner and outer labels. The conversion module 502 is further configured to use the target VLAN identifier as the inner label of the target QINQ identifier and the service provider identifier of the user equipment as the outer label of the target QINQ identifier to generate the target QINQ identifier.

[0103] In some embodiments, the user equipment IP address allocation apparatus 500 may further include an adjustment module, configured to perform a pointer offset operation on the virtual Scalable Local Area Network (VLAN) identifier before using the VLAN identifier as an inner label of the QINQ identifier, adjust the VLAN identifier according to a preset pointer offset amount, and obtain an adjusted VLAN identifier, wherein the adjusted VLAN identifier has the same bit width as the inner label of the QINQ identifier.

[0104] Figure 5 The various modules in the illustrated device can achieve Figure 2 The various steps involved, and the corresponding technical effects achieved, will not be elaborated upon here for the sake of brevity.

[0105] Figure 6 This is a schematic diagram of a user equipment IP address allocation device 600 provided in an embodiment of this application, applied to a DHCP relay device. (See attached diagram.) Figure 6 As shown, the device may include:

[0106] The receiving module 601 is used to receive a DHCP request message sent by the cloud gateway, which encapsulates the target QINQ identifier and the user equipment identifier.

[0107] The determining module 602 is used to determine the target DHCP server address corresponding to the target QinQ identifier based on 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 the target DHCP server corresponding to the target DHCP server address, so that the DHCP server can allocate 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 DHCP reply messages sent by the target DHCP server. The DHCP reply message includes the target DHCP server address, the user equipment identifier, and the IP address assigned to the user equipment.

[0110] Correspondingly, the sending module is also used to send DHCP reply messages to the cloud gateway, so that the cloud gateway can send the DHCP reply messages to the user equipment corresponding to the user equipment identifier through the optical network device.

[0111] In some embodiments, the DHCP server address includes host bits and network bits. The determining 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 network bit of the preset target DHCP server address to generate the target DHCP server address.

[0112] Figure 6 The various modules in the illustrated device can achieve Figure 2 The various steps involved, and the corresponding technical effects achieved, will not be elaborated upon here for the sake of brevity.

[0113] Figure 7 A schematic diagram of the hardware structure of the terminal device provided in an embodiment of this 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), an application specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.

[0116] Memory 702 may include mass storage for data or instructions. For example, and not limitingly, memory 702 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. In one instance, memory 702 may include removable or non-removable (or fixed) media, or memory 702 may be non-volatile solid-state memory. Memory 702 may be internal or external to the integrated gateway disaster recovery device.

[0117] In one example, memory 702 may include read-only memory (ROM), random access memory (RAM), disk storage media device, optical storage media device, flash memory device, electrical, optical, or other physical / tangible memory storage device. Therefore, typically, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) 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 of user equipment IP address allocation according to this disclosure.

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

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

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

[0121] Bus 704 includes hardware, software, or both, that couples components of an end device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 704 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, this application contemplates any suitable bus or interconnect.

[0122] Furthermore, in conjunction with the user equipment IP address allocation method in the above embodiments, this application embodiment can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any of the user equipment IP address allocation methods in the above embodiments.

[0123] This application also provides a computer program product, including a computer program, which, when executed, implements any of the user equipment IP address allocation methods described in the above embodiments.

[0124] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.

[0125] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or text segments used to perform the required tasks. Programs or text segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "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 (ROM), flash memory, erasable read-only memory (EROM), floppy disks, compact disc read-only memory (CD-ROM), optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Text segments can be downloaded via computer networks such as the Internet, intranets, etc.

[0126] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. 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 embodiments, or in a different order, or several steps can be performed simultaneously.

[0127] The aspects of this disclosure have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, 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 apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. 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 is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by special-purpose hardware performing the specified functions or actions, or can be implemented by a combination of special-purpose hardware and computer instructions.

[0128] The above description is merely a specific implementation of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.

Claims

1. A method for allocating IP addresses for user equipment, characterized in that, Applied to cloud gateways, the method includes: When a virtual scalable local area network is established between a cloud gateway and an optical network device, a Dynamic Host Configuration Protocol (DHCP) request message is received from the optical network device. The DHCP request message is a request message sent by a user equipment connected to the optical network device and received by the optical network device. The DHCP request message includes a target virtual scalable local area network identifier and a user equipment identifier. Based on the correspondence between the Virtual Scalable Local Area Network (VLAN) identifier and the Double Label QinQ identifier, the target VLAN identifier is converted into the target QinQ identifier, and the target QinQ identifier is encapsulated in the DHCP request message. A DHCP request message encapsulating the target QinQ identifier and the user equipment identifier is sent to the DHCP relay device. The DHCP relay device determines the target DHCP server address corresponding to the target QinQ identifier based on 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. The DHCP server then allocates a network protocol IP address to the user equipment corresponding to the user equipment identifier based on the DHCP request message. The device receives a DHCP reply message sent by the DHCP relay device. The DHCP reply message includes the target QinQ identifier, the user equipment identifier, and the IP address assigned to the user equipment. The reply message is a message sent by the target DHCP server to the DHCP relay device. The optical network device sends the DHCP reply message to the user equipment corresponding to the user equipment identifier.

2. The method for allocating user equipment IP addresses 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: Receive a Virtual Scalable Local Area Network (VLAN) tunnel establishment request sent by an optical network device, wherein the VLAN tunnel establishment request includes the target IP address of the optical network device and a preset VLAN identifier; Establish a target virtual scalable local area network tunnel connected to the optical network device corresponding to the target IP address, and configure a preset virtual scalable local area network identifier to the established target virtual scalable local area network tunnel.

3. The method for allocating user equipment IP addresses according to claim 1, characterized in that, The DHCP request message also includes the service provider identifier of the user equipment. The QinQ identifier is an identifier with inner and outer tags. The step of converting the target VLAN identifier into a target QinQ identifier according to the correspondence between the VLAN identifier and the dual-tag QinQ identifier includes: The target QinQ identifier is generated by using the target Virtual Scalable Local Area Network (VLAN) identifier as the inner label of the target QinQ identifier and the service provider identifier of the user equipment as the outer label of the target QinQ identifier.

4. The method for allocating user equipment IP addresses according to claim 3, characterized in that, Before using the Virtual Scalable LAN identifier as an inner label of the QinQ identifier, the method further includes: A pointer offset operation is performed on the virtual Scalable Local Area Network (VLAN) identifier. The VLAN identifier is adjusted according to a preset pointer offset amount to obtain an adjusted VLAN identifier. The adjusted VLAN identifier has the same bit width as the inner tag of the QinQ identifier.

5. A method for allocating IP addresses for user equipment, characterized in that, Applied to DHCP relay devices, the method includes: Receive a DHCP request message sent by the cloud gateway, which encapsulates the target QinQ identifier and the user equipment identifier; Based on the mapping between QinQ identifiers and DHCP server addresses, determine the target DHCP server address corresponding to the target QinQ identifier; Send a DHCP request message encapsulating the user equipment identifier to the target DHCP server corresponding to the target DHCP server address, so that the DHCP server can allocate an IP address to the user equipment corresponding to the user equipment identifier based on the DHCP request message; Receive a DHCP reply message sent by the target DHCP server, the DHCP reply message including the target DHCP server address, user equipment identifier and IP address assigned to the user equipment; The cloud gateway sends the DHCP reply message to the user equipment corresponding to the user equipment identifier via the optical network device.

6. The method for allocating user equipment IP addresses according to claim 5, characterized in that, The DHCP server address includes host bits and network bits. Determining the target DHCP server address corresponding to the target QinQ identifier based on the mapping between QinQ identifiers and DHCP server addresses includes: The target DHCP server address is generated by using the target QinQ identifier as the host bit of the target DHCP server address and combining it with the network bit of the preset target DHCP server address.

7. An apparatus for allocating IP addresses for user equipment, characterized in that, The device, applied to a cloud gateway, includes: The receiving module is used to receive a Dynamic Host Configuration Protocol (DHCP) request message sent by the optical network device when a virtual scalable local area network is established between the cloud gateway and the optical network device. The DHCP request message is a request message sent by a user equipment connected to the optical network device and received by the optical network device. The DHCP request message includes a target virtual scalable local area network identifier and a user equipment identifier. The conversion module is used to convert the target Virtual Scalable Local Area Network (VPN) identifier into a target QinQ identifier according to the correspondence between VPN identifiers and dual-label QinQ identifiers, and to encapsulate the target QinQ identifier in a DHCP request message; The sending module is configured to send 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 can 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, and send 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 can allocate 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 also used to receive a DHCP reply message sent by the DHCP relay device. The DHCP reply message includes the target QinQ identifier, the user equipment identifier, and the IP address assigned to the user equipment. The reply message is a message sent by the target DHCP server to the DHCP relay device. The sending module is also configured to send the DHCP reply message to the optical network device, so that the optical network device can send the DHCP reply message to the user equipment corresponding to the user equipment identifier.

8. An apparatus for allocating IP addresses for user equipment, characterized in that, Applied to DHCP relay equipment, the device includes: The receiving module is used to receive DHCP request messages sent by the cloud gateway, which encapsulate the target QinQ identifier and the user equipment identifier. The determination module is used to determine the target DHCP server address corresponding to the target QinQ identifier based on the correspondence between the QinQ identifier and the DHCP server address. The sending module is used to send a DHCP request message encapsulating the user equipment identifier to the target DHCP server corresponding to the target DHCP server address, so that the DHCP server can allocate 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, the DHCP reply message including the target DHCP server address, user equipment identifier and IP address assigned to the user equipment; The sending module is also used to send the DHCP reply message to the cloud gateway, so that the cloud gateway can send 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 includes: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, it implements the user equipment IP address allocation method as described in any one of claims 1-6.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions, which, when executed by a processor, implement the user equipment IP address allocation method as described in any one of claims 1-6.

11. A computer program product, characterized in that, When the instructions in the computer program product are executed by the processor of the electronic device, the electronic device performs the user equipment IP address allocation method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • IP address distribution method and apparatus

    CN105763671A

  • Dynamic IP address allocation method and device

    CN108063837A