What kind of war is the Torah discussing here?
What are the implications of the words "Lehilachem alehah"?
Sifri: It implies that - initially - the army approaches the town to fight but not to starve its inhabitants of food or drink or to torture them to death them in some other way. 1
See Torah Temimah, note 46.
What is the definition of an Ir?
Sifri: A medium size town - to preclude from the time-span of three days a large city on the one hand and a village on the other. 1
What are the implication of "Le'hilachem Alehah"?
Sifri: It precludes where one is coming, not to fight, but to starve its inhabitants of food or drink or to torture them to death in some other way , from the obligation to first offer it peace-terms. 1
See Torah Temimah, note 46.
To whom do the peace-terms apply?
Rashi, Rashbam (in Pasuk 16) and Hadar Zekenim: To all but the seven Cana'ani nations (as stated in Pasuk 15 - Rashi. Because in the land of your inheritance, you are not permitted to offer Shalom or leave anyone alive - Rashbam).
Ramban: To all enemies - even the seven nations, 1 as we learn from Moshe, who invited Sichon to make peace, 2 and the difference between Milchemes Mitzvah and a Milchemes ha'Reshus applies only 3 if they decline to accept Yisrael's peace terms. 4
Ramban (citing Midrash Rabah, Tanchuma and Yerushalmi, Shevi'is): Indeed, Yehoshua adhered to this command, by sending three letters to all the nations: 'Whoever wants to make peace should come and make peace; whoever wants to move away may do so, and whoever wishes to fight, let him come and fight. The Girgashi fled, the Giv'onim made peace, whereas the thirty-one kings came to fight and Hakadosh-Baruch-Hu destroyed them - as the Pasuk states in Yehoshua, 19:20. See also Ramban DH 've'Da' and 've'ha'Rav R. Moshe', with reference to the Giv'onim.
Refer to Bamidbar, 21:22:1:1-2. See Oznayim la'Torah, who, in support of Rashi, explains that Moshe did not offer Sichon the peace-terms mentioned here, only that Yisrael would not attack him if he would allow them to pass through his land - and elaborates.
Ramban: Besides the obligation to demand from the Cana'anim that they relinquish Avodah-Zarah, seeing as we are forbidden to live among idolaters - See Sh'mos 23:33, or to force them to do so without prior condition after they have accepted our peace terms.