Address allocation method, electronic device, storage medium and program product
By encapsulating the user group identification and total number in messages in the broadband network core architecture, the problem of random user address allocation caused by CP devices not being assigned is solved, and continuous address allocation and routing efficiency are improved.
Patent Information
- Application Number
- CN202411397951.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-08
- Publication Date
- 2025-01-10
AI Technical Summary
In the broadband network core architecture, CP devices do not assign addresses, but instead ask for addresses from the DHCP server, resulting in random allocation of user addresses to different UP devices, which is not conducive to routing aggregation and increases routing learning volume.
By encapsulating the user group identification and total user group number of UP devices corresponding to the client device in a message and uploading it to the network configuration server, it can sense user information and divide the network address based on the total number of user groups and the identification to ensure that the address is continuous Distribution within the segment.
It realizes continuous allocation of user addresses, improves routing efficiency and aggregation effect, and reduces the amount of routing learning.
Smart Images

Figure CN119299427A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to an address allocation method, an electronic device, a storage medium, and a program product. Background Art
[0002] One of the key technologies of broadband network core (BNC) architecture is the separation of control plane (CP) and user plane (UP), which combines the CP function of traditional broadband network gateway (BNG) with other functions required by broadband networks to form a comprehensive broadband network core network. The functions required by broadband networks, such as authentication, authorization and counting (AAA) and dynamic host configuration protocol (DHCP), can be implemented in BNC.
[0003] When address allocation is performed on the basis of separation of CP and UP, there is a situation that the CP device does not allocate addresses, but requests addresses from the DHCP server and then issues them to users. In this case, the CP device will select one of the UP devices to carry the user according to the load of each UP device. The selection result has a certain randomness, and the DHCP server has no perception of this process. Therefore, the DHCP server may randomly allocate the entire segment of user addresses to different UP devices, which is not conducive to route aggregation and will also generate a huge amount of route learning for other routers. Summary of the invention
[0004] The present application provides an address allocation method, an electronic device, a storage medium and a program product, which can make the network addresses allocated to UP devices distributed in continuous address segments, which is conducive to routing aggregation and improves routing efficiency.
[0005] In a first aspect, the present application provides an address allocation method, which is applied to a CP device in a broadband access system, wherein the CP device controls M UP devices, each UP device including multiple first user groups; the method includes: in response to receiving a network address acquisition request from a first client device, sending a first request message to a network configuration server through a first target user group of the first UP device; wherein the first target user group is any one of the multiple first user groups included in the first UP device; the first request message includes the total number of first user groups included in the M UP devices and an identifier of the first target user group; the first request message is used to request the network configuration server to divide the network address based on the total number of first user groups included in the M UP devices, and allocate a network address to the first client device based on the identifier of the first target user group; receiving a first response message sent by the network configuration server, and sending the first response message to the first client device through the first UP device; the first response message includes the network address allocated to the first client device by the network configuration server.
[0006] The address allocation method provided in the present application has at least the following beneficial effects: the first user group identifier and the total number of the first user groups of the UP device corresponding to the client device can be encapsulated in a message and uploaded to the network configuration server, so that the network configuration server can perceive the information of the user plane, and then divide the network address based on the total number of the first user group and allocate the network address to the first client device based on the identifier of the first target user group. In this way, the network configuration server can pre-divide the network address for the first user group of the UP device, so that the first user group of the UP device forms a binding relationship with the address segment in the address pool of the network configuration server. Since the user group identifiers in the same device are continuous, the network addresses allocated to the client devices of different user groups under the UP device based on the binding relationship are also distributed in the continuous address segments, which is conducive to routing aggregation and improves routing efficiency.
[0007] In a possible implementation manner, the multiple first user groups included in the M UP devices are numbered sequentially, and the number is used as an identifier of each first user group.
[0008] In another possible implementation, the first request message is a Dynamic Host Configuration Protocol DHCP message, and the number of M×N first user groups included in the M UP devices and the identifier of the first target user group are encapsulated in a relay agent information option field of the DHCP message.
[0009] In another possible implementation, the user group on the UP device adds multiple second user groups on the basis of the original first user group; the multiple second user groups are sequentially numbered on the basis of the original first user group, and the number is used as the identifier of each second user group; the method also includes: in response to receiving a network address acquisition request from the second client device, sending a second request message to the network configuration server through the second target user group of the second UP device; wherein the target second user group is any one of the multiple first user groups included in the second UP device, or the target second user group is any one of the multiple second user groups included in the second UP device; the second request message includes the total number of the first user groups and the second user groups included in the M UP devices, and the identifier of the second target user group; the second request message is used to request the network configuration server to additionally divide multiple network addresses based on the total number of the first user group and the second user group, and allocate a network address to the second client device based on the identifier of the second target user group; receiving a second response message sent by the network configuration server, and sending the second response message to the second client device through the second UP device; the second response message includes the network address allocated by the network configuration server to the second client device.
[0010] Among them, the first client device and the second client device can be different client devices or the same client device. For example, the first request message is a request message sent by client device A when it goes online for the first time, and the second request message is a request message sent by client device A when it goes online for the second time; the second UP device and the first UP device can be different UP devices or the same UP device, and the embodiment of the present application does not limit this.
[0011] In another possible implementation, the multiple second user groups newly added by the M UP devices are numbered sequentially based on the original first user groups, and the number is used as an identifier of each second user group.
[0012] In a second aspect, the present application provides another address allocation method, which is applied to a network configuration server, and the method includes: receiving a first request message sent by a CP device, the first request message including the total number of multiple first user groups included in M UP devices controlled by the CP device and an identifier of a first target user group; the first target user group is a user group assigned by the CP device to a first client device; dividing the network address based on the total number of the first user groups included in the M UP devices; based on the identifier of the first target user group, allocating a network address to the first client device from the divided network addresses; sending a first response message to the CP device, the first response message including the network address allocated to the first client device by the network configuration server.
[0013] The address allocation method provided in the present application enables the network configuration server to perceive user plane information, and then divide the network address based on the total number of the first user group and allocate the network address to the first client device based on the identifier of the first target user group. In this way, the network configuration server can pre-divide the network address for the first user group of the UP device, so that the first user group of the UP device forms a binding relationship with the address segment in the address pool of the network configuration server. Since the user group identifiers in the same device are continuous, the network addresses allocated to the client devices of different user groups under the UP device based on the binding relationship are also distributed in the continuous address segments, which is conducive to routing aggregation and improves routing efficiency.
[0014] A possible implementation method includes receiving a second request message sent by a CP device, where the second request message includes the total number of multiple first user groups and multiple second user groups included in M UP devices, and an identifier of a second target user group; the second target user group is a user group assigned to a second client device by the CP device; the second user group is a user group added by the UP device on the basis of the first user group; multiple network addresses are additionally divided based on the number of multiple second user groups; a network address is assigned to the second client device based on the identifier of the second target user group; and a second response message is sent to the CP device, where the second response message includes the network address assigned to the second client device by a network configuration server.
[0015] In a third aspect, the present application provides an address allocation device, comprising: a processing module, used to send a first request message to a network configuration server through a first target user group of a first UP device in response to receiving a network address acquisition request from a first client device; wherein the first request message includes the total number of first user groups included in the M UP devices and an identifier of the first target user group; the first request message is used to request the network configuration server to divide the network address based on the total number of first user groups included in the M UP devices, and allocate a network address to the first client device based on the identifier of the first target user group; a communication module, used to receive a first response message sent by the network configuration server, and send the first response message to the first client device through the first UP device; the first response message includes the network address allocated by the network configuration server to the first client device.
[0016] In a possible implementation manner, the multiple first user groups included in the M UP devices are numbered sequentially, and the number is used as an identifier of each first user group.
[0017] In another possible implementation, the first request message is a Dynamic Host Configuration Protocol DHCP message, and the number of M×N first user groups included in the M UP devices and the identifier of the first target user group are encapsulated in a relay agent information option field of the DHCP message.
[0018] In another possible implementation, the user group on the UP device adds multiple second user groups on the basis of the original first user group; the multiple second user groups are numbered sequentially on the basis of the original first user group, and the number is used as the identifier of each second user group; the method also includes: a processing module, which is also used to respond to receiving a network address acquisition request from a second client device, and send a second request message to the network configuration server through the second target user group of the second UP device; wherein the second request message includes the total number of the first user groups and the second user groups included in the M UP devices, and the identifier of the second target user group; the second request message is used to request the network configuration server to additionally divide multiple network addresses based on the total number of the first user group and the second user group, and allocate a network address to the second client device based on the identifier of the second target user group; the communication module is also used to receive a second response message sent by the network configuration server, and send the second response message to the second client device through the second UP device; the second response message includes the network address allocated by the network configuration server to the second client device.
[0019] In another possible implementation, the multiple second user groups newly added by the M UP devices are numbered sequentially based on the original first user groups, and the number is used as an identifier of each second user group.
[0020] In a fourth aspect, the present application provides another address allocation device, including: a communication module, used to receive a first request message sent by a CP device, the first request message including the total number of multiple first user groups included in M UP devices controlled by the CP device and an identifier of a first target user group; the first target user group is a user group allocated by the CP device to the first client device; an allocation module, used to divide network addresses based on the total number of first user groups included in the M UP devices; based on the identifier of the first target user group, allocate a network address to the first client device from the divided network addresses; the communication module is also used to send a first response message to the CP device, the first response message including the network address allocated by the network configuration server to the first client device.
[0021] In a possible implementation manner, the communication module is further used to receive a second request message sent by the CP device, where the second request message includes the total number of multiple first user groups and multiple second user groups included in the M UP devices, and the identifier of the second target user group; the second target user group is a user group assigned to the second client device by the CP device; the second user group is a user group added by the UP device on the basis of the first user group; the allocation module is further used to additionally divide multiple network addresses based on the number of multiple second user groups; based on the identifier of the second target user group, the network address is allocated to the second client device; the communication module is further used to send a second response message to the CP device, where the second response message includes the network address allocated to the second client device by the network configuration server.
[0022] In a fifth aspect, the present application provides an electronic device, comprising: a processor and a memory; the memory stores instructions executable by the processor; when the processor is configured to execute the instructions, the electronic device implements the method of the first aspect or the second aspect above.
[0023] In a sixth aspect, the present application provides a computer-readable storage medium, which includes: computer software instructions; when the computer software instructions are executed in an electronic device, the electronic device implements the method of the first aspect or the second aspect mentioned above.
[0024] In a seventh aspect, the present application provides a computer program product, which includes a computer program; when the computer program runs in an electronic device, the electronic device implements the method of the first aspect or the second aspect above.
[0025] The beneficial effects of the third to seventh aspects mentioned above refer to the corresponding description of the first or second aspect and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 A schematic diagram of an application environment of an address allocation method provided in this application;
[0027] Figure 2 A flowchart of an address allocation method provided in this application;
[0028] Figure 3 A user group grouping diagram provided for this application;
[0029] Figure 4 A schematic diagram of a message encapsulation format provided for this application;
[0030] Figure 5 A flowchart of another address allocation method provided by this application;
[0031] Figure 6 A flowchart of another address allocation method provided by the present application;
[0032] Figure 7 A flowchart of another address allocation method provided by the present application;
[0033] Figure 8 A schematic diagram of a specific implementation process of an address allocation method provided in this application;
[0034] Fig. 9 A schematic diagram of a specific implementation process of another address allocation method provided in this application;
[0035] Fig.10A schematic diagram of an address allocation application scenario provided for this application;
[0036] Fig.11 A schematic diagram of another address allocation application scenario provided for this application;
[0037] Fig.12 A schematic diagram of the composition of an address allocation device provided in this application;
[0038] Fig.13 A schematic diagram of another address allocation device provided by the present application;
[0039] Fig.14 A schematic diagram of the structure of an electronic device provided in this application. DETAILED DESCRIPTION
[0040] The address allocation method provided in this application will be described in detail below with reference to the accompanying drawings.
[0041] The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0042] The terms "first" and "second" and the like in the specification and drawings of this application are used to distinguish different objects, or to distinguish different processing of the same object, rather than to describe a specific order of objects.
[0043] In addition, the terms "including" and "having" and any variations thereof mentioned in the description of the present application are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include other steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.
[0044] It should be noted that, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0045] In order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second", etc. are used to distinguish the same items or similar items with basically the same functions and effects. Those skilled in the art can understand that the words "first", "second", etc. are not limiting the quantity and execution order.
[0046] In the description of the present application, unless otherwise specified, “plurality” means two or more.
[0047] As described in the background technology, in the BNC architecture, CP and UP are separated. When address allocation is performed on this basis, the user end will send a request message to the UP device after startup, and then the UP device will upload the request message to the CP device, which will authenticate and allocate addresses after authentication. During the address allocation process, the CP device can manage the address pool and centrally allocate all address requests; or the DHCP server can manage the address pool and allocate addresses. In this case, the CP device needs to request addresses from the DHCP server and then issue them to the user.
[0048] In the scenario where the DHCP server manages the address pool and allocates addresses, the CP device will select one of the UP devices to carry the user according to the load of each UP device. This selection has a certain degree of randomness, and the DHCP server has no perception of this process. Therefore, the DHCP server may randomly allocate the entire segment of user addresses to different UP devices. The user addresses allocated to the same UP device are scattered and disordered, which is not conducive to route aggregation. Therefore, the UP device can only publish 32-bit host routes, and it will also generate a huge amount of route learning for other routers.
[0049] In response to the above technical problems, the present application provides an address allocation method, the idea of which is that: the first user group identifier of the UP device corresponding to the client device and the total number of the first user groups can be encapsulated in a message and uploaded to the network configuration server, so that the network configuration server can perceive the information of the user plane, and then divide the network address based on the total number of the first user group and allocate the network address to the first client device based on the identifier of the first target user group. In this way, the network configuration server can pre-divide the network address for the first user group of the UP device, so that the first user group of the UP device forms a binding relationship with the address block in the address pool of the network configuration server. Since the user group identifiers in the same device are continuous, the network addresses allocated to the client devices of different user groups under the UP device based on the binding relationship are also distributed in continuous address segments, which is conducive to routing aggregation and improves routing efficiency.
[0050] It should be understood that in a broadband access network, a user group is a logical classification concept. A user group may include one or more client devices. The user group manages and organizes the client devices in the group in a unified manner to better allocate network resources.
[0051] The embodiments provided in this application are described in detail below in conjunction with the accompanying drawings.
[0052] The address allocation method provided in this application can be applied to Figure 1 In the application environment shown. Figure 1 As shown, the application environment includes: a client device 101, a UP device 102, a CP device 103 and a network configuration server 104. The client device 101 and the UP device 102 are connected to each other, the UP device 102 and the CP device 103 are connected to each other, and the CP device 103 and the network configuration server 104 are connected to each other.
[0053] In some embodiments, the client device 101 may be a device that provides broadband Internet access services to users. The access method of the client device 101 is IP access based on Ethernet (Internet Protocol Over Ethernet, IP OE), which allows the terminal device to directly connect to the Internet Service Provider (Internet Service Provider, ISP) through the Ethernet interface, and the terminal device can access the Internet without additional authentication steps after connecting to the network.
[0054] Exemplarily, the client device 101 may be an optical modem, a modem, a fiber optic modem, a home gateway, a wireless router, a network attached storage (NAS) device, a voice over internet protocol (VoIP) terminal, a set-top box (STB), etc. The embodiment of the present application does not limit the specific device form of the client device 101.
[0055] In some embodiments, the UP device 102 may be a network device responsible for forwarding and processing user data.
[0056] Exemplarily, the UP device may be a router, a switch, an access point (AP), a multi-service switch, a load balancer, an edge computing device, etc. The embodiment of the present application does not limit the specific device form of the UP device 102.
[0057] In some embodiments, the CP device 103 may be a device responsible for management and control decisions. Exemplarily, the CP device has functions such as user authentication, address allocation, routing decision, and policy execution.
[0058] Exemplarily, the CP device may be a router, a switch, a gateway, an authentication, authorization, and accounting server (AAA Server), an access controller, etc. The present application does not limit the specific device form of the CP server 103 .
[0059] In some embodiments, the UP device 102 and the CP device 103 can be integrated into one device, which implements the separation of CP functions and UP functions through network functions virtualization (NFV). The device can be a broadband remote access server (BRAS), a broadband access server (BAS), etc.
[0060] In some embodiments, the network configuration server 104 may be a device responsible for automatically allocating and managing network addresses and other network configuration information.
[0061] Exemplarily, the network configuration server 104 may be a DHCP server.
[0062] Exemplarily, the network configuration server 104 may be a server cluster composed of multiple servers, or a single server, or a computer, or a processor or processing chip in a server or computer, etc. The embodiment of the present application does not limit the specific device form of the network configuration server. Figure 1 In the figure, a single server is used as the network configuration server as an example.
[0063] In some embodiments, the network configuration server 104 may also be a device that integrates network address allocation and management functions, such as a router or switch that integrates network address allocation and management functions.
[0064] In some embodiments, the application environment of the present application includes at least one UP device 102 and at least one client device 101 connected to the UP device. The present application does not limit the number of client devices 101 and UP devices 102. Figure 1 A UP device and a client device connected thereto are used as an example.
[0065] In some embodiments, the client device 101 sends a network address acquisition request to the UP device 102; the UP device 102 sends the network address acquisition request to the CP device 103; the CP device 103 responds to the received network address acquisition request and sends a first request message to the network configuration server 104 through the first target user group of the UP device 102; wherein the first request message includes the total number of first user groups included in the M UP devices 102 and the identifier of the first target user group; the first request message is used to request the network configuration server 104 to allocate a network address; after receiving the first request message, the network configuration server 104 divides the network address based on the total number of first user groups included in the M UP devices 102, allocates a network address to the client device 101 based on the identifier of the first target user group and encapsulates a first response message and sends it to the CP device 103; wherein the first response message includes the network address allocated by the network configuration server to the first client device; the CP device 103 sends the first response message to the UP device 102; the UP device 102 sends the first response message to the client device 101.
[0066] It should be noted that the system architecture described in the embodiments of the present application is for more clearly illustrating the technical solutions of the embodiments of the present application, and does not constitute a limitation on the technical solutions provided in the embodiments of the present application. A person of ordinary skill in the art can know that with the evolution of the system architecture, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0067] See also Figure 2 , is a flow chart of an address allocation method provided in an embodiment of the present application. Figure 2 As shown, the address allocation method provided by this application can be implemented as follows Figure 1 The CP device shown is implemented, and the CP device controls M UP devices. Exemplarily, the address allocation method includes the following steps S201-S202.
[0068] S201: In response to receiving a network address acquisition request from a first client device, sending a first request message to a network configuration server through a first target user group of a first UP device.
[0069] The first target user group is any one of the multiple first user groups included in the first UP device, and the first request message includes the total number of first user groups included in the M UP devices and the identifier of the first target user group. The first request message is used to request the network configuration server to divide the network address based on the total number of first user groups included in the M UP devices, and to allocate a network address to the first client device based on the identifier of the first target user group.
[0070] In some embodiments, the CP device allocates the same number of virtual media access control (MAC) addresses to each UP device, and this number is recorded as N. Each virtual MAC address corresponds to a user group, that is, the number of user groups on each UP device should be consistent. For example, each UP device includes M first user groups, and the UP devices controlled by the CP device include M×N first user groups.
[0071] In some embodiments, the network address acquisition request is sent by the client device to all UP devices in the network by broadcasting to find an available network configuration server in the network to request configuration information such as the network address. The network address acquisition request can be in the form of a message, for example, a network address request message.
[0072] Exemplarily, the network address acquisition request can be a DHCP Discover message. In the DHCP Discover message, the source MAC address is the MAC address of the client device, the destination MAC address is the broadcast address of the Ethernet, the source IP address is blank, indicating that the client is not assigned a valid IP address, and the destination IP address is the broadcast address of the IP layer.
[0073] In some embodiments, the first request message is obtained based on a network address acquisition request.
[0074] Exemplarily, step S201 can be implemented as the following steps a1-a3.
[0075] Step a1: In response to a network address acquisition request, assign a first target user group of a first UP device to a first client device.
[0076] In some embodiments, the CP device numbers all user groups consecutively, and the user group numbers on the same UP device should be consecutive. After receiving the first request message sent by the first client device through the UP device, the CP device selects a user group of a suitable UP device for user carrying, for example, assigning the first target user group of the first UP device to the first client device.
[0077] As a possible implementation manner, the CP device selects a user group to carry users, and may select a suitable user group to carry users according to the load conditions of each UP device.
[0078] As another possible implementation manner, the CP device performs a hash operation according to the source MAC address of the client device, and assigns a user group to the client device according to the result of the hash operation and an identifier of the user group.
[0079] Exemplarily, the source MAC address is hashed using a Secure Hash Algorithm 256-bit (SHA-256) algorithm to obtain a hash value of a fixed length, and the hash value is mapped to a certain user group according to certain rules. For example, the result of a modulus operation of the hash value on the total number of user groups can be used as a modulus value, and the obtained modulus value is matched with the user group identifier to determine the user group corresponding to the client device.
[0080] For example, Figure 3 As shown, the UP devices controlled by the CP device are deployed in a "3+1" manner. For example, assuming that there are 4 UP devices in total, the 4 UP devices can be marked as UP-1, UP-2, UP-3 and UP-4 respectively. The CP device allocates 8 virtual MAC addresses to each UP device. Then, there are 32 user groups in the UP pool controlled by the CP device. The CP device numbers these 32 user groups consecutively, with one virtual MAC address corresponding to one number. The user groups corresponding to the 8 virtual MAC addresses of UP-1 can be numbered 1-8, and the user groups corresponding to the 8 virtual MAC addresses of UP-2 can be numbered 9-16, and so on. The numbering of the 32 user groups is completed. After receiving the network address acquisition request sent by the client device through the UP device, the CP device selects the user group numbered 13 for user bearing and allocates the user group numbered 13 to the client device.
[0081] Step a2: Generate a first request message based on the network address acquisition request.
[0082] In some embodiments, the first request message is obtained by the CP server after repackaging the message based on the network address acquisition request. Exemplarily, the total number of first user groups included in the M UP devices and the identifier of the first target user group are encapsulated into the Option 82 field of the DHCP message relay agent information option (Option) based on the standard, such as Figure 4 As shown in the figure, the newly added Option 82 field consists of three fields: sub-option type, sub-option length and sub-option value. Among them, the sub-option type is 2 bytes long and the value of this field is defined as 9; the sub-option length is 2 bytes long and is used to indicate the length of the sub-option value; the sub-option value is 4 bytes long, the first 2 bytes are used to encapsulate the identifier of the first target user group, and the last two bytes are used to encapsulate the total number of the first user groups included in the M UP devices.
[0083] Exemplarily, when the identifier of the first target user group is 13 and the number of first user groups is 32, the sub-option field of Option is 0000 0000 0000 1001 0000 0000 0000 0100 0000 00000000 1101 000000000 0010 0000, which can be converted into hexadecimal as 00 09 00 04 000D 02 00.
[0084] Step a3: Send a first request message to the network configuration server through the first target user group of the first UP device.
[0085] S202: Receive a first response message sent by the network configuration server, and send the first response message to the first client device through the first UP device.
[0086] The first response message includes a network address allocated by the network configuration server to the first client device, and is sent in a unicast manner.
[0087] In some embodiments, the first response message may be a DHCP Offer message, which is used to respond to a DHCP Discover message and provide an IP address and related configuration information to the client device.
[0088] In some embodiments, in response to a received first request message (for example, received in the form of a broadcast), the network configuration server divides the network address according to the total number of the first user groups included in the M UP devices carried in the first request message, and allocates a network address to the first client device based on the identifier of the first target user group. Afterwards, the network configuration server encapsulates the IP address, subnet mask, default gateway, and other necessary network configuration information allocated to the first client device into a first response message and sends it to the CP device, and the CP device sends the message to the first client device through the UP device where the user group of the client device is located.
[0089] In some embodiments, after the above step S202, the method also includes: in response to receiving a network address confirmation request from the first client device, sending a network address confirmation request message to the network configuration server; receiving a response confirmation message sent by the network configuration server, and sending the response confirmation message to the first client device through the first UP device.
[0090] Exemplarily, the network address confirmation request may be a DHCP request (Request) message, used to select one of the received single or multiple DHCP Offers to make an address configuration request; the response confirmation message may be a DHCP confirmation (Acknowledge) message, used to confirm the allocation of the network address when the network address requested for configuration in the received DHCP Request message is available.
[0091] In some embodiments, the CP device can add multiple second user groups based on the original first user group according to actual needs. Since the newly added second user group is not bound to the network address in the network configuration server, the network configuration server can generate a second request message according to the received network address acquisition request of the second client device, so that the network configuration server allocates the network address for the newly added second user group. For example, Figure 5 As shown, after S202, the address allocation method provided in the embodiment of the present application may also include the following S203-S204:
[0092] S203: In response to receiving the network address acquisition request from the second client device, sending a second request message to the network configuration server through the second target user group of the second UP device.
[0093] After completing the initial address allocation work for the first client device, the user group on the UP device adds multiple second user groups based on the original first user group; the multiple second user groups are numbered sequentially based on the original multiple first user groups, and the number is used as the identification of each second user group.
[0094] The target second user group is any one of the multiple first user groups included in the second UP device, or the target second user group is any one of the multiple second user groups included in the second UP device; the second request message includes the total number of the first user groups and the second user groups included in the M UP devices, and the identifier of the second target user group. The second request message is used to request the network configuration server to divide multiple network addresses based on the total number of the first user groups and the second user groups, and to allocate a network address to the second client device based on the identifier of the second target user group.
[0095] It is understandable that the first client device and the second client device may be different client devices or the same client device. For example, when the first client device and the second client device are the same client device, the first request message is the request message sent by the client device A when it goes online for the first time, and the second request message is the request message sent by the client device A when it goes online for the second time; the second UP device and the first UP device may be different UP devices or the same UP device, and this embodiment of the application does not limit this.
[0096] In some embodiments, the network address acquisition request may be in the form of a message, for example, a network address request message.
[0097] Exemplarily, the network address acquisition request may be a DHCP Discover message, which is sent by the client device to all UP devices in the network through broadcasting.
[0098] In some embodiments, the second request message is obtained based on a network address acquisition request.
[0099] Exemplarily, step S202 may be implemented as the following steps b1-b3:
[0100] Step b1: In response to the network address acquisition request, assign the second target user group to the first client device.
[0101] In some embodiments, due to network expansion, the CP device allocates more virtual MAC addresses to each UP device, P user groups are added to each UP device, and M UP devices add M×P user groups. The CP device sequentially numbers multiple second user groups based on the original first user group, and one virtual MAC address corresponds to one number. After receiving the second request message sent by the second client device through the UP device, the CP device will select a user group of a suitable UP device for user carrying, for example, assigning the second target user group of the second UP device to the second client device.
[0102] Step b2: Generate a second request message based on the network address acquisition request.
[0103] In some embodiments, the total number of the first user group and the second user group included in the M UP devices and the identifier of the second target user group are encapsulated in the Option 82 field of the relay agent information option (Option) field of the DHCP message based on standard provisions.
[0104] Step b3: Send a second request message to the network configuration server through the second target user group of the second UP device.
[0105] S204: Receive a second response message sent by the network configuration server, and send the second response message to the second client device through the second UP device.
[0106] The second response message includes the network address allocated by the network configuration server to the second client device.
[0107] In some embodiments, the second response message may be a DHCP Offer message, which is used to respond to the broadcast DHCP Discover message and provide an IP address and related configuration information to the second client device.
[0108] See also Figure 6 , is a flow chart of another address allocation method provided in an embodiment of the present application. Figure 6 As shown, the address allocation method provided by this application can be implemented as follows Figure 1 The network configuration server shown in is implemented, specifically including the following steps S301 to S304.
[0109] S301: Receive a first request message sent by a CP device.
[0110] The first request message includes the total number of multiple first user groups included in the M UP devices controlled by the CP device and an identifier of the first target user group; the first target user group is the user group allocated by the CP device to the first client device.
[0111] In some embodiments, the first request message may be a DHCP Discover message, which is used to find an available DHCP server to request configuration information such as a network address, and is sent by the client device to all UP devices in the network through broadcasting.
[0112] S302: Divide the network addresses based on the total number of first user groups included in the M UP devices.
[0113] In some embodiments, the network configuration server maintains an address pool to be allocated to the client device, and the address pool contains one or more continuous network addresses, which belong to the private network address space and will not conflict with other devices on the Internet. In response to the first request message, the network configuration server can take out some addresses from the address pool, divide these addresses according to the total number of first user groups, so that each first user group can correspond to a segment of addresses in the address pool, and the addresses in the address pool corresponding to the first user group are continuous, and the first user group identifier can be used as the address index of the corresponding address segment, so that corresponding searches can be performed when the network address is subsequently allocated to the client device that carries the user based on the first user group.
[0114] Exemplarily, the address pool maintained by the network configuration server includes the network address segment 192.168.1.100-192.168.1.200. This segment of the network address is divided. The total number of first user groups is 4. The address segment 192.168.1.100-192.168.1.124 can be corresponded to the first user group with the first user group identifier being 1, the address segment 192.168.1.125-192.168.1.149 can be corresponded to the first user group with the first user group identifier being 2, the address segment 192.168.1.150-192.168.1.174 can be corresponded to the first user group with the first user group identifier being 3, and the address segment 192.168.1.175-192.168.1.200 can be corresponded to the first user group with the first user group identifier being 4, thereby realizing the division of the network address according to the total number of first user groups.
[0115] S303: Allocate a network address for the first client device from the divided network addresses based on the identifier of the first target user group.
[0116] In some embodiments, based on the identifier of the first target user group, an address segment corresponding to the first target user group is found from the network addresses in the address pool divided according to the total number of the first user group (for example, the index of the address segment is the same as the identifier of the first target user group), and an address is selected from the address segment and assigned to the first client device.
[0117] Exemplarily, the address pool maintained by the network configuration server includes the network address segment 192.168.1.100-192.168.1.200, the total number of first user groups is 4, the first target user group identifier is 3, and the address segment corresponding to the first user group with the first target user group identifier being 3 is 192.168.1.150-192.168.1.174, then the network address assigned to the first client device can be 192.168.1.168.
[0118] S304: Send a first response message to the CP device, where the first response message includes a network address allocated by the network configuration server to the first client device.
[0119] In some embodiments, the first response message may be a DHCP Offer message, which is used to respond to the DHCP Discover message, provide an IP address and related configuration information to the first client device, and is sent to the first client device via unicast.
[0120] In some embodiments, after step S304, the method further includes: receiving a network address confirmation request message sent by the CP device, and sending a response confirmation message to the CP device after confirmation.
[0121] Exemplarily, the network address confirmation request may be a DHCP Request message, used to select one of a single or multiple DHCP Offers received to make an address configuration request; the response confirmation message may be a DHCP Acknowledge message, used to confirm the allocation of the network address when the network address requested for configuration in the received DHCP Request message is available.
[0122] It should be understood that after allocating addresses, the network configuration server may further divide and allocate addresses based on the second request message when the number of user groups increases.
[0123] Therefore, if Figure 7 As shown, after S304, the embodiment of the present application provides an address allocation method, which also includes the following S305-S308.
[0124] S305: Receive a second request message sent by the CP device.
[0125] Among them, the second request message includes the total number of multiple first user groups and multiple second user groups included in the M UP devices, and the identifier of the second target user group; the second target user group is the user group assigned by the CP device to the second client device, and the second user group is the user group added by the UP device on the basis of the first user group.
[0126] In some embodiments, the second request message may be a DHCP Discover message, which is used to find an available DHCP server to request configuration information such as a network address, and is broadcasted by the client device to all UP devices in the network.
[0127] S306: Further divide a plurality of network addresses based on the number of the plurality of second user groups.
[0128] In some embodiments, the network configuration server maintains an address pool, which contains one or several continuous network addresses. Since some addresses in the address pool have been allocated to the first user group, the network configuration server can take out some addresses in the address pool that have not been allocated to the first user group, and divide this part of the addresses according to the total number of second user groups, so that each second user group can correspond to a segment of addresses in the address pool (that is, each second user group can form a binding relationship with a segment of addresses in the address pool). The second user group identifier can be used as an address index for the corresponding address segment, so that corresponding searches can be performed when network addresses are subsequently allocated to client devices that carry users based on the second user group.
[0129] S307: Allocate a network address for the second client device based on the identifier of the second target user group.
[0130] In some embodiments, when the second target user group is any one of the multiple first user groups included in the second UP device, the network address corresponding to the second target user group is determined based on the identifier of the second target user group from the network addresses allocated to the multiple first user groups by the network configuration server and assigned to the second client device.
[0131] In other embodiments, when the second target user group is any one of the multiple second user groups included in the second UP device, the network address corresponding to the second target user group is determined based on the identifier of the second target user group from the network addresses allocated for the multiple second user groups by the network configuration server and assigned to the second client device.
[0132] S308: Send a second response message to the CP device, where the second response message includes a network address allocated by the network configuration server to the second client device.
[0133] In some embodiments, the second response message may be a DHCP Offer message, which is used to respond to the DHCP Discover message, provide an IP address and related configuration information to the second client device, and is sent to the first client device via unicast.
[0134] The following is an introduction to the address allocation method of the present application embodiment with reference to a specific embodiment. The specific implementation process of the method is as follows: Figure 8 shown.
[0135] The address allocation method provided in the present application can form a collaborative control between the control plane CP device and the DHCP server based on the total number of user groups and user group identifiers and the address segments in the address pool. The collaborative control between the CP device and the DHCP server is completed based on message transmission, such as Figure 8 As shown, the address allocation method provided in this application can be implemented as the following steps:
[0136] S401: In response to receiving a network address acquisition request from a first client device, a CP device assigns a first target user group of a first UP device to the first client device.
[0137] S402: The CP device generates a first request message based on the network address acquisition request.
[0138] The first request message includes the total number of the multiple first user groups included in the M UP devices controlled by the CP device and the identifier of the first target user group.
[0139] In some embodiments, taking the network address acquisition request as a DHCP message as an example, the CP device first decapsulates the DHCP message, and then encapsulates the total number of first user groups included in the M UP devices and the identifier of the first target user group into the DHCP message to obtain a first request message.
[0140] S403: The CP device sends a first request message to the DHCP server. Correspondingly, the DHCP server receives the first request message sent by the CP device.
[0141] S404: The DHCP server divides the network address based on the total number of the first user group included in the M UP devices carried in the first request message.
[0142] Exemplarily, the specific description of step S404 may refer to the specific description of step S302 above, which will not be repeated here.
[0143] S405: The DHCP server allocates a network address to the first client device from the divided network addresses based on the identifier of the first target user group carried in the first request message.
[0144] Exemplarily, the specific description of step S405 may refer to the specific description of step S303 above, which will not be repeated here.
[0145] S406: The DHCP server sends a first response message to the CP device, and accordingly, the CP device receives the first response message sent by the DHCP server, wherein the first response message includes a network address allocated by the DHCP server to the first client device.
[0146] S407: The CP device sends a first response message to the first client device through the first UP device.
[0147] In some embodiments, the CP device can add multiple second user groups based on the original first user group according to actual needs. Since the newly added second user group is not bound to the network address in the network configuration server, when the second client device is assigned to the second user group for user bearing, a second request message can be generated according to the network address acquisition request of the second client device, so that the network configuration server allocates a network address for the newly added second user group. For example, Fig. 9 As shown, after S406, the address allocation method provided in the embodiment of the present application may further include the following steps:
[0148] S408: In response to receiving the network address acquisition request of the second client device, the CP device allocates the second target user group of the second UP device to the second client device.
[0149] S409: The CP device generates a second request message based on the network address acquisition request.
[0150] The second request message includes the total number of the multiple first user groups and the multiple second user groups included in the M UP devices controlled by the CP device, and the identifier of the second target user group.
[0151] In some embodiments, taking the network address acquisition request as a DHCP message as an example, the CP device first decapsulates the DHCP message, and then encapsulates the total number of multiple first user groups and multiple second user groups included in the M UP devices and the identifier of the second target user group into the DHCP message to obtain a second request message.
[0152] S410: The CP device sends a second request message to the DHCP server. Correspondingly, the DHCP server receives the second request message sent by the CP device.
[0153] S411: The DHCP server allocates a plurality of network addresses based on the total number of the first user group and the second user group included in the M UP devices carried in the second request message.
[0154] S412: The DHCP server allocates a network address to the second client device based on the identifier of the second target user group carried in the second request message.
[0155] S413: The DHCP server sends a second response message to the CP device, and accordingly, the CP device receives the second response message sent by the DHCP server, wherein the second response message includes the network address allocated by the DHCP server to the second client device.
[0156] S414: The CP device sends a second response message to the second client device through the second UP device.
[0157] The following describes the address allocation method of the embodiment of the present application in conjunction with specific application scenarios.
[0158] like Fig.10 As shown, this is an address allocation application scenario of an embodiment of the present application with an optical modem as a client device and a DHCP server as a network configuration server, such as Fig.10 As shown, the DHCP server is connected to the CP device, and the CP device controls four UP devices, namely UP-1, UP-2, UP-3 and UP-4. There are 8 first user groups on each UP device. There are a total of 32 user groups in this architecture that can carry users. Each first user group corresponds to a virtual MAC address assigned by the CP device. In the initial state, the optical modem can interact with each UP device.
[0159] For example, in Fig.10 The address allocation method implemented in the address allocation application scenario shown includes the following Sa1-Sa5.
[0160] Sa1. After the optical modem is turned on, it broadcasts a DHCP request message to all UP devices to find an available DHCP server to request configuration information such as the network address.
[0161] Sa2. After receiving the DHCP request message, each UP device sends the request message to the CP device.
[0162] Sa3, the CP device selects the first user group numbered 24 on the UP-3 device as the first target user group for user carrying according to the internal load balancing principle. Then, the CP device encapsulates the total number of the first user groups 32 and the first target user group identifier 24 in the sub option type field in the Option 82 field of the DHCP message and sends the encapsulated message to the DHCP server.
[0163] Sa4. After receiving the DHCP request information sent by the CP device, the DHCP server stores the total number of the first user groups 32 inside the server, takes out a large block address segment maintained inside the server according to the total number of the first user groups 32, divides it into 32 small segments, selects a suitable address in the address segment identified as 24 according to the first user group identifier 24, encapsulates the DHCP response message and sends it to the CP device.
[0164] Sa5 and CP devices send DHCP response messages to the optical modem through UP-3 devices.
[0165] like Fig.11 So, in Fig.10Based on the address allocation application scenario shown in the figure, the network capacity has been expanded. Each UP device has 8 new second user groups, and the total number of user groups has increased from 32 to 64. Fig.11 The address allocation application scenario shown in the figure, based on the aforementioned Sa1-Sa5, the expanded address allocation includes the following Sa6-Sa10:
[0166] Sa6. After the optical modem is turned on again, it broadcasts a DHCP request message to all UP devices.
[0167] Sa7. After receiving the DHCP request message, each UP device sends the request message to the CP device.
[0168] Sa8. The CP device selects the user group numbered 49 on the UP-3 device as the second target user group for user carrying according to the internal load balancing principle. Then, the CP device encapsulates the total number of the first user group and multiple second user groups 64 and the second target user group identifier 49 in the sub option type field in the Option 82 field of the DHCP message, and sends the encapsulated message to the DHCP server.
[0169] Sa9. After receiving the DHCP request information sent by the CP device again, the DHCP server compares it with the total number of the first user group 32 stored in the server, and finds that the total number of the first user group and the second user group 64 is different from the total number of user groups stored internally. A piece of the address segment that is not allocated to the first user group in the server is taken out, and it is divided into 32 small segments according to the total number of the second user group 32. According to the second target user group identifier 49, a suitable address is selected in the address segment identified as 49, and the DHCP response message is encapsulated and sent to the CP device.
[0170] Sa10 and CP devices send DHCP response messages to the optical modem through UP-3 devices.
[0171] The address allocation method provided in the present application can encapsulate the first user group identifier and the total number of the first user groups of the UP device corresponding to the client device in a message and upload it to the network configuration server, so that the network configuration server can perceive the information of the user plane, and then divide the network address based on the total number of the first user group and allocate the network address to the first client device based on the identifier of the first target user group. In this way, the network configuration server can pre-divide the network address for the first user group of the UP device, so that the first user group of the UP device forms a binding relationship with the address segment in the address pool of the network configuration server. Since the user group identifiers in the same device are continuous, the network addresses allocated to the client devices of different user groups under the UP device based on the binding relationship are also distributed in the continuous address segments, which is conducive to routing aggregation and improves routing efficiency.
[0172] It can be seen that the above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to achieve the above functions, the embodiment of the present application provides a hardware structure and / or software module corresponding to each function. It should be easily appreciated by those skilled in the art that, in combination with the modules and algorithm steps of each example described in the embodiment disclosed herein, the embodiment of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
[0173] The embodiment of the present application can divide the functional modules of the address allocation device according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. Optionally, the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0174] In some embodiments, the present application further provides an address allocation device, which may include one or more functional modules for implementing the address allocation method of the above method embodiment.
[0175] For example, Fig.12 FIG. 1 is a schematic diagram of a composition of an address allocation device 1200 provided in an embodiment of the present application. Fig.12 As shown, the address allocation device 1200 includes: a processing module 1201 and a communication module 1202 .
[0176] Processing module 1201 is used to send a first request message to the network configuration server through the first target user group of the first UP device in response to receiving a network address acquisition request from the first client device; wherein the first request message includes the total number of first user groups included in the M UP devices and the identifier of the first target user group; the first request message is used to request the network configuration server to divide the network address based on the total number of first user groups included in the M UP devices, and allocate a network address to the first client device based on the identifier of the first target user group.
[0177] The communication module 1202 is used to receive a first response message sent by the network configuration server, and send the first response message to the first client device through the first UP device; the first response message includes a network address allocated by the network configuration server to the first client device.
[0178] In some embodiments, the multiple first user groups included in the M UP devices are numbered sequentially, and the number is used as an identifier of each first user group.
[0179] In some other embodiments, the first request message is a Dynamic Host Configuration Protocol DHCP message, and the processing module 1201 is used to encapsulate the number of M×N first user groups included in the M UP devices and the identifier of the first target user group in the relay agent information option field of the DHCP message.
[0180] In other embodiments, the user group on the UP device adds multiple second user groups based on the original first user group; the multiple second user groups are numbered sequentially based on the original first user group, and the number is used as an identifier of each second user group.
[0181] The processing module 1201 is also used to send a second request message to the network configuration server through the second target user group of the second UP device in response to receiving a network address acquisition request from the second client device; wherein the second request message includes the total number of the first user group and the second user group included in the M UP devices, and the identifier of the second target user group; the second request message is used to request the network configuration server to additionally divide a plurality of network addresses based on the total number of the first user group and the second user group, and allocate a network address to the second client device based on the identifier of the second target user group.
[0182] The communication module 1202 is further configured to receive a second response message sent by the network configuration server, and send the second response message to the second client device through the second UP device; the second response message includes a network address allocated by the network configuration server to the second client device.
[0183] In some other embodiments, the multiple second user groups newly added by the M UP devices are numbered sequentially based on the original first user groups, and the number is used as an identifier of each second user group.
[0184] Fig.13 FIG. 1 is a schematic diagram of another address allocation device 1300 provided in an embodiment of the present application. Fig.13 As shown, the address allocation device 1300 includes: a communication module 1301 and an allocation module 1302 .
[0185] The communication module 1301 is used to receive a first request message sent by a CP device, wherein the first request message includes the total number of multiple first user groups included in the M UP devices controlled by the CP device and an identifier of a first target user group; the first target user group is a user group assigned by the CP device to the first client device.
[0186] The allocation module 1302 is configured to divide the network addresses based on the total number of the first user groups included in the M UP devices; and allocate a network address to the first client device from the divided network addresses based on the identifier of the first target user group.
[0187] The communication module 1301 is further configured to send a first response message to the CP device, where the first response message includes a network address allocated by the network configuration server to the first client device.
[0188] In some embodiments, the communication module 1301 is also used to receive a second request message sent by the CP device, the second request message including the total number of multiple first user groups and multiple second user groups included in the M UP devices, and the identifier of the second target user group; the second target user group is the user group assigned by the CP device to the second client device; the second user group is a user group added by the UP device on the basis of the first user group.
[0189] The allocation module 1302 is further configured to divide a plurality of network addresses based on the number of the plurality of second user groups; and allocate a network address to the second client device based on the identifier of the second target user group.
[0190] The communication module 1301 is further configured to send a second response message to the CP device, where the second response message includes a network address allocated by the network configuration server to the second client device.
[0191] In the case of implementing the functions of the above-mentioned integrated modules in the form of hardware, the embodiment of the present invention provides a possible structural diagram of the electronic device involved in the above-mentioned embodiment. Fig.14 As shown, the electronic device 1400 includes: a processor 1402 , a communication interface 1403 , and a bus 1404 . Optionally, the electronic device 1400 may further include a memory 1401 .
[0192] Processor 1402 may be a processor that implements or executes various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor 1402 may be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field programmable gate array, or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 1402 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
[0193] The communication interface 1403 is used to connect with other devices via a communication network, such as Ethernet, wireless access network, wireless local area network (WLAN), etc.
[0194] The memory 1401 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
[0195] As a possible implementation, the memory 1401 may exist independently of the processor 1402, and the memory 1401 may be connected to the processor 1402 via a bus 1404 to store instructions or program codes. When the processor 1402 calls and executes the instructions or program codes stored in the memory 1401, the address allocation method provided in the embodiment of the present invention can be implemented.
[0196] In another possible implementation, the memory 1401 may also be integrated with the processor 1402 .
[0197] The bus 1404 may be an extended industry standard architecture (EISA) bus, etc. The bus 1404 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.14 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0198] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the service calling device can be divided into different functional modules to complete all or part of the functions described above.
[0199] The embodiment of the present application also provides a computer-readable storage medium. All or part of the processes in the above method embodiments can be completed by computer instructions to instruct the relevant hardware, and the program can be stored in the above computer-readable storage medium. When the program is executed, it may include the processes of the above method embodiments. The computer-readable storage medium can be the memory or memory of any of the above embodiments. The above computer-readable storage medium can also be an external storage device of the above service calling device, such as a plug-in hard disk, a smart memory card (smart media card, SMC), a secure digital (secure digital, SD) card, a flash card (flash card), etc. equipped on the above service calling device. Further, the above computer-readable storage medium can also include both the internal storage unit of the above service calling device and an external storage device. The above computer-readable storage medium is used to store the above computer program and other programs and data required by the above service calling device. The above computer-readable storage medium can also be used to temporarily store data that has been output or is to be output.
[0200] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program product is run on a computer, the computer is enabled to execute any one of the address allocation methods provided in the above embodiments.
[0201] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. An address allocation method, characterized in that: A CP device applied to a broadband access system, wherein the CP device controls M UP devices, each of which includes multiple first user groups; and the method includes: In response to receiving a network address acquisition request from a first client device, sending a first request message to a network configuration server through a first target user group of a first UP device; wherein the first request message includes the total number of the first user groups included in the M UP devices and an identifier of the first target user group; the first request message is used to request the network configuration server to divide the network address based on the total number of the first user groups included in the M UP devices, and to allocate a network address to the first client device based on the identifier of the first target user group; A first response message sent by the network configuration server is received, and the first response message is sent to the first client device through the first UP device; the first response message includes a network address allocated by the network configuration server to the first client device.
2. The method according to claim 1, characterized in that The multiple first user groups included in the M UP devices are numbered sequentially, and the number is used as an identifier of each of the first user groups.
3. The method according to claim 1, characterized in that The first request message is a Dynamic Host Configuration Protocol DHCP message, and the number of the M×N first user groups included in the M UP devices and the identifier of the first target user group are encapsulated in a relay agent information option field of the DHCP message.
4. The method according to claim 1, characterized in that: The user group on the UP device adds multiple second user groups on the basis of the original first user group; the method further includes: In response to receiving a network address acquisition request from a second client device, sending a second request message to a network configuration server through a second target user group of a second UP device; wherein the second request message includes the total number of the first user group and the second user group included in the M UP devices, and an identifier of the second target user group; the second request message is used to request the network configuration server to additionally divide a plurality of network addresses based on the total number of the first user group and the second user group, and to allocate a network address to the second client device based on the identifier of the second target user group; A second response message sent by the network configuration server is received, and the second response message is sent to the second client device through the second UP device; the second response message includes a network address allocated by the network configuration server to the second client device.
5. The method according to claim 4, characterized in that The multiple second user groups newly added by the M UP devices are numbered sequentially based on the original first user groups, and the number is used as an identifier of each second user group.
6. An address allocation method, characterized in that: Applied to a network configuration server, the method comprises: receiving a first request message sent by a CP device, wherein the first request message includes the total number of a plurality of first user groups included in the M UP devices controlled by the CP device and an identifier of a first target user group; the first target user group is a user group assigned by the CP device to the first client device; dividing the network addresses based on the total number of the first user groups included in the M UP devices; Based on the identifier of the first target user group, assigning a network address to the first client device from the divided network addresses; A first response message is sent to the CP device, where the first response message includes a network address allocated by the network configuration server to the first client device.
7. The method according to claim 6, characterized in that The method further comprises: Receive a second request message sent by a CP device, where the second request message includes the total number of the first user groups and the second user groups included in the M UP devices, and an identifier of a second target user group; the second target user group is a user group assigned by the CP device to the second client device; and the second user group is a user group added by the UP device on the basis of the first user group; Further dividing a plurality of network addresses based on the number of the plurality of second user groups; Allocating a network address to the second client device based on the identifier of the second target user group; A second response message is sent to the CP device, where the second response message includes a network address allocated by the network configuration server to the second client device.
8. An electronic device, characterized in that: The invention comprises a processor and a memory, wherein the processor is coupled to the memory; the memory is used to store computer instructions, and the computer instructions are loaded and executed by the processor so that the computer device implements the address allocation method according to any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium comprises computer-executable instructions, and when the computer-executable instructions are executed on a computer, the computer is enabled to execute the address allocation method according to any one of claims 1 to 7.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is run on an electronic device, the electronic device is enabled to perform the address allocation method according to any one of claims 1 to 7.
Citation Information
Cited By
Message processing method and device
CN120675974A
Address allocation method, electronic device, storage medium, and program product
WO2026077281A1