The invention relates to a traffic playback method and
system for a
virtual network. The traffic playback method includes a first step of capturing and
processing real traffic, extracting a real
IP address set R_IP, a second step of conducting depth-first search on a
bipartite graph which is generated by real traffic communication relationships, dividing the real
IP address set R_IP into two disjoint sets, namely, a set R_IPA and a set R_IPB, a third step of dividing all virtual nodes which are in communication through any
virtual network routing interface v_interfacei into two disjoint sets, namely a set V_IPAi and a set V_IPBi, a fourth step of calculating similarities of all the
virtual network routing interfaces and a real traffic collecting point, a fifth step of selecting a
virtual network interface which is most similar to the real traffic collecting point to be used as a mapping node of the traffic collecting point, conducting
IP address mapping based on the mapping mode, and a sixth step of traversing the real traffic again to achieve real traffic playback in the virtual network. When the traffic is played back in the virtual network through the traffic playback method and
system for the virtual network, the real traffic communication environment is restored as good as possible, and the virtual network
traffic system is improved.