A communication method, comprising: determining, by a session management network element in a process of creating a session for a terminal in a group, a transit device that provides a fifth generation virtual network, 5GVN, service for the group, wherein the transit device is configured to forward data between any two user plane network elements that provide the 5GVN service for the group; and sending, by the session management network element, a first forwarding rule to the transit device, wherein the first forwarding rule comprises forwarding information of at least one user plane network element and forwarding information of at least one terminal in the group served by the at least one user plane network element, the first forwarding rule is used by the transit device to forward, to a first user plane network element that serves a first terminal in the group, a data packet whose destination address is an address of the first terminal in the group, and the first terminal in the group is any one of the at least one terminal in the group, the first user plane network element is any one of the at least one user plane network element; wherein the method further comprises: sending, by the session management network element, a second forwarding rule to the first user plane network element, wherein the second forwarding rule comprises forwarding information of the transit device, and the second forwarding rule is used by the first user plane network element to forward, to the transit device, a data packet whose destination address is not an address of a terminal served by the first user plane network element; sending, by the session management network element, a fourth forwarding rule to the first user plane network element, wherein the fourth forwarding rule is used by the first user plane network element to forward a data packet whose destination address is an address of a terminal served by the first user plane network element to a radio access network, RAN, node accessed by the terminal served by the first user plane network element; wherein a star topology architecture to reduce a quantity of tunnels is used in 5GVN networking. determining, by a session management network element in a process of creating a session for a terminal in a group, a transit device that provides a fifth generation virtual network, 5GVN, service for the group, wherein the transit device is configured to forward data between any two user plane network elements that provide the 5GVN service for the group; and sending, by the session management network element, a first forwarding rule to the transit device, wherein the first forwarding rule comprises forwarding information of at least one user plane network element and forwarding information of at least one terminal in the group served by the at least one user plane network element, the first forwarding rule is used by the transit device to forward, to a first user plane network element that serves a first terminal in the group, a data packet whose destination address is an address of the first terminal in the group, and the first terminal in the group is any one of the at least one terminal in the group, the first user plane network element is any one of the at least one user plane network element; wherein the method further comprises: sending, by the session management network element, a second forwarding rule to the first user plane network element, wherein the second forwarding rule comprises forwarding information of the transit device, and the second forwarding rule is used by the first user plane network element to forward, to the transit device, a data packet whose destination address is not an address of a terminal served by the first user plane network element; sending, by the session management network element, a fourth forwarding rule to the first user plane network element, wherein the fourth forwarding rule is used by the first user plane network element to forward a data packet whose destination address is an address of a terminal served by the first user plane network element to a radio access network, RAN, node accessed by the terminal served by the first user plane network element; wherein a star topology architecture to reduce a quantity of tunnels is used in 5GVN networking. sending, by the session management network element, a second forwarding rule to the first user plane network element, wherein the second forwarding rule comprises forwarding information of the transit device, and the second forwarding rule is used by the first user plane network element to forward, to the transit device, a data packet whose destination address is not an address of a terminal served by the first user plane network element; sending, by the session management network element, a fourth forwarding rule to the first user plane network element, wherein the fourth forwarding rule is used by the first user plane network element to forward a data packet whose destination address is an address of a terminal served by the first user plane network element to a radio access network, RAN, node accessed by the terminal served by the first user plane network element; wherein a star topology architecture to reduce a quantity of tunnels is used in 5GVN networking.