Address allocation method of gateway, core network, user terminal, medium and product

By automatically acquiring and encapsulating the network segment information of downstream devices in the 5G network through the core network, the problem of low intelligence and errors caused by manual configuration of network segment information of downstream devices for user terminals is solved, and efficient and accurate allocation of gateway addresses is achieved.

CN122160359APending Publication Date: 2026-06-05CHENGDU TD TECH LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHENGDU TD TECH LTD
Filing Date
2026-05-09
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

In 5G networks, the network segment information of devices connected to user terminals needs to be manually configured into the DHCP Server address pool, resulting in low intelligence and a high risk of errors, leading to network access failures.

Method used

When establishing a Protocol Data Unit (PDU) session at a user terminal via the core network, the network segment information of the downstream devices is obtained and encapsulated into the protocol configuration option field. A PDU session establishment response message is then constructed, and the user terminal automatically resolves and assigns a gateway IP address without requiring manual configuration.

Benefits of technology

It improves the intelligence of gateway address allocation, reduces manual configuration errors, enhances the accuracy and efficiency of address allocation, and ensures stable network access for downstream devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122160359A_ABST
    Figure CN122160359A_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a gateway address allocation method, a core network, a user terminal, a medium and a product. The method comprises the following steps: when a protocol data unit session is established by the user terminal, the core network acquires the information of a network segment of a hanging device associated with the user terminal and an Internet protocol address of the user terminal, encapsulates the information of the network segment of the hanging device into a protocol configuration option field, and constructs a protocol data unit session establishment response message according to the protocol configuration option field and the Internet protocol address of the user terminal, wherein the protocol data unit session establishment response message comprises the protocol configuration option field and the Internet protocol address of the user terminal. Then, the protocol data unit session establishment response message is sent to the user terminal, and the user terminal is used for allocating the Internet protocol address of the gateway used by the hanging device according to the protocol data unit session establishment response message. The application does not need a user to manually configure the network segment information to the user terminal, and the intelligent degree and the accuracy of address allocation are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a gateway address allocation method, core network, user terminal, medium and product. Background Technology

[0002] In 5G networks, user equipment (UE) not only needs to access the network itself, but also needs to provide network access capabilities for downstream devices.

[0003] In related technologies, the network segment information of the UE-connected device needs to be manually configured by the user into the address pool of the UE terminal's Dynamic Host Configuration Protocol Server (DHCP Server). In this way, the connected device can obtain the Internet Protocol (IP) address of the gateway it uses through DHCP.

[0004] However, the above methods have a low level of intelligence and are prone to errors. Summary of the Invention

[0005] This application provides a gateway address allocation method, core network, user terminal, medium, and product to achieve the technical effect of improving intelligence and accuracy.

[0006] In a first aspect, embodiments of this application provide a gateway address allocation method, applied to a core network, comprising:

[0007] When a user terminal establishes a protocol data unit session, the network segment information of the downstream device associated with the user terminal and the Internet Protocol address of the user terminal are obtained. The network segment information of the downstream device and the Internet Protocol address of the user terminal are located in the same subnet or different subnets.

[0008] The network segment information of the downstream device is encapsulated into the protocol configuration option field;

[0009] Based on the protocol configuration option field and the Internet Protocol address of the user terminal, a Protocol Data Unit Session Establishment Response Message is constructed, wherein the Protocol Data Unit Session Establishment Response Message contains the protocol configuration option field and the Internet Protocol address of the user terminal;

[0010] The Protocol Data Unit (PDU) Session Establishment Response Message is sent to the user terminal, and the user terminal is used to allocate the Internet Protocol address of the gateway to the downstream device according to the PDU Session Establishment Response Message.

[0011] In one possible implementation, encapsulating the downstream device network segment information into a protocol configuration option field includes:

[0012] A preset hash algorithm is used to perform a hash operation on the core network segment identifier of the downstream device network segment information to obtain a verification hash value;

[0013] Based on the encapsulation conditions of the protocol configuration option field, the format of the downstream device network segment information is adjusted to obtain the adjusted downstream device network segment information;

[0014] The verification hash value and the adjusted downstream device network segment information are encapsulated into the preset field position of the protocol configuration option field.

[0015] Secondly, embodiments of this application provide a gateway address allocation method, applied to a user terminal, comprising:

[0016] The system receives a Protocol Data Unit (PDU) Session Establishment Response (PDRT) message sent by the core network. The PDU Session Establishment Response message includes a Protocol Configuration Options field and the Internet Protocol address of the user terminal.

[0017] Extract the protocol configuration option field and the Internet protocol address of the user terminal from the protocol data unit session establishment response message;

[0018] The protocol configuration option fields are parsed to obtain the network segment information of the downstream devices of the user terminal;

[0019] If the network segment information of the downstream device and the Internet Protocol address of the user terminal are located in different subnets, then the Internet Protocol address of the gateway used by the downstream device is assigned to the downstream device according to the network segment information of the downstream device;

