Software defined network (SDN) is a newly emerging network architecture with the core concept of separating the control plane and data plane. Centralized controller is introduced to manage and configure network equipments to realize flexible control of network traffic and provide a good platform for application-oriented network innovation. It thus be able to improve network resource utilization, simplify network management, reduce operating cost, and promote innovation and evolution. Routing is always a major concern in network management. When SDN devices (e.g., OpenFlow switches) are introduced, routing becomes different. The flow table is usually implemented in expensive and power-hungry Ternary Content Addressable Memory (TCAM), which is thus capacity-limited. How to optimize the network performance in the consideration of limited TCAM capacity is therefore significant. For example, multi-path routing (MPR) has been widely regarded as a promising method to promote the network performance. But MPR is at the expense of additional forwarding rule, imposing burden on the limited flow table. On the other hand, a logical centralized programmable controller manages the whole SDN by installing rules onto switches. It is widely regarded that one controller is restricted on both performance and scalability. To address these limitations, pioneering researchers advocate deploying multiple controllers in SDNs where each controller is in charge of a set of switches. This raises the switch-controller association problem on a switch shall be managed by which controller. In this chapter, we first investigate how to schedule MPR with joint consideration of forwarding rule placement. Then, we study a minimum cost switch-controller association (MC-SCA) problem on how to minimize the number of controllers needed in an SDN while guaranteeing the flow setup time.