Dynamic and flexible optical networks are among the evolution scenarios of the optical transport networks. These form the basis of the new generation of optical networks of tomorrow and enable the effective deployment of services such as cloud computing. This evolution is intended to provide flexibility and automation to the optical layer. However, it results in additional complexity, particularly in terms of the management and control of this new network generation. Until recently, the standardized routing and signaling protocols have been taking into account several optical parameters like the spectral bandwidth information, modulation format, and optical regeneration. However, other parameters (e.g., link optical powers, gain of optical amplifiers) are still required in order to efficiently operate large optical networks. In this context, there is a need to study the existing optical networks and the different integration methods of the photonic layer in a control plane. The goal is to get an automatic optical network that is flexible, programmable, and at the same time efficient from an economical and operational perspective. The use of flexible grid technology has an impact on existing optical networks, where almost all the equipment must be replaced, resulting in an additional cost to network operators. In this work, we study the current optical networks and evaluate the impact of flexibility on the existing infrastructures. Then, we identify several physical parameters to be controlled and propose protocol extensions in order to integrate these parameters in the GMPLS control plane. In addition, we develop the routing and signaling algorithms that allow the implementation of an efficient control plane that addresses the need for flexibility. Finally, the set of our proposals and solutions are evaluated on multiple network topologies with different traffic patterns in order to validate their relevance.