The current routing and wavelength assignment (RWA) algorithms in optical switching (OBS) networks usually adopt the shortest path between the source-destination pairs as the routes and assign wavelengths hop-by-hop. There are two main problems exist in theses algorithms: (1) If there are common links among the shortest paths of different source-destination pairs, the one-way reservation protocol may cause congestion on these links while other links are underutilized, which may deteriorate the network performance, especially in an unsymmetrical network. (2) Few RWA algorithms take the fault recovery into consideration, which is
important for the network to operate smoothly. An ant system based RWA algorithm is proposed in this paper to resolve these two problems. The destination nodes send ACKs back for each successfully received burst control packet (BCP). The ACKs are
feed back along the same path as the one through which BCPs are forwarded. ACKs leave some "pheromone" along the path. The coming bursts will choose the output links with the probability proportioned to their pheromone intensity. Numerical results obtained from simulation show that our RWA algorithm can find the optimal routes adaptively and get a better burst drop probability performance compared with current RWA algorithms in an unsymmetrical network. Furthermore, our RWA algorithm is robust for fault recovery. When there are failures on some fibers, the bursts can be dynamically deflected to a suitable route without any extra information exchange among the switching nodes.