Preface: I love dogs. Honest, always have. I’d avoid harming any if possible. But if it’s a choice between me and my riding companions or the dog, well…

Do I blame the dog for being aggressive? Not really. Some types are more naturally aggressive than others, having been bread that way for generations. But it’s more often than not the owners fault. You want to keep a mean dog? Cool, good for you (though I’m of the mind that your dog doesn’t need to be mean to be a well-trained defender of your house/yard). If the dog gets off the property, then that’s the owner’s fault, not the dog’s. And I hate hearing these excuses: “The dog was tied, but the rope broke.” Seriously? If you’re dog is big enough to break the rope, don’t use rope, stupid! “The gate was left open.” Negligence doesn’t clear one of fault, it just makes them negligent, which still makes them responsible. “The dog is just defending my land.” You don’t own the road – unless it’s a private road, in which case the dog is perfectly within it’s rights to chew on my ass all day long.
That being said, with dogs there is a difference between being chased – something almost every dog does naturally – and being attacked. It can be hard to tell the difference, and sometimes there’s very little time to make the distinction. But a dog that’s behind you and chasing you down isn’t nearly the threat that a dog that in front of you or lunging at you from the side is. If the dog is following you, or running along-side you without trying to close the gap between you and them, you’re probably in the clear even if they’re barking and looking mighty toothy. But if they’re jumping towards you, trying to close that gap, trying to cut you off: then you’ve got problems.
There are a few things that have helped me avoid leaving a part of my calf behind as a chew toy:
1) Remain calm. In fact, I found after several dog encounters that remaining emotionally passive tends to disinterest the wee beasties more often than not. You’ll get mixed results with shouting, being aggressive, or being playful – some dogs will back down when you’re aggressive (yelling), others will just get meaner. And showing fear – though usually the reaction we naturally want to show – isn’t an option. That’ll encourage them every time.
2) High-rev. It’s unlikely you’ll outrun a dog. The average dog can run 20-25 mph while barking and snapping the whole time. And if you’re heading uphill, then you’re outta luck, because you’re only going to go slower. If you drop your gears and spin faster, there’s less chance of an aggressive dog getting a clean shot at your ankles or calves, and if they do lunge you’re more likely to knock ’em with the pedal then become an afternoon snack.
3) Remain seated. If you’ve gotta swerve out of the way of a dog, standing will just make you less stable. And if you’re unfortunate enough to run into one – or have one run into you – you’ll be better able to stay upright.

4) Don’t cross the road. Even if you’ve gotta swerve to avoid hitting the dog, or take up more of the lane, that’s cool. But what, the dog ain’t gonna follow you across? Please. And if there’s a car behind you, they’re more likely to go into the oncoming lane if they see you’re having problems. So you might end up right in their path again. Moreover, while you’re moving into the opposite lane and paying attention to the capering canine, you won’t see that Mack truck that’s gonna flatten you and the dog.
5) Keep your head on swivel. By this I mean keep a lookout for other dogs. Feral dogs often travel in packs. If the dog comes out of a yard, it’ll most likely just be the one dog. But if it comes out of a field or row of bushes, another one might be behind (or ahead). So keep a lookout, and don’t slow down until you’re well clear of the area.
6) Warn others. Call out “Dog right!” or “Dog left”, depending on location, and point in the direction of the impending dog. Just because you avoid becoming a tasty treat doesn’t mean you should sacrifice your peloton to save your tail.
7) Remember where you are. When your heart rate returns to normal, make a mental note of where the dog was, what road, and where he was hiding out. Even feral dogs tend to be territorial, so you’re likely to run into them again and again on the same road.
Lastly, keep this in mind: sometimes dogs are just being dogs. Give them room and the benefit of a doubt, and let them run. Just… don’t let ’em run too close. 😉