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.
Jiangqu
In 51 BCE a pretender to the Xiongnu's throne Huhanye re-established the "heqin" peace and kinship treaty with the Han empire, and fled to China with a fraction of the Xiongnu, partitioning the Xiongnu state into the Northern Xiongnu and Southern Xiongnu, and establishing a new polity allied with China. The Southern Xiongnu retained a title "Chanyu" for their leader, and started a new dynastic line beginning with Huhanye. Huhanye himself belonged to the 8th generation of the Maodun line of the dynastic paternal Luanti tribe, the tribe Qiang ("Kiyan") was a maternal dynastic tribe of the Southern Xiongnu. During the existence of the Southern Xiongnu state, its Xiongnu population greatly varied depending on the events in the steppe, at times it was swelling with numerous Xiongnu tribes fleeing trouble events, and at times it was losing Xiongnu tribes when they returned after return of peaceful times. The Chinese policies also affected the in and out flows. Until the event with Zhang Xiu in 179 CE, the Southern Xiongnu continued electing their Chanyus without explicit Chinese intervention, Jiangqu was the first Southern Xiongnu Chanyu who broke the traditional Xiongnu succession laws, undermining the integrity of the Southern fraction. Tribes that did not want to recognise a non-eligible leader either revolted against him, or left the area under his control.