[0020] If the network segment information of the downstream device and the Internet Protocol address of the user terminal are located in the same subnet, then the Internet Protocol address of the gateway used by the downstream device is assigned to the downstream device according to the network segment information of the downstream device and the Internet Protocol address of the user terminal.

[0021] In one possible implementation, parsing the protocol configuration option field to obtain the downstream device network segment information of the user terminal includes:

[0022] Extract the verification hash value and encapsulated network segment information from the preset corresponding positions of the protocol configuration option fields respectively;

[0023] A preset hash algorithm is used to perform hash operations on the encapsulated network segment information to generate a comparison hash value. The preset hash algorithm is the same as the preset hash algorithm used in the core network encapsulation process.

[0024] The comparison hash value is compared with the verification hash value to obtain the comparison result;

[0025] If the comparison result indicates that the comparison hash value is the same as the verification hash value, then the encapsulated network segment information is determined to be the network segment information of the downstream device of the user terminal.

[0026] In one possible implementation, the downstream device network segment information includes multiple Internet Protocol (IP) addresses, and the step of allocating the IP address of the gateway used by the downstream device based on the downstream device network segment information includes:

[0027] Based on preset selection rules, a first target address is determined from the plurality of Internet Protocol addresses;

[0028] The first target address is determined as the Internet Protocol address of the gateway used by the downstream device.

[0029] In one possible implementation, the step of allocating the Internet Protocol address of the gateway to the downstream device based on the downstream device network segment information and the Internet Protocol address of the user terminal includes:

[0030] Configure the control plane internal gateway address and default route of the user terminal based on the network segment information of the downstream device and the Internet Protocol address of the user terminal;

[0031] Based on the internal gateway address and default route of the control plane, the Internet Protocol address of the user terminal is determined as the Internet Protocol address of the gateway used to allocate the downstream device.

[0032] In one possible implementation, the downstream device network segment information includes multiple Internet Protocol (IP) addresses. The step of configuring the control plane internal gateway address and default route of the user terminal based on the downstream device network segment information and the user terminal's IP address includes:

[0033] Configure the Internet Protocol address of the user terminal to the Internet Protocol address of the local bridge;

[0034] Based on preset selection rules, a second target address is determined from the plurality of Internet Protocol addresses;

[0035] The second target address is determined as the control plane internal gateway address of the user terminal;

[0036] The default route of the user terminal is configured to use the control plane internal gateway address as the next hop, so that packets sent by the downstream device to the Internet Protocol address of the user terminal are forwarded to the core network via the control plane internal gateway address.

[0037] In one possible implementation, after obtaining the network segment information of the downstream device of the user terminal, the method further includes:

[0038] The network segment information of the downstream device of the user terminal is stored in the local dynamic host configuration protocol server address pool for use when allocating the Internet Protocol address of the gateway used by the downstream device.

[0039] Thirdly, embodiments of this application provide a core network, including: a memory and a processor;

[0040] The memory stores computer-executed instructions;

[0041] The processor executes computer execution instructions stored in the memory, causing the processor to perform the implementation method described in the first aspect above.

[0042] Fourthly, embodiments of this application provide a user terminal, including: a memory and a processor;

[0043] The memory stores computer-executed instructions;

[0044] The processor executes computer execution instructions stored in the memory, causing the processor to perform the second aspect and / or various possible implementations of the second aspect as described above.

[0045] Fifthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement various possible implementations of the first and / or second aspects described above.

[0046] Sixthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements various possible implementations of the first and / or second aspects described above.

[0047] The gateway address allocation method, core network, user terminal, medium, and product provided in this application embodiment, by having the core network obtain the downstream device network segment information and the user terminal's Internet Protocol address when the user terminal establishes a Protocol Data Unit (PDU) session, and encapsulate the downstream device network segment information into a protocol configuration option field, thereby constructing a PDU session establishment response message and sending it to the user terminal. This PDU session establishment response message includes the protocol configuration option field and the user terminal's Internet Protocol address. The method of this application enables the user terminal to allocate a gateway's Internet Protocol address to the downstream device based on the PDU session establishment response message, eliminating the need for the user to manually configure the network segment information into the DHCP Server address pool. This effectively improves the intelligence level of gateway address allocation for downstream devices, reduces errors caused by manual configuration, and improves the accuracy of gateway address allocation. Attached Figure Description

[0048] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0049] Figure 1 A schematic diagram illustrating the allocation of a gateway Internet Protocol address to a downstream device, as provided in this application;

[0050] Figure 2 A flowchart illustrating a gateway address allocation method provided in an embodiment of this application;

[0051] Figure 3 A flowchart illustrating another gateway address allocation method provided in this application embodiment;

[0052] Figure 4 A flowchart illustrating a method for configuring the control plane internal gateway address and default route of a user terminal, as provided in an embodiment of this application;

[0053] Figure 5 A schematic diagram of the structure of an address allocation device for a gateway provided in an embodiment of this application;

[0054] Figure 6 A schematic diagram of the structure of another gateway address allocation device provided in an embodiment of this application;

[0055] Figure 7 A schematic diagram of the core network structure provided in an embodiment of this application;

