I think it depends on your dog's natural inclinations. We once had a dog named Sundae (herding mix) who was the most gentle protector of anything he saw as part of our family, whether it be kids, kittens or pet hamster. We have another dog, Bella (mix of unknown origin...probably cattle dog/norwegian elkhund in there) with a very strong prey drive and a love of chasing squirels, chipmunks, birds, rabbits, deer even. Our third dog Aslan is an Anatolian Shepherd, who has good livestock guardian instincts, but since he is still a juvenile, needs some supervision because as a puppy he wanted to play with the chickens when they ran or were dirtbathing.
With the first dog, it was only a manner of cuddling whatever it was we wanted it to accept, sitting next to the dog for example with a chicken in my lap and petting it and crooning over it would have been enough, I believe to have the Sundae see it as his flock and in need of his protection.
With Bella, I needed to work a lot harder. I brought her out with me to the garage when the chicks were tiny and let her sniff at them over the side of the brooder and correcting her verbally (and physically if necessary with a yank of the leash) if she even looked at a chicken with that stiff legged, predatory gaze or made the little growling woof she makes when she sees a squirel. I continued this pretty much daily when they were in the brooder and started the process over again when they started free ranging. Sometimes sitting outside with her on or off leash with some treats (both for chickens and dogs) and rewarding Bella for letting the chickens come around her without messing with them.
Aslan was been pretty easy, just needs to be taught that chickens are not toys. He is the one who goes on duty when I let the chickens out to free range. He barks a lot when he's outside with the chickens but that's his job. Who knows what he sees up in the Colorado mountains around our property that he thinks needs to be barked at. I don't correct his barking when he's on duty.