Patent attributes
A communication method and a communications apparatus, wherein the communication method includes: receiving, by a network repository network element, a first request message from a mobility management network element, where the first request message carries a data network name of a session that a terminal device requests to establish; determining, by the network repository network element based on the first request message, at least one target session management network element from session management network elements that support the data network name; and sending, by the network repository network element, an identifier of the at least one target session management network element to the mobility management network element, such that a session management network element can be selected to provide a service for a terminal device.