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

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

Info

Publication number
CN114363881B
CN114363881B CN202111464694.0A CN202111464694A CN114363881B CN 114363881 B CN114363881 B CN 114363881B CN 202111464694 A CN202111464694 A CN 202111464694A CN 114363881 B CN114363881 B CN 114363881B
Authority
CN
China
Prior art keywords
address
static
user equipment
attribute
pool
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.)
Active
Application number
CN202111464694.0A
Other languages
Chinese (zh)
Other versions
CN114363881A (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

Landscapes

  • Small-Scale Networks (AREA)

Abstract

The present disclosure relates to a method, an apparatus, a device, and a medium for allocating an IP address, where the method includes: receiving a session establishment request sent by first user equipment; the session establishment request contains subscription information of the first user equipment; judging whether the subscription information contains a static address or not; if the static address is included, distributing the static address 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 subscription information, and carrying out 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 preconfigured 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, next Generation Radio Access Network) and 5G core network (5GC,5G Core Network).
The IP (Internet Protocol ) address of the user equipment is assigned by the 5GC in the session establishment procedure. Currently, most of address allocation schemes in 5G systems rely on multiple network element resources such as DHCP (Dynamic Host Configuration Protocol ), AF (Application Function, application function) and UPF (User plane Function ) to perform address allocation, and the core is that the addresses are acquired through signaling interaction with the multiple network elements and allocated to corresponding user equipment; however, the scheme has the problems of extremely high signaling interaction overhead and serious dependence on network element resources. Alternatively, there are some schemes suitable for the 4G system, but 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.
Therefore, there is a need for an address allocation optimization scheme for 5G systems that minimizes the resource consumption of the system while ensuring that addresses do not conflict.
Disclosure of Invention
In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides a method, an apparatus, a device, and a medium for allocating an IP address.
The present disclosure provides 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 or not;
if the static address is contained, distributing the static address to the first user equipment under the condition that the static address belongs to a preplanned 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 carrying out dynamic address allocation on the first user equipment based on the target address attribute and a first address pool; the first address pool is a preconfigured address pool matched with the target address attribute.
Optionally, the allocating the static address to the first user device in the case that the static address belongs to a pre-planned address range includes:
judging whether the static address belongs to a pre-planned address range or not;
if the static address belongs to the address range, the static address is distributed to the first user equipment based on a second address pool which is preconfigured;
and if the address range is not included, selecting a target address attribute according to the session establishment request or the subscription information, and carrying out dynamic address allocation on the first user equipment based on the target address attribute and a 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 second address pool which is preconfigured;
if the static address does not belong to the second address pool, the static address is distributed to the first user equipment;
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, distributing the static address to the first user equipment.
Optionally, the determining whether the static address meets the use condition includes:
judging whether the static address is used or not;
if not, marking that the static address has been used in a static manner and determining that the use condition is satisfied;
if so, judging whether the static address is used by the 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 to re-request the allocation address, and determining that the use condition is met;
if not used by the second user equipment in a dynamic manner, determining that the use condition is not satisfied, and refusing to establish a session with the first user equipment.
Optionally, the dynamically allocating the address to 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 a matched first address pool exists, judging whether an allocatable first IP address exists in the first address pool;
if the allocable first IP address exists, allocating the first IP address to the first user equipment;
if the allocatable first IP address does not exist, judging whether a second IP address with the recovery time reaching the second IP address allocation time of the preset reallocation time exists in the recovery address or not;
and if the second IP address reaching the reassignment time exists, assigning the second IP address to the first user equipment.
Optionally, the method further comprises:
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 match the first address pool;
or, there is no second IP address reaching the reassignment time in the reclaimed address.
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, the address attribute provided by the session establishment request is used 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 comprises:
initializing and configuring an address pool according to preset address pool attributes; wherein the address pool attributes include: address attributes, address ranges, and number of addresses.
Optionally, the address attribute includes: a data network name DNN and/or an access point name APN.
Alternatively, the method is applied to a session management function SMF.
The present disclosure also provides an IP address allocation apparatus, including:
a request receiving module, 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;
the judging module is used for judging whether the subscription information contains a static address or not;
the static allocation module is used for allocating the static address to the first user equipment if the static address is included and the static address belongs to a pre-planned address range;
the dynamic allocation module is used for selecting a target address attribute according to the session establishment request or the subscription information if the static address is not contained, and carrying out dynamic address allocation on the first user equipment based on the target address attribute and a first address pool; the first address pool is a preconfigured address pool matched with the target address attribute.
The present disclosure also provides an electronic device including: a processor; a memory for storing the processor-executable instructions;
the processor is configured to read the executable instruction from the memory, and execute the instruction to implement the above IP address allocation method.
The present disclosure also provides a computer-readable storage medium storing a computer program for executing the above IP address allocation method.
Compared with the prior art, the technical scheme provided by the embodiment of the disclosure has the following advantages:
according to the IP address allocation method provided by the embodiment of the disclosure, other network element resources such as DHCP, UPF, AF are not needed, a session establishment request containing subscription information and sent by the first user equipment is received through the SMF, and static address allocation or dynamic address allocation is carried out for the first user equipment according to whether the subscription information contains the static address or not; the scheme uses a single SMF to obviously reduce unnecessary signaling interaction overhead, thereby achieving low-cost address allocation. And 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, so that the problem of abnormal service of the user equipment can be solved; in the dynamic address allocation process, the complex diversity of address allocation can be fully considered by utilizing the pre-configured address pool matched with the target address attribute, so that the allocated addresses are ensured not to collide, and the efficiency and stability of the address allocation are improved. Therefore, the technical scheme aims at the 5G system, so that the signaling overhead is reduced, 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 disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments of the present disclosure or the solutions in the prior art, the drawings that are required for the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
Fig. 1 is a flowchart of a method for allocating an IP address according to an embodiment of the present disclosure;
FIG. 2 is a flow chart of a method of static address allocation according to an embodiment of the present disclosure;
FIG. 3 is a flow chart of a method of dynamic address allocation according to an embodiment of the present disclosure;
fig. 4 is a block diagram of a configuration of an IP address allocation apparatus according to an embodiment of the present 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, a further description of aspects of the present disclosure will be provided below. It should be noted that, without conflict, the embodiments of the present disclosure and features in the embodiments may be combined with each other.
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 otherwise than as described herein; it will be apparent that the embodiments in the specification are only some, but not all, embodiments of the disclosure.
At present, aiming at a 5G system, the allocation scheme of the IP address of user equipment mostly depends on network element resources such as DHCP, AF, UPF and the like to allocate the address, and the scheme seriously depends on the network element resources and has extremely high signaling interaction cost.
Considering that a scheme suitable for a 4G system is applied to a 5G system, however, the 5G system technology has a large variation from the 4G system technology, and an address allocation scheme suitable for a 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 allocate to a user equipment IP address, where one IMSI corresponds to one user equipment IP address; one IMSI may correspond to one or more user equipment IP addresses in a 5G system; thus, the IP address of the user equipment cannot be cached in the 5G system using only IMSI as a key value. Also for example, the same session ID or different session IDs of the user equipment with the same IMSI allocated by the 5GC belong to one address range, but this is not the case in the 4G system, so 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, if the static address not belongs to the planned address range in the network is used, so that the problem of abnormal service of the user equipment may be caused, and the user experience is affected.
Based on the above-mentioned problems, in order to optimize an address allocation scheme in a 5G system, an embodiment of the present disclosure provides an IP address allocation method, apparatus, electronic device, and medium. For ease of understanding, embodiments of the present disclosure are described in detail below.
Embodiment one:
the present embodiment provides a method for allocating an IP address, which can 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 the first user equipment is received through the SMF. The first user equipment includes, in addition to a hardware entity directly operated by a user, a hardware entity on the user side, for example: a home gateway, a fixed network residential gateway, etc., are not limited herein.
The IP address of the first ue is allocated by the SMF in the session establishment procedure, and each time the session is successfully established, the IP address allocated by the SMF is in a common address range for the same session ID or different session IDs of the first ue of the same IMSI. In the process of allocating an IP address to the first user equipment, the following steps may be referred to, and the IP address allocated to the first user equipment may be determined according to the attribute of the request address (i.e. whether it is a static address) and the status of the address pool.
Step S104, judging whether the subscription information contains 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 allocation is performed with reference to step S106, whereas the dynamic address allocation is performed with reference to step S108.
Step S106, assigning the static address to the first user device in case the static address belongs to a pre-planned address range.
If the subscription information contains static addresses, it is considered that in the 5G system, one user equipment can correspond to a plurality of IP addresses, and the plurality of IP addresses belong to one address range in common; therefore, in order to avoid the problem that the first user equipment uses the static address which does not belong to the planned address range, and the service abnormality of the user equipment occurs, in this embodiment, whether the static address contained in the subscription information belongs to the pre-planned address range is first determined, and in the case of the static address belongs to the pre-planned address range, the static address is allocated to the first user equipment by combining with the pre-configured second address pool.
Step S108, selecting a target address attribute according to the session establishment request or subscription information, and carrying out 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 preconfigured address pool matched with the target address attribute.
And if the static address is not contained, carrying out 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 subscription information may be referred to as follows:
when the address attribute is provided in the session establishment request, the address attribute provided by the session establishment request is used as the selected target address attribute; when the address attribute is not provided in the session establishment request, the address attribute carried by the subscription information is used as the selected target address attribute. The address attribute is an address attribute such as DNN (Data Network Name ) or APN (Access Point Name, access point name).
In some implementations, if the target 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, dynamic address allocation cannot be performed on the first user equipment based on the target address attribute. In this case, the SMF refuses to establish a session with the first user equipment, ending the session establishment procedure.
For the pre-configured address pool, the 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; among the address pool attributes include, but are not limited to: address attributes, address ranges, 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 carrying out address allocation based on multiple network element resources such as DHCP, AF, UPF and the like, the IP address allocation method provided by the embodiment of the 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 containing subscription information sent by first user equipment through SMF, and carries out static address allocation or dynamic address allocation for the first user equipment according to whether the subscription information contains static addresses or not; the scheme uses a single SMF to obviously reduce unnecessary signaling interaction overhead, thereby achieving low-cost address allocation. And 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, so that the problem of abnormal service of the user equipment can be solved; in the dynamic address allocation process, the complex diversity of address allocation can be fully considered by utilizing the pre-configured address pool matched with the target address attribute, so that the allocated addresses are ensured not to collide, and the efficiency and stability of the address allocation are improved. Therefore, the technical scheme aims at the 5G system, so that the signaling overhead is reduced, 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 by the embodiments of the present disclosure, this 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, judging whether the subscription information contains static address. If a static address is included, the static address is assigned to the first user equipment as follows steps S206 to S212. If the static address is not included, then referring to fig. 3, the first user equipment is dynamically assigned an address.
Step S206, judging whether the static address belongs to a pre-planned address range. If it belongs to the address range, static addresses are allocated to the first user equipment based on the preconfigured second address pool, and the specific implementation process can refer to the following steps S208 to S212. If not, referring to fig. 3, a target address attribute is selected according to the session establishment request or subscription information, and dynamic address allocation is performed 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 second address pool which is preconfigured; if the address belongs to the second address pool, executing step S210; if not, step S212 is performed.
Step S210, judging whether the static address meets the use condition. Wherein, the conditions of use include: the static address is not used or is not used in a dynamic manner by the second user device.
In particular embodiments, the method comprises: judging whether the static address is used or not; if not, the tag static address has been used in a static manner and it is determined that the use condition is satisfied.
If so, judging whether the static address is used by the second user equipment in a dynamic mode; if the address is used by the second user equipment in a dynamic mode, the second user equipment is informed to re-request the allocation address, and the use condition is determined to be met. If not used by the second user equipment in a dynamic manner, determining that the use condition is not satisfied, and refusing to establish the session with the first user equipment.
Through the above-described determination, if the static address satisfies the use condition, step S212 is performed. If the static address does not meet the use condition, the session establishment with the first user equipment is refused.
Step S212, the static address is allocated to the first user equipment.
And distributing the static address to the first user equipment according to the steps.
In case that the subscription information does not contain a static address or the static address does not belong to a pre-planned address range, the dynamic address allocation is performed for the first user equipment with reference to the steps shown in fig. 3.
Step S302, judging whether the target 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 performed, and the session establishment with the first user equipment is refused. 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.
The SMF pre-configures an address pool matching different address attributes based on address pool attributes such as DNN. The embodiment judges whether a first address pool matched with the target address attribute exists in a preset address pool or not; if there is a matching first address pool, then step S306 is performed; if there is no matching first address pool, step S314 is performed, refusing to establish a session with the first user equipment.
Step S306, judging whether the first IP address which can be allocated exists in the first address pool. The first IP address may refer to an IP address in the first address pool that is not used, i.e., may be allocated.
If there is an allocable first IP address, then step S308 is performed; if there is no allocatable first IP address, step S310 is performed.
Step S308, the first IP address is allocated to the first user equipment.
Step S310, judging whether there is a second IP address with recovery time reaching the preset reassignment time in the recovery addresses.
In some recycling address processing schemes, as long as the IP address is in the recycling state, the IP address can be reassigned, and the reassignment time interval is very short, which may cause the problem that the IP address of the user equipment is still used, and thus the address conflict affects the service. Based on this, the present embodiment presets a reassignment time indicating a time at which the reclaimed time recorded by the reclaimed IP address reaches reassignability. The IP address is regarded as the allocatable second IP address only if it is determined that the recovery time of the IP address reaches the reassignment time. In addition, when there are a plurality of IP addresses reaching the reassignment time among the reclaimed addresses, the IP address having the earliest reclaimed time may be taken as the second IP address to be assigned.
If it is judged that the second IP address reaching the reassignment time exists, step S312 is executed, otherwise step S314 is executed, and the session establishment with the first user equipment is refused.
Step S312, the second IP address is distributed to the first user equipment;
step S314, the session establishment with the first user equipment is refused.
In summary, the method for allocating the IP address provided in the embodiments of the present disclosure does not need to rely on multiple network element resources such as DHCP, UPF, AF, and uses a single SMF to control and manage address allocation of the user equipment, thereby reducing signaling overhead and simplifying reliance of network element resources. According to the technical scheme, aiming at 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, so that the problem of abnormal service of the user equipment can be solved, and the conflict of the allocated address is avoided by judging whether the static address is used or not. In the dynamic address allocation process, the address pool preconfigured based on DNN and other address attributes is utilized, and an elegant recovery mode for recording recovery time is adopted in recovery addresses, so that the complexity and the 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 method for local configuration, perfect address management, allocation and graceful release of SMF can avoid address conflict, achieve static and dynamic allocation of the IP address of the user equipment with smaller cost and high efficiency and flexibility, and further facilitate improving service quality and user experience and improving economic benefits of operators.
Embodiment 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 judging module 404, configured to judge 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 without including the static address, and perform dynamic address allocation on the first user equipment based on the target address attribute and a first address pool; the first address pool is a preconfigured address pool matched with the target address attribute.
In one embodiment, static allocation module 406 is specifically configured to:
judging whether the static address belongs to a pre-planned address range or not;
if the static address belongs to the address range, the static address is distributed to the first user equipment based on a second address pool which is preconfigured;
and if the address range is not included, selecting a target address attribute according to the session establishment request or the subscription information, and carrying out dynamic address allocation on the first user equipment based on the target address attribute and a first address pool.
In one embodiment, static allocation module 406 is specifically configured to:
judging whether the static address belongs to a second address pool which is preconfigured;
if the static address does not belong to the second address pool, the static address is distributed to the first user equipment;
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, distributing the static address to the first user equipment.
In one embodiment, static allocation module 406 is specifically configured to:
judging whether the static address is used or not;
if not, marking that the static address has been used in a static manner and determining that the use condition is satisfied;
if so, judging whether the static address is used by the 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 to re-request the allocation address, and determining that the use condition is met;
if not used by the second user equipment in a dynamic manner, determining that the use condition is not satisfied, and refusing to establish 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 a matched first address pool exists, judging whether an allocatable first IP address exists in the first address pool;
if the allocable first IP address exists, allocating the first IP address to the first user equipment;
if the first IP address which can be allocated does not exist, judging whether a second IP address with the recovery time reaching the preset reallocation time exists in the recovery address or not;
and if the second IP address reaching the reassignment time exists, assigning 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 match the first address pool;
or, there is no second IP address reaching the reassignment time in the reclaimed address.
In one embodiment, the dynamic allocation module 408 is specifically configured to:
when the address attribute is provided in the session establishment request, the address attribute provided by the session establishment request is used 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 one embodiment, the apparatus further includes an address pool configuration module configured to:
initializing and configuring an address pool according to preset address pool attributes; wherein the address pool attributes include: address attributes, address ranges, 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-described apparatus is applied to SMF.
The device provided in this embodiment has the same implementation principle and technical effects as those of the foregoing method embodiment, and for brevity, reference may be made to the corresponding content of the foregoing method embodiment where the device embodiment is not mentioned.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. As shown in fig. 5, 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 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) and/or cache memory (cache), and the like. The non-volatile memory may include, for example, read Only Memory (ROM), hard disk, flash memory, and the like. One or more computer program instructions may be stored on the computer readable storage medium that can be executed by the processor 501 to implement the IP address assignment method and/or other desired functions of the embodiments of the present disclosure described above. Various contents such as an input signal, a signal component, a noise component, and the like 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).
In addition, 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 device 504 may include, for example, a display, speakers, a printer, and a communication network and remote output apparatus connected thereto, etc.
Of course, only some of the components of the electronic device 500 that are relevant to the present disclosure are shown in fig. 5 for simplicity, components such as buses, input/output interfaces, etc. are omitted. 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 storing a computer program for executing the above-described IP address allocation method.
The embodiment of the present disclosure provides a method, an apparatus, an electronic device, and a computer program product of a medium for allocating an IP address, which includes a computer readable storage medium storing program codes, where instructions included in the program codes may be used to execute a method described in the foregoing method embodiment, and specific implementation may refer to the method embodiment and will not be described herein.
It should be noted that in this document, relational terms such as "first" and "second" and the like are 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. Moreover, 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing is merely a specific embodiment of the disclosure to enable one skilled in the art to understand or practice the 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 and described herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (12)

