Software-Defined Networking is today a mature technology, which is developed in many networks and also embedded in novel architectures like 5G and 6G. The SDN control centralization concept brings significant advantages for management and control in SDN together with the programmability of the data plane. SDN represents a paradigm shift towards agile, efficient, and secure network infrastructures, moving away from traditional, hardware-centric models to embrace dynamic, software-driven paradigms. SDN is compliant also with the virtualization architecture defined in the Network Function Virtualization framework. However, SDN should cooperate seamlessly for some years with the distributed TCP/IP control developed during the years all over the world. Among others, the traditional tasks of routing, forwarding, load balancing, QoS assurance, security, and privacy should be solved. The SDN native centralization brings also some new challenges and problems which are different from the traditional distributed control IP networks. The algorithms and protocols usable in SDN should meet requirements like scalability, convergence, redundancy assurance, sustainability, and good real-time response, and allow orchestrated automation in enhancing network resilience and adaptability. This work presents a theoretical review of state-of-the-art SDN optimization techniques, offering a critical and comparative discussion of various algorithms having tasks such as routing (including dynamic ones), forwarding, load balancing and traffic optimization, and forwarding delay minimization. Attention is pointed to general algorithms which can offer pragmatic solutions for large systems or multiple metric routing.