This paper studies optimal bandwidth and power allocation in a cognitive radio network where multiple secondary users (SUs) share the licensed spectrum of a primary user (PU) under fading channels using the frequency division multiple access scheme. The sum ergodic capacity of all the SUs is taken as the performance metric of the network. Besides the peak/average transmit power constraints at the SUs and the peak/average interference power constraint imposed by the PU, total bandwidth constraint of the licensed spectrum is also taken into account. Optimal bandwidth allocation is derived in closed-form for any given power allocation. The structures of optimal power allocations are also derived under all possible combinations of the aforementioned power constraints. These structures indicate the possible numbers of users that transmit at nonzero power but below their corresponding peak powers, and show that other users do not transmit or transmit at their corresponding peak powers. Based on these structures, efficient algorithms are developed for finding the optimal power allocations.