1. A method for assigning IP addresses, the method being applied to a 5G core network, 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 or not;
if the static address is contained, distributing the static address to the first user equipment under the condition that the static address belongs to a preplanned 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 carrying out dynamic address allocation on the first user equipment based on the target address attribute and a first address pool; the first address pool is a preconfigured address pool matched with the target address attribute;
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, the address attribute provided by the session establishment request is used 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.
2. The method according to claim 1, wherein said assigning the static address to the first user device in case 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 static address belongs to the address range, the static address is distributed to the first user equipment based on a second address pool which is preconfigured;
and if the address range is not included, selecting a target address attribute according to the session establishment request or the subscription information, and carrying out dynamic address allocation on the first user equipment based on the target address attribute and a first address pool.
3. The method of claim 2, wherein the assigning the static address to the first user device based on the preconfigured second pool of addresses comprises:
judging whether the static address belongs to a second address pool which is preconfigured;
if the static address does not belong to the second address pool, the static address is distributed to the first user equipment;
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, distributing the static address to the first user equipment.
4. A method according to claim 3, wherein said determining whether said static address satisfies a use condition comprises:
judging whether the static address is used or not;
if not, marking that the static address has been used in a static manner and determining that the use condition is satisfied;
if so, judging whether the static address is used by the 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 to re-request the allocation address, and determining that the use condition is met;
if not used by the second user equipment in a dynamic manner, determining that the use condition is not satisfied, and refusing to establish a session with the first user equipment.
5. The method according to claim 1 or 2, wherein said dynamically allocating 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 a matched first address pool exists, judging whether an allocatable first IP address exists in the first address pool;
if the allocable first IP address exists, allocating the first IP address to the first user equipment;
if the first IP address which can be allocated does not exist, judging whether a second IP address with the recovery time reaching the preset reallocation time exists in the recovery address or not;
and if the second IP address reaching the reassignment time exists, assigning the second IP address to the first user equipment.
6. The method of claim 5, wherein the method further comprises:
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 match the first address pool;
or, there is no second IP address reaching the reassignment time in the reclaimed address.
7. The method according to claim 1, wherein the method further comprises:
initializing and configuring an address pool according to preset address pool attributes; wherein the address pool attributes include: address attributes, address ranges, and number of addresses.
8. The method of claim 7, wherein the address attributes comprise: a data network name DNN and/or an access point name APN.
9. The method according to claim 1, characterized in that the method is applied to a session management function SMF.
10. An apparatus for assigning IP addresses, the apparatus being applied to a 5G core network, the apparatus comprising:
a request receiving module, 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;
the judging module is used for judging whether the subscription information contains a static address or not;
the static allocation module is used for allocating the static address to the first user equipment under the condition that the static address is included and the static address belongs to a pre-planned address range;
the dynamic allocation module is used for selecting 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 carrying out dynamic address allocation on the first user equipment based on the target address attribute and a first address pool; the first address pool is a preconfigured address pool matched with the target address attribute;
the dynamic allocation module is further configured to:
when the address attribute is provided in the session establishment request, the address attribute provided by the session establishment request is used 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.
11. An electronic device, the electronic device comprising:
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 according to any one of claims 1 to 9.
12. 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 the preceding claims 1-9.
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 CN114363881A (en) 2022-04-15
CN114363881B true 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)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
CN115002749B (en) * 2022-06-20 2024-06-07 中国电信股份有限公司 IP address allocation method and device, storage medium and electronic equipment
CN115174525B (en) * 2022-06-30 2024-03-15 北京百佑科技有限公司 Equipment IP address allocation method and device

