A dynamic routing and wavelength assignment algorithm in all-optical network with limited-range wavelength conversion was proposed.The correlation of different wavelengths on different links in all possible routes is described by wavelength weight.Attempts are made to assign wavelengths on each candidate route using shortest-path algorithm based on wavelength weight and choose the best as its route and wavelength assignment scheme.Numerical results obtained for NSFNET and 12-node ring show that our algorithm can greatly reduce the blocking probability and the number of converters needed under uniform traffic or traffic dominated by larger hop routes.