A knocking sound? Are you sure it's not that your pedaling isn't as smooth as it should be and the speed of the wheel is occasionally out pacing your feet?
That will have the pawls about to disengage and then when your feet catch up the pawls slam back into their proper position. Along with all the other drivetrain components suddenly going from slack to tension. And that is about the only thing that ever sounds like a knock to me that concerns the rear wheel and freewheel or free hub.