I moved from the burbs to a couple acres six years ago. I asked that the chickens that were already here stay. Owners obliged. I had three dogs at the time. A four year old Doberman, a six year old pit/lab, and an old Chihuahua. My pit/lab couldn't have cared less about the chickens (loved their poop, though

). Same for the Chihuahua. My Doberman chased one first thing. I grabbed that dog, threw him down on his back HARD and gave him a sharp smack across his nose telling him NO and BAD DOG. I held him down until he had relaxed entirely. Once. Those birds walk right under him now and have for years. The ducks noodle his toes and tail. He has never attempted to harm one ever again and is fully relaxed around them. I trust him entirely, and he is often out unsupervised with the birds. I have never had an incident occur.
New pup about five months back. Carolina Dog. Same thing. ONCE. He won't even look at the birds anymore. He's too young to be trusted unsupervised, but responds instantly to the "leave it" verbal command.
Those things being said, I'm a stickler for obedience training. I start all my dogs on circuit training first thing, and stick with it. It only takes 10-15 minutes a day, and does a whole world of good for establishing who is in charge. I start out using pieces of dried kibble, then move on to nothing but praise. Most dogs pick up really quickly and actually look forward to the time with you. In addition to training, my dogs get a daily
leashed walk where they need to heel, and use their heads a bit.
Each dog is different. Some folks try everything and still can't get a response from their dog. Others try one thing and get an immediate response. Be consistent, establish boundaries with your dog, and stick with a routine. They tend to really respond well to it. Best of luck to you and your flock (and your dog)!