Optimizing Controller Placement for Distributed Software-Defined Networks.