Because of the distributed control of the network, the dynamic nature of the traffic and the unpredictability of a failure event, the flexibility and robustness of ant colony optimization (ACO) make it a suitable candidate for provisioning lightpaths in an optical network. In this work, we propose a fault-tolerant dynamic routing and wavelength assignment (RWA) algorithm based on the ACO framework, presenting its integration into the Generalized multi-protocol label switching (GMPLS) control plane. By simulating two different scenarios, we demonstrate the effectiveness of this algorithm when a single link or node failure occurs.