Weapons
Throwing weapons could be used to defend against light cavalry. Since the horses are unarmored, about 2 hits to the head will do it. For throwing I recommend Jarids, they have the longest range and have the best damage. Against heavy cavalry I recommend Jarids, against light Javelins could do, since javelins and jarids all take about 2 hits to kill a horse.
Aim for the riders if they are unshielded, aim for the horse if they have a shield. The axes are good at damaging but the range is very effective against riders. The throwing axe are just too short of range. The darts and are many, but their damage and range is just not enough to make up for their numbers. As for knifes and daggers, don't use them. You can't hit anyone with them and they will not do you good if you hit them.
For the weapon types I suggest using 2 packs of Jarids, or javelins, a shield(To protect you against couched lances). And a polearm or axe. The two handed axe are good, or a bardiche. If you want a polearm that can do the damage and make up for the range then the Glaive is the one for you. The pikes are good for stopping cavalry, but however, they don't have the power to quickly kill the horse or the rider.
Troops
Infantry are the most important troop for a all foot army, I suggest getting a few cavalry. The nord huscarl is the best infantry, but they are often weak to cavalry, as they don't have any good anti cavalry stuff other than throwing axes. Rhodok sergeants are the good elite. their inferior counterparts will also do fine. The swadian also have a good polearm, the awlpike. The vaegir have the bardiche, but it is short and not very effective against a straight lance charge. The sarranids have the guard, lacks in armor, shield, anti-cavalry weapon. their jarids are the saving weapon for them.
Archers's weakness is calvary, especially heavy ones. But given enough time they can serious weaken the cavalry. The Rhodok crossbowmen hardest hitting, but their slow reload time is their weakness, the sarrranid is the fastest, but they will quickly run out of arrows. the Vaegir deals the second most damage, and the second fastest. The nord is capable of 1 v 1 most dismounted cavalry. but they all has to be protected by infantry, cavalry, or terrain.
Tactics.
Formations
An all out foot army needs to have good tactics to take out a large cavalry force. First of all is Formations. Formations are very important. The infantry needs to be in good formations, in which case a cluster. which can cluster an cavalry or groups of them. the archers will need to be in a firing line.
Terrain
Terrain is very Important for a foot army, usaully the higher ground is better. If there is only one good high ground place, you choose wether to put your archers up or your infantry. If you put your infantry up there, then the cavalry will be less effective. If you choose to bring your archers up there, then your archers can shoot at the cavalry while they are fightings.
Flankings
Flankings the cavalry is a good stratagy. With archers you can put them behind the main fighting, and they will shoot at the enemy while their backs are turned. with Infantry, I suggest you put infantry into two groups. I say rhodok sergeants in front and nord huscarls for flank. they will encircle the enemy and decimate them.
Use of troops.
Using the troops to what they are best for. For example, every troop has their strength and weakness, one is better at this task and one is worse at this. For the huscarl, they are not good for straight charge. Against cavalry they are better for the flanking force. Same goes for the veagir guards. While the rhodok and swadians, they are good to stand against straight frontal charge. the sarranid guards are good for skirmishing. while they are not the most effective fighters or anti cavalry, they could be on a near hill for throwing javelins at the enemy to weaken them. Archers, if you believe in the infantry holding firm, you should use the vaegir, rhodok and sarranids. With the swadians as a exception. however, if you lack infantry and are fearing of a attack by the cavalry on your archers, then, you should use the nord veteran archers or the rhodok sharpshooter.
Splitting the troops.
In vanilla warband there are 3 troop groups, infantry cavalry, and archers. however, for tactics, I would suggest you divide the infantry into 2 more groups. pikes, and heavy. the heavy infantry are good for straight attack when the cavalry has lost their momentum. when they are dehorsed or slowed.
Against other factions
there are different factions and different fight style, and some of them will require you using your small amount of cavalry(If you have them) to secure victory.
Swadia
swadia is know for the best cavalry. But I wouldn't count them much as a threat, because they don't have the number of cavalry to overun your forces, most of them have around 10 out of 100. and about 2 to 5 are knights. As for their infantry, the swadian sergeant is decent, but they don't have enough of them to do serious damage. their ranged are not a big threat
Nords
The nords are not a large threat to your force, because your combinations of infantry and archers can probably take them on.
Rhodoks
the Rhodoks do not have the best infantry, but they are the second best. Again, since they do not have any cavalry and are not the best attackers, the infantry is not much worried. The crossbowmen are the best, so beware, because not even the best troop can take 50 bolts in their shield.
Vaegirs
The vaegirs are know for their good archer. the vaegirs like swadia, lack the amount of cavalry, and their cavalry have little shields, which are good for archers and sarranid guards. they tend to have slightly more cav than swadia. their infantry are vulnerable to your archers, and their archers are the threat, but the few cavalry can kill their archers before they can shoot very good.
Khergits
The Khergits are almost cavalry only. however, most of their cavalry are a nuisense, only tier 2 or 3. But they do have a large amount of lancers, which tend to be in larger numbers than the other elite cavalry. the horse archers will in time start to pick off one by one. Because of the AI in warband, the archers will not shoot in front of the moving horse archer, so companion cavalry with coursers is the best way to take the horsearchers.
Sarranid
The sarranid are a large threat. they have the second best cavalry, but most lords of 100 tend to have around 10 to 20 of them. they also have a large amount of sarranid master archers. dealing with the cavalry is going to be a pain. Archers will be good because some of the mamelukes don't use shields. Some Jarid throwers are also good for weakening Mamelukes, usaully those Mamelukes decimate infantry when met, so good polearms are required, and flanking is good to take them out. After that, with the support of your archers, your infantry can take them on from there.
Mods
For mods i recommend diplomacy, spear bracing, and pre-battle planning. the deathcam mod is also good for if you get knocked out, the battle won't be over. As for bigger mods, Floris basic is good, it adds new items, spears doing more to horses, and other stuff. Many other mods like floris expanded, clash of kings, brytenwalda, and others have the thing needed for more effective infantry.
Good luck with that