Whether you're walking alone or with your dog, it's good to be prepared for any situation you may encounter. Take dogs. The best thing you can do is avoid dogs you don't know -- switch to the other side of the road, avoid direct eye contact and never turn your back on them. Carry a repellent or stick with you, just in case you can't avoid confrontation.
Most local pet stores sell dog repellent, often made with citronella. These sprays are not harmful to dogs, some can spray 10 feet. But they're not 100 percent effective in the face of an angry dog. Do not use human-grade pepper spray, as it is too strong to a dog's eyes and nose, and can cause the dog injury.
Walking with a cane, a large stick or an umbrella can be a deterrent for stray dogs, particularly if you swing it. If the dog doesn't back off, you can use it for defense as a last resort.
Dogs have sensitive ears, so loud noises and high pitched sounds will startle a stray dog as he comes near you on your walk. An air horn can distract the dog, even just for a second, so you can walk the other direction.