| CPC H04L 61/4511 (2022.05) | 6 Claims |

|
1. A method, comprising:
receiving, by a network element, a domain name system (DNS) query message from a terminal device;
obtaining, by the network element, first information from the DNS query message, wherein the first information comprises a domain name, and the domain name is requested by the terminal device, and wherein the network element is an address resolution function network element;
sending, by the network element, the first information to a session management function network element;
receiving, by the session management function network element, the first information;
determining, by the session management function network element, data network access identifier based on the first information and location information of the terminal device, wherein the data network access identifier is for indicating location information of a first application platform on which a first application is deployed, and the domain name corresponds to the first application;
sending, by the session management function network element, second information related to the data network access identifier to the network element;
receiving, by the network element, the second information from the session management function network element;
adding, by the network element, the second information into the DNS query message to obtain a second DNS query message and sending the second DNS query message containing the second information to a central DNS server, wherein the second DNS query message is for obtaining an Internet Protocol (IP) address of an application server corresponding to the domain name;
receiving, by the network element, the IP address of the application server; and
sending, by the network element, the IP address to the terminal device.
|