Besides it depends where and when.
MA are 1000 years long so of course things were different. For instance, Charlemagne had a few custom entries but Henri VII's budget depended at 50% on it...
Besides, you had times and places where crossing the borders was just not an option. See for instance during the plagues. But on average, with less than 2% of the population involved in civil service, keeping the borders was just not an option (not mentionning that the actual idea of border came very late but I wouldn't know exactly when.