Citations (5)

* 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
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

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
BR112018000736A2 (en) * 2015-07-14 2018-09-04 Huawei Technologies Co., Ltd. IP address designation method, network system for IP address designation and user equipment
US10404655B2 (en) * 2017-02-03 2019-09-03 T-Mobile Usa, Inc. IP index for IP address allocation based on policy control function
KR102293669B1 (en) * 2017-05-08 2021-08-25 삼성전자 주식회사 Session continuity support for 5g cellular network
CN112567699A (en) * 2018-08-13 2021-03-26 苹果公司 Flexible range of packet filters for reflected quality of service

Patent Citations (5)

* 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
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

Also Published As

Publication number Publication date
CN114363881A (en) 2022-04-15

Similar Documents

Publication Publication Date Title
CN114363881B (en) IP address allocation method, device, equipment and medium
CN110417676B (en) Scheduling method, device and scheduling network
US20160080483A1 (en) Method for setting gateway device identity, and management gateway device
US20130166776A1 (en) Method, apparatus, and system for allocating public ip address
CN109151009B (en) CDN node distribution method and system based on MEC
CN101951417A (en) Method, system and trunk equipment for assigning multiple server addresses
CN110677405A (en) Data processing method and device, electronic equipment and storage medium
CN108040009B (en) Data directional transmission method, data directional transmission control device and computer readable storage medium
US20200334384A1 (en) Method of dynamically configuring fpga and network security device
US11394683B2 (en) Domain name resolution method and apparatus based on a plurality of availability zones AZ
CN113612861B (en) Remote access method, system and computer readable storage medium
CN105245629A (en) DHCP-based host communication method and device
CN104519551B (en) WiFi network DHCP negotiation method and client
CN101997931A (en) Position information acquiring method and equipment
CN111683159A (en) IP address allocation method, device, system and storage medium
CN109302302B (en) Method, system and computer readable storage medium for scaling service network element
CN107534919B (en) IP address management method and device, IP address anchor point and mobile node
KR100977399B1 (en) Method and apparatus of processing DHCP packet in dynamic IP address allocation for reducing network load
CN110753134A (en) Multi-policy DHCP client classification method and system
CN113497811A (en) Domain name system server distribution method and related equipment
CN113452586B (en) Method and device for registering edge computing node and intelligent home system
CN117478722B (en) P2P identifier allocation method, system, electronic equipment and storage medium
US20240064212A1 (en) Discovery Request and Response Handling
CN108540585B (en) Address allocation method and device and communication equipment
CN115484230B (en) Network access method, system, equipment and storage medium

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