We have a little 4-month-old pug puppy. He absolutely adores people and would walk off with any stranger without a second thought tail wagging and trying to give them kisses. He is also completely unfazed by any scary/loud noises, cars, motorcycles, bikes, scooters, cats, birds, large animals like horses, would sleep through loud music, loud TV-noise, hoover, even a sudden firework etc etc. Nothing fazes him, EXCEPT his own species!
He absolutely hates dogs for whatever bizarre reason and barks at them regardless of how far away that dog is or how little that dog cares about him. He spots them miles away and starts barking and growling! He is a usually the smallest fog around, so it looks ridiculous and people laugh it off, but he really doesn't miss a single dog without angrily barking at them. I used to think he was afraid of them and that it was all fear-related, but actually... it's not like those dogs are invading his space (very rarely some friendly dogs approach) most of the time my little warrior seeks out the fog and pulls me towards that dog only to start loudly (angrily) barking at it once we get closer and he follows the dogs barking from behind once they leave. He's on a lead, but he pose isn't fearful at all, but quite combative (like he thinks he's big and scary and wants to stand his ground/pick a fight). He does it to dogs of all breeds/shapes/sizes, even to puppies! I have a theory that he thinks he is human and doesn't recognise he's of the same species as those dogs 
Distraction doesn't work at all. He stops whatever he is doing (eating/drinking/sleeping) and starts barking if a dog walks past.
It's something I would love to fix, especially as our next door neighbours just got a rescue dog and they are barking at each other over the fence non-stop (he usually just quietly mooches around the garden).