Disclaimer: You are ultimately responsible for checking your State and local laws regarding the use of lethal or less than lethal force against dogs. Failure to do so can result in criminal and/or civil charges being filed against you and the revocation of your concealed carry license even if you were "justified." Don't take the fall for an irresponsible dog owner.
Foreward: "Dog attacks" seem to be a perennial topic on the Self Defense board. With this in mind, I sought to consolidate some helpful and sage advice from around the web in addition to drawing from my own personal experiences to make this post. No, I am not an "expert" or "dog whisperer," nor have I stayed at a Holiday Inn Express recently.
I simply want to help anyone who's interested in this subject.
Avoidance - The First and Best Defense
The first and best defense is and will always be avoidance; the best encounter is the one you'll never have to face. How familiar are you with your neighborhood? Do you know of any neighbors who let their dog roam "free range," or areas where strays have sighted? Forewarned is forearmed. Knowing these things will keep you from getting surprised by an off-leash dog if and when you come across one, and you can avoid danger entirely by planning alternate routes if possible. For anyone familiar with the Jeff Cooper color codes, we should go on our walks in "Condition Yellow." In other words, we're in a relaxed state of awareness with no specific focal point, yet we're also on the lookout for things that are "JDLR" (Just Don't Look Right). This requires avoiding distractions and being alert and aware of our surroundings. The very moment we spot any off-leash dog, known or not, is when we should ramp up to "Condition Orange" where we begin focusing our attention on a potential threat, but not to the point where we lose sight of our surroundings. (We're also looking for subtle "cues" that confirm a threat, but more on that later.) Assuming you haven't yet drawn the dog's attention, this is an excellent opportunity to withdraw from the immediate area if you can safely do so. Make a mental note of where you spotted the dog and, once in a position of safety, notify animal control or law enforcement, whichever is more appropriate to your locality. Don't expect immediate results, but also keep in mind that they cannot deal with something they don't know about. Unless you know the dog very, very well, do not let your guard down around any dog that's off-leash!
Assessing the Threat - Identifying the "Signs"
Dog attacks do not "come out of the blue" unless you're in Condition White (unaware/unalert/oblivious). There are, in fact, subtle cues and body language that are precursors to an attack. The trick to pre-empting an attack is knowing how to "read and speak dog." I'm not being facetious; not only must we know how to identify these cues when present, but we must also avoid inadvertently presenting ourselves as a threat as well. For example, one sign of threatening behavior is when a dog stares directly at you from a distance, sometimes with an "intent" look on its face or eyes that appear larger than normal. However, did you also know that staring directly back into their eyes is interpreted as a challenge? In fact, your best course of action in this situation would be to slowly avert your gaze without letting the dog out of your peripherary vision. In the dog world, looking away is a way of saying "I'm not a threat." In the interests of brevity, I'm including a link to the ASPCA's "Canine Body Language" so that you can learn more about how to read dogs and avoid provoking an attack in the process. The ideal outcome to this situation is when you're able to avert a confrontation by making the dog lose interest in you (i.e. showing you're not a threat), thus allowing you to safely exit the area.
Condition Red - When Avoidance Isn't Possible
Let's suppose an off-leash dog comes running towards you with snarls and growls the very moment it notices you. This is when you immediately go from Condition Orange to Condition Red. This does not necessarily mean you have your sidearm drawn and trained on the dog with the slack taken out of the trigger; it means you're mentally prepared to defend yourself with lethal force if necessary. Being charged by a dog is a terrifying experience for sure, and you may only have mere seconds to react, but believe it or not this is just a precursor to a potential attack. How you react can mean the difference between the dog losing interest in you and having to call police and paramedics in the aftermath of an actual attack. The one thing you do not want to do is show any fear; dogs will pick up on this and exploit it. Running away, screaming, or panicking is virtually guaranteed to trigger an attack. Don't let your fear drive your actions, stay calm. No exaggerated movements. No hand waving freak outery.
Effective Weapons - In Defense of Life and Limb
There is one thing I'm going to stress before going any further: Do not place your limbs anywhere near a hostile dog's mouth. Ever. I believe the reasons for this are myriad and obvious. If an actual attack seems imminent, you want to utilize deterrents that maintain distance between you and the dog's teeth. With that being said, stun batons and pepper spray seem like the obvious less lethal choices, but they each have their own disadvantages. For example, the stun baton requires fresh batteries in order to be employed properly, and pepper spray can affect you if not carefully deployed under the right conditions. Additionally, it is your responsibility to familiarize yourself with your State and local laws regarding these items. And finally, a word of caution: AVOID using items or tactics that can cause permenent injury to the dog. You don't want to get charged with animal cruelty and gain 15 minutes of fame as "that crazy gun-toter who sprayed wasp and hornet killer into the face of that poor defenseless dog."
What is often overlooked as a less lethal option is the humble walking stick; I've yet to come across an example of a jurisdiction where their possession and use are tightly regulated, and it's also a highly effective deterrent in its own right. A proper walking stick should be at least 2 feet long, around an inch in diameter or made of a sufficiently sturdy material if thinner, and is best employed in the same manner that a pike would be used against a cavalry charge; that is, you point the stick at the dog and keep it there. The goal is to place the stick between you and the dog's teeth. If the dog stops what it's doing, congratulations. You've preempted a potential attack. While still pointing the stick at the dog, take a small, deliberate step forward. If it backs up, continue taking steps toward it until it retreats. What you're doing is entering the dog's space and taking its ground away from it.If the dog does not back down, do not attempt to take a swing at it. Instead, you want to poke the dog with the end of it until it "gets the point" and leaves. Alternately, if the dog bites the end of the stick, do not attempt to pull the stick away from it. Instead, when the dog tugs, take a small step forward and carefully push it into its mouth. (Remember, we're trying to deter the dog, not wound it; the idea is to keep the dog's teeth on the stick instead of you.) Repeat as necessary until it decides you're not worth the trouble. If the dog is so vicious that it refuses to back down despite all of this, it may just be best to employ your CCW while the dog is preoccupied with the stick.
You could, of course, just deploy your CCW while the dog charges, but then you'd have to accurately place your shots in the kill zone of a small, fast moving target before it chomps down on you. All within mere seconds of "clearing leather" while leaving yourself open to attack the whole time. Me? I'd rather have the stick. I'm a decent shot, but I'm no Jerry Miculek.
Aftermath - What Steps to Take
If you happen to know the stray dog you just deterred (or killed), or were charged and attacked in the vicinity of a residence, the best course of action is to get to a position of safety ASAP. Some irresponsible dog owners are worse than their dogs, and before you know it, you may very well be dealing with a human attacker. When it is safe to do so, call 9-1-1 and ask for police (and paramedics, if you've sustained injuries) so that you can file an incident report. Politely insist on filing one if the responding officer(s) seem dismissive of your claims and make sure you obtain a copy regardless of how irritating the "paperwork fee" may be. Filing an incident report may not accomplish much, but it will at least "leave a paper trail" and establish that you were the victim should any complaints be filed against you later. If the dog is still alive, contact animal control with a complete description of the dog and where you were attacked. Reasonably clear photos and video of the dog are even better if you can take them without putting yourself in danger.
Foreward: "Dog attacks" seem to be a perennial topic on the Self Defense board. With this in mind, I sought to consolidate some helpful and sage advice from around the web in addition to drawing from my own personal experiences to make this post. No, I am not an "expert" or "dog whisperer," nor have I stayed at a Holiday Inn Express recently.

Avoidance - The First and Best Defense
The first and best defense is and will always be avoidance; the best encounter is the one you'll never have to face. How familiar are you with your neighborhood? Do you know of any neighbors who let their dog roam "free range," or areas where strays have sighted? Forewarned is forearmed. Knowing these things will keep you from getting surprised by an off-leash dog if and when you come across one, and you can avoid danger entirely by planning alternate routes if possible. For anyone familiar with the Jeff Cooper color codes, we should go on our walks in "Condition Yellow." In other words, we're in a relaxed state of awareness with no specific focal point, yet we're also on the lookout for things that are "JDLR" (Just Don't Look Right). This requires avoiding distractions and being alert and aware of our surroundings. The very moment we spot any off-leash dog, known or not, is when we should ramp up to "Condition Orange" where we begin focusing our attention on a potential threat, but not to the point where we lose sight of our surroundings. (We're also looking for subtle "cues" that confirm a threat, but more on that later.) Assuming you haven't yet drawn the dog's attention, this is an excellent opportunity to withdraw from the immediate area if you can safely do so. Make a mental note of where you spotted the dog and, once in a position of safety, notify animal control or law enforcement, whichever is more appropriate to your locality. Don't expect immediate results, but also keep in mind that they cannot deal with something they don't know about. Unless you know the dog very, very well, do not let your guard down around any dog that's off-leash!
Assessing the Threat - Identifying the "Signs"
Dog attacks do not "come out of the blue" unless you're in Condition White (unaware/unalert/oblivious). There are, in fact, subtle cues and body language that are precursors to an attack. The trick to pre-empting an attack is knowing how to "read and speak dog." I'm not being facetious; not only must we know how to identify these cues when present, but we must also avoid inadvertently presenting ourselves as a threat as well. For example, one sign of threatening behavior is when a dog stares directly at you from a distance, sometimes with an "intent" look on its face or eyes that appear larger than normal. However, did you also know that staring directly back into their eyes is interpreted as a challenge? In fact, your best course of action in this situation would be to slowly avert your gaze without letting the dog out of your peripherary vision. In the dog world, looking away is a way of saying "I'm not a threat." In the interests of brevity, I'm including a link to the ASPCA's "Canine Body Language" so that you can learn more about how to read dogs and avoid provoking an attack in the process. The ideal outcome to this situation is when you're able to avert a confrontation by making the dog lose interest in you (i.e. showing you're not a threat), thus allowing you to safely exit the area.
Condition Red - When Avoidance Isn't Possible
Let's suppose an off-leash dog comes running towards you with snarls and growls the very moment it notices you. This is when you immediately go from Condition Orange to Condition Red. This does not necessarily mean you have your sidearm drawn and trained on the dog with the slack taken out of the trigger; it means you're mentally prepared to defend yourself with lethal force if necessary. Being charged by a dog is a terrifying experience for sure, and you may only have mere seconds to react, but believe it or not this is just a precursor to a potential attack. How you react can mean the difference between the dog losing interest in you and having to call police and paramedics in the aftermath of an actual attack. The one thing you do not want to do is show any fear; dogs will pick up on this and exploit it. Running away, screaming, or panicking is virtually guaranteed to trigger an attack. Don't let your fear drive your actions, stay calm. No exaggerated movements. No hand waving freak outery.
Effective Weapons - In Defense of Life and Limb
There is one thing I'm going to stress before going any further: Do not place your limbs anywhere near a hostile dog's mouth. Ever. I believe the reasons for this are myriad and obvious. If an actual attack seems imminent, you want to utilize deterrents that maintain distance between you and the dog's teeth. With that being said, stun batons and pepper spray seem like the obvious less lethal choices, but they each have their own disadvantages. For example, the stun baton requires fresh batteries in order to be employed properly, and pepper spray can affect you if not carefully deployed under the right conditions. Additionally, it is your responsibility to familiarize yourself with your State and local laws regarding these items. And finally, a word of caution: AVOID using items or tactics that can cause permenent injury to the dog. You don't want to get charged with animal cruelty and gain 15 minutes of fame as "that crazy gun-toter who sprayed wasp and hornet killer into the face of that poor defenseless dog."
What is often overlooked as a less lethal option is the humble walking stick; I've yet to come across an example of a jurisdiction where their possession and use are tightly regulated, and it's also a highly effective deterrent in its own right. A proper walking stick should be at least 2 feet long, around an inch in diameter or made of a sufficiently sturdy material if thinner, and is best employed in the same manner that a pike would be used against a cavalry charge; that is, you point the stick at the dog and keep it there. The goal is to place the stick between you and the dog's teeth. If the dog stops what it's doing, congratulations. You've preempted a potential attack. While still pointing the stick at the dog, take a small, deliberate step forward. If it backs up, continue taking steps toward it until it retreats. What you're doing is entering the dog's space and taking its ground away from it.If the dog does not back down, do not attempt to take a swing at it. Instead, you want to poke the dog with the end of it until it "gets the point" and leaves. Alternately, if the dog bites the end of the stick, do not attempt to pull the stick away from it. Instead, when the dog tugs, take a small step forward and carefully push it into its mouth. (Remember, we're trying to deter the dog, not wound it; the idea is to keep the dog's teeth on the stick instead of you.) Repeat as necessary until it decides you're not worth the trouble. If the dog is so vicious that it refuses to back down despite all of this, it may just be best to employ your CCW while the dog is preoccupied with the stick.
You could, of course, just deploy your CCW while the dog charges, but then you'd have to accurately place your shots in the kill zone of a small, fast moving target before it chomps down on you. All within mere seconds of "clearing leather" while leaving yourself open to attack the whole time. Me? I'd rather have the stick. I'm a decent shot, but I'm no Jerry Miculek.

Aftermath - What Steps to Take
If you happen to know the stray dog you just deterred (or killed), or were charged and attacked in the vicinity of a residence, the best course of action is to get to a position of safety ASAP. Some irresponsible dog owners are worse than their dogs, and before you know it, you may very well be dealing with a human attacker. When it is safe to do so, call 9-1-1 and ask for police (and paramedics, if you've sustained injuries) so that you can file an incident report. Politely insist on filing one if the responding officer(s) seem dismissive of your claims and make sure you obtain a copy regardless of how irritating the "paperwork fee" may be. Filing an incident report may not accomplish much, but it will at least "leave a paper trail" and establish that you were the victim should any complaints be filed against you later. If the dog is still alive, contact animal control with a complete description of the dog and where you were attacked. Reasonably clear photos and video of the dog are even better if you can take them without putting yourself in danger.