for defending- use forts on bridges/passes with 4-6 peasant units inside. if you seal off the borders you will find most hordes don't bother to attack the fort and just walk on by