CN114363881A - IP address allocation method, device, equipment and medium - Google Patents

IP address allocation method, device, equipment and medium Download PDF

Info

Publication number
CN114363881A
CN114363881A CN202111464694.0A CN202111464694A CN114363881A CN 114363881 A CN114363881 A CN 114363881A CN 202111464694 A CN202111464694 A CN 202111464694A CN 114363881 A CN114363881 A CN 114363881A
Authority
CN
China
Prior art keywords
address
user equipment
static
pool
attribute
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111464694.0A
Other languages
Chinese (zh)
Other versions
CN114363881B (en
Inventor
钟政杰
饶玉立
吴伟锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Comba Network Systems Co Ltd
Original Assignee
Comba Network Systems Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Comba Network Systems Co Ltd filed Critical Comba Network Systems Co Ltd
Priority to CN202111464694.0A priority Critical patent/CN114363881B/en
Publication of CN114363881A publication Critical patent/CN114363881A/en
Application granted granted Critical
Publication of CN114363881B publication Critical patent/CN114363881B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The present disclosure relates to a method, an apparatus, a device and a medium for allocating an IP address, the method comprising: receiving a session establishment request sent by first user equipment; the session establishment request comprises subscription information of the first user equipment; judging whether the subscription information contains a static address; if the static address is contained, the static address is allocated to the first user equipment under the condition that the static address belongs to a pre-planned address range; if the static address is not contained, selecting a target address attribute according to the session establishment request or the subscription information, and performing dynamic address allocation on the first user equipment based on the target address attribute and the first address pool; the first address pool is a pre-configured address pool matched with the target address attribute. The method and the device can reduce signaling overhead and improve the efficiency and stability of address allocation.

Description

IP address allocation method, device, equipment and medium
Technical Field
The present disclosure relates to the field of mobile communications technologies, and in particular, to a method, an apparatus, a device, and a medium for allocating an IP address.
Background
In the field of mobile communication technology, a network architecture of a 5G wireless communication system mainly includes: user Equipment (UE), Access Network (NG-RAN), and 5G Core Network (5GC, 5G Core Network).
The IP (Internet Protocol) address of the user equipment is allocated by the 5GC in the session establishment procedure. At present, most of address allocation schemes in 5G systems rely on multiple network element resources such as DHCP (Dynamic Host Configuration Protocol), AF (Application Function), and UPF (User plane Function) to perform address allocation, and the core of the address allocation schemes is to perform signaling interaction with the multiple network elements to obtain addresses and allocate the addresses to corresponding User equipment; however, the scheme has the problems of serious dependence on network element resources and extremely high signaling interaction overhead. Or, there are some schemes applicable to the 4G system, however, the 5G system technology is greatly changed from the 4G system technology, and the address allocation scheme applicable to the 4G system has a very large limitation in the 5G system.
Therefore, there is a need for an address allocation optimization scheme for 5G systems, which can ensure that addresses do not conflict and minimize the resource consumption of the system.
Disclosure of Invention
In order to solve the technical problem or at least partially solve the technical problem, the present disclosure provides an IP address allocation method, apparatus, device and medium.
The present disclosure provides a method for allocating an IP address, the method including:
receiving a session establishment request sent by first user equipment; the session establishment request comprises subscription information of the first user equipment;
judging whether the subscription information contains a static address;
if the static address is contained, the static address is distributed to the first user equipment under the condition that the static address belongs to a pre-planned address range;
if the static address is not contained, selecting a target address attribute according to the session establishment request or the subscription information, and performing dynamic address allocation on the first user equipment based on the target address attribute and a first address pool; wherein the first address pool is a preconfigured address pool that matches the target address attribute.
Optionally, in the case that the static address belongs to a pre-planned address range, allocating the static address to the first user equipment includes:
judging whether the static address belongs to a pre-planned address range or not;
if the address belongs to the address range, assigning the static address to the first user equipment based on a preconfigured second address pool;
and if the first user equipment does not belong to the address range, selecting a target address attribute according to the session establishment request or the subscription information, and performing dynamic address allocation on the first user equipment based on the target address attribute and the first address pool.
Optionally, the allocating the static address to the first user equipment based on the preconfigured second address pool includes:
judging whether the static address belongs to a pre-configured second address pool or not;
assigning the static address to the first user equipment if not in the second address pool;
if the static address belongs to the second address pool, judging whether the static address meets the use condition;
and if the use condition is met, the static address is allocated to the first user equipment.
Optionally, the determining whether the static address meets the use condition includes:
determining whether the static address has been used;
if not, marking that the static address has been used in a static manner and determining that the usage condition is satisfied;
if the static address is used, judging whether the static address is used by second user equipment in a dynamic mode;
if the address is used by the second user equipment in a dynamic mode, notifying the second user equipment of re-requesting to allocate the address, and determining that the use condition is met;
if not used in a dynamic manner by a second user equipment, determining that the usage condition is not satisfied, and denying establishment of a session with the first user equipment.
Optionally, the performing dynamic address allocation on the first user equipment based on the target address attribute and the first address pool includes:
judging whether the target address attribute corresponds to a matched first address pool or not;
if the first address pool is matched, judging whether a first IP address which can be distributed exists in the first address pool or not;
if the first IP address which can be allocated exists, the first IP address is allocated to the first user equipment;
if the first IP address which can be distributed does not exist, judging whether a second IP address with the recovery time reaching the second IP address distribution time of the preset redistribution time exists in the recovery address or not;
and if the second IP address reaching the reallocation time exists, allocating the second IP address to the first user equipment.
Optionally, the method further includes:
refusing to establish a session with the first user equipment when any one of the following conditions is met; the conditions include:
the target address attribute is not selected according to the session establishment request or the subscription information;
or, the target address attribute does not have a matched first address pool;
or the second IP address reaching the reallocation time does not exist in the recovered addresses.
Optionally, the selecting a target address attribute according to the session establishment request or the subscription information includes:
when the address attribute is provided in the session establishment request, taking the address attribute provided by the session establishment request as a selected target address attribute;
and when the address attribute is not provided in the session establishment request, taking the address attribute carried by the subscription information as the selected target address attribute.
Optionally, the method further includes:
performing initial configuration of an address pool according to preset address pool attributes; wherein the address pool attributes include: address attributes, address range, and number of addresses.
Optionally, the address attribute includes: a data network name DNN and/or an access point name APN.
Optionally, the method is applied to a session management function SMF.
The present disclosure also provides an IP address allocation apparatus, including:
the request receiving module is used for receiving a session establishment request sent by first user equipment; the session establishment request comprises subscription information of the first user equipment;
the judging module is used for judging whether the subscription information contains a static address;
a static allocation module, configured to, if the static address is included, allocate the static address to the first user equipment if the static address belongs to a pre-planned address range;
a dynamic allocation module, configured to select a destination address attribute according to the session establishment request or the subscription information if the static address is not included, and perform dynamic address allocation on the first user equipment based on the destination address attribute and a first address pool; wherein the first address pool is a preconfigured address pool that matches the target address attribute.
The present disclosure also provides an electronic device, including: a processor; a memory for storing the processor-executable instructions;
and the processor is used for reading the executable instruction from the memory and executing the instruction to realize the IP address allocation method.
The present disclosure also provides a computer-readable storage medium storing a computer program for executing the above-described IP address allocation method.
Compared with the prior art, the technical scheme provided by the embodiment of the disclosure has the following advantages:
the method for allocating the IP address provided in the embodiment of the present disclosure does not need to rely on other network element resources such as DHCP, UPF, AF, and the like, but receives a session establishment request including subscription information sent by the first user equipment through the SMF, and allocates a static address or allocates a dynamic address to the first user equipment according to whether the subscription information includes the static address; the scheme obviously reduces unnecessary signaling interaction overhead by using a single SMF, and achieves low-cost address allocation. In the process of allocating the static address, under the condition that the static address belongs to the address range, the static address is allocated to the first user equipment, so that the problem of abnormal service of the user equipment can be solved; in the dynamic address allocation process, the pre-configured address pool matched with the target address attribute is utilized, the complex diversity of address allocation can be fully considered, the allocated addresses are ensured not to conflict, and the efficiency and the stability of address allocation are improved. Therefore, the technical scheme aims at the 5G system, not only is the signaling overhead reduced, but also the cost is reduced, and the efficiency and the stability of address allocation are improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present disclosure, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a flowchart of an IP address allocation method according to an embodiment of the present disclosure;
FIG. 2 is a flowchart of a method for static address assignment according to an embodiment of the present disclosure;
FIG. 3 is a flowchart of a method for dynamic address allocation according to an embodiment of the present disclosure;
fig. 4 is a block diagram illustrating an IP address allocation apparatus according to an embodiment of the disclosure;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure.
Detailed Description
In order that the above objects, features and advantages of the present disclosure may be more clearly understood, aspects of the present disclosure will be further described below. It should be noted that the embodiments and features of the embodiments of the present disclosure may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure, but the present disclosure may be practiced in other ways than those described herein; it is to be understood that the embodiments disclosed in the specification are only a few embodiments of the present disclosure, and not all embodiments.
At present, for a 5G system, the allocation scheme of the IP address of the user equipment mostly depends on network element resources such as DHCP, AF, and UPF to perform address allocation, and the scheme heavily depends on the network element resources and has extremely high signaling interaction overhead.
Considering that the scheme suitable for the 4G system is applied to the 5G system, however, the 5G system technology is greatly changed compared with the 4G system technology, and the address allocation scheme suitable for the 4G system has a very large limitation in the 5G system. For example, in the 4G system, an IMSI (International Mobile Subscriber Identity) is used as a key value buffer to be allocated to an IP address of a user equipment, and one IMSI corresponds to one IP address of the user equipment; but in a 5G system one IMSI may correspond to one or more user equipment IP addresses; thus, in the 5G system, the IP address of the user equipment cannot be cached by using only the IMSI as a key. For example, the same session ID or different session IDs of the user equipment of the same IMSI allocated by the 5GC all belong to one address range, but this does not exist in the 4G system, so that the allocation scheme of the 4G system is adopted, and there is no incentive to determine whether the static address belongs to the planned address range, for example, if the static address not belonging to the planned address range in the network is used, the service abnormality problem of the user equipment may occur, and the user experience is affected.
Based on the above problem, in order to optimize an address allocation scheme in a 5G system, embodiments of the present disclosure provide an allocation method and apparatus for an IP address, an electronic device, and a medium. For ease of understanding, the embodiments of the present disclosure are described in detail below.
The first embodiment is as follows:
this embodiment provides a method for allocating an IP address, which may be applied to a 5G core network, specifically, a network element SMF (Session Management Function) of the 5G core network. As shown in fig. 1, the method comprises the steps of:
step S102, receiving a session establishment request sent by first user equipment; the session establishment request includes subscription information of the first user equipment.
In this embodiment, a session establishment request sent by a first user equipment is received through an SMF. Wherein, the first user equipment includes, besides referring to the hardware entity directly operated by the user, the hardware entity on the user side, such as: home gateways, fixed network residential gateways, etc., without limitation herein.
The IP address of the first user equipment is allocated by the SMF in the session establishment procedure, and whenever the session establishment is successful, the IP addresses allocated by the SMF all belong to one address range for the same session ID or different session IDs of the first user equipment of the same IMSI. In allocating the IP address to the first user equipment, the following steps may be referred to, and the IP address allocated to the first user equipment is determined according to the attribute (i.e. whether the request address is a static address) of the request address and the status of the address pool.
Step S104, judging whether the subscription information contains a static address.
In this embodiment, the 5G core network determines an address allocation manner of the first user equipment according to whether the subscription information of the first user equipment includes a static address; if the static address is included, the static address is assigned with reference to step S106, and if not, the dynamic address is assigned with reference to step S108.
And step S106, under the condition that the static address belongs to the address range planned in advance, the static address is distributed to the first user equipment.
If the subscription information contains a static address, considering that in a 5G system, one user equipment can correspond to a plurality of IP addresses, and the plurality of IP addresses belong to one address range; therefore, in order to avoid the problem that the first user equipment uses a static address that is not in the address range planned by the first user equipment and causes the user equipment to have abnormal service, the embodiment first determines whether the static address included in the subscription information belongs to the address range planned in advance, and if so, allocates the static address to the first user equipment by combining with the preconfigured second address pool.
Step S108, selecting a target address attribute according to the session establishment request or the subscription information, and performing dynamic address allocation on the first user equipment based on the target address attribute and the first address pool; the first address pool is a pre-configured address pool matched with the target address attribute.
And if the static address is not contained, performing dynamic address allocation on the first user equipment. In the dynamic address allocation process, the manner of selecting the target address attribute according to the session establishment request or the subscription information may refer to the following:
when the address attribute is provided in the session establishment request, taking the address attribute provided by the session establishment request as a selected target address attribute; and when the address attribute is not provided in the session establishment request, taking the address attribute carried by the subscription information as the selected target address attribute. The address attribute is an address attribute such as DNN (Data Network Name) or APN (Access Point Name).
In some implementations, if the destination address attribute is not successfully selected according to the session establishment request or the subscription information, that is, the address attribute is not provided by both the session establishment request and the subscription information, the first user equipment cannot be dynamically allocated with the address based on the destination address attribute. In this case, the SMF rejects the session establishment with the first user equipment, and ends the session establishment procedure.
For the preconfigured address pool, the present embodiment may perform initialization configuration of the address pool according to a preset address pool attribute, so as to obtain a first address pool and a second address pool; wherein the address pool attributes include, but are not limited to: address attributes, address range, and number of addresses. The first address pool and the second address pool may be the same address pool or different address pools.
Compared with the traditional scheme of performing address allocation based on multiple network element resources such as DHCP, AF, UPF and the like, the method for allocating an IP address provided by the embodiment of the present disclosure receives a session establishment request including subscription information sent by a first user equipment through an SMF without depending on other network element resources such as DHCP, UPF, AF and the like, and performs static address allocation or dynamic address allocation for the first user equipment according to whether the subscription information includes a static address; the scheme obviously reduces unnecessary signaling interaction overhead by using a single SMF, and achieves low-cost address allocation. In the process of allocating the static address, under the condition that the static address belongs to the address range, the static address is allocated to the first user equipment, so that the problem of abnormal service of the user equipment can be solved; in the dynamic address allocation process, the pre-configured address pool matched with the target address attribute is utilized, the complex diversity of address allocation can be fully considered, the allocated addresses are ensured not to conflict, and the efficiency and the stability of address allocation are improved. Therefore, the technical scheme aims at the 5G system, not only is the signaling overhead reduced, but also the cost is reduced, and the efficiency and the stability of address allocation are improved.
In order to facilitate understanding of the IP address allocation method provided in the embodiments of the present disclosure, the present embodiment describes a static address allocation manner and a dynamic address allocation manner, and provides a more detailed IP address allocation method.
Referring to fig. 2, the static address allocation method includes the steps of:
step S202, receiving a session establishment request sent by first user equipment; the session establishment request includes subscription information of the first user equipment.
Step S204, determining whether the subscription information includes a static address. If a static address is included, the static address is assigned to the first user equipment as follows in steps S206 to S212. If the static address is not included, dynamic address allocation is performed for the first user equipment with reference to fig. 3.
Step S206, judging whether the static address belongs to the address range planned in advance. If the address belongs to the address range, a static address is allocated to the first user equipment based on the preconfigured second address pool, and the specific implementation process may refer to the following steps S208 to S212. And if the address does not belong to the address range, referring to fig. 3, selecting a target address attribute according to the session establishment request or the subscription information, and performing dynamic address allocation on the first user equipment based on the target address attribute and the first address pool.
Step S208, judging whether the static address belongs to a pre-configured second address pool; if the address belongs to the second address pool, executing step S210; if not, step S212 is performed.
Step S210, determining whether the static address satisfies the use condition. Wherein the use conditions comprise: the static address is not used or the static address is not used in a dynamic manner by the second user equipment.
In specific implementation, the method comprises the following steps: judging whether the static address is used or not; if not, the static address is marked as having been used in a static manner and it is determined that the usage condition is satisfied.
If the static address is used, judging whether the static address is used by the second user equipment in a dynamic mode; and if the second user equipment is used in a dynamic mode, notifying the second user equipment of re-requesting to allocate the address, and determining that the use condition is met. If not used by the second user equipment in a dynamic manner, determining that the usage condition is not satisfied, and denying establishment of the session with the first user equipment.
After the above determination, if the static address satisfies the use condition, step S212 is executed. And if the static address does not meet the use condition, refusing to establish the session with the first user equipment.
Step S212, a static address is assigned to the first user equipment.
According to the steps, static addresses are distributed to the first user equipment.
When the subscription information does not include a static address or the static address does not belong to a pre-planned address range, dynamic address allocation is performed on the first user equipment with reference to the steps shown in fig. 3.
Step S302, determining whether the destination address attribute can be successfully selected according to the session establishment request or the subscription information. If the target address attribute is not successfully selected, step S314 is executed to refuse to establish a session with the first user equipment. If the target address attribute is successfully selected, the following step S304 is performed.
Step S304, judging whether the target address attribute corresponds to a matched first address pool.
And the SMF configures an address pool matched with different address attributes in advance based on the DNN and other address pool attributes. The embodiment judges whether a first address pool matched with the target address attribute exists in a pre-configured address pool or not; if the first address pool is matched, executing step S306; if there is no matching first address pool, step S314 is executed to refuse to establish a session with the first user equipment.
Step S306, determine whether the first address pool has the assignable first IP address. The first IP address may refer to an unused, i.e., assignable, IP address in the first pool of addresses.
If there is an allocatable first IP address, go to step S308; if there is no assignable first IP address, step S310 is performed.
Step S308, the first IP address is assigned to the first user equipment.
Step S310, judging whether a second IP address with the recovery time reaching the preset redistribution time exists in the recovery addresses.
In some recycled address processing schemes, the IP address can be allocated again as long as the IP address is in a recycled state, and the reallocation time interval is short, which may cause the IP address of the user equipment to be still used, thereby causing a problem that address collision affects the service. Based on this, the present embodiment presets the reallocation time, which indicates that the recovery time recorded by the recovered IP address reaches the time that can be reallocated. And only in the case of judging that the recovery time of the IP address reaches the reallocation time, taking the IP address as a second allocable IP address. In addition, when there are a plurality of IP addresses that reach the reallocation time among the reclaimed addresses, the IP address whose reclamation time is the earliest may be used as the second IP address to be allocated.
By the judgment, if there is the second IP address reaching the reallocation time, step S312 is performed, otherwise, step S314 is performed, and the session establishment with the first user equipment is rejected.
Step S312, allocating a second IP address to the first user equipment;
step S314, refusing to establish a session with the first user equipment.
In summary, the IP address allocation method provided in the embodiment of the present disclosure does not need to rely on multiple network element resources such as DHCP, UPF, and AF, and uses a single SMF to control and manage address allocation of the user equipment, thereby reducing signaling overhead and simplifying the dependence on network element resources. According to the technical scheme, in the 5G system, in the static address allocation process, under the condition that the static address belongs to the address range, the static address is allocated to the first user equipment, the problem of abnormal service of the user equipment can be solved, and the allocated address is prevented from being collided by judging whether the static address is used or not. In the dynamic address allocation process, an address pool pre-configured based on address attributes such as DNN and the like and an elegant recovery mode for recording recovery time in a recovery address are utilized, and the complex diversity of address allocation can be fully considered, so that the allocation addresses are ensured not to conflict, and the efficiency and the stability of address allocation are improved. Therefore, the method can avoid address conflict, achieve static and dynamic allocation of the IP address of the user equipment with lower cost, high efficiency and flexibility, and further be beneficial to improving service quality and user experience and improving economic benefits of operators by utilizing the SMF local configuration and the perfect address management, allocation and elegant release method.
Example two:
referring to fig. 4, an embodiment of the present disclosure provides an IP address allocation apparatus, including:
a request receiving module 402, configured to receive a session establishment request sent by a first user equipment; the session establishment request comprises subscription information of the first user equipment;
a determining module 404, configured to determine whether the subscription information includes a static address;
a static allocation module 406, configured to allocate the static address to the first user equipment if the static address is included and if the static address belongs to a pre-planned address range;
a dynamic allocation module 408, configured to select a target address attribute according to the session establishment request or the subscription information under the condition that the static address is not included, and perform dynamic address allocation on the first user equipment based on the target address attribute and the first address pool; wherein the first address pool is a preconfigured address pool that matches the target address attribute.
In an embodiment, the static allocation module 406 is specifically configured to:
judging whether the static address belongs to a pre-planned address range or not;
if the address belongs to the address range, assigning the static address to the first user equipment based on a preconfigured second address pool;
and if the first user equipment does not belong to the address range, selecting a target address attribute according to the session establishment request or the subscription information, and performing dynamic address allocation on the first user equipment based on the target address attribute and the first address pool.
In an embodiment, the static allocation module 406 is specifically configured to:
judging whether the static address belongs to a pre-configured second address pool or not;
assigning the static address to the first user equipment if not in the second address pool;
if the static address belongs to the second address pool, judging whether the static address meets the use condition;
and if the use condition is met, the static address is allocated to the first user equipment.
In an embodiment, the static allocation module 406 is specifically configured to:
determining whether the static address has been used;
if not, marking that the static address has been used in a static manner and determining that the usage condition is satisfied;
if the static address is used, judging whether the static address is used by second user equipment in a dynamic mode;
if the address is used by the second user equipment in a dynamic mode, notifying the second user equipment of re-requesting to allocate the address, and determining that the use condition is met;
if not used in a dynamic manner by a second user equipment, determining that the usage condition is not satisfied, and denying establishment of a session with the first user equipment.
In one embodiment, the dynamic allocation module 408 is specifically configured to:
judging whether the target address attribute corresponds to a matched first address pool or not;
if the first address pool is matched, judging whether a first IP address which can be distributed exists in the first address pool or not;
if the first IP address which can be allocated exists, the first IP address is allocated to the first user equipment;
if the first IP address which can be distributed does not exist, judging whether a second IP address with the recovery time reaching the preset redistribution time exists in the recovery addresses or not;
and if the second IP address reaching the reallocation time exists, allocating the second IP address to the first user equipment.
In one embodiment, the dynamic allocation module 408 is specifically configured to:
refusing to establish a session with the first user equipment when any one of the following conditions is met; the conditions include:
the target address attribute is not selected according to the session establishment request or the subscription information;
or, the target address attribute does not have a matched first address pool;
or the second IP address reaching the reallocation time does not exist in the recovered addresses.
In one embodiment, the dynamic allocation module 408 is specifically configured to:
when the address attribute is provided in the session establishment request, taking the address attribute provided by the session establishment request as a selected target address attribute;
and when the address attribute is not provided in the session establishment request, taking the address attribute carried by the subscription information as the selected target address attribute.
In an embodiment, the apparatus further includes an address pool configuration module, configured to:
performing initial configuration of an address pool according to preset address pool attributes; wherein the address pool attributes include: address attributes, address range, and number of addresses. The address attributes include: a data network name DNN and/or an access point name APN.
In one embodiment, the above apparatus is applied to SMF.
The device provided by the embodiment has the same implementation principle and technical effect as the method embodiments, and for the sake of brief description, reference may be made to the corresponding contents in the method embodiments without reference to the device embodiments.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. As shown in fig. 5, the electronic device 500 includes one or more processors 501 and memory 502.
The processor 501 may be a Central Processing Unit (CPU) or other form of processing unit having data processing capabilities and/or instruction execution capabilities, and may control other components in the electronic device 500 to perform desired functions.
Memory 502 may include one or more computer program products that may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. The volatile memory may include, for example, Random Access Memory (RAM), cache memory (cache), and/or the like. The non-volatile memory may include, for example, Read Only Memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium and executed by the processor 501 to implement the IP address assignment method of the embodiments of the present disclosure described above and/or other desired functions. Various contents such as an input signal, a signal component, a noise component, etc. may also be stored in the computer-readable storage medium.
In one example, the electronic device 500 may further include: an input device 503 and an output device 504, which are interconnected by a bus system and/or other form of connection mechanism (not shown).
The input device 503 may also include, for example, a keyboard, a mouse, and the like.
The output device 504 may output various information to the outside, including the determined distance information, direction information, and the like. The output devices 504 may include, for example, a display, speakers, a printer, and a communication network and its connected remote output devices, among others.
Of course, for simplicity, only some of the components of the electronic device 500 relevant to the present disclosure are shown in fig. 5, omitting components such as buses, input/output interfaces, and the like. In addition, the electronic device 500 may include any other suitable components depending on the particular application.
Further, the present embodiment also provides a computer-readable storage medium, in which a computer program is stored, and the computer program is configured to execute the IP address allocation method.
The method, apparatus, electronic device and computer program product for allocating IP addresses provided in the embodiments of the present disclosure include a computer-readable storage medium storing program codes, where instructions included in the program codes may be used to execute the methods described in the foregoing method embodiments, and specific implementation may refer to the method embodiments, and will not be described herein again.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present disclosure, which enable those skilled in the art to understand or practice the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (13)

1. A method for allocating an IP address, the method comprising:
receiving a session establishment request sent by first user equipment; the session establishment request comprises subscription information of the first user equipment;
judging whether the subscription information contains a static address;
if the static address is contained, the static address is distributed to the first user equipment under the condition that the static address belongs to a pre-planned address range;
if the static address is not contained, selecting a target address attribute according to the session establishment request or the subscription information, and performing dynamic address allocation on the first user equipment based on the target address attribute and a first address pool; wherein the first address pool is a preconfigured address pool that matches the target address attribute.
2. The method of claim 1, wherein the assigning the static address to the first user equipment if the static address belongs to a pre-planned address range comprises:
judging whether the static address belongs to a pre-planned address range or not;
if the address belongs to the address range, assigning the static address to the first user equipment based on a preconfigured second address pool;
and if the first user equipment does not belong to the address range, selecting a target address attribute according to the session establishment request or the subscription information, and performing dynamic address allocation on the first user equipment based on the target address attribute and the first address pool.
3. The method of claim 2, wherein assigning the static address to the first user equipment based on the preconfigured pool of second addresses comprises:
judging whether the static address belongs to a pre-configured second address pool or not;
assigning the static address to the first user equipment if not in the second address pool;
if the static address belongs to the second address pool, judging whether the static address meets the use condition;
and if the use condition is met, the static address is allocated to the first user equipment.
4. The method of claim 3, wherein the determining whether the static address satisfies a usage condition comprises:
determining whether the static address has been used;
if not, marking that the static address has been used in a static manner and determining that the usage condition is satisfied;
if the static address is used, judging whether the static address is used by second user equipment in a dynamic mode;
if the address is used by the second user equipment in a dynamic mode, notifying the second user equipment of re-requesting to allocate the address, and determining that the use condition is met;
if not used in a dynamic manner by a second user equipment, determining that the usage condition is not satisfied, and denying establishment of a session with the first user equipment.
5. The method according to claim 1 or 2, wherein the dynamic address allocation for the first user equipment based on the target address attribute and a first address pool comprises:
judging whether the target address attribute corresponds to a matched first address pool or not;
if the first address pool is matched, judging whether a first IP address which can be distributed exists in the first address pool or not;
if the first IP address which can be allocated exists, the first IP address is allocated to the first user equipment;
if the first IP address which can be distributed does not exist, judging whether a second IP address with the recovery time reaching the preset redistribution time exists in the recovery addresses or not;
and if the second IP address reaching the reallocation time exists, allocating the second IP address to the first user equipment.
6. The method of claim 5, further comprising:
refusing to establish a session with the first user equipment when any one of the following conditions is met; the conditions include:
the target address attribute is not selected according to the session establishment request or the subscription information;
or, the target address attribute does not have a matched first address pool;
or the second IP address reaching the reallocation time does not exist in the recovered addresses.
7. The method of claim 1, wherein selecting a destination address attribute according to the session establishment request or the subscription information comprises:
when the address attribute is provided in the session establishment request, taking the address attribute provided by the session establishment request as a selected target address attribute;
and when the address attribute is not provided in the session establishment request, taking the address attribute carried by the subscription information as the selected target address attribute.
8. The method of claim 1, further comprising:
performing initial configuration of an address pool according to preset address pool attributes; wherein the address pool attributes include: address attributes, address range, and number of addresses.
9. The method of claim 8, wherein the address attributes comprise: a data network name DNN and/or an access point name APN.
10. The method of claim 1, applied to a session management function, SMF.
11. An apparatus for allocating an IP address, the apparatus comprising:
the request receiving module is used for receiving a session establishment request sent by first user equipment; the session establishment request comprises subscription information of the first user equipment;
the judging module is used for judging whether the subscription information contains a static address;
a static allocation module, configured to allocate the static address to the first user equipment if the static address is included and if the static address belongs to a pre-planned address range;
a dynamic allocation module, configured to select a destination address attribute according to the session establishment request or the subscription information under the condition that the static address is not included, and perform dynamic address allocation on the first user equipment based on the destination address attribute and a first address pool; wherein the first address pool is a preconfigured address pool that matches the target address attribute.
12. An electronic device, characterized in that the electronic device comprises:
a processor;
a memory for storing the processor-executable instructions;
the processor is configured to read the executable instructions from the memory and execute the instructions to implement the IP address allocation method of any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that the storage medium stores a computer program for executing the IP address allocation method according to any one of claims 1 to 10.
CN202111464694.0A 2021-12-03 2021-12-03 IP address allocation method, device, equipment and medium Active CN114363881B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111464694.0A CN114363881B (en) 2021-12-03 2021-12-03 IP address allocation method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111464694.0A CN114363881B (en) 2021-12-03 2021-12-03 IP address allocation method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN114363881A true CN114363881A (en) 2022-04-15
CN114363881B CN114363881B (en) 2023-10-20

Family

ID=81096719

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111464694.0A Active CN114363881B (en) 2021-12-03 2021-12-03 IP address allocation method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN114363881B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114598682A (en) * 2022-04-26 2022-06-07 中国电信股份有限公司 User address allocation method, device and system
CN114900499A (en) * 2022-04-20 2022-08-12 中国电信股份有限公司 IP address allocation method, device, equipment and storage medium
CN115002749A (en) * 2022-06-20 2022-09-02 中国电信股份有限公司 IP address allocation method, device, storage medium and electronic equipment
CN115174525A (en) * 2022-06-30 2022-10-11 北京百佑科技有限公司 Method and device for allocating equipment IP addresses

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103731816A (en) * 2012-10-16 2014-04-16 普天信息技术研究院有限公司 Method for address management of user equipment
US20180132099A1 (en) * 2015-07-14 2018-05-10 Huawei Technologies Co., Ltd. Ip address assignment method and apparatus
US20180227267A1 (en) * 2017-02-03 2018-08-09 T-Mobile Usa, Inc. Ip index for ip address allocation based on policy control function
US20180324646A1 (en) * 2017-05-08 2018-11-08 Samsung Electronics Co., Ltd. Method and apparatus for supporting session continuity for 5g cellular network
CN109413640A (en) * 2017-08-18 2019-03-01 中国移动通信有限公司研究院 Session information querying method, network element and computer storage medium
CN110266826A (en) * 2018-03-12 2019-09-20 华为技术有限公司 Address management method, equipment and system
CN110661894A (en) * 2018-06-29 2020-01-07 中兴通讯股份有限公司 User IP address allocation method, network device and storage medium
CN113194462A (en) * 2021-03-30 2021-07-30 北京和峰科技有限公司 Node address allocation method and device, storage medium and electronic equipment
US20210306912A1 (en) * 2018-08-13 2021-09-30 Intel Corporation Flexible scope of packet filters for reflective quality of service

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103731816A (en) * 2012-10-16 2014-04-16 普天信息技术研究院有限公司 Method for address management of user equipment
US20180132099A1 (en) * 2015-07-14 2018-05-10 Huawei Technologies Co., Ltd. Ip address assignment method and apparatus
US20180227267A1 (en) * 2017-02-03 2018-08-09 T-Mobile Usa, Inc. Ip index for ip address allocation based on policy control function
US20180324646A1 (en) * 2017-05-08 2018-11-08 Samsung Electronics Co., Ltd. Method and apparatus for supporting session continuity for 5g cellular network
CN109413640A (en) * 2017-08-18 2019-03-01 中国移动通信有限公司研究院 Session information querying method, network element and computer storage medium
CN110266826A (en) * 2018-03-12 2019-09-20 华为技术有限公司 Address management method, equipment and system
CN110661894A (en) * 2018-06-29 2020-01-07 中兴通讯股份有限公司 User IP address allocation method, network device and storage medium
US20210306912A1 (en) * 2018-08-13 2021-09-30 Intel Corporation Flexible scope of packet filters for reflective quality of service
CN113194462A (en) * 2021-03-30 2021-07-30 北京和峰科技有限公司 Node address allocation method and device, storage medium and electronic equipment

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114900499A (en) * 2022-04-20 2022-08-12 中国电信股份有限公司 IP address allocation method, device, equipment and storage medium
CN114900499B (en) * 2022-04-20 2023-10-03 中国电信股份有限公司 IP address allocation method, device, equipment and storage medium
CN114598682A (en) * 2022-04-26 2022-06-07 中国电信股份有限公司 User address allocation method, device and system
CN115002749A (en) * 2022-06-20 2022-09-02 中国电信股份有限公司 IP address allocation method, device, storage medium and electronic equipment
CN115174525A (en) * 2022-06-30 2022-10-11 北京百佑科技有限公司 Method and device for allocating equipment IP addresses
CN115174525B (en) * 2022-06-30 2024-03-15 北京百佑科技有限公司 Equipment IP address allocation method and device

Also Published As

Publication number Publication date
CN114363881B (en) 2023-10-20

Similar Documents

Publication Publication Date Title
CN114363881B (en) IP address allocation method, device, equipment and medium
US11568092B2 (en) Method of dynamically configuring FPGA and network security device
KR100733511B1 (en) Working fa assignment method, working fa assignment device in the wireless portable internet system
CN110677405A (en) Data processing method and device, electronic equipment and storage medium
WO2017206572A1 (en) Ip address management method for use in network environment having multiple dhcp servers, and dhcp client
US11044729B2 (en) Function scheduling method, device, and system
US20100325406A1 (en) Computer system and management device
CN113612861B (en) Remote access method, system and computer readable storage medium
US20210092090A1 (en) Domain name resolution method and apparatus based on a plurality of availability zones az
CN107517150B (en) Intranet resource access method and device based on virtual private network VPN
CN110798546A (en) DUID-based DHCP client access authentication method
CN101309305B (en) IP address allocating method and apparatus
US10237233B2 (en) Allocating identifiers with minimal fragmentation
CN104519551B (en) WiFi network DHCP negotiation method and client
CN101997931A (en) Position information acquiring method and equipment
US8750177B2 (en) Allocating memory to low usage packet data sessions in a wireless communication system
CN104519145A (en) An address resource managing method, system and DHCP server
CN112737806B (en) Network traffic migration method and device
US20200162419A1 (en) Address assignment method and related device
CN106612337B (en) Method, gateway and system for inhibiting 6LoWPAN address conflict in heterogeneous environment
CN112600765B (en) Method and device for scheduling configuration resources
CN115314468A (en) IP address allocation method and system for container cloud platform
CN109167846B (en) Communication port allocation method and device
CN110460683B (en) Method and switching equipment for processing data message through gateway
KR100977399B1 (en) Method and apparatus of processing DHCP packet in dynamic IP address allocation for reducing network load

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant