Dynamics of confined polymer chains