Software-Defined Networking (SDN) is a promising network architecture that proposes the decoupling of data and control planes. It uses a logically centralized controller powered by a global view to orchestrate the network, enabling innovation by shifting the task of network administration to network programming. Many SDN applications are designed to work autonomously without intervention, and thus they need to monitor the state of the network in order to take appropriate actions, and improve their future decisions. Furthermore, in the case of physically distributed SDN controllers, applications also need to exchange their views in order to build a global network view. This great shift in how networks are perceived gave birth to many new network applications design challenges.In this dissertation, we identify some of these challenges and study how they could affect the performance and security of SDN applications. In particular, we focus on the problem of inconsistent network view at the controllers and its impact on the network applications. We identify two key factors that can contribute to the inconsistent network view at the controllers: (1) network state collection; and (2) controllers' state distribution. We investigate different manifestations of the impact of network state collection and distribution on network applications performance and security. Moreover, we show that different network applications have different consistency requirements, and hence we introduce adaptive distributed SDN controllers as a solution to the controllers' state distribution. Adaptive controllers can tune their i First and foremost, I wish to thank my supervisor Dr. Ashraf Matrawy for his guidance, advice, and more importantly for his patience throughout this dissertation. I would like to thank my PhD committee members Dr. Chadi Assi, Dr. Chris Smelser, Dr. Dimitrios Makrakis, and Dr. Jason Jaskolla for reviewing my dissertation and providing me with their insightful feedback and comments. I would also like to thank my research group colleagues for their fabulous support, and for the fruitful dicussions and the meetings that we had. Last but not least, I would like to express my deepest gratitude and appreciation to my family and friends. Special thanks should be given to my father Abdelsalam, my mother Shoukran, my brothers Khaled and Mahmoud, and my sister Ghada for giving me the encouragement and motivation that I really needed. iv Contents Abstract i Acknowledgments iv List of Figures x List of Tables xiii List of Abbreviations xv CHAPTER 3. IMPLEMENTATION OF SDN EMULATION ENVIRONMENTS kernel (i.e., Linux namespaces is a resource isolation subsystem; or an operating system level virtualization technology). With Linux Namespaces, users can isolate and virtualize filesystems, processes, as well as network stacks.In order to emulate network hosts, Mininet uses the Linux Namespaces to create isolated process spaces for the hosts. In Mininet, hosts are processes with isolated network namespaces (and a shared filesystem).Switches...