In this paper, a new framework based on the tool of stochastic geometry is proposed to analyze the coverage probability and average rate with different channel allocations in a D2D multi-channel downlink cellular network. We consider a network with two types of users: cellular users and D2D users, where each D2D user has its own D2D relay and can only receive data from the relay. Cellular users and D2D relays can establish cellular links with the nearest base station through cellular channels only if the SINR is above a threshold. D2D users communicate with their own D2D relays to form D2D links through specific D2D channels. As validated by extensive numerical results, we are able to find the optimal channel allocation for D2D communications, to achieve the optimal system performance in terms of coverage probability and average rate.