Borders where fuzzy lines on a map, defining who should tax the peasants. At least when the borders where in low populated areas, and not along natural borders like rivers, the peasants did not really bother if the passed it or not. It might be illegal to do that, or to bring certain things cross the border, but in peaceful periods there where no more supervision of the crossings than needed to collect taxes (customs) and catch a few smugglers.