In this paper, the authors propose an efficient closed loop routing in optical networks. It also proposes distance optimization by genetic approach subject to requirements of fairness, efficiency and cost. It proposes a network design problem for the traffic grooming and routing in WDM networks. Moreover, effective ways to improve its performance and reduce its complexity are provided. In this paper, it is concentrated on the effects of bandwidth, delay and bit error rate. This paper deliberates the development in blocking probably for incoming requests while performing routing by proposed algorithm and shortest path algorithm. Used prior to network operation, the algorithm determines which route should be used for each potential connection.