A Knocking noise can be the enclosure walls being loose, or as stated above the woofers not screwed down tight, or it can com from the sub itself and may be the dust cap popping off, or spider coming loose, or tinsel leads slapping the back of the cone. Or at high excursion it could be the voice coil rocking and hitting the pole, or bottoming out and hitting the back plate.
So just saying your sub knocks isnt descriptive enough to tell. Gotta get a closer listen and check some of those things off the list.