Han dynasty
To the north of China proper, the nomadic Xiongnu chieftain Modu Chanyu (r. 209–174 BC) conquered various tribes inhabiting the eastern portion of the Eurasian Steppe. By the end of his reign, he controlled Manchuria, Mongolia, and the Tarim Basin, subjugating over twenty states east of Samarkand. Emperor Gaozu was troubled about the abundant Han-manufactured iron weapons traded to the Xiongnu along the northern borders, and he established a trade embargo against the group. In retaliation, the Xiongnu invaded what is now Shanxi province, where they defeated the Han forces at Baideng in 200 BC. After negotiations, the "heqin" agreement in 198 BC nominally held the leaders of the Xiongnu and the Han as equal partners in a royal marriage alliance, but the Han were forced to send large amounts of tribute items such as silk clothes, food, and wine to the Xiongnu.
Han–Xiongnu War
In 169 BC, the Han minister Chao Cuo presented to Emperor Wen a memorandum on frontier defense and the importance of agriculture. Chao characterized the Xiongnu as people whose livelihood did not depend on permanent settlement and were always migrating. As such, he wrote, the Xiongnu could observe the Han frontier and attack when there were too few troops stationed in a certain region. He noted that if troops are mobilized in support, then few troops will be insufficient to defeat the Xiongnu, while many troops will arrive too late as the Xiongnu will have retreated by then. He also noted that keeping the Xiongnu mobilized will be at a great expense, while they will just raid another time after dispersing them. To negate these difficulties, Chao Cuo elaborated a proposal, which in essence suggested that military-agricultural settlements with permanent residents should be established to secure the frontier and that surrendered tribes should serve along the frontier against the Xiongnu.