For a sequence (s/sub 1/, t/sub 1/), ..., (s/sub i/, t/sub i/), ... of routing requests with (s/sub i/, t/sub i/) arriving at time step i on the wavelength-division multiplexing (WDM) all-optical network, the on-line routing problem is to set-up a path s/sub i/ /spl rarr/ t/sub i/ and assign a wavelength to the path in step i such that the paths set-up so far with the same wavelength are edge-disjoint. Two measures are important for on-line routing algorithms: the number of wavelengths used and the response time. The sequence (s/sub 1/,t/sub 1/), ..., (s/sub i/, t/sub i/), ... is called a permutation if each node in the network appears in the sequence at most once as a source and at most once as a destination. Let H/sub n/ be the n-dimensional WDM all-optical hypercube. We develop two on-line routing algorithms on H/sub n/. Our first algorithm is a deterministic one which realizes any permutation by at most /spl lceil/3(n-1)/2/spl rceil/ + 1 wavelengths with response time O(2/sup n/). The second algorithm is a randomized one which realizes any permutation by at most (3/2 + /spl delta/)(n-1) wavelengths, where /spl delta/ can be any value satisfying /spl delta/ /spl ges/ 2/(n-1). The average response time of the algorithm is O(n(1 + /spl delta/)//spl delta/). Both algorithms use at most O(n) wavelengths for the permutation on Hn. This improves the previous bound of O(n/sup 2/).