All-optical networks are becoming increasingly popular for high bandwidth connections. With the advent of the crossconnect technology, optical connections can be established dynamically. Routing and wavelength assignment are important issues in such networks. This work focuses on the routing issue in networks. Two online algorithms are presented that compute a route among all feasible routes for a node pair based on hop length of the path and congestion in the network. Simulations are conducted on sample network topologies with Poisson traffic and exponential call holding times. Results show that shortest hop least congested routing technique performs better than other previous techniques in terms of blocking probability.