[0056] Figure 8 This is a schematic diagram of the structure of a user terminal provided in an embodiment of this application.

[0057] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0058] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0059] First, let me explain the terms used in this application:

[0060] Downlink devices refer to various terminal devices in the network topology that are connected to a main terminal device and rely on that terminal as a communication intermediary to access the network. These devices do not directly establish a connection with the core network, but forward and interact with data through the upper-level terminal device.

[0061] In 5G networks, user terminals not only need to access the network themselves, but also need to provide network access capabilities for downstream devices, such as smart home devices, industrial IoT devices, and cameras. At this time, user terminals need to dynamically obtain their own IP address and the network segment information of downstream devices through the 5G Core Network (5GC) to achieve data communication between downstream devices and the core network.

[0062] Frame routing is a new routing solution for scenarios involving downstream devices on the terminal. This solution enables downstream devices to access the network and transmit data through the UE.

[0063] Specifically, please see Figure 1 , Figure 1 This application provides a schematic diagram of allocating a gateway Internet Protocol address to a downstream device. Before the Protocol Data Unit (PDU) session of the UE is activated, the corresponding downstream device network segment information needs to be configured for the UE on the Authentication, Authorization, Accounting (AAA) server.

[0064] The wireless access node is responsible for providing 5G wireless access services to the UE and enabling wireless data transmission and protocol forwarding between the UE and the core network.

[0065] When the core network receives a PDU session activation request from the UE, it interacts with the AAA server via the Remote Authentication Dial In User Service (RADIUS) protocol. While assigning the UE an IP address, the AAA server also sends the network segment information of the downstream devices associated with the UE to the core network.

[0066] On the one hand, the core network distributes the UE's own IP address to the UE through the Non-Access Stratum (NAS). On the other hand, it converts the network segment information of the downstream devices returned by the AAA server into routing information and publishes it to the data network (DN) through the Session Management Function (SMF) and User Plane Function (UPF) network elements, thereby realizing direct IP data forwarding between the UE's downstream devices and devices in the DN network.

[0067] In related technologies, the UE can only obtain its own IP address through the PDU session activation process. The network segment information of its downstream devices still needs to be manually configured into the UE's DHCP Server address pool. Moreover, this configuration must be completely consistent with the network segment of the downstream devices pre-configured on the AAA server. Finally, the DHCP Server on the UE side assigns IP addresses to the gateways used by the downstream devices.

[0068] However, the above-mentioned manual configuration method has a low level of intelligence. When there are a large number of UE devices, the manual configuration workload is large and prone to errors, which in turn leads to problems such as the gateway used by the downstream devices being unable to obtain IP addresses and network access failure.

[0069] Therefore, to address the aforementioned issues in related technologies, this application proposes that during the UE's PDU session establishment process, the core network obtains the network segment information of the downstream device associated with the UE and the UE's own IP address, and encapsulates the downstream device network segment information into the Protocol Configuration Option (PCO) field. Then, based on this field and the UE's own IP address, a PDU session establishment response message is constructed and sent to the UE. This allows the UE to allocate gateway IP addresses to the downstream devices according to the PDU session establishment response message, thereby eliminating the need for manual configuration of network segment information and improving the intelligence and accuracy of gateway address allocation.

[0070] This application can be widely applied in various scenarios where user terminals provide network access for downstream devices in 5G networks, including but not limited to smart home networking, industrial IoT terminal access, security camera networking, and enterprise-level multi-device sharing of 5G network access. In these scenarios, user terminals need to assign gateway IP addresses to downstream devices through the 5G network to achieve data communication.

[0071] The gateway address allocation method provided in this application enables the core network to automatically distribute the network segment information of the downstream device of the user terminal during the establishment of the Protocol Data Unit session, without the need for manual configuration on the terminal side. This effectively improves the efficiency and accuracy of gateway address allocation in scenarios with multiple terminals and multiple downstream devices, and ensures stable network access for downstream devices.

[0072] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0073] Please see Figure 2 , Figure 2 This is a flowchart illustrating a gateway address allocation method provided in an embodiment of this application. The executing entity of this method can be the core network, such as... Figure 2 As shown, the method may include the following steps:

[0074] S201. When establishing a protocol data unit session at a user terminal, obtain the network segment information of the downstream device associated with the user terminal and the Internet protocol address of the user terminal.

[0075] When a UE equipped with multiple downstream devices initiates a PDU session establishment request, triggering the PDU session establishment, the SMF network element in the core network interacts with the pre-configured AAA server through the Radius protocol.

[0076] Based on the UE's terminal identifier, the core network obtains the network segment information of the downstream devices bound to the UE, and assigns a dedicated IP address to the UE in combination with the preset network address allocation rules.

[0077] The network segment information of the downstream device and the IP address of the UE can be set according to the actual networking requirements. They can be in the same subnet to adapt to short-distance, small-scale downstream device networking scenarios, or they can belong to different subnets to meet the networking requirements of large-scale, hierarchical IoT devices and ensure the flexibility of network deployment.

