I recently have been doing some renovations in my upstairs bathroom. When I run the tub or shower and turn it off, I get knocking sounds in the pipes. Thinking it was water hammer,I followed some advice and drained all the pipes including hot water heater. Same thing still happened. So I tried a few experiments which leave me with more questions. I ran the shower/bath but had the drain plug in. Turned off the shower and no knocking. Doesn't that eliminate the possibility of water hammer? I waited 5 minutes-still no knocking, then opened the drain and bam knocking again. So it appears to be related to the drain pipes and not the water pipes. Any ideas?