A method for routing and forwarding, comprising: receiving, by a network controller, a routing request message sent by a requesting routing node, wherein the routing request message carries container tree set information of a requested content, wherein the container tree set information comprises a container name of at least one container comprising a home container of the requested content, and the container tree set information is used to indicate an access relationship between the at least one container; determining, by the network controller according to registration information of each container in the at least one container stored or acquired by the network controller, an edge routing node of each container, wherein the registration information of the container is used to indicate a correspondence between a container name of the container and the edge routing node of the container; determining, by the network controller, a topological range of each container according to the edge routing node of each container and network topology information of a network controlled by the network controller, wherein the network topology information is used to indicate a topological structure of the network by using network names of routing nodes in the network, and the topological range is used to indicate an inclusion relationship between containers and routing nodes; determining, by the network controller according to a network name of an edge routing node of the home container, an acquired network name of the requesting routing node, and the network topology information, a forwarding path that starts from the requesting routing node and ends at the edge routing node of the home container; determining, by the network controller according to the topological range of the at least one container and the forwarding path, routing information corresponding to the requesting routing node, wherein the routing information comprises a container name and a port corresponding to the container name, wherein the container name is a container name of a container in the at least one container comprised in the container tree set information; and delivering, by the network controller, the routing information corresponding to the requesting routing node to the requesting routing node, so that the requesting routing node forwards, according to the routing information corresponding to the requesting routing node, a content request packet corresponding to the requested content. receiving, by a network controller, a routing request message sent by a requesting routing node, wherein the routing request message carries container tree set information of a requested content, wherein the container tree set information comprises a container name of at least one container comprising a home container of the requested content, and the container tree set information is used to indicate an access relationship between the at least one container; determining, by the network controller according to registration information of each container in the at least one container stored or acquired by the network controller, an edge routing node of each container, wherein the registration information of the container is used to indicate a correspondence between a container name of the container and the edge routing node of the container; determining, by the network controller, a topological range of each container according to the edge routing node of each container and network topology information of a network controlled by the network controller, wherein the network topology information is used to indicate a topological structure of the network by using network names of routing nodes in the network, and the topological range is used to indicate an inclusion relationship between containers and routing nodes; determining, by the network controller according to a network name of an edge routing node of the home container, an acquired network name of the requesting routing node, and the network topology information, a forwarding path that starts from the requesting routing node and ends at the edge routing node of the home container; determining, by the network controller according to the topological range of the at least one container and the forwarding path, routing information corresponding to the requesting routing node, wherein the routing information comprises a container name and a port corresponding to the container name, wherein the container name is a container name of a container in the at least one container comprised in the container tree set information; and delivering, by the network controller, the routing information corresponding to the requesting routing node to the requesting routing node, so that the requesting routing node forwards, according to the routing information corresponding to the requesting routing node, a content request packet corresponding to the requested content.