This paper proposes a bandwidth-aware localized-routing algorithm that is capable of sensing the available spectrum bands within a two-hop neighboring for choosing the highly opportunistic routes. A mixed-integer linear programming (MILP) is utilized to formulate the optimization problem. Then, the proposed algorithm is used to determine the maximum bandwidth possible of link pairs via a bandwidth approximation process of relaxed variables. Thereby, the proposed algorithm can allow selected routes corresponding to maximum bandwidth possible between cognitive radio (CR) users through link pairs in cognitive radio networks. By comparing the solution values to previous works, simulation results demonstrate that the proposed algorithm can offer a closed-optimal solution for routing performance in cognitive radio networks. The contribution of this paper is achieved through approximately 50% throughput utilized in the network.