The present invention provides an SDN-based method and device for optimizing routing of terminal cells, SDN controller and terminal cell. The SDN-based method for optimizing routing of the terminal cells applicable to the SDN controller comprises: allocating, by an SDN controller, address information to at least one terminal cell; recording status information of each of the at least one terminal cell, path information between each of the terminal cells and other terminal cell, and path information between each of the terminal cells and a base station; and configuring routing to a network side server for any one of the terminal cells according to the status information of each of the terminal cells, the path information between each of the terminal cells and the other terminal cell, and the path information between each of the terminal cells and the base station. The technical solution of the present invention enables the SDN controller to configure an optimal routing for each terminal cell flexibly, and thus