Choosing appropriate breeds is incredibly important, but so is choosing the individual dog within the breed. Look for breeds that are gentle with smaller animals, then look for individual dogs who have very little predator instincts. All our dogs are rescues, so we began training them as we got them.
You sometimes have to do this with your barncat, too. Here's Libby with the brooder chicks:
Gracie, learning Leave It:
We have two Basset Hounds and a Border Collie. While Border Collies have been used for centuries to control sheep, Bassets are known to be problematic with smaller livestock and are notoriously difficult to train (they are very stupid dogs, comparably speaking, but we adore them anyway). We began with the concept of Leave it, then began de-sensitizing them while the chickens and ducklings were small.
I'd sit with a chick on my lap and rub it on their face and head, let it perch on them, etc. to teach the dogs that the chickens can do whatever they want and the dogs cannot react. At the slightest reaction from the dog, I'd give them the Leave It command and begin again.
Flash really loves it when the chicks play on him now, he's incredibly proud of his birdies:
Gracie, gossiping with one of the pullets:
After a few days, we were in a good position with the dogs ignoring the chickens entirely while under strict supervision for the first few weeks. We can also rely on the Border Collie, which are sort of the hall monitors of the farm, anyway to get involved should there be an issue. Now they all hang out in the backyard together.
Gracie, guarding her baby feathered sheep:
One of the big things to do is to feed the chickens first. Then after they are fed and cared for, I feed the dogs. That's part of the pack hierarchy and a very important step. First the humans eat, then the poultry, then the dogs. Nowadays, we don't even bother supervising the dogs and poultry but we know they can be trusted - it's literally been years. They all politely ignore each other. Unless the chickens want to eat the dog food, in which case, the dogs wait until the chickens are done, then they eat.
Gracie, begging for dinner, while the chickens eat theirs first:
Scarlett, having had her share of Flash's food, wanders off to sample someone else's:
Ruby and Scarlett sharing Flash's food, while he waits:
Both Bassets waiting for their turn to eat:
Hope this helps!