This paper considers a single server queue that operates in a random environment defined by an alternating renewal process with states 1 and 2. When the random environment is in state i (i=1,2), the arrivals occur at a mean rate of λi and the distribution of service-time for these arrivals is Bi(t). The server is working when the random environment is in state 1 and not working when the state is 2. This model is applicable to situations in manufacturing, computer and telecommunications problems when the server is subject to random breakdown. It is also useful in modeling some priority and cyclic server queues. The paper analyzes the problem by first examining the steady-state distribution of work in the system. It shows that the work in the system is closely related to the waiting time in a special GI/G/1 queue. For the special case when the off-period is exponentially distributed, exact closed-form expressions are obtained for the performance measures of interest. For other cases, the paper proposes an approximation and shows that it works well when compared with simulations.