SUMMARYWe propose an ant-based algorithm to improve the alternate routing scheme for dynamic Routing and Wavelength Assignment (RWA) in all-optical wavelength-division-multiplexing (WDM) networks. In our algorithm, we adopt a novel twin routing table structure that comprises both a P-route table for connection setup and a pheromone table for ants' foraging. The P-route table contains P alternate routes between a source-destination pair, which are dynamically updated by ant-based mobile agents based on current network congestion information. Extensive simulation results upon the ns-2 network simulator indicate that by keeping a suitable number of ants in a network to proactively and continually update the twin routing tables in the network, our new ant-based alternate routing algorithm can result in a small setup time and achieve a significantly lower blocking probability than the promising alternate shortest-path (ASP) algorithm and the fixed-paths least congestion (FPLC) algorithm for dynamic RWA even with a small value of P. key words: ant-based routing, routing and wavelength assignment, WDM networks, alternate routing