In days of yore, before the medieval, when tribes wandered because they hadn't quite figured out a plow yet, there was really only one defense: A constantly-vigilant patrol of warriors, day and night, and a fire (or bog) to incinerate (or drown) the pests.
Thousands of years ago, dogs joined the patrol. Some were bred to sniff out the pests and lead their human pack-mates to them. Others were bred to jump high, to knock down the climbers. Still others were bred to carefully pick up the pests in their powerful jaws, carry them to the nearby drowning-pit, and to hold them under.
Hundreds of years ago, when folks developed the tools and skills to cut stone and make mortar, they built a village wall with overhangs. The walls couldn't keep the pests out, but slowed them down so the (smaller) patrol and their dogs could catch them. A smaller patrol meant a more productive labor available for farming and industry and specialization.
During the present (medieval) era, everybody lives within the village walls. The wealthy live in stone-built houses. Most others live in houses built partially of stone. Even the poorest families have several of the breeds of dogs. Every able-bodied adult has a weekly shift with the Patrol, keeping the walls clean and the drowning pits filled.
The children have duties, too: Feeding the patrol's dogs, counting the weapons at every Patrol shift change, and (of course) doing extra farm work...since the adults lose one day each week to Patrol work.
Every village has a smithy to maintain the weapons and specialized tools -- often long-handled two-handed tongs to grab a pest securely, pluck it off the wall, and drown it. But also swords to chop their legs, pry-bars to lift their suction-cups, chisels to cut through the shell, etc.
The inventory of iron and steel for the smithy is monitored by the local Baron, as is the Patrol's weapon inventory. The Baron can't afford too many goons, since so much of the productive effort of the village is spent on defense. If you have a Patrol shift, don't be late when the muster-horn sounds -- the Commander of the Patrol is not at all forgiving.