Pretty sure electric fencing will do the trick, but as Jody said, ensure that they can't roll under it. I have seen a large horse roll under a metal gate, they can be very agile when they want to, and they don't mind to lay in the muck to roll under to greener pastures, smiling. Good luck, goats are amazing critters!!! Have that most beautiful day, to love and live, with greatest of health. Cindi