This paper considers the problem of Routing and Wavelength Assignment(RWA) in a reconfigurable optical network using wavelength division multiplexing (WDM). The RWA problem consists of two basic sub-problems, namely, routing problem and wavelength assignment problem. We couple the two sub-problems: the paths are decided by the state of the wavelength assignment. This is usually called dynamic (or adaptive) RWA. As Traditional static RWA algorithms only consider to have lower blocking probability, for high priority class light-path, they ignore to optimize the performance of low priority class light-path and result in higher blocking probability for low priority class light-path request. So the average of blocking probability is increased in all-optic networks. In fact, the most efficient service of optic network is for low priority class light-path request. In order to improve the performance of optic network, we must optimize low priority class light-path request. Our method is based on quality of service (QoS), using a layered-graph model and setting a threshold to assign the wavelength dynamically, this threshold decides whether to assign intensively the preferred wavelength in higher priority class wavelength. The value is tuned adaptively by nodes in all optic-networks with the usage of wavelength. Then the nodes select the routing dynamically according to the wavelength assigned. By using our method, the blocking rate of the high priority request is guaranteed to the lower degree, and at the same time performance of the low priority request is improved. So the network’s average blocking rate is minimized. Simulation results of the network performance showed that the proposed method performs well in different dynamic traffic situation.