Barking is an expressive form of communication that dogs employ in a variety of circumstances. It is used as a warning, a show of fear, excitement and joy. I think it best to look at barking as something you can control but probably not eliminate. The first step is to identify the triggers that initiate the barking you need to control, sometimes the trigger could be eliminated and that would solve the problem for example play interaction with your puppy that causes barking. If the trigger cannot be eliminated you can try desensitizing the puppy to the trigger. For example, a puppy that barks at strangers many times will stop if he frequently interacts with strangers at a park or even on a busy sidewalk. You can also intentionally initiate the trigger, like a doorbell but be holding the puppy and talking to the puppy when the trigger occurs. Use of strong positive reinforcement and praise if he doesn't bark can begin to send your message. Negative reinforcement in the form of a recognizable firm tone and phrase can deter some puppies. Using a water squirt gun or a metal can with coins that creates a loud noise helps some owners to send the message. Electronic devices that emit an unpleasant signal triggered by barking are effective in many indoor and outdoor environments, the tone is not heard by people. These work best if they are put in play before the barking behavior has gotten out of control. Since your puppy is 6 months old using an antibark collar may be the best option. The urge to bark is strong in many dogs and the reasons for barking vary, controlling barking takes consistency of approach and patience.