Barking, lunging, growling, or otherwise reacting to other dogs while restrained (on a leash, behind a fence, or when otherwise held back) is often referred to as 'reactivity.' Reactivity is a common behavior in dogs of all breeds and sizes and can range in severity.
It's common to see reactivity develop in the adolescent period (somewhere around 7-14 months old) or when a dog reaches full maturity (somewhere around 2-3 years old). Reactivity is typically the result of an extreme emotion, most often fear or frustration. The dog quickly realizes that when he barks, growls, lunges, or otherwise reacts, it makes the scary thing go away.
We treat reactivity through 'conditioning.' Remember Pavlov's Dogs - the sound of a bell predicted food, and soon, the sound of a bell alone made the dogs salivate. If we can teach our dog that the thing that he finds scary or frustrating - like another dog - brings him something really good (like a very yummy treat), we can change his negative association with that scary thing.
We typically start with 'classical conditioning,' in which the dog receives food because the scary thing is present. Scary thing = food. Always. It doesn't matter what the dog is doing. The scary thing is present, so he's receiving food. If he is reacting (barking, lunging, growling), we also move him farther away from the scary thing until he is able to remain calm, still feeding him while the scary thing is present.
Once the dog is feeling more comfortable with the scary thing, we proceed to 'operant conditioning,' in which the dog receives food for a particular behavior (in this case, looking at the thing) when the scary thing is present. At a distance at which the dog is comfortable and not reacting, if the dog glances towards the scary thing, we mark it with a clicker or happy 'yes,' then deliver food. See the 'Engage/Disengage' graphic below.
It takes time and dedication to change a dog's 'conditioned emotional response' to something that scares or frustrates him, but it produces long-lasting results.
Not sure where to start? Contact us - we're super happy to answer your questions.