Patent Description:
A terminal apparatus may obtain an internet protocol (internet protocol, IP) address of the terminal apparatus from a core network device through a user plane connection. For example, in an evolved packet core (evolved packet core, EPC) network architecture, key logical network elements include a mobility management entity (mobility management entity, MME), a serving gateway (serving gateway, S-GW), and a packet data network gateway (packet data network gateway, P-GW). The terminal apparatus may obtain the IP address of the terminal apparatus through the user plane connection that is between a radio access network (radio access network, RAN) device, an SGW, and a PGW. For another example, in a <NUM> communications network architecture, key logical network elements include a network element having an access and mobility management function (access and mobility function, AMF), a network element having a session management function (session management function, SMF), and a network element having a user plane function (user plane function, UPF). The terminal apparatus may obtain the IP address of the terminal apparatus via a user plane tunnel between a RAN and a UPF.

In the EPC architecture and the <NUM> communications network architecture, to support small-size packet data transmission in a cellular internet of things (Cellular Internet of Things, CIOT) scenario, the terminal apparatus may establish a session that supports control plane data transmission with a control plane network element. The session implements data transfer by established connection channels between network elements. However, in a session establishment procedure, the terminal apparatus cannot obtain the IP address via the user plane connection path. For example, in the EPC network architecture, there is no user plane connection between the RAN and the SGW for the session that supports control plane data transmission. For another example, in the <NUM> communications network architecture, there is no user plane tunnel between the RAN and the UPF for the session that supports control plane data transmission. Therefore, a new interaction manner needs to be provided, so that the terminal apparatus can still obtain the IP address when the session that supports control plane data transmission is established.

"<NPL>, discloses UE IP address management including allocation and release of the UE IP address and renewal of the allocated IP address. The UE sets the requested PDU session type during the PDU Session Establishment procedure based on its IP stack capabilities.

<CIT> discloses that a network element of a core network receives a connectivity request for a first peer device. The connectivity request includes an indication for establishing a peer-to-peer connection for the first peer device to communicate data packets with a second peer device. The network element sends, to a first base station of an access network, an access network bearer setup request, which includes an address for the first peer device and serves as a request for the first base station to establish, for the peer-to-peer connection, an access network bearer in the access network for use in communicating the data packets with the second peer device.

"<NPL>, discloses procedures for the case where the PDU Session is terminated at a user plane functionality.

<CIT> discloses a method and wireless communication devices for selection of IP version during setup of a PDU session in a wireless communications system.

This application provides a method and device for allocating and obtaining an IP address, so that a terminal apparatus can obtain the IP address more flexibly. The embodiments and/or aspects in the following description which are not covered by the appended claims are considered as not being part of the present invention.

In this application, there is no connection channel between some network elements for the session used for transmitting the data via a control plane. According to the method for allocating an IP address provided in this application, the terminal apparatus can obtain the IP address without establishing an additional connection channel, so that the terminal apparatus can obtain the IP address more flexibly, and occupation of excessive signaling resources can be avoided.

In this application, the session management network element may receive the first indication information in a session establishment procedure. Therefore, the session management network element may not receive an IP address request sent by the terminal apparatus, or may allocate the IP address to the terminal apparatus before receiving an IP address request sent by the terminal apparatus. The terminal apparatus may obtain the IP address in advance, so that the IP address can be allocated to the terminal apparatus in a more flexible way, signaling overheads can be reduced, and the terminal apparatus can obtain the IP address earlier.

It is noted that embodiments of <FIG> and <FIG> are not part of the invention, but are illustrative examples helpful for understanding the invention.

Terminologies such as "component", "module", and "system" used in this application are used to indicate computer-related entities, hardware, firmware, combinations of hardware and software, software, or software being executed. For example, a component may be, but is not limited to, a process that runs on a processor, a processor, an object, an executable file, an execution thread, a program, and/or a computer. As shown in figures, both a computing device and an application that runs on a computing device may be components. One or more components may reside within a process and/or an execution thread, and a component may be located on one computer and/or distributed between two or more computers. In addition, these components may be executed by various computer-readable media that store various data structures. For example, the components may communicate by using a local and/or remote process based on a signal having one or more data packets (for example, data from two components interacting with another component in a local system, a distributed system, and/or across a network such as the internet interacting with another system by using the signal).

The technical solution of the embodiments of this application may be used in various communications systems, for example, a global system for mobile communications (Global System of Mobile communication, GSM) system, a code division multiple access (Code Division Multiple Access, CDMA) system, a wideband code division multiple access (Wideband Code Division Multiple Access, WCDMA) system, a general packet radio service (General Packet Radio Service, GPRS) system, a long term evolution (Long Term Evolution, LTE) system, an LTE frequency division duplex (Frequency Division Duplex, FDD) system, an LTE time division duplex (Time Division Duplex, TDD) system, a universal mobile telecommunications system (Universal Mobile Telecommunication System, UMTS), a worldwide interoperability for microwave access (Worldwide Interoperability for Microwave Access, WiMAX) communications system, a 5th generation (5th Generation, <NUM>) system, or a new radio (New Radio, NR) system.

Generally, a conventional communications system supports a limited quantity of connections and is easy to implement. However, with development of communications technologies, a mobile communications system not only supports conventional communication, but also supports, for example, device-to-device (device to device, D2D) communication, machine to machine (machine to machine, M2M) communication, machine type communication (machine type communication, MTC), and vehicle to everything (vehicle to everything, V2X) communication, for example, vehicle to vehicle (vehicle to vehicle, V2V) communication, vehicle to infrastructure (vehicle to infrastructure, V2I) communication, vehicle to pedestrian (vehicle to pedestrian, V2P) communication, and vehicle to network (vehicle to network, V2N) communication. In addition, the communications system may alternatively be a public land mobile network (public land mobile network, PLMN) network, an internet of things (internet of things, IoT) network, or another network.

The embodiments of this application are described with reference to a terminal apparatus. The terminal apparatus may also be referred to as user equipment (user equipment, UE), an access terminal, a subscriber unit, a subscriber station, a mobile station, a mobile console, a remote station, a remote terminal, a mobile device, a user terminal, a terminal, a wireless communications device, a user agent, or a user apparatus. The terminal apparatus may be a station (STAION, ST) in WLAN, a cellular phone, a cordless phone, a session initiation protocol (session initiation protocol, SIP) phone, a wireless local loop (wireless local loop, WLL) station, a personal digital assistant (personal digital assistant, PDA) device, a handheld device having a wireless communication function, a computing device, another processing device connected to a wireless modem, a vehicle-mounted device, an internet of vehicles terminal, a computer, a laptop computer, a handheld communications device, a handheld computing device, a satellite wireless device, a wireless modem card, a television set-top box (set top box, STB), customer premise equipment (customer premise equipment, CPE) and/or another device configured to perform communication in a wireless system, a terminal apparatus in a next generation communications system, for example, a <NUM> network, or a terminal apparatus in a future evolved public land mobile network (public land mobile network, PLMN) network.

As an example instead of a limitation, the terminal apparatus in the embodiments of this application may alternatively be a wearable device. The wearable device may also be referred to as a wearable intelligent device, and is a general term for wearable devices such as glasses, gloves, watches, clothes, and shoes that are developed by applying wearable technologies in intelligent designs of daily wear. The wearable device is a portable device that can be directly worn by a user or integrated into clothes or an accessory of a user. The wearable device is not only a hardware device, but is used to implement a powerful function through software support, data exchange, and cloud interaction. Generalized wearable intelligent devices include full-featured and large-size devices that can implement complete or partial functions without depending on smartphones, for example, smart watches or smart glasses, and devices that focus on only one type of application and need to work with other devices such as smartphones, such as various smart bands or smart jewelry for monitoring physical signs.

