Plumber came in. Replaced the shutoff valve. In doing so, he realised that the pipe was lose through where it goes inside the floor. Wedged it with a piece of wood.
The knocking sound reduced to about 60 %, and he said that sound is due to pipe being lose inside the wall.
What is the best way to clamp the water pipes going inside the wall. If I trace the path of the pipe, what is the best way to OPEN the wall/ceiling ??? Also, how to check if there are any electric cables nearby, other than visual inspection (any gadgets in the market that sense the cables inside the wall, like the wood stud sensor) ???