It`s much easier to pass by a fence with a barking dog behind do if a 
you keep calm: anywhay no harm will come to your dog. Having 
noticed the dog behind a fence, take side with the fence as soon as possible 
and calm down your dog with a simple motion. At that you needn`t pull 
the lead, shout and punish your pet. Everything should happen in a silent 
and quiet way. You should probably be required to calm down your dog by words
 or in any habitual way for you in addition. It`s very important to do 
this in order when passing by the fence with your dog next time it wasn`t excited. Then you`ll have an opportunity to teach your pet
 to pass by the fence with the dog behind more quietly. 
When you train your dog to respond quietly to the other dogs you`ll require a reliable dog control outfit like a stop pull dog harness. It will help you to handle you dog before you train it to be calm when meet other dogs and distractions inviting its aggression.

The best stop pull dog harnesses, click on the pictures!
Find a matching dog leash for safe dog walking here.