
I have this issue with my youngsters (8 months and nearly two) as they get frustrated at not being able to greet the other dog. I don't allow them to as I walk 6 dogs and other dogs would probably find this too much.
They know the command quiet, and if i see the other dofg first I get tehm to look at me (I use headcollars on all 6) and repeat quietly 'quiet'.
I really praise for self control and quiet, give a check and ah ah, if they start barking and put myself in their line of sight.
Of course i also explain and appologise to the other dog owner. In the mantime the other fout look bored.
Interestingly if the other owner stops just out of reach and we get talking they very quickly settle, so I knwo they are jsut 'fustrted greeters'.
They do not react likw this at shows whwre there are lots and lots of dogs, only the odd dog appearing gets them excited.