Han–Xiongnu War
In 119 BC, when the Xiongnu suffered a catastrophic defeat by the Han armies, the Chanyu moved his court (located in present-day Inner Mongolia) to another location north. This had the desired result that the Xiongnu were separated the Wuhuan people, which also prevented the Xiongnu from exacting many resources from the Wuhuan. The Han court placed the Wuhuan in tributary protection and resettled them in five northeastern commandaries, namely Shanggu, Yuyang, Youbeiping (present-day Hebei), Liaoxi, and Liaodong (present-day Liaoning). A new office, the Colonel-Protector of the Wuhuan, was established (near present-day Beijing) in order to prevent contact between the Wuhuan with the Xiongnu and to use them to monitor the Xiongnu activities. Nevertheless, the effective Han control over the Wuhuan was lacking through much of the Western Han period, since the Xiongnu had considerable military and political influence over the Wuhuan while relations between the Wuhuan and Han often remained strained at best. This can be exemplified by a situation in 78 BC, when the Xiongnu led a punitive campaign against the Wuhuan, resulting in General Fan Mingyou (范明友) leading a Han army to impede further incursions. When they learned that the Xiongnu had left by the time the army arrived, the Han court ordered Fan to attack the Wuhuan instead, killing 6000 Wuhuan men and three chieftains, since the Wuhuan had recently raided Han territory. Only in 49 AD, when 922 Wuhuan chieftains submitted during Emperor Guangwu's reign, did many of the Wuhuan tribes come under tributary system of the Han empire. The Han court provided for the Wuhuan and in return the Wuhuan tribes guarded the Han frontier against the Xiongnu and other nomadic peoples.
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.