In addition, the terminal apparatus in the embodiments of this application may alternatively be a terminal apparatus in an IoT system. The IoT is an important part of future development of information technologies. A main technical feature of the IoT is connecting a thing to a network by using a communications technology, to implement an intelligent network for interconnection between a person and a machine or between one thing and another.

A basic service that can be provided by a core network includes mobile office, e-commerce, communication, an entertainment service, a travel and location-based service, a telemetry (telemetry) service, a simple message transfer service (monitoring and control), or the like. Main functions of the core network are to provide a user connection, user management, and a service bearer, and the core network functions as a bearer network to provide an interface to an external network. The establishment of the user connection includes functions such as mobility management (mobile management, MM), call management (connection management, CM), switching/routing, and recording notification. The user management includes user description, quality of service (Quality of Service, QoS), user communication accounting (accounting), virtual home environment (virtual home environment, VHE), and security (corresponding security measures provided by an authentication center, including security management for a mobile service and security processing for external network access). The bearer access (access) includes a public switched telephone network (public switched telephone network, PSTN) to the outside, an external circuit data network and a packet data network, an internet (internet) and an intranet (intranets), a short message service (Short Message Service, SMS) server of a mobile network itself, and the like.

As an example instead of a limitation, a core network device may include functional units such as an access and mobility management function (access and mobility function, AMF), a session management function (session management function, SMF), a policy control function (policy control function, PCF), and a user plane function (user plane function, UPF). The functional units may work independently, or may be combined together to implement some control functions. For example, the AMF, the SMF, and the PCF may be combined together as a management device to implement access control and mobility management functions such as access authentication, security encryption, and location registration of the terminal apparatus; session management functions such as establishment, release, and modification of a user plane transmission path; and functions such as analysis of data (such as congestion) related to slice (slice) and terminal apparatus-related data. The UPF mainly completes a function such as routing and forwarding of user plane data, for example, data packet filtering, data transmission/forwarding, rate control, and charging information generation for the terminal apparatus.

An access network (AN) includes a series of transport entities (such as line equipment and transmission facilities) between a service network interface (service network interface, SNI) and a user network interface (user network interface, UNI). The access network is an implementation system that provides bearer capabilities required for transmitting a telecom service, and can be configured and managed through a management interface (Q3). In principle, there is no limitation on types and quantities of UNIs and SNIs that can be supported by the access network. Signaling is not parsed in the access network. The access network can be considered as a transport network that is independent of services and applications, and mainly implements functions of cross-connection, multiplexing, and transmission.

An access network device may include an access network/radio access network (radio access network, RAN) device, and a network including a plurality of <NUM>-RAN nodes. The <NUM>-RAN node may be an access point (access point, AP), a next-generation new base station (NR nodeB, gNB), a next-generation evolved NodeB (ng-eNB, gNB), a transmission reception point (transmission receive point, TRP), a transmission point (transmission point, TP), or another access node. There may be further a centralized unit (central unit, CU) and a distributed unit (distributed unit, DU) inside the <NUM>-RAN node.

In addition, the access network device may alternatively be a base transceiver station (base transceiver Station, BTS) in SM or CDMA, a NodeB (NodeB, NB) in WCDMA, an evolved NodeB (evolutional NodeB, eNB or eNodeB) in LTE, a relay station or an access point, a vehicle-mounted device, a wearable device, an access network device in a <NUM> network, an access network device in a future evolved PLMN network, or the like. This is not particularly limited in this application.

It should be noted that, in the embodiments of this application, the access network device serves a cell. The terminal apparatus communicates with the access network device by using a transmission resource (for example, a frequency domain resource or a spectrum resource) used by the cell. The cell may be a cell corresponding to the access network device (for example, a base station). The cell may belong to a macro base station, or a base station corresponding to a small cell (Small cell). The small cell herein may include a metro cell (metro cell), a micro cell (micro cell), a pico cell (pico cell), a femto cell (femto cell), or the like. The small cells have features of small coverage and low transmit power, and are suitable for providing a high-rate data transmission service.

In addition, a plurality of cells may simultaneously work in a same frequency band on a carrier in the LTE system or the <NUM> system. In some special scenarios, the concept of the carrier is considered equivalent to that of the cell. For example, in a carrier aggregation (carrier aggregation, CA) scenario, both a carrier index of a secondary component carrier and a cell identifier (cell indentify, Cell ID) of a secondary cell that works on the secondary component carrier are carried when the secondary component carrier is configured for UE. In this case, the concept of the carrier is considered equivalent to that of the cell. For example, that the UE accesses a carrier is equivalent to that the UE accesses a cell.

The access network device may send data or information to the terminal apparatus through a forward link (also referred to as a downlink), and receive data or information from the terminal apparatus through a reverse link (also referred to as an uplink).

For example, in a frequency division duplex (frequency division duplex, FDD) system, for example, the forward link and the reverse link may have different frequency bands.

For another example, in a time division duplex (time division duplex, TDD) system and a full-duplex (full duplex) system, the forward link and the reverse link may have a same frequency band.

Each antenna (or antenna group including a plurality of antennas) and/or each area designed for communication are/is referred to as a sector of the access network device.

For example, an antenna group may be designed to communicate with a terminal apparatus in a sector within coverage of the access network device. The access network device may send signals to all terminal apparatuses in the corresponding sector by using a single antenna or a multi-antenna transmit diversity.

In a process in which the access network device communicates with the terminal apparatus through the forward link, a transmit antenna of the access network device may also improve a signal-to-noise ratio of the forward link through beamforming.

In addition, interference to a mobile device in a neighboring cell when the access network device sends signals through beamforming to terminal apparatuses that are randomly scattered in related coverage is less than that in a manner in which the access network device sends, by using a single antenna or a multi-antenna transmit diversity, signals to all terminal apparatuses served by the access network device.

At a given time, the access network device or the terminal apparatus may be a wireless communications sending apparatus and/or a wireless communications receiving apparatus. When sending data, the wireless communications sending apparatus may encode data for transmission. Specifically, the wireless communications sending apparatus may obtain (for example, generate, receive from another communications apparatus, or store in a memory) a specific quantity of data bits to be sent on a channel to the wireless communications receiving apparatus. The data bits may be included in a transport block (or a plurality of transport blocks) of the data, and the transport block may be segmented to generate a plurality of code blocks.

In the embodiments of this application, the terminal apparatus, the core network device, or the access network device includes a hardware layer, an operating system layer running above the hardware layer, and an application layer running above the operating system layer. The hardware layer includes hardware such as a central processing unit (Central Processing Unit, CPU), a memory management unit (Memory Management Unit, MMU), and a memory (also referred to as a main memory). The operating system may be any one or more computer operating systems that implement service processing by using a process (process), for example, a Linux operating system, a Unix operating system, an Android operating system, an iOS operating system, or a windows operating system. The application layer includes applications such as a browser, an address book, word processing software, and instant messaging software. In addition, a specific structure of an entity for performing the method according to the embodiments of this application is not particularly limited in the embodiments of this application, provided that a program recording code of the method according to the embodiments of this application can be run to perform communication according to the method according to the embodiments of this application. For example, the entity for performing the method according to the embodiments of this application may be the terminal apparatus, the core network device, or the access network device, or may be a functional module, in the terminal apparatus, the core network device, or the access network device, that is capable of invoking and executing the program.

