Rule #1 of dog training: Your dog might be friendly, but that doesn't mean every other dog wants to be it's friend. Rule #2 of dog training: Have a solid recall on your dog.
How to Get A Reliable Recall:
Here is a quick video on theory:
and how to use a long line to start recall training:
You can also take formal classes to work on recall, or join a club. Every basic manners class should have dedicate time to recall basics while working on other basic skills (sit, down, stay, don't eat that), and some classes are even designed specifically for working on one thing only- getting your dog to come when called.
And then, there is my favorite way to work recall and off leash skills with a dog: Sports. In most dog sports, (Obedience, Rally, Agility, Frisbee, etc), the dog has to be able to execute skills, such as "go this way", "do this thing", "come" and "stay" while off leash...and it looks REALLY cool!
The reason this works? It's fun for the handler, and for the dog. Mark demonstrates the basic principle of come when called while competing with his dog - YOU HAVE TO BE MORE EXCITING THAN ALL THOSE OTHER EXCITING THINGS, which isn't always easy to do, and he never yells at the dog for coming to him. "Fido, come here NOW" and getting a whack on the nose, or getting his nails clipped is a surefire way to insure your dog never comes when you call.
So in short:
- Never let your dog off leash until you have a reliable recall on your dog.
- Use a long line to work longer distances.
- Find a way to be more exciting than a squirrel (highly motivating treats, frisbee, ball, whatever your dog likes)
- If your dog doesn't come, make it easier for your dog to be successful (shorter distance/fewer distractions)
- Keep practicing, join a club, take a class, or start dabbling in sports to make things interesting and fun!