[0078] Therefore, in this embodiment, the network segment information of the downstream devices and the Internet Protocol address of the user terminals can be pre-configured to be in the same subnet or different subnets, according to the actual networking requirements.

[0079] Optionally, the aforementioned pre-configured downstream device network segment information can be determined in conjunction with the core network's process of obtaining UE-related information. That is, during the interaction between the SMF network element and the AAA server, in addition to obtaining the basic network segment information bound to the UE terminal identifier, the usage mode of the UE can also be obtained simultaneously. This usage mode may include key information such as the number of downstream devices connected to the user terminal and their activity level. Based on this usage mode, the core network can flexibly pre-configure the IP address range of the downstream device network segment to ensure that the configured network segment information matches the actual deployment of the downstream devices connected to the UE.

[0080] S202. Encapsulate the network segment information of the downstream device into the protocol configuration option field.

[0081] The SMF network elements in the core network use a preset hash algorithm to perform a hash operation on the core network segment identifier of the downstream device network segment information to obtain a verification hash value. The core network segment identifier is key identification information for the downstream device network segment. The preset hash algorithm adapts to the interaction requirements of 5G network protocols, ensuring that the obtained verification hash value is unique and can be used for subsequent verification of the validity of network segment information by user terminals.

[0082] Based on the encapsulation conditions of the PCO field and in accordance with 5G network protocol specifications, the SMF network elements of the core network standardize the format of the downstream device network segment information, eliminating invalid and redundant fields and unifying the data encoding format to obtain adjusted downstream device network segment information adapted to the PCO field encapsulation requirements. The PCO field provides additional information for user terminals to connect to the network and serves as a compliant carrier for transmitting downstream device network segment information between the core network and user terminals, ensuring that the network segment information is not lost or corrupted during subsequent message transmission.

[0083] The SMF network element of the core network will verify the hash value and the adjusted downstream device network segment information, and embed the subfields into the preset corresponding positions of the PCO field.

[0084] Specifically, by utilizing the "FF00H~FFFFH" range identifier (Id) reserved for operator-defined extensions in the communication protocol, the verification hash value is embedded into the preset verification field corresponding to the custom extension Id, and the adjusted downstream device network segment information is embedded into the preset data field corresponding to the custom extension Id. The two fields are bound to each other to avoid conflicts with the fields corresponding to the "Reserved" range Id in the PCO field, ensuring the directional transmission of network segment information and verification information, and adapting to the protocol interaction standard between the core network and the UE.

[0085] The term "Reserved" indicates that the current standard has not yet assigned specific functions to these IDs.

[0086] S203. Based on the protocol configuration option field and the Internet protocol address of the user terminal, construct a protocol data unit session establishment response message.

[0087] Based on the protocol configuration option field that encapsulates the network segment information of the downstream device, the SMF network element combines the assigned UE's own IP address with the signaling interaction specification for PDU session establishment in 5G network. It embeds the UE's own IP address and the protocol configuration option field that encapsulates the network segment information of the downstream device into the corresponding signaling field of the PDU session establishment response message, thereby constructing a complete protocol data unit session establishment response message.

[0088] The Protocol Data Unit (PDU) session establishment response message includes a protocol configuration options field and the Internet Protocol address of the user terminal.

[0089] S204. Send the Protocol Data Unit Session Establishment Response Message to the user terminal.

[0090] The user terminal is used to assign the Internet Protocol address of the gateway to the downstream device based on the protocol data unit session establishment response message.

[0091] The core network sends the established protocol data unit session establishment response message to the UE. After receiving the message, the UE automatically parses the message content and extracts the network segment information of the downstream devices. Without the need for manual configuration of network segment parameters in the UE's DHCP Server address pool, the UE can automatically assign corresponding gateway IP addresses to each of its downstream devices based on the parsed network segment information, thereby completing the network access configuration of the downstream devices.

[0092] In the above embodiments of this application, when a user terminal establishes a Protocol Data Unit (PDU) session, the core network obtains the network segment information of the downstream device and the Internet Protocol (IP) address of the user terminal, encapsulates the downstream device network segment information into a protocol configuration option field, and then constructs a PDU session establishment response message and sends it to the user terminal. This PDU session establishment response message contains the protocol configuration option field and the user terminal's IP address. This method allows the user terminal to allocate an IP address for a gateway to a downstream device based on the PDU session establishment response message, eliminating the need for the user to manually configure the network segment information into the DHCP Server address pool. This effectively improves the intelligence of allocating gateway addresses to downstream devices, reduces errors caused by manual configuration, and improves the accuracy of gateway address allocation.

[0093] Based on the above embodiments, the following embodiments further illustrate the gateway address allocation process. Please refer to... Figure 3 , Figure 3 This is a flowchart illustrating another gateway address allocation method provided in an embodiment of this application. The execution subject of this method is a user terminal, and the method may include the following steps:

[0094] S301. Receive the Protocol Data Unit Session Establishment Response Message sent by the core network. The Protocol Data Unit Session Establishment Response Message contains the Protocol Configuration Options field and the Internet Protocol address of the user terminal.