In addition, aspects or features in the embodiments of this application may be implemented as a method, an apparatus, or a product that uses standard programming and/or engineering technologies. The term "product" used in this application covers a computer program that can be accessed from any computer-readable component, carrier or medium. For example, the computer-readable medium may include but is not limited to: a magnetic storage component (for example, a hard disk, a floppy disk, or a magnetic tape), an optical disc (for example, a compact disc (Compact Disc, CD) or a digital versatile disc (Digital Versatile Disc, DVD)), a smart card, and a flash memory component (for example, an erasable programmable read-only memory (Erasable Programmable Read-Only Memory, EPROM), a card, a stick, or a key drive). In addition, various storage media described in this specification may indicate one or more devices and/or other machine-readable media that are configured to store information. The term "machine-readable media" may include but is not limited to a radio channel, and various other media that can store, contain, and/or carry an instruction and/or data.

It should be noted that in the embodiments of this application, a plurality of application programs may be run at the application layer. In this case, an application program for performing the method in the embodiments of this application and an application program configured to control a receive end device to implement an action corresponding to received data may be different application programs.

<FIG> shows a network architecture used in an embodiment of this application. The following separately describes network elements that may be in the network architecture.

In a <NUM> communications system, the user plane network element may be a user plane function (user plane function, UPF) network element. In a future communications system, the user plane network element may still be a UPF network element, or may have another name. This is not limited in this application. For example, the UPF mainly provides user-plane service processing functions, including service routing, packet forwarding, anchoring, quality of service (quality of service, QoS) mapping and execution, identification of an uplink identifier and routing the identifier to a data network, downlink packet buffering, triggering notification of downlink data arrival, and connection to an external data network.

A data network element <NUM> is configured to provide a network for data transmission.

In the <NUM> communications system, the data network element may be a data network (data network, DN) network element. In a future communications system, the data network element may still be a DN network element, or may have another name. This is not limited in this application.

An access management network element <NUM> is mainly configured to perform mobility management, access management, and the like, and may be configured to implement functions, for example, lawful interception and access authorization/authentication, other than session management in functions of a mobility management entity (mobility management entity, MME).

In the <NUM> communications system, the access management network element may be an access and mobility management function (access and mobility management function, AMF) network element. In a future communications system, the access management network element may still be an AMF network element, or may have another name. This is not limited in this application.

A session management network element <NUM> is mainly configured to manage a session, assign and manage an Internet Protocol (internet protocol, IP) address of a terminal apparatus, select a termination point that can manage a user plane function interface and a policy control and charging function interface, notify downlink data, and the like.

In the <NUM> communications system, the session management network element may be a session management function (session management function, SMF) network element. In a future communications system, the session management network element may still be an SMF network element, or may have another name. This is not limited in this application.

A policy control network element <NUM> is configured to: guide a unified policy framework for network behavior, and provide policy rule information for a control plane function network element (such as an AMF or an SMF network element), and the like.

In a <NUM> communications system, the policy control network element may be a policy and charging rules function (policy and charging rules function, PCRF) network element. In the <NUM> communications system, the policy control network element may be a policy control function (policy control function, PCF) network element. In a future communications system, the policy control network element may still be a PCF network element, or may have another name. This is not limited in this application.

A binding support network element <NUM> is configured to search for a PCF associated with a session.

In the <NUM> communications system, the binding support network element may be a binding support function (binding support function, BSF) network element. In a future communications system, the binding support network element may still be a BSF network element, or may have another name. This is not limited in this application.

An authentication server <NUM> is configured to authenticate a service, generate a key to implement bidirectional authentication for a terminal apparatus, and support a unified authentication framework.

In the <NUM> communications system, the authentication server may be an authentication server function (authentication server function, AUSF) network element. In a future communications system, the authentication server function network element may still be an AUSF network element, or may have another name. This is not limited in this application.

A data management network element <NUM> is configured to process a terminal apparatus identifier, perform access authentication, registration, and mobility management, and the like.

In the <NUM> communications system, the data management network element may be a unified data management (unified data management, UDM) network element. In a future communications system, the unified data management network element may still be a UDM network element, or may have another name. This is not limited in this application.

An application network element is configured to perform application-affected data routing, access a network exposure function network element, interact with a policy framework to perform policy control, and the like.

In the <NUM> communications system, the application network element may be an application function (application function, AF) network element. In a future communications system, the application network element may still be an AF network element, or may have another name. This is not limited in this application.

A network storage network element is configured to maintain real-time information of all network function services in a network.

In the <NUM> communications system, the network storage network element may be a network repository function (network repository function, NRF) network element. In a future communications system, the network storage network element may still be an NRF network element, or may have another name. This is not limited in this application.

A set of network elements such as the AMF, the SMF, and the UDM may be referred to as a control plane function (Control Plane Function, CPF) network element.

It should be noted that the "network element" may also be referred to as an entity, a device, an apparatus, a module, or the like. This is not particularly limited in this application. In addition, for ease of understanding and description, descriptions of the "network element" are omitted in some descriptions of this application. For example, the SMF network element is referred to as an SMF for short. In this case, the "SMF" should be understood as an SMF network element or an SMF entity. Descriptions of same or similar cases are omitted below.

It may be understood that the foregoing network element or function may be a network element in a hardware device, a software function running on dedicated hardware, or a virtualized function instantiated on a platform (for example, a cloud platform).

In the network architecture, N1 is a reference point between the terminal apparatus <NUM> and the AMF network element <NUM>, and is used for sending a non-access stratum (non-access stratum, NAS) message. N2 is a reference point between the RAN network element <NUM> and the AMF network element <NUM>, and is used for sending an N2 message, a NAS message, and the like. N3 is a reference point between the RAN network element <NUM> and the UPF network element <NUM>, and is used for transmitting user plane data and the like. N4 is a reference point between the SMF network element <NUM> and the UPF network element <NUM>, and is used for transmitting information such as interface identification information of an N3 interface, data buffering indication information, and a downlink data notification message.

It should be understood that network elements included in the foregoing network architecture are merely examples for description, and this application is not limited thereto. For example, the network elements may further include but are not limited to:.

It should be understood that the foregoing network architecture used in the embodiments of this application is merely an example, and a network architecture applicable to the embodiments of this application is not limited thereto. Any network architecture that can implement functions of the foregoing network elements is applicable to the embodiments of this application.

<FIG> is a schematic diagram of an evolved packet core (Evolved Packet Core, EPC) network architecture used in an embodiment of this application. The following separately describes network elements that may be in the network architecture.

The network architecture includes an evolved universal terrestrial radio access network (evolved terrestrial radio access network, E-UTRAN), an access network (GSM edge radio access network, GERAN), a serving GPRS support node (Serving GPRS Support Node, SGSN), a home subscriber server (home subscriber server, HSS), a policy and charging rules function (policy and charging rules function, PCRF), and a server. The network architecture is used in a non-roaming scenario, and a radio access network of the network architecture is an evolved universal terrestrial radio access network. Key logical network elements of the evolved packet core network include a mobility management entity (mobility management entity, MME), a serving gateway (serving gateway, SGW), and a packet data network gateway (packet data network gateway, PGW).

The MME mainly completes processing of signaling plane functions, such as user authentication, handover, mobility management of a terminal in idle mode, user context management, and bearer management.

