I tried this just now with my Mac as host os and Debian as guest os.
I configured the debian guest os to use a Host Interface. I then set its IP address manually (static).
I unplugged my host os (Mac) from my network. As a result, its interface was taken down (DHCP). I then manually configured this interface (static) and brought it up.
Pinging my guest os from my host os was successful.
There may be other ways to do this, but this is how I tackled it. I use my guest os as a development server and use my host os for actually writing the code (go samba).
EDIT: This has the potential of putting data onto a real network. I am unsure how to keep the traffic local/confined to just the Host and Guest os's. I do plan to look it up in the next day or two and will experiment a little on both Mac & Windows. (I think it has to do with the network devices on the host os)