Network access method and apparatus
An apparatus includes a processor and a memory having instructions stored thereon that, when executed by the processor, cause the apparatus to insert an uplink classifier user plane function network element at a home location. The uplink classifier user plane function network element is configured to offload a service flow of a terminal device. The apparatus is also caused to, in response to determining the terminal device moved to a visited location, send an address of the uplink classifier user plane function network element to an intermediate user plane function network element at the visited location to establish a tunnel between the intermediate user plane function network element and the uplink classifier user plane function network element.
1 . An apparatus, comprising:
a processor; and
a memory having instructions stored thereon that, when executed by the processor, cause the apparatus to:
insert an uplink classifier user plane function network element at a home location, wherein the uplink classifier user plane function network element is configured to offload a service flow of a terminal device;
in response to determining the terminal device moved to a visited location, send an address of the uplink classifier user plane function network element to an intermediate user plane function network element at the visited location to establish a tunnel between the intermediate user plane function network element and the uplink classifier user plane function network element; and
send an offloading rule to the uplink classifier user plane function network element, wherein the offloading rule indicates to send a service flow that matches the offloading rule to a secondary anchor user plane function network element at the home location, and the secondary anchor user plane function network element is connected to a local data network at the home location.
2 . The apparatus according to claim 1 , wherein the apparatus is further caused to:
insert the uplink classifier user plane function network element based on a data network name (DNN) subscribed to by the terminal device.
3 . The apparatus according to claim 1 , wherein the apparatus is further caused to:
receive a user policy of the terminal device from a policy control function network element, wherein the user policy indicates that the service flow of the terminal device needs to return to the home location and be offloaded in a roaming scenario; and
insert the uplink classifier user plane function network element based on the user policy.
4 . The apparatus according to claim 1 , wherein the apparatus is further caused to:
send the address of the uplink classifier user plane function network element to the secondary anchor user plane function network element to establish a tunnel between the secondary anchor user plane function network element and the uplink classifier user plane function network element.
5 . The apparatus according to claim 1 , wherein the offloading rule further indicates to send a service flow that does not match the offloading rule to a primary anchor user plane function network element at the home location, and the primary anchor user plane function network element is connected to the Internet.
6 . The apparatus according to claim 5 , wherein the apparatus is further caused to:
send the address of the uplink classifier user plane function network element to the primary anchor user plane function network element to establish a tunnel between the primary anchor user plane function network element and the uplink classifier user plane function network element.
7 . The apparatus according to claim 1 , wherein the apparatus is further caused to:
send the address of the uplink classifier user plane function network element to an access network device at the home location to establish a tunnel between the access network device and the uplink classifier user plane function network element.
8 . The apparatus according to claim 1 , wherein the apparatus is further caused to:
in response to determining the terminal device is in a service area of a session management function network element at the home location after determining the terminal device moved to the visited location, insert the intermediate user plane function network element at the visited location; and
send an address of the intermediate user plane function network element to the uplink classifier user plane function network element to establish a tunnel between the uplink classifier user plane function network element and the intermediate user plane function network element.
9 . The apparatus according to claim 8 , wherein the apparatus is further caused to:
send the address of the intermediate user plane function network element to an access network device at the visited location to establish a tunnel between the access network device and the intermediate user plane function network element.
10 . The apparatus according to claim 1 , wherein the apparatus is further caused to:
in response to determining the terminal device left a service area of a session management function network element at the home location after moving to the visited location, send the address of the uplink classifier user plane function network element to the intermediate user plane function network element by using an intermediate session management function network element at the visited location.
11 . The apparatus according to claim 10 , wherein the apparatus is further caused to:
receive, through the intermediate session management function network element, an address of the intermediate user plane function network element from the intermediate user plane function network element; and
send the address of the intermediate user plane function network element to the uplink classifier user plane function network element to establish a tunnel between the uplink classifier user plane function network element and the intermediate user plane function network element.
12 . An apparatus, comprising:
a processor; and
a memory having instructions stored thereon that, when executed by the processor, cause the apparatus to:
in response to determining a terminal device moved to a visited location, insert an intermediate user plane function network element at the visited location;
receive an address of an uplink classifier user plane function network element from a session management function network element at a home location, wherein the uplink classifier user plane function network element is configured to offload a service flow of the terminal device and
send an offloading rule to the uplink classifier user plane function network element, wherein the offloading rule indicates to send a service flow that matches the offloading rule to a secondary anchor user plane function network element at the home location, and the secondary anchor user plane function network element is connected to a local data network at the home location.
13 . The apparatus according to claim 12 , wherein the apparatus is further caused to:
send the address of the uplink classifier user plane function network element to the intermediate user plane function network element, to establish a tunnel between the intermediate user plane function network element and the uplink classifier user plane function network element.
14 . The apparatus according to claim 12 , wherein the apparatus is further caused to:
send an address of the intermediate user plane function network element to the session management function network element to establish a tunnel between the uplink classifier user plane function network element and the intermediate user plane function network element.
15 . The apparatus according to claim 12 , wherein the apparatus is further caused to:
send the address of the intermediate user plane function network element to an access network device at the visited location to establish a tunnel between the access network device and the intermediate user plane function network element.
16 . An apparatus, comprising:
a processor; and
a memory having instructions stored thereon that, when executed by the processor, cause the apparatus to:
in response to determining a terminal device moved to a visited location, insert an uplink classifier user plane function network element at the visited location, wherein the uplink classifier user plane function network element is configured to offload a service flow of the terminal device; and
send an offloading rule to the uplink classifier user plane function network element, wherein the offloading rule indicates to send a service flow that matches the offloading rule to a primary anchor user plane function network element at a home location, and the primary anchor user plane function network element is connected to a local data network at the home location.
17 . The apparatus according to claim 16 , wherein the apparatus is further caused to:
cause a session management function network element at the visited location to insert the uplink classifier user plane function network element based on a data network name (DNN) subscribed to by the terminal device.
18 . The apparatus according to claim 16 , wherein the apparatus is further caused to:
insert the uplink classifier user plane function network element based on a user policy of the terminal device, wherein the user policy indicates that a service flow of the terminal device is to be offloaded at the visited location in a roaming scenario and a service flow that accesses the local data network of the home location returns to the home location.
19 . The apparatus according to claim 16 , wherein the apparatus is further caused to:
in response to determining a session management function network element at the visited location is the same as a session management function network element at the home location, cause the session management function network element at the visited location to send an address of the uplink classifier user plane function network element to the primary anchor user plane function network element, to establish a tunnel between the primary anchor user plane function network element and the uplink classifier user plane function network element.