I have a Ubuntu 13.04 host running VirtualBox 4.2.12. This host has both a wired and a wireless network interface, but only one of which would usually be active at any given time. For example, at home wireless would be active, and at office wired one would be active.
Now, I would like to set up a Fedora 18 VirtualBox guest in "Bridged Networking" mode in such a way that the guest and the host can freely
ssh to each other (and to the network that the host is connected to) using their static IPv4 addresses. And if I add more such guests in future, then the guests should also be able to
ssh to each other.
However, I'm facing the following problems:
Upon selecting "Bridged Networking" mode for the guest in VirtualBox settings, the guest ends up getting a dynamically assigned, IPv6 address (whereas I want a statically assigned address that is an IPv4 address).
When the wireless interface is active on the host, I get to see only the "lo" and the "wlan0" entries in the output if
ip addron the host. So, the static IPv4 address that I assigned to the host's p2p1 (or, the wired) interface when it was active earlier in the day (in office) simply cannot be seen when the wired interface is not active later (at home).
I tried the instructions given here (using the
ifcfg-p2p1file for my case), but they didn't work for me. For example, I was able to
NetworkManager.servicejust fine, but I could not
network.service(it gave me the error
"Restarting network (via systemctl): Job for network.service failed. See 'systemctl status network.service' and 'journalctl -n' for details."
Is there any distribution-independent way to assign static IPv4 address to my F18 VM? Meaning, since each Linux distro keeps its network settings in different file/dir structures (and with maybe different properties too inside), is there any way I can achieve the above setup via commands like
route, etc and then also be able to persist their changes to whatever files those changes need to go in?
To avoid problem #2 above, do I have to use a manually created tun/tap device to use for "Bridged Networking"? If so, how can I do that on Ubuntu 13.04?