Maybe I can answer this, but forgive my English, just be patient.
When you see Vietnam history, you may see China always conquered Vietnam. But if you think it from the opposite, the 2 countries relationship is just like Scottish and welsh. You cannot say who invade who, right? Same thing happened in Korea, Mongolia and Turkistan. But I can say Mongolian are Chinese. Why? Because there are 8 million Mongolian in China, and only 2 million in their own country.
So when you ask this question, you misunderstand a concept as all the other foreigners. Major nationality in China is HAN people, but HAN people doesnt mean China. China has 56 ethnic groups. Han is just one of them. Even Han itself absorbed many great ethnic groups, like Goguryeo, Cathay, Jurchen and hundreds of them. 3100 yrs ago, King of Zhou defeated nearly 100 kindoms and 600+ cities along Huang river. Which forms prime Han. A loser king in that battle ran into Korea. The man taught the locals to write and the idea of culture. His decendants controled Korea for 1500+ years, then another Chinese ran into Korea because of war in China and instead of the local king.
While until about 600 years ago, Emperor of China(Ming period) gave an order to all the kings in east asia, said there are only 13 provinces are traditional Han area, called Han Chinese. And all the others using Chinese culture, dressing nearly to Chinese with high class of culture at that time are different kinds of Chinese(I donot know how to translate the name directly). And he gave a list of kingdom(other Chinese) will never invade, including 17 kindoms:
1 korea 2 Japan 3 Ryukyu(controled by Japan now) 4 Northern Vietnam 5 Southern Vietnam and Cambodia 6 ancient thailand 7 part of Indonesia 8 another part of Indonesia 9 Sumatra and other eight ancient southeast asian nations.
Although he considered these nations were Chinese, he only asked these countries gave tribute to China, in return Chinese government would gave more treasure back. The only requriement was these country should nominally belong to China and keep China's border line safe. So that's why evertime Korea ,Pakistan ,Vietnam and others had a war with foreigners, China will send out army to help.