The SGW is a user plane function entity that can route and forward packet data. The SGW serves as a data anchor in the 3rd Generation Partnership Project (3rd Generation Partnership Project, 3GPP) system, an interface to terminate the E-UTRAN, and also an anchor for local mobility management in the E-UTRAN handover scenario in a specific geographical area.

The PGW is a GW connected to an external data network, and is a user plane anchor between a 3GPP access network and a non-3GPP access network. User equipment may access an external PDN by connecting to the PGW to create a packet data network (packet data network, PDN) connection, where the PDN may be a network, a virtual private network, an IP multimedia service network, a wireless application protocol network provided by an operator, or the like.

In actual network deployment, the logical network elements SGW and PGW can be separated or combined. Except for some special cases (such as roaming), the logical network elements SGW and PGW are jointly deployed. The GW in the embodiments of this application may be a collective name of the logical network elements SGW and PGW.

It should be further understood that, in the embodiments of this application, the PDN, the GW, and the MME are names in an LTE network architecture, and respectively correspond to a packet data unit (packet data unit, PDU), a forwarding plane network element, and a control plane network element in another network.

In conclusion, because network architectures are different, a network element in the network architecture shown in <FIG> may not correspond to any network element in the network architecture shown in <FIG>. For ease of description, in this application, a network element entity is described by using a function of a network element. For example, a mobility management network element may be an AMF or an MME. A session management network element may be an SMF, a PGW, or a PGW control plane function (PGW-Control plane, PGW-C). A data forwarding network element may be a UPF, a PGW, or a PGW user plane function (PGW-User plane, PGW-U). For a method for implementing a chip in an apparatus entity, refer to specific descriptions of the apparatus entity. Details are not described again.

<FIG> is a schematic interaction diagram of a session establishment procedure and an IP address allocation procedure performed in the network architecture shown in <FIG>.

Steps <NUM> to <NUM> constitute the session establishment procedure.

A feature of data transfer in a control plane cellular internet of things <NUM> system optimisation (data transfer in control plane CIoT 5GS optimisation) is introduced into a <NUM> communications system, so that the terminal apparatus can transmit data via a control plane network element. In other words, the terminal apparatus sends a non-access stratum (non-access stratum, NAS) packet to implement data transmission between the terminal apparatus and a core network device. A control plane data transmission path may be from the terminal apparatus to the AMF, the SMF, and the UPF. However, when the session supports control plane data transmission, there is no N3 interface between the RAN and the UPF. Therefore, the terminal apparatus cannot obtain the IP address through a user plane transmission path between the RAN and the UPF in the manner shown in <FIG>.

<FIG> shows an attach procedure and an IP address allocation procedure performed in the network architecture shown in <FIG>.

Steps <NUM> to <NUM> constitute the attach procedure. The attach procedure is similar to the session establishment procedure shown in <FIG>.

A control plane cellular Internet of Things EPS optimisation (control plane CIoT EPS optimisation) data transmission mechanism similar to the feature of the control plane CIoT 5GS optimisation in the <NUM> communications system is introduced into an EPC network architecture, so that the terminal apparatus can transmit data via a control plane network element, and a data transmission path may be from the terminal apparatus to the MME, the SGW, and the PGW. However, when the session supports EPS control plane data transmission, there is no user plane connection between the RAN and the SGW. That is, when the SGW receives the IP address sent by the PGW, the SGW cannot send the IP address to the terminal apparatus via the RAN. Therefore, the terminal apparatus cannot obtain the IP address in the manner shown in <FIG>.

For a problem that may occur in the scenarios shown in <FIG>, this application provides a method for allocating and obtaining an IP address, to improve flexibility of obtaining an IP address by a terminal apparatus.

<FIG> is a schematic interaction diagram of a method for allocating and obtaining an IP address according to this application.

Establish a session for transmitting a data packet via a control plane network element.

That the data packet is transmitted via the control plane network element means that the session is used for data exchange between a terminal apparatus and the control plane network element. The control plane network element may be one or more of a mobility management network element and a session management network element, for example, may be an AMF and an SMF; or for another example, may be an MME, an SGW, and a PGW.

For example, the mobility management network element is an AMF, and the session management network element is an SMF; or the mobility management network element is an MME, and the session management network element is a PGW.

The session type may be IPv6, IPv4v6, IPv4, or another similar session type. The session management network element may determine a type of an IP address based on the session type.

The terminal apparatus may further exchange data with a data forwarding network element by using the session for transmitting the data packet via the control plane network element.

A session establishment procedure may specifically include:.

The session management network element receives the session establishment request message that is forwarded by the mobility management network element and that is from the terminal apparatus, and the first indication information sent by the mobility management network element. The session management network element may determine, based on the first indication information, that the session is a session for transmitting the data packet via the control plane network element, to establish the session for the terminal apparatus.

The session management network element may store the first indication information. After the session is established, the session management network element may determine, by invoking the first indication information, a network element to which the data packet is to be sent. The data packet includes an uplink data packet and a downlink data packet. The data packet is an uplink data packet of a service and a downlink data packet of a service that are transmitted between the terminal apparatus and a network The data packet is an uplink data packet that is used by the terminal apparatus to request the network to allocate an IP address and a downlink data packet that is sent by the network and that includes an IP address.

The first indication information may be the control plane data transmission indication information, for example, the control plane CIoT 5GS optimization indication information in the <NUM> communications system, or the control plane CIoT EPS optimization indication information in the EPC network architecture. The session management network element may forward the downlink data packet based on the first indication information via the mobility management network element.

Optionally, in addition to the control plane CIoT 5GS optimization indication information in the <NUM> communications system or the control plane CIoT EPS optimization indication information in the EPC network architecture, the first indication information may be other indication information.

The first indication information indicates the session management network element to send the downlink data packet to the mobility management network element. In other words, the session management network element may send the downlink data packet to the terminal apparatus based on the first indication information via the mobility management network element, and does not forward the downlink data packet via another control plane network element, for example, the data forwarding network element.

In an example, not forming part of the invention, the first indication information may indicate the session management network element not to send the downlink data packet to the data forwarding network element. In other words, the session management network element may not send the downlink data packet to the terminal apparatus based on the first indication information via the data forwarding network element, but forwards the downlink data packet via another control plane network element, for example, the mobility management network element.

In an example, not forming part of the invention, the first indication information may indicate the session management network element to send the uplink data packet to the data forwarding network element. In other words, the session management network element may send the uplink data packet to the data forwarding network element based on the first indication information.

In an example, not forming part of the invention, the first indication information may indicate that the session management network element is the last network element that receives the uplink data packet, and the session management network element may parse the uplink data packet based on the first indication information, and construct a corresponding downlink data packet.

In an example, not forming part of the invention, the first indication information may indicate that the data forwarding network element is the last network element that receives the uplink data packet, and the session management network element may send the uplink data packet to the data forwarding network element based on the first indication information.

In an example, not forming part of the invention, the first indication information may further indicate the session management network element not to select the data forwarding network element in the session establishment procedure. The session management network element does not select a data management network element in the session establishment procedure based on the first indication information. The session establishment procedure in the <NUM> communications system shown in <FIG> is used as an example. When the session management network element does not receive the first indication information, the session management network element selects the data forwarding network element in the session establishment procedure, that is, establishes an N4 interface. However, when the session management network element receives the first indication information, the session management network element does not select the data forwarding network element in the session establishment procedure, that is, does not establish an N4 interface. Therefore, the session management network element may not send the uplink data packet to the data forwarding network element.

The first indication information may further indicate an occasion for the session management network element to select the data forwarding network element.