[0095] After the UE initiates a PDU session establishment request, it waits for the core network's response and receives the PDU session establishment response message issued by the core network.

[0096] The PDU session establishment response message has been encapsulated in accordance with the 5G PDU session signaling interaction specification. It contains key information such as the UE's own IP address and protocol configuration option fields encapsulating the network segment information of the downstream devices. Each piece of information corresponds to a specified signaling field embedded in the response message.

[0097] S302. Extract the protocol configuration option field and the Internet protocol address of the user terminal from the protocol data unit session establishment response message.

[0098] After receiving the PDU session establishment response message sent by the core network, the UE locates the PCO field in the message and extracts the check hash value and encapsulation network segment information based on the preset field positions agreed upon during the core network encapsulation phase. The preset field positions completely correspond to the field positions during core network SMF element encapsulation; specifically, they are the two associated fields corresponding to the operator-defined extended identifier within the "FF00H~FFFFH" range in the PCO field, the check hash value corresponds to the preset check field, and the encapsulation network segment information corresponds to the preset data field.

[0099] The UE uses the same preset hash algorithm as the core network SMF element encapsulation stage to perform hash operations on the extracted encapsulated network segment information and generate comparison hash values. Specifically, the preset hash algorithm prioritizes extracting the core network segment identifier from the encapsulated network segment information for processing, ensuring that the operation logic and parameters remain consistent with the core network encapsulation stage, and avoiding distortion of comparison results due to algorithm differences.

[0100] The UE compares the generated comparison hash value with the extracted verification hash value bit by bit to obtain the comparison result. If the comparison result indicates that the comparison hash value and the verification hash value are exactly the same, it means that the extracted encapsulated network segment information has not been tampered with, lost, or corrupted during transmission, and the encapsulated network segment information is determined to be valid information. This encapsulated network segment information is then identified as the network segment information of the UE's downstream device, and is used for subsequent allocation of the downstream device's gateway address. If the comparison result indicates that the two are inconsistent, the encapsulated network segment information is determined to be invalid, triggering a re-parsing process or reporting parsing error information to the core network to ensure the reliability of network segment information parsing.

[0101] S303. Parse the protocol configuration option fields to obtain the network segment information of the downstream devices of the user terminal.

[0102] The UE performs standardized parsing of the extracted protocol configuration option fields, and disassembles the valid information within the protocol configuration option fields according to the format used in the core network encapsulation, ultimately obtaining the network segment information of the downstream devices associated with the UE.

[0103] During the parsing process, the UE will verify the field format to ensure the legality and integrity of the network segment information of the connected devices, thereby reducing the occurrence of subsequent address allocation failures due to parsing errors.

[0104] S304. If the network segment information of the downstream device and the Internet Protocol address of the user terminal are located in different subnets, then the Internet Protocol address of the gateway used by the downstream device shall be assigned to the downstream device according to the network segment information of the downstream device.

[0105] The default routing architecture of a UE is usually a dual-segment scheme of Wide Area Network (WAN) and Local Area Network (LAN). The WAN is used for remote connection between the UE and the core network, and the LAN is used for local connection between the UE and downstream devices. In order to reduce network address conflicts and ensure the accuracy of data forwarding, the WAN side and the LAN side are divided into different subnets, so they are in different subnets.

[0106] The UE will perform subnetting by comparing the resolved downstream device network segment information with its own IP address. This comparison will determine whether the devices belong to the same subnet. The downstream device network segment information includes multiple Internet Protocol (IP) addresses.

[0107] If the determination result is different subnets, the UE will configure the obtained downstream device network segment information into the local DHCPServer address pool for use when allocating the Internet Protocol address of the gateway used by the downstream device.

[0108] Then, based on preset selection rules, the DHCP Server determines the first target address from multiple Internet Protocol addresses and sets this first target address as the Internet Protocol address of the gateway to be used by the downstream device.

[0109] For example, the first address among multiple Internet Protocol (IP) addresses is determined as the IP address of the gateway used by the downstream device.

[0110] By assigning corresponding gateway IP addresses to each of its attached downstream devices, the downstream devices can communicate with the core network and other networks through the gateway IP address, thus adapting to large-scale, hierarchical downstream device networking scenarios. At this time, the UE can still use the WAN and LAN dual-segment architecture to adapt to the networking needs of different subnet scenarios.

[0111] S305. If the network segment information of the downstream device and the Internet Protocol address of the user terminal are in the same subnet, then the Internet Protocol address of the gateway used by the downstream device shall be assigned to the downstream device according to the network segment information of the downstream device and the Internet Protocol address of the user terminal.

[0112] If the UE determines that the downstream device's network segment information and its own IP address are in the same subnet, the UE configures the user terminal's control plane internal gateway address and default route based on the downstream device's network segment information and the user terminal's Internet Protocol address. Then, based on the control plane internal gateway address and default route, the UE determines the user terminal's Internet Protocol address as the Internet Protocol address for the gateway used to allocate to the downstream device.

[0113] Please see Figure 4 , Figure 4 This application provides a flowchart illustrating a method for configuring the control plane interior gateway address and default route of a user terminal. The method may include the following steps:

[0114] S401. Configure the Internet Protocol address of the user terminal to the Internet Protocol address of the local bridge.

[0115] The UE directly configures the IP address assigned to it by the core network as the IP address of the UE's local bridge.

[0116] The local bridge is used to achieve network bridging between the UE's own control plane and the downstream device. By configuring the UE's own IP address as the local bridge IP, it can ensure that the packets sent by the downstream device can be accurately routed to the UE's local network, laying the foundation for subsequent configuration of the internal gateway address of the control plane and packet forwarding, while ensuring network connectivity between the UE and the downstream device within the same subnet.

[0117] S402. Based on preset selection rules, determine the second target address from multiple Internet Protocol addresses.

[0118] According to preset selection rules, the UE selects a second target address from multiple Internet Protocol addresses that meets the requirements of the control plane internal gateway address, and the second target address must be in the same subnet as the UE's own IP address and the network segment information of the connected devices.

[0119] For example, the preset selection rule can be to prioritize the selection of free IP addresses that are in the same network segment as the UE's own IP address and are not occupied by the UE itself or its downstream devices, while the address must meet the address specifications for 5G control plane signaling transmission.

[0120] For example, the preset selection rules can be randomized, and the second target address can be determined from the randomly selected Internet Protocol addresses.

[0121] After determining the second target address, the remaining addresses from the multiple Internet Protocol addresses other than the second target address are configured into the DHCP Server address pool.

[0122] S403. The second target address is determined as the control plane internal gateway address of the user terminal.

[0123] The UE officially designates this second target address as its own Control Plane (CP) internal gateway address. This CP internal gateway address is used for signaling interaction and message forwarding between the UE's control plane and the core network. It is not directly assigned to downstream devices; its function is to establish a control plane forwarding channel between the UE and the core network.

[0124] S404. Configure the default route of the user terminal to use the control plane internal gateway address as the next hop, so that the packets sent by the downstream device to the Internet Protocol address of the user terminal are forwarded to the core network via the control plane internal gateway address.

[0125] After the UE determines the address of the control plane's internal gateway, it initiates the default route configuration process.

[0126] Specifically, when the downstream device sends a data packet to the UE's own IP address, the UE can forward the packet to the control plane internal gateway address according to the default routing rule, and then the control plane internal gateway address will further forward it to the core network, thereby realizing the packet interaction between the downstream device and the core network and solving the problem that the downstream device's packets cannot be efficiently forwarded to the core network in the same subnet scenario.

[0127] In related technologies, UEs generally adopt a dual-segment WAN and LAN scheme, which means that the UE's own IP address (WAN side) and the network segment address of the connected device (LAN side) must be in different subnets. When there are too many UE devices, the division of a large number of dual-segment devices will significantly increase the difficulty of network deployment.

[0128] In step S305, the UE no longer uses the dual-segment scheme of WAN and LAN. Instead, it mounts the UE's own IP address, which originally belonged to the WAN side, and the network segment information of the downstream device, which belonged to the LAN side, to the same local bridge. After mounting the UE's own IP address on the WAN side and the network segment of the downstream device on the LAN side, the two will be included in the same Layer 2 network, thereby realizing integrated bridging and achieving integrated network bridging between the control plane and the downstream device.

[0129] This configuration method eliminates the need for additional WAN and LAN segment division, which reduces the complexity of network deployment in multi-UE scenarios, reduces deployment difficulty and maintenance costs caused by unreasonable segment division, and ensures the stability of data interaction between UEs and downstream devices and the core network within the same subnet through unified bearing of the local bridge and accurate forwarding of the internal gateway address of the control plane.

[0130] In the above embodiments of this application, the application automatically assigns a gateway Internet Protocol (IP) address to the downstream device by having the user terminal receive a Protocol Data Unit (PDU) session establishment response message issued by the core network. The PDU field, along with the user terminal's own Internet Protocol (IP) address, is extracted from the PDU and parsed to obtain the downstream device's network segment information. Based on whether the downstream device's network segment information and the user terminal's IP address are in the same subnet, the application automatically assigns a gateway IP address to the downstream device. This eliminates the need for manual configuration of network segment information in the user terminal's dynamic host configuration protocol server address pool, effectively reducing errors caused by manual configuration and improving the intelligence and accuracy of address allocation. Simultaneously, it simplifies the network deployment process, reduces the operational complexity and deployment difficulty in multi-terminal scenarios, and ensures stable network access for downstream devices and efficient data interoperability with the core network and data network.

[0131] This application also provides an address allocation device for a gateway; please refer to [link to relevant documentation]. Figure 5 , Figure 5 This application provides a schematic diagram of the structure of an address allocation device for a gateway, applied to a core network, comprising:

[0132] The acquisition module 501 is used to acquire the network segment information of the downstream device associated with the user terminal and the Internet Protocol address of the user terminal when the user terminal establishes a Protocol Data Unit session. The network segment information of the downstream device and the Internet Protocol address of the user terminal are located in the same subnet or different subnets.

