This is achieved by calculating the interactions between the different network entities such as routers, switches, nodes, access points, links, etc.
The behavior of the network and the various applications and services it supports can then be observed in a test lab; various attributes of the environment can also be modified in a controlled manner to assess how the network/protocols would behave under different conditions.
Trace files log every packet, every event that occurred in the simulation and is used for analysis.
The typical methodology is that real packets from a live application are sent to the emulation server (where the virtual network is simulated).
Emulation is widely used in the design stage for validating communication networks prior to deployment.