Military history of the Three Kingdoms
By the time of the Three Kingdoms period the Xiongnu had already ceased to be a major power. Their last stand as a steppe empire was in 89 when Dou Xian led an army of 45,000 and decisively defeated them at the Battle of the Altai Mountains. The Xiongnu Empire was replaced by a loose confederation of disorganized Xianbei tribes, who were nonetheless highly aggressive and proved problematic to their southern neighbors. A southern branch of the Xiongnu split off from their northern neighbors in 50 AD and continued to exist as a Han puppet state in Bing Province. However, in 188 the Xiuchuge clan rebelled against their Chanyu, Qiangqu, for sending troops to aid the Han against the rebels Zhang Ju and Zhang Chun. They replaced Qiangqu with his son Yufuluo, who's hold on power was tenuous, and he was ousted over a marquis of the Xubu clan. When the marquis of Xubu died the next year an elderly king became the nominal head of state without the title of Chanyu and the Southern Xiongnu ceased to exist as a coherent entity. In 216 the Xiongnu of the Ordos were settled but the region remained outside the jurisdiction of Cao Wei's administration.
Xiongnu
As a result of these battles, the Chinese controlled the strategic region from the Ordos and Gansu corridor to Lop Nor. They succeeded in separating the Xiongnu from the Qiang peoples to the south, and also gained direct access to the Western Regions. Because of strong Chinese control over the Xiongnu, the Xiongnu became unstable and were no longer a threat to the Han Chinese.
Ban Chao, Protector General (都護; "Duhu") of the Han dynasty, embarked with an army of 70,000 men in a campaign against the Xiongnu insurgents who were harassing the trade route now known as the Silk Road. His successful military campaign saw the subjugation of one Xiongnu tribe after another. Ban Chao also sent an envoy named Gan Ying to Daqin (Rome). Ban Chao was created the Marquess of Dingyuan (定遠侯, i.e., "the Marquess who stabilized faraway places") for his services to the Han Empire and returned to the capital Luoyang at the age of 70 years and died there in the year 102. Following his death, the power of the Xiongnu in the Western Regions increased again, and the emperors of subsequent dynasties were never again able to reach so far to the west.