A medium access control (MAC) protocol for spread-spectrum ad hoc networks with dynamic channel allocation (DCA) is presented. DCA can support large systems with a smaller number of channels by dynamically assigning channels only when a node has a packet to transmit. The protocol extends cross layer, with the scheduling at the MAC, and assignment of channels at the physical layer by means of a query. It is shown that DCA is collision-free under ideal conditions. By assigning channels dynamically, DCA offers improved throughput normalized by available bandwidth. Analytical results are presented for the performance of the query detection and the throughput for a fully connected network.