यदि दुई कम्प्युटर, चाहे त्यो VM होस् या phyisical कम्प्युटर, भिन्ना भिन्नै network मा छन् भने तिनी हरु को communication हुन लाइ router चाहिन्छ ! यो एउटा basic concept हो networking को !
यदि एउटै नेटवर्क मा छन् भने router चाहिदैन, switch भए मा पनि communication हुन्छ !
bridge connection or/and NAT are different concepts which are used for different purpose.
Also, default gateway and subnet mask plays a vital role. Subnet mask determines which network you would be in and gateway does something similar since it is the gate for all your traffic (even ping) to go through and come to your computer as well.
Another important thing to consider is firewall. Even if two computers are in the same network in the same switch, with same subnet mask and default gateway, but iCMP traffic is blocked by firewall, then, you cannot receive ping reply. Again, firewall is implemented on Operating System level as well as Network level.
It is unclear which environment your computers are in. Please explain. And also, please look the basic concepts of hub, switch, router, Subnet mask, Default Gateway and firewall... also good to know about dns and dhcp and you should get most of your answers.