Xiongnu
Full-scale war broke out in autumn 129 BC, when 40,000 Chinese cavalry made a surprise attack on the Xiongnu at the border markets. In 127 BC, the Han general Wei Qing retook the Ordos. In 121 BC, the Xiongnu suffered another setback when Huo Qubing led a force of light cavalry westward out of Longxi and within six days fought his way through five Xiongnu kingdoms. The Xiongnu Hunye king was forced to surrender with 40,000 men. In 119 BC both Huo and Wei, each leading 50,000 cavalrymen and 100,000 footsoldiers (in order to keep up with the mobility of the Xiongnu, many of the non-cavalry Han soldiers were mobile infantrymen who traveled on horseback but fought on foot), and advancing along different routes, forced the "chanyu" and his court to flee north of the Gobi Desert. Major logistical difficulties limited the duration and long-term continuation of these campaigns. According to the analysis of Yan You (嚴尤), the difficulties were twofold. Firstly there was the problem of supplying food across long distances. Secondly, the weather in the northern Xiongnu lands was difficult for Han soldiers, who could never carry enough fuel. According to official reports, the Xiongnu lost 80,000 to 90,000 men, and out of the 140,000 horses the Han forces had brought into the desert, fewer than 30,000 returned to China.
Xianyun
Later Chinese annals contain a number of references to the Xianyun, such as by Sima Qian (c. 145/135 – 86 BCE), Ying Shao (140-206 CE), Wei Zhao (204-273 CE), and Jin Zhuo (late 3rd–4th century CE). Without giving specific arguments, they stated that Xunyu (獯鬻) or "Xianyun" were terms that designated nomadic people who later during the Han dynasty were transcribed as "Xiongnu" (匈奴). This view was also held by the Tang dynasty commentator Sima Zhen (c. 8th century CE). Wang Guowei (1877–1927), as a result of phonetical studies and comparisons based on the inscriptions on bronze and the structure of the characters, came to the conclusion that the tribal names "Guifang" (鬼方), "Xunyu" (獯鬻), "Xianyu" (鮮虞), Xianyun, "Rong" (戎), "Di" (狄), and "Hu" (胡) given in the annals designated one and the same people, who later entered history under the name Xiongnu.