Someone recently wrote to me for advice on a situation developing between her dog and her baby. When such a problem arises, I think you need to teach the baby that he may NOT sit on the dog, pull ears, bother the dog when it's lying down, hit it with toys, and so on. You can't do this with punishment, babies can't learn that way; but you can do it. The dog needs to learn to get up and leave if bothered; but the baby needs to experience being removed, gently but firmly, from the dog, long BEFORE the dog has become irritated to the point of growling. "Leave the dog alone," is the word, in my family. Maybe babies can't understand it, but toddlers sure can, and in any case the parent needs to be the one who is ALWAYS paying attention, and physically splits up the dog/baby interaction as soon as the baby becomes intrusive.
If being impolite to the dog always leads to being removed from the dog, children learn to be gentle with dogs, even when they are tots. The dog shouldn't have to be brought to the point of defending itself from the child; that's your job. And the child doesn't understand the dog's feelings, so teaching him to do so is your job, too.
s a mom and stepmom and grandmother, with jillions of dogs and jillions of kids over a lot of years, this is what I've done, and no trouble has ever occurred. Dogs ranged from teacup toy poodles to great Danes. With visiting children I keep an even sharper eye, and put the dogs away if the child shows signs of being rough. Since the dogs expect support if troubled, they tend to be very patient with visitors.
The only time I ever got a scare was when a two-to-three-year-old male visitor got under the table during dinner and grabbed my Border terrier firmly by the whiskers with both hands. She cried, and dragged him to me to have him removed. It was a job, too, he really tightened his fists, and he and his parents thought it was funny until I rebuked him harshly enough to make him cry and let go.
It scared me; Borders have tremendously powerful jaws for their size. I was proud of her for crying instead of snapping; I know it hurt. The dog was happy to be shut in the bedroom, and the parents never brought that kid back to my house, which was all right with me!