How loud is the knocking? It may be a harmonic rythm from water pressure. This is more common in boiler based hot water heating systems but may also be causing your knocking. A plumber would install a 12" riser, a vertical section of water pipe, close to the first right angle turn in the main line. The 12" riser would be capped so that it holds air. The air dampens the knocking.