In an example, the first indication information indicates to select the data forwarding network element after the session is established. The session establishment procedure in the <NUM> communications system shown in <FIG> is still used as an example. When the session management network element does not receive the first indication information, the session management network element selects the data forwarding network element in the session establishment procedure, that is, establishes an N4 interface. However, when the session management network element receives the first indication information, the session management network element delays selection of the data forwarding network element, that is, delays establishment of the N4 interface. Therefore, the session management network element may not send the uplink data packet to the data forwarding network element.

Optionally, the session management network element determines, based on an indication of the terminal apparatus or the data forwarding network element, a network element to which the data packet is to be sent.

For example, in the session establishment procedure, the terminal apparatus sends indication information to the session management network element, where the indication information is used to indicate the session management network element to send the downlink data packet to the mobility management network element; or indicate the session management network element to send the uplink data packet to the data forwarding network element; or indicate the session management network element not to send the uplink data packet to the data forwarding network element; or indicate the session management network element not to select the data forwarding network element in the session establishment procedure; or indicate the session management network element of an occasion for selecting the data forwarding network element.

For another example, in the session establishment procedure, the data forwarding network element may send indication information to the session management network element, where the indication information is used to indicate the session management network element not to send the uplink data packet to the data forwarding network element; or indicate the session management network element to establish an N4 interface but not use the N4 interface temporarily; or indicate the session management network element of a starting occasion of the N4 interface.

Content and an effect of the indication information is similar to those of the first indication information.

Optionally, the session establishment procedure may further include:
<NUM>. The session management network element selects the data forwarding network element.

In other words, the session management network element may determine, based on the indication information, whether to select the data forwarding network element in the session establishment procedure.

If the session management network element does not select the data forwarding network element, the session management network element does not send the uplink data packet to the data forwarding network element, and does not receive the downlink data packet from the data forwarding network element.

Optionally, the session management network element may select the data forwarding network element after the session is established.

Optionally, the session management network element may select the data forwarding network element after the session is established and before the session management network element sends the data packet to the terminal apparatus via the mobility management network element.

Optionally, the session management network element may select, based on the indication information sent by the terminal apparatus or the mobility management network element, the data forwarding network element after the session is established.

In other words, the session management network element may not select the data forwarding network element in the session establishment procedure based on the indication information. However, if the session management network element does not receive the indication information, the session management network element may select the data forwarding network element in the session establishment procedure.

In an example, the session management network element may determine, based on the foregoing first indication information, not to select the data forwarding network element in the session establishment procedure.

In an example, the session management network element may determine, based on fourth indication information sent by the terminal apparatus, not to select the data forwarding network element in the session establishment procedure. Alternatively, the session management network element may receive the fourth indication information sent by the terminal apparatus, where the fourth indication information may indicate the session management network element not to send the uplink data packet to the data forwarding network element; or the fourth indication information may indicate the session management network element not to select the data forwarding network element in the session establishment procedure, or the fourth indication information may indicate the session management network element to select the data forwarding network element at an occasion that is not in the session establishment procedure, for example, select the data forwarding network element after the IP address is allocated to the terminal apparatus. The fourth indication information may be carried in the session establishment request message sent by the terminal apparatus.

The session management network element allocates the IP address to the terminal apparatus.

The session management network element may directly construct the IP address based on the session type. That is, the session management network element constructs the IP address by itself. The session management network element may further request the IP address from another network element. For example, the session management network element may request the IP address from a DHCP server that has an IP address allocation function, and then the session management network element delivers the IP address.

When the session type is IPv4v6 or IPv6, the SMF may construct an RA packet, where the RA packet carries the IP address.

When the session type is IPv4, the SMF may construct a DHCP offer packet, where the DHCP offer packet carries the IP address.

Optionally, the session management network element may allocate the IP address to the terminal apparatus in response to an IP address request sent by the terminal apparatus.

For example, the session management network element may receive another packet or another message that is sent by the mobility management network element and that is used by the terminal apparatus to request a core network to allocate the IP address, and allocate the IP address to the terminal apparatus.

Optionally, the session management network element may allocate the IP address to the terminal apparatus in response to content of the uplink data packet.

The session management network element may receive the uplink data packet that is sent by the mobility management network element and that is from the terminal apparatus, where the uplink data packet includes an RS packet or a DHCP discovery packet; and the session management network element may allocate the IP address to the terminal apparatus based on the uplink data packet. That is, the session management network element allocates the IP address to the terminal apparatus after receiving the RS packet or the DHCP discovery packet.

Optionally, the session management network element may determine to allocate the IP address to the terminal apparatus in response to the indication information of the terminal apparatus, the mobility management network element, and the data forwarding network element.

In an example, the session management network element may allocate the IP address to the terminal apparatus based on the first indication information and the session type described above.

In an example, the session management network element receives second indication information sent by the terminal apparatus and the session type, where the second indication information is used to indicate the session management network element to allocate the IP address to the terminal apparatus. For example, the second indication information indicates that the uplink data packet is the RS packet or the DHCP discovery packet.

In an example, the session management network element may determine, based on third indication information sent by the data forwarding network element and the session type, to allocate the address to the terminal apparatus. For example, the third indication information is used to indicate that the uplink data packet includes the RS packet or the DHCP discovery packet.

The session management network element sends the downlink data packet to the terminal apparatus via the mobility management network element, where the downlink data packet includes the IP address.

In other words, the terminal apparatus may receive, via the mobility management network element, the IP address sent by the session management network element, where the IP address is carried in the downlink data packet.

The data packet is, a RA packet or a DHCP offer packet, or the data packet may be another packet or another message used by the session management network element to send the IP address to the terminal apparatus.

The data packet received by the terminal apparatus may alternatively be forwarded by the data forwarding network element.

That is, the data packet may be forwarded by the data forwarding network element, or may not be forwarded by the data forwarding network element.

If the session management network element does not select the data forwarding network element in the session establishment procedure, the session management network element may further select the data forwarding network element based on an indication in a process of receiving uplink data.

The following further describes, by using <FIG>, a method for allocating and obtaining an IP address according to this application.

For a specific implementation of step <NUM>, refer to step <NUM> in the embodiment shown in <FIG>.

In a session establishment procedure, a session management network element selects a data forwarding network element.

A terminal apparatus sends an uplink data packet to a mobility management network element to request an IP address.

The uplink data packet may be encapsulated in an uplink non-access stratum (non-access stratum, NAS) message.

The uplink data packet may be, for example, an RS packet or a DHCP discovery data packet, or another packet or another message used by the terminal apparatus to request a core network to allocate the IP address.

The uplink data packet may carry a session identifier (session ID).

The mobility management network element forwards the uplink data packet to the session management network element.

The mobility management network element may decapsulate the uplink NAS message to obtain the uplink data packet.

For example, the mobility management network element may invoke a PDU session message transfer service (Nsmf_PDUSession_Message Transfer) of a session management function, to forward the uplink data packet to the mobility management network element.

The session management network element determines the data forwarding network element based on the session identifier, and forwards the uplink data packet to the data forwarding network element.

Because a packet check function is not enabled for the session management network element, the session management network element may not learn of all content of the uplink data packet. The session management network element needs to forward the uplink data packet to the data forwarding network element, and the data forwarding network element checks the uplink data packet.

The data forwarding network element indicates the content of the uplink data packet to the session management network element.

The session management network element may be triggered, based on the content of the uplink data packet, to allocate the IP address to the terminal apparatus.

The session management network element sends a downlink data packet to the mobility management network element, where the downlink data packet includes the IP address.

