There is no specific evidence of contact between the peoples of China and the Iranians west of the mountains, that for the Chinese, marked the edge of the world, before the Han dynasty (206 BC - AD 220). Nevertheless, because Central Asia was home to numerous nomadic tribes - all with similar lifestyles - there was much cultural exchange between them - mostly concerned with weapons of war, of course. This probably explains why certain uniformities can be found in China and Iran from around 600 BC. But the mountains and the desert were a huge barrier against direct contact.
The dreaded Taklamakan desert, a barrier between China and Iran.
The first meeting
The Han emperor Wu (141 - 87 BC) sent a mission to the west, hoping to find an ally in the Yuezhi against the fearsome Xiongnu, their common enemy. Zhang Qian (Chang Ch'ien) was briefed to compile a report (which exists as a most valuable document). His mission failed: there was no alliance with the Yuezhi (who had just overrun Bactria and deposed the last Greco-Bactrian king) - but he could give the emperor details of the lands he'd visited, and of more distant ones. His report included information on Bactria (Ta-Hsia), Sogdia and the Parthians (An-hsi):
The inhabitants of these kingdoms are poor in the use of arms, but clever at commerce. There are flourishing markets at Bactra [capital of Bactria] where all sorts of goods are bought and sold, carried from far and wide.
Trade and diplomacy
Following Zhang Qian's mission - both trade and diplomatic contact increased, but only briefly. After the first reported caravan between east and west (it arrived in 106 BC), things went a bit wrong. A quarrel over the famous "divine" Ferghana horses - much in demand in China - led to unsuccessful Chinese military intervention, and diplomatic activity ceased. In AD 73, the Parthians may have thwarted a Chinese attempt to make contact with their arch-enemies, the Romans, fearing as middle-men they were going to be by-passed.
Generally speaking, in times of turmoil, China took little interest in central Asia and beyond. Only when internal stability was restored (from the 5th century AD) did "normal" service resume, as centralised power was again exercised as it had been under the Han dynasty. Yazdegird II had diplomatic contact with the Wei dynasty (AD 455); contact was made again under Kavad (between 518 and 520) - the dowager empress was said to have been impressed with Zoroastrian ideas. More embassies were exchanged during the reigns of Khusrau I and Khusrau II, and a Chinese report was written on Po-szu (Persia). Finds of coinage increase dramatically from this time. But it was almost too late: Yazdegird III appealed for help against the Arabs - and his son went in person to China. The story is here. The Iranian community in China survived at least until AD 872 or 874 (despite a purge of foreigners in 848) - an Iranian of the Suren family buried his daughter near Changan - and commemorated her with an inscription in Chinese and Persian.
In AD 751, the Abbasids defeated the Chinese Tang dynasty at the Battle of Talas River, halting Chinese westward expansion, and opening up central Asia to Islam. But - though trade continued - there was no more direct contact for many centuries.
The "silk road" (though not what it was called by the ancients) is an apt name. Silk was much-prized, in India, the Roman empire, and in Iran, although it was probably not the main commodity traded along it. The Iranians (mainly Sogdians) profited as middle-men: hence Chinese attempts to circumvent them with a different land-route or by opening up a sea-route. The Chinese became known in the west as "Seres", the Silk People. It remained a closely-guarded Chinese secret until the 5th century AD, Thereafter silk began to be produced in Iran itself and elsewhere in the west. Iranian silk brocade was actually re-exported to China. See the Silk Road and Sogdian pages.