A numerical study of turbulent channel flow at various Reynolds numbers (Reτ=115, 210, 300) is conducted in order to examine the requirements for a reliable subgrid modelling in large-eddy simulations of wall-bounded flows. Using direct numerical simulation data, the interactions between large and small scales in the near-wall flow are analysed in detail which sheds light on the origin of the inverse cascade of turbulent kinetic energy observed in the buffer layer. It is shown that the correlation of the wall-normal subgrid stress and the wall-normal derivative of the streamwise grid-scale velocity plays the key role in the occurrence of the inverse cascade. A brief a priori test of several subgrid models shows that currently applied models are not capable of accounting properly for the complex interactions in the near-wall flow. A series of large-eddy simulations gives evidence that this deficiency may cause significant errors in important global quantities of the flow such as the mean wall shear stress. A study of the eddy-viscosity ansatz is conducted which reveals that the characteristic scales usually employed for the definition of the eddy viscosity are inappropriate in the vicinity of a wall. Therefore, a novel definition of the eddy viscosity is derived from the analysis of the near-wall energy budget. This new definition, which employs the wall-normal subgrid stress as a characteristic scale, is more consistent with the near-wall physics. No significant Reynolds-number effects are encountered in the present analysis which suggests that the findings may be generalized to flows at higher Reynolds numbers.