A resource allocation algorithm for orthogonal frequency division multiple access-based and infrastructure-based relay networks is introduced in this paper. The algorithm is applied in the downlink of a single cell. Channel state information is exploited at the transmitting base station (BS) and at the transmitting relay stations (RSs). The algorithm coordinates the allocation of subcarriers, bits, and power distributed over the BS and RSs. The goal of the resource allocation algorithm is that the sum rate in a cell is maximized. Simultaneously, each subscriber station (SS) achieves a requested data rate called minimum data rate, and a tolerated bit error probability is ensured on each link. Simulation results show that a sum rate in a cell is achieved which is near to an upper bound introduced in the paper. Even if the sum of the minimum data rates of all SSs is large, the proposed algorithm offers the minimum data rate nearly as reliable as the upper bound. Additionally, simulation results show that the proposed algorithm achieves a superior sum rate compared to the sum rate of other resource allocation algorithms.