[0133] Encapsulation module 502 is used to encapsulate the network segment information of the downstream device into the protocol configuration option field.

[0134] The construction module 503 is used to construct a Protocol Data Unit (PDU) session establishment response message based on the protocol configuration option field and the Internet Protocol address of the user terminal. The PDU session establishment response message contains the protocol configuration option field and the Internet Protocol address of the user terminal.

[0135] The sending module 504 is used to send the Protocol Data Unit Session Establishment Response Message to the user terminal. The user terminal is used to assign the Internet Protocol address of the gateway to the downstream device according to the Protocol Data Unit Session Establishment Response Message.

[0136] The address allocation device for the gateway provided in this embodiment can execute the method provided in the above-described core network execution method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.

[0137] This application also provides another address allocation device for a gateway, please refer to [link to relevant documentation]. Figure 6 , Figure 6 A schematic diagram of another gateway address allocation device provided in this application embodiment, applied to a user terminal, includes:

[0138] The receiving module 601 is used to receive the Protocol Data Unit Session Establishment Response message sent by the core network. The Protocol Data Unit Session Establishment Response message includes the protocol configuration option field and the Internet Protocol address of the user terminal.

[0139] Extraction module 602 is used to extract the protocol configuration option field and the Internet protocol address of the user terminal from the protocol data unit session establishment response message.

[0140] The parsing module 603 is used to parse the protocol configuration option fields to obtain the network segment information of the downstream devices of the user terminal.

[0141] The allocation module 604 is used to allocate the Internet Protocol address of the gateway to the downstream device based on the downstream device network segment information if the downstream device network segment information and the Internet Protocol address of the user terminal are located in different subnets.

[0142] The allocation module 604 is used to allocate the Internet Protocol address of the gateway to the downstream device based on the network segment information of the downstream device and the Internet Protocol address of the user terminal if the network segment information of the downstream device and the Internet Protocol address of the user terminal are located in the same subnet.

[0143] In one possible implementation, the downstream device network segment information includes multiple Internet Protocol addresses, and the allocation module 604 is specifically used for:

[0144] Based on preset selection rules, the first target address is determined from multiple Internet Protocol addresses.

[0145] The first target address is determined as the Internet Protocol address of the gateway used by the downstream device.

[0146] In one possible implementation, allocation module 604 is specifically used for:

[0147] Configure the internal gateway address and default route of the user terminal's control plane based on the network segment information of the downstream device and the Internet Protocol address of the user terminal.

[0148] Based on the control plane's internal gateway address and default route, the user terminal's Internet Protocol address is determined as the Internet Protocol address of the gateway used to assign to the downstream device.

[0149] In one possible implementation, the downstream device network segment information includes multiple Internet Protocol addresses, and the allocation module 604 is specifically used for:

[0150] Configure the user terminal's Internet Protocol address to the local bridge's Internet Protocol address.

[0151] Based on preset selection rules, a second target address is determined from multiple Internet Protocol addresses.

[0152] The second target address is determined as the control plane internal gateway address of the user terminal.

[0153] Configure the default route of the user terminal to use the control plane interior gateway address as the next hop, so that packets sent by the downstream device to the user terminal's Internet Protocol address are forwarded to the core network via the control plane interior gateway address.

[0154] In one possible implementation, before determining the first target address from multiple Internet Protocol addresses based on preset selection rules, the parsing module 603 is further configured to:

[0155] The network segment information of the user terminal's downstream devices is stored in the local dynamic host configuration protocol server address pool for use when allocating the Internet Protocol address of the gateway to be used by the downstream devices.

[0156] The address allocation device for the gateway provided in this embodiment can execute the method provided in the above-described user terminal execution method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.

[0157] Figure 7 This is a schematic diagram of a core network structure provided in an embodiment of this application. Figure 7 As shown, the core network provided in this embodiment includes at least one processor 701 and a memory 702. Optionally, the core network also includes a communication component 703. The processor 701, memory 702, and communication component 703 are connected via a bus 704.

[0158] In the specific implementation process, at least one processor 701 executes computer execution instructions stored in memory 702, causing at least one processor 701 to execute the method described above, in which the execution subject is the core network.

[0159] The specific implementation process of processor 701 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0160] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.

[0161] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0162] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0163] Figure 8 This is a schematic diagram of the structure of a user terminal provided in an embodiment of this application. Figure 8 As shown, the user terminal provided in this embodiment includes at least one processor 801 and a memory 802. Optionally, the user terminal further includes a communication component 803. The processor 801, memory 802, and communication component 803 are connected via a bus 804.

[0164] In the specific implementation process, at least one processor 801 executes computer execution instructions stored in memory 802, causing at least one processor 801 to execute the method described above, in which the execution subject is a user terminal.

[0165] The specific implementation process of processor 801 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0166] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.

[0167] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0168] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0169] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the methods described above for execution by the core network and / or user terminal.

[0170] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the aforementioned method executed by the core network and / or user terminal.

[0171] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory, electrically erasable programmable read-only memory, erasable programmable read-only memory, programmable read-only memory, read-only memory, magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0172] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an application-specific integrated circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.