For example, the session management network element may invoke an N1N2 interaction message transfer service (Namf_Communication_N1N2 Message Transfer) of a mobility management function, to send the downlink data packet to the mobility management network element.

When the uplink data packet is the RS packet, the downlink data packet may be an RA packet; or when the uplink data packet is the DHCP discovery packet, the downlink data packet may be a DHCP offer packet. Alternatively, the downlink data packet may be another packet or another message used by the session management network element to send the IP address to the terminal apparatus.

The mobility management network element forwards the downlink data packet to the terminal apparatus.

The mobility management network element may encapsulate the downlink data packet in a downlink NAS message.

As shown in <FIG>, the terminal apparatus sends an IP address request message. Because the session management network element cannot directly obtain the content of the uplink data packet, the data forwarding network element needs to indicate the session management network element to allocate the IP address to the terminal apparatus.

In a session establishment procedure, a session management network element may select a data forwarding network element, or may not select a data forwarding network element.

For example, the session management network element may not select the data forwarding network element in the session establishment procedure based on indication information sent by a terminal apparatus or a mobility management network element in the session establishment procedure. The terminal apparatus sends an uplink data packet to the mobility management network element to request an IP address, where the uplink data packet includes second indication information, and the second indication information is used to indicate the session management network element to allocate the IP address to the terminal apparatus.

The uplink data packet may be, for example, an RS packet or a DHCP discovery packet, or another packet or another message used by UE to request a core network to allocate the IP address.

If the session management network element selects the data forwarding network element in the session establishment procedure:.

Optionally, the second indication information may be, for example, used to indicate the session management network element to allocate the IP address to the terminal apparatus.

If the session management network element does not select the data forwarding network element in the session establishment procedure:
the second indication information may indicate, for example, that the uplink data packet is the RS packet or the DHCP discovery packet.

Optionally, the second indication information may be used to indicate to select the data forwarding network element after the session is established and before the IP address is sent.

For example, the mobility management network element may invoke Nsmf_PDUSession_Message Transfer to forward the uplink data packet to the mobility management network element.

The session management network element allocates the IP address to the terminal apparatus based on the second indication information.

The session management network element may determine, based on the second indication information, that the uplink data packet is used to request the IP address, and the session management network element may allocate the IP address to the terminal apparatus.

For example, the second indication information is used to indicate to select the data forwarding network element after the session is established and before the IP address is sent. The session management network element may allocate the IP address to the terminal apparatus after selecting the data forwarding network element.

For example, the session management network element may invoke Namf_Communication_N1N2 Message Transfer to send the downlink data packet to the mobility management network element.

Optionally, step <NUM> may be further included in which the session management network element selects the data forwarding network element after the session establishment request is sent.

In other words, the session management network element may select the data forwarding network element after allocating the IP address to the terminal apparatus, or after sending the IP address to the terminal apparatus or the mobility management network element. As shown in <FIG>, the session management network element may learn, based on the second indication information sent by the terminal apparatus, that content of the uplink data packet is used to request the IP address, and the uplink data packet may not be forwarded by the data forwarding network element, thereby reducing signaling interaction.

It should be understood that, in the embodiment shown in <FIG>, the terminal apparatus sends the indication information to the session management network element, so that the session management network element allocates the IP address to the terminal apparatus. The indication information may be sent by another network element, for example, the mobility management network element.

A session management network element may receive a session establishment request message that is forwarded by a mobility management network element and that is from a terminal apparatus, and first indication information sent by the mobility management network element.

The first indication information may be control plane CIoT 5GS optimization indication information in a <NUM> communications system, or control plane CIoT EPS optimization indication information in an EPC network architecture.

Alternatively, the first indication information may indicate the session management network element to send the data packet to the mobility management network element.

Alternatively, the first indication information may indicate the session management network element not to send the data packet to a data forwarding network element.

Optionally, the first indication information may be used to indicate the session management network element not to select a data management network element in a session establishment procedure, or the first indication information may be used to indicate to select the data forwarding network element after the session is established and before an IP address is sent.

In the session establishment procedure, the session management network element may select the data forwarding network element, or may not select the data forwarding network element.

For example, the session management network element may not select the data forwarding network element in the session establishment procedure based on indication information sent by the terminal apparatus or the mobility management network element in the session establishment procedure.

The session management network element allocates the IP address to the terminal apparatus based on the first indication information.

The session management network element may actively allocate the IP address to the terminal apparatus based on the first indication information. In other words, when the session management network element does not receive an IP address request sent by the terminal apparatus, the session management network element may actively allocate the IP address to the terminal apparatus.

For example, the first indication information is control plane data transmission indication information, for example, the control plane CIoT 5GS optimization indication information in the <NUM> communications system, or the control plane CIoT EPS optimization indication information in the EPC network architecture. The session management network element may allocate, based on the first indication information, the IP address to the terminal apparatus after the session is established.

For example, the first indication information is used to indicate to select the data forwarding network element after the session is established and before the IP address is sent. The session management network element may allocate the IP address to the terminal apparatus, then select the data forwarding network element, and send the IP address. Alternatively, the session management network element may allocate the IP address to the terminal apparatus after selecting the data forwarding network element.

The session management network element sends a downlink data packet to the terminal apparatus via the mobility management network element, where the downlink data packet includes the IP address.

Optionally, step <NUM> may be further included in which the session management network element selects the data forwarding network element after the session is established.

As shown in <FIG>, the session management network element may not receive the IP address request sent by the terminal apparatus, or may allocate the IP address to the terminal apparatus before receiving the IP address request sent by the terminal apparatus. The terminal apparatus may obtain the IP address in advance, so that the IP address can be allocated to the terminal apparatus in a more flexible way.

A terminal apparatus sends a session establishment request message to a mobility management network element.

The session establishment request message may be, for example, the session establishment request (for example, a PDU session establishment request) message in the session establishment procedure shown in <FIG>, or may be the attach request (attach request) message in the attach procedure shown in <FIG>. The session establishment request message may carry a session identifier (for example, a PDU session ID) and indication information indicating a session type. The session is a session for transmitting a data packet via a control plane network element.

The mobility management network element forwards the session establishment request message to a session management network element.

The mobility management network element may send first indication information to the session management network element during forwarding of the session establishment request message. In other words, the mobility management network element sends a request message to the session management network element, and the message includes the session establishment request message and the first indication information. The first indication information is used to indicate, to the session management network element, that the session is a session for transmitting the data packet via the control plane network element.

For example, the first indication information includes control plane data transmission indication information. The control plane data transmission indication information may be, for example, control plane CIoT 5GS optimization indication information in a <NUM> communications system, or may be control plane CIoT EPS optimization indication information in an EPC network architecture.

Optionally, the first indication information may be used to indicate to select the data forwarding network element after an IP address is allocated.

The session management network element may actively allocate the IP address to the terminal apparatus based on the first indication information. In other words, the session management network element allocates the IP address to the terminal apparatus in a session establishment procedure.

For example, the first indication information is the control plane data transmission indication information, for example, the control plane CIoT 5GS optimization indication information in the <NUM> communications system, or the control plane CIoT EPS optimization indication information in the EPC network architecture. The session management network element may allocate, based on the first indication information, the IP address to the terminal apparatus in the session establishment procedure.

For example, the first indication information is used to indicate to select the data forwarding network element after the IP address is allocated. The session management network element may allocate the IP address to the terminal apparatus, then select the data forwarding network element, and then send the IP address. Alternatively, the session management network element may select, based on the first indication information, the data forwarding network element after sending the IP address. That is, the session management network element may select the data forwarding network element after allocating the IP address to the terminal apparatus, or after sending the IP address to the terminal apparatus or the mobility management network element.

