I have fenced in a large area of my pasture with 2' tall chicken wire. My ducks (Runners, Buff Orpington, Magpie and White Layer) are able to flap over that, but they respect that boundary. If some really jump the fence by accident, they frantically try to get back inside to their flock mates.
I also use
really cheap plastic fencing to open additional areas, outside of the fenced in area to the ducks for foraging - and to keep the grass short, so that i don't have to mow…
Ducks like to have cover above from trees, shrubs or your house. My ducks rarely walk onto an open surface without any cover, so fencing in a long small stretch of land without trees and/or shrubs is a waste of time, the ducks won't use it.