[0173] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0174] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0175] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0176] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0177] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0178] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A method for address allocation of a gateway, characterized in that, Applied to the core network, including: When a user terminal establishes a protocol data unit session, the network segment information of the downstream device associated with the user terminal and the Internet Protocol address of the user terminal are obtained. The network segment information of the downstream device and the Internet Protocol address of the user terminal are located in the same subnet or different subnets. The network segment information of the downstream device is encapsulated into the protocol configuration option field; Based on the protocol configuration option field and the Internet Protocol address of the user terminal, a Protocol Data Unit Session Establishment Response Message is constructed, wherein the Protocol Data Unit Session Establishment Response Message contains the protocol configuration option field and the Internet Protocol address of the user terminal; The Protocol Data Unit (PDU) Session Establishment Response Message is sent to the user terminal, and the user terminal is used to allocate the Internet Protocol address of the gateway to the downstream device according to the PDU Session Establishment Response Message.

2. The method according to claim 1, characterized in that, The step of encapsulating the network segment information of the downstream device into the protocol configuration option field includes: A preset hash algorithm is used to perform a hash operation on the core network segment identifier of the downstream device network segment information to obtain a verification hash value; Based on the encapsulation conditions of the protocol configuration option field, the format of the downstream device network segment information is adjusted to obtain the adjusted downstream device network segment information; The verification hash value and the adjusted downstream device network segment information are encapsulated into the preset field position of the protocol configuration option field.

3. A method for address allocation of a gateway, characterized in that, Applied to user terminals, including: The system receives a Protocol Data Unit (PDU) Session Establishment Response (PDRT) message sent by the core network. The PDU Session Establishment Response message includes a Protocol Configuration Options field and the Internet Protocol address of the user terminal. Extract the protocol configuration option field and the Internet protocol address of the user terminal from the protocol data unit session establishment response message; The protocol configuration option fields are parsed to obtain the network segment information of the downstream devices of the user terminal; If the network segment information of the downstream device and the Internet Protocol address of the user terminal are located in different subnets, then the Internet Protocol address of the gateway used by the downstream device is assigned to the downstream device according to the network segment information of the downstream device; If the network segment information of the downstream device and the Internet Protocol address of the user terminal are located in the same subnet, then the Internet Protocol address of the gateway used by the downstream device is assigned to the downstream device according to the network segment information of the downstream device and the Internet Protocol address of the user terminal.

4. The method according to claim 3, characterized in that, The step of parsing the protocol configuration option fields to obtain the network segment information of the downstream device of the user terminal includes: Extract the verification hash value and encapsulated network segment information from the preset corresponding positions of the protocol configuration option fields respectively; A preset hash algorithm is used to perform hash operations on the encapsulated network segment information to generate a comparison hash value. The preset hash algorithm is the same as the preset hash algorithm used in the core network encapsulation process. The comparison hash value is compared with the verification hash value to obtain the comparison result; If the comparison result indicates that the comparison hash value is the same as the verification hash value, then the encapsulated network segment information is determined to be the network segment information of the downstream device of the user terminal.

5. The method according to claim 3, characterized in that, The downstream device network segment information includes multiple Internet Protocol (IP) addresses. The step of allocating the IP address of the gateway used by the downstream device based on the downstream device network segment information includes: Based on preset selection rules, a first target address is determined from the plurality of Internet Protocol addresses; The first target address is determined as the Internet Protocol address of the gateway used by the downstream device.

6. The method according to claim 3, characterized in that, The step of allocating the Internet Protocol address of the gateway to be used by the downstream device based on the network segment information of the downstream device and the Internet Protocol address of the user terminal includes: Configure the control plane internal gateway address and default route of the user terminal based on the network segment information of the downstream device and the Internet Protocol address of the user terminal; Based on the internal gateway address and default route of the control plane, the Internet Protocol address of the user terminal is determined as the Internet Protocol address of the gateway used to allocate the downstream device.

7. The method according to claim 6, characterized in that, The downstream device network segment information includes multiple Internet Protocol (IP) addresses. The step of configuring the control plane internal gateway address and default route of the user terminal based on the downstream device network segment information and the user terminal's IP address includes: Configure the Internet Protocol address of the user terminal to the Internet Protocol address of the local bridge; Based on preset selection rules, a second target address is determined from the plurality of Internet Protocol addresses; The second target address is determined as the control plane internal gateway address of the user terminal; The default route of the user terminal is configured to use the control plane internal gateway address as the next hop, so that packets sent by the downstream device to the Internet Protocol address of the user terminal are forwarded to the core network via the control plane internal gateway address.

8. The method according to claim 5, characterized in that, Before determining the first target address from the plurality of Internet Protocol addresses based on preset selection rules, the method further includes: The network segment information of the downstream device of the user terminal is stored in the local dynamic host configuration protocol server address pool for use when allocating the Internet Protocol address of the gateway used by the downstream device.

9. A core network, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-2.

10. A user terminal, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 3-8.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-2 or 3-8.

12. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method according to any one of claims 1-2 or 3-8.