Optionally, the session establishment procedure may further include step <NUM> in which the session management network element selects the data forwarding network element.

In other words, in the session establishment procedure, the session management network element may select the data forwarding network element, or may not select the data forwarding network element.

Specifically, the session management network element may not select the data forwarding network element in the session establishment procedure based on indication information sent by the terminal apparatus or the mobility management network element in the session establishment procedure.

For example, the first indication information is used to indicate to select the data forwarding network element after the IP address is allocated. The session management network element may first allocate the IP address to the terminal apparatus based on the first indication information, and then select the data forwarding network element in the session establishment procedure. Alternatively, the session management network element may not select the data forwarding network element in the session establishment procedure based on the first indication information.

The session management network element sends a session establishment accept message to the mobility management network element.

The session management network element may invoke Namf_Communication_N1N2 Message Transfer to send an N1 session management (session management, SM) message to the mobility management network element, where the N1 SM message includes the session establishment accept message, and the session establishment accept message may include an RA packet or a DHCP offer packet. The session establishment accept message may be, for example, a PDU session establishment accept message.

The mobility management network element forwards the session establishment accept message to the terminal apparatus.

The mobility management network element encapsulates the session establishment accept message into a NAS message.

It should be understood that, in the embodiment shown in <FIG>, the mobility management network element sends the indication information to the session management network element, so that the session management network element allocates the IP address to the terminal apparatus. The indication information may be sent by another device, for example, the terminal apparatus.

As shown in <FIG>, the session management network element may allocate the IP address to the terminal apparatus in the session establishment procedure, so that the terminal apparatus obtains the IP address in a more flexible way.

In a session establishment procedure, a session management network element does not select a data forwarding network element.

For example, the session management network element does not select the data forwarding network element in the session establishment procedure based on indication information sent by a terminal apparatus or a mobility management network element in the session establishment procedure.

The session management network element may receive a session establishment request message that is forwarded by the mobility management network element and that is from the terminal apparatus, and first indication information sent by the mobility management network element.

Alternatively, the first indication information may indicate the session management network element not to send the data packet to the data forwarding network element.

Optionally, the first indication information may be used to indicate the session management network element not to select a data management network element in the session establishment procedure, or the first indication information may be used to indicate to select the data forwarding network element after the session is established and before an IP address is sent.

The terminal apparatus sends an uplink data packet to the mobility management network element to request the IP address.

The uplink data packet may be, for example, an RS packet or a DHCP discovery packet, or another packet or another message used by the terminal apparatus to request a core network to allocate the IP address.

The session management network element selects the data forwarding network element based on the first indication information.

In other words, the session management network element may select, based on the first indication information, the data forwarding network element after allocating the IP address to the terminal apparatus, or after sending the IP address to the terminal apparatus or the mobility management network element.

As shown in <FIG>, because a connection between the session management network element and the data forwarding network element is not established in the session establishment procedure, a packet check function needs to be enabled for the session management network element, to obtain an IP address request in the uplink data packet.

The method according to this embodiment of this application may be used in a plurality of network architectures, for example, the network architectures shown in <FIG> and <FIG>. It should be understood that, in this application, descriptions of the network elements in the embodiments shown in <FIG> are function descriptions. Based on functions of the network elements, a person of ordinary skill in the art may apply the embodiments shown in <FIG> to the network architectures shown in <FIG> and <FIG> and another similar network architecture. To make a person of ordinary skill in the art more clearly understand that the solutions of this application can be used in various communication scenarios for the functions of the network elements, in this application, <FIG> is used to show that the solution corresponding to <FIG> is used in the network architecture shown in <FIG>.

<FIG> shows a method for allocating and obtaining an IP address according to an embodiment of this application.

For example, a terminal apparatus sends a PDN connection establishment request, to request to establish a PDN connection that supports in transmitting the data packet (control plane CIoT EPS optimisation) via the control plane network element. The PDN connection establishment request may carry indication information (for example, protocol configuration options) to indicate a session type and indicate to obtain an IP address after the PDN connection is established. In a PDN connection establishment procedure, an MME may allocate an evolved packet system bearer identity (evolved packet system bearer identity, EBI) and establish an S11-U interface.

For a specific implementation of step <NUM>, refer to steps <NUM> to <NUM> in the embodiment shown in <FIG>.

The terminal apparatus sends an uplink data packet to the MME to request the IP address.

The uplink data packet may carry the EBI.

For example, the terminal apparatus may encapsulate the uplink data packet in an uplink NAS message, and send the uplink NAS message to the MME.

The MME sends the uplink data packet to an SGW.

For example, the MME may send the uplink data packet to the SGW through the S11-U interface.

The SGW forwards the uplink data packet to a PGW.

The PGW responds to the uplink data packet, and allocates the IP address to the terminal apparatus.

For example, the PGW may receive the uplink data packet that is sent by the MME and that is from the terminal apparatus, where the uplink data packet includes the RS packet or the DHCP discovery packet; and the PGW may allocate the IP address to the terminal apparatus based on the uplink data packet. That is, the PGW may allocate the IP address to the terminal apparatus after receiving the RS packet or the DHCP discovery packet.

In an example, the operation of allocating the IP address to the terminal apparatus may alternatively be an operation of constructing a downlink data packet, where the downlink data packet includes the IP address.

For example, when the uplink data packet is the RS packet, the downlink data packet may be an RA packet; or when the uplink data packet is the DHCP discovery packet, the downlink data packet may be a DHCP offer packet. Alternatively, the downlink data packet may be another packet or another message used by the PGW to send the IP address to the terminal apparatus.

The PGW sends the downlink data packet to the SGW.

The SGW forwards the downlink data packet to the MME.

For example, the SGW may send the downlink data packet to the MME through the S11-U interface.

The MME sends the downlink data packet to the terminal device.

For example, the MME encapsulates the downlink data packet in a downlink NAS message, and sends the downlink NAS message to the terminal apparatus.

The foregoing describes in detail the methods for allocating and obtaining an IP address according to the embodiments of this application with reference to <FIG>. The following describes in detail an apparatus and a device for allocating and obtaining an IP address according to the embodiments of this application with reference to <FIG>.

<FIG> is a schematic block diagram of a session management network element <NUM> according to an embodiment of this application. As shown in <FIG>, the session management network element <NUM> includes:.

Therefore, the session management network element according to this embodiment of this application allocates and sends the IP address to the terminal apparatus without establishing an additional connection channel, so that the terminal apparatus can obtain the IP address more flexibly, and occupation of excessive signaling resources can be avoided.

In a possible design, the session management network element <NUM> may be the session management network element in the foregoing method embodiment, or may be a chip configured to implement a function of the session management network element in the foregoing method embodiment. Specifically, the session management network element <NUM> may correspond to the session management network element in the method <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, or <NUM> according to the embodiments of this application, and the session management network element <NUM> may include units configured to perform the methods performed by the session management network elements in the method <NUM> to the method <NUM> in <FIG>. In addition, the foregoing and other operations and/or functions of the units in the session management network element <NUM> are separately used to implement corresponding procedures of the method <NUM> to the method <NUM> in <FIG>. It should be understood that a specific process in which each unit performs the foregoing corresponding steps is described in detail in the foregoing method embodiments. For brevity, details are not described herein again.

<FIG> is a schematic block diagram of a terminal apparatus <NUM> according to an embodiment of this application. As shown in <FIG>, the terminal apparatus <NUM> includes:.

In a possible design, the terminal apparatus <NUM> may be the terminal apparatus in the foregoing method embodiment, or may be a chip configured to implement a function of the terminal apparatus in the foregoing method embodiment. Specifically, the terminal apparatus <NUM> may correspond to the terminal apparatus in the method <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, or <NUM> according to the embodiments of this application, and the terminal apparatus <NUM> may include units configured to perform the methods performed by the terminal apparatuses in the method <NUM> to the method <NUM> in <FIG>. In addition, the foregoing and other operations and/or functions of the units in the terminal apparatus <NUM> are separately used to implement corresponding procedures of the method <NUM> to the method <NUM> in <FIG>. It should be understood that a specific process in which each unit performs the foregoing corresponding steps is described in detail in the foregoing method embodiments. For brevity, details are not described herein again.

Therefore, the terminal apparatus according to this embodiment of this application obtains the IP address without establishing an additional connection channel, so that the terminal apparatus can obtain the IP address more flexibly, and occupation of excessive signaling resources can be avoided.

An embodiment of this application further provides a communications system <NUM>. As shown in <FIG>, the communications system <NUM> includes:
the session management network element <NUM> in the foregoing embodiment of this application.

Further, the communications system <NUM> may further include the terminal apparatus <NUM> in the foregoing embodiment of this application.

Further, the communications system <NUM> may further include a data forwarding network element.

<FIG> shows a structure of a session management network element according to still another embodiment of this application. The session management network element includes at least one processor <NUM> (for example, a general-purpose processor CPU having computing and processing capabilities, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), or a field programmable gate array (FPGA)). The session management network element further includes at least one network interface <NUM> or another communications interface, a memory <NUM>, and at least one bus system <NUM>. The components in the session management network element are coupled by using the bus system <NUM>. The bus system <NUM> may include a data bus, a power bus, a control bus, a status signal bus, and the like. For clarity of description, various buses are marked as the bus system <NUM> in the figure.

The method disclosed in the embodiments of this application may be used by the processor <NUM>, or is used to execute an executable module stored in the memory <NUM>, for example, a computer program. The memory <NUM> may include a high-speed random access memory (RAM: Random Access Memory), or may further include a non-volatile memory (non-volatile memory). The memory may include a read-only memory and a random access memory, and provide required signaling or data, a required program, and the like for the processor. A part of the memory may further include a non-volatile random access memory (NVRAM). The at least one network interface <NUM> (which may be wired or wireless) is used to implement a communication connection to at least one another network element.

In some implementations, the memory <NUM> stores a program <NUM>, and the processor <NUM> executes the program <NUM> to perform the following operations:.

It should be noted that the session management network element may be specifically the session management network element in the foregoing embodiments, and may be configured to perform steps and/or procedures corresponding to the session management network element in the foregoing method embodiments.

The session management network element <NUM> in this embodiment of this application may correspond to the session management network element in the communication method in the embodiments of this application, and the foregoing and other operations and/or functions of the modules in the session management network element <NUM> are separately used to implement corresponding procedures of the foregoing methods. For brevity, details are not described herein again.

<FIG> shows a structure of a terminal apparatus according to still another embodiment of this application. The terminal apparatus includes at least one processor <NUM> (for example, a general-purpose processor CPU having computing and processing capabilities, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), or a field programmable gate array (FPGA)). The processor manages and schedules modules and components in the terminal apparatus. The terminal apparatus further includes at least one network interface <NUM> or another communications interface, a memory <NUM>, and at least one bus system <NUM>. The components in the terminal apparatus are coupled by using the bus system <NUM>. The bus system <NUM> may include a data bus, a power bus, a control bus, a status signal bus, and the like. For clarity of description, various buses are marked as the bus system <NUM> in the figure.

It should be noted that the terminal apparatus may be specifically the terminal apparatus in the foregoing embodiments, and may be configured to perform steps and/or procedures corresponding to the terminal apparatus in the foregoing method embodiments.

The terminal apparatus <NUM> in this embodiment of this application may correspond to the terminal apparatus in the communication method in the embodiments of this application, and the foregoing and other operations and/or functions of the modules in the terminal apparatus <NUM> are separately used to implement corresponding procedures of the foregoing methods. For brevity, details are not described herein again.

An embodiment of this application further provides a computer storage medium, and the computer storage medium may store a program instruction for executing any of the foregoing methods.

Optionally, the storage medium may be specifically either of the memory <NUM> and the memory <NUM>.

It should be understood that the term "and/or" in this specification describes only an association relationship between associated objects and represents that three relationships may exist.

It should be understood that sequence numbers of the foregoing processes do not mean execution sequences in the embodiments of this application.

Whether the functions are performed by hardware or software depends on a particular application and a design constraint condition of the technical solutions.

It may be clearly understood by a person skilled in the art that, for the purpose of convenient and brief description, for a detailed working process of the described system, apparatus, and unit, refer to a corresponding process in the foregoing method embodiments.

In the several embodiments provided in this application, it should be understood that the disclosed system, apparatus, and method may be implemented in another manner.

Some or all of the units may be selected based on an actual requirement to achieve the objectives of the solutions of the embodiments.

When the functions are implemented in a form of a software functional unit and sold or used as an independent product, the functions may be stored in a computer-readable storage medium. Based on such an understanding, the technical solutions of this application essentially, or the part contributing to the conventional technology, or some of the technical solutions may be implemented in a form of a software product. The computer software product is stored in a storage medium, and includes several instructions for instructing a computer device (which may be a personal computer, a server, or a network device) to perform all or some of the steps of the methods described in the embodiments of this application. The foregoing storage medium includes: any medium that can store program code, such as a USB flash drive, a removable hard disk, a read-only memory (read-only memory, ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disc.

Claim 1:
A method for allocating an internet protocol, IP, address, comprising:
receiving, by a session management network element, a request message from a mobility management network element, wherein the request message comprises a session establishment request message and first indication information, wherein the session establishment request message is from a terminal apparatus and is forwarded by the mobility management network element and comprises a session identifier and indication information indicating a session type, wherein the session type is one of internet protocol version <NUM>, IPv6, hybrid internet protocol version <NUM> and version <NUM>, IPv4v6, and internet protocol version <NUM>, IPv4, and wherein the first indication information is sent directly from the mobility management network element and comprises control plane data transmission indication information, the control plane data transmission indication information being control plane cellular Internet of Things <NUM> system, CIoT 5GS, optimisation indication information, or being control plane cellular Internet of Things EPS, CIoT EPS, optimisation indication information;
establishing (<NUM>), by the session management network element, a session for the terminal apparatus, wherein the session is used for transmitting a data packet via a control plane;
allocating (<NUM>) based on the indication information indicating the session type, by the session management network element, an IP address to the terminal apparatus; and
receiving, by the session management network element, an uplink data packet, wherein the uplink data packet includes an router solicitation, RS, packet or a dynamic host configuration protocol, DHCP, discovery packet and the uplink data packet is from a terminal apparatus and is forwarded by the mobility management network element,
sending (<NUM>), by the session management network element, a downlink data packet to the terminal apparatus based on the first indication information, wherein the downlink data packet comprises the IP address allocated to the terminal apparatus, the downlink data packet being a router advertisement, RA, packet carrying the IP address, or a DHCP offer packet carrying the IP address;
wherein the first indication information further indicates the session management network element to send the downlink data packet to the terminal apparatus via the mobility management network element based on the control plane data transmission indication information.