fixing the host only IP address - confusion enp0s3 and enp08s
Posted: 22. Jan 2018, 11:39
Hi,
I know there are hundreds of articles all over the place on this, but I seem to be stuck in getting my head around one thing.
My Host --> Windows 7 laptop
Oracle Virtual Box --> current version 5.2.6
My Guest --> current Centos 7
It's all actually installed and runs ok, I can connect to the internet from the Guest and also connect from my Host to the Guest via PuTTy.
Confusion starts here.
On initial build of the Guest
- created a NAT and set this up to start automatically, which sets the ONBOOT=yes in the /etc/sysconfig/network-scripts/enp03s file.
- the IP address seems to be 10.0.2.15 when I do a ifconfig or ip add from the terminal.
- was able to connect to the internet
Next step created a Host Only Adapter in VirtualBox for the Guest (Adapter 2)
- started up the Guest
- ifconfig showed an additional entry against enp08s with an I.P of 192.168.56.101
- using PuTTy on My Host I could connect to the Guest
All fine so far
Now most articles, when the talk about fixing the IP address (making it Static) for the Host Only Adapter, talk about the enp03s config file. This is where I'm confused, as this was attached to the NAT Adapter. If I make these changes then the 10.0.2.15 just changes to something I decide like 192.168.56.140, and that is what will show up against ifconfig for enp03s.
I want to fixed the 192.168.56.101 IP address. So in the instance of having 2 Guest, I always know the IP of each one when they need to communicate to each other and also from the Host. I'm assuming that the 2 Guests would talk on IPs like 192.168.56.101 and .102 etc.
What am I missing or completely misunderstanding ?
Thanks in advance for any insight on this !
I know there are hundreds of articles all over the place on this, but I seem to be stuck in getting my head around one thing.
My Host --> Windows 7 laptop
Oracle Virtual Box --> current version 5.2.6
My Guest --> current Centos 7
It's all actually installed and runs ok, I can connect to the internet from the Guest and also connect from my Host to the Guest via PuTTy.
Confusion starts here.
On initial build of the Guest
- created a NAT and set this up to start automatically, which sets the ONBOOT=yes in the /etc/sysconfig/network-scripts/enp03s file.
- the IP address seems to be 10.0.2.15 when I do a ifconfig or ip add from the terminal.
- was able to connect to the internet
Next step created a Host Only Adapter in VirtualBox for the Guest (Adapter 2)
- started up the Guest
- ifconfig showed an additional entry against enp08s with an I.P of 192.168.56.101
- using PuTTy on My Host I could connect to the Guest
All fine so far
Now most articles, when the talk about fixing the IP address (making it Static) for the Host Only Adapter, talk about the enp03s config file. This is where I'm confused, as this was attached to the NAT Adapter. If I make these changes then the 10.0.2.15 just changes to something I decide like 192.168.56.140, and that is what will show up against ifconfig for enp03s.
I want to fixed the 192.168.56.101 IP address. So in the instance of having 2 Guest, I always know the IP of each one when they need to communicate to each other and also from the Host. I'm assuming that the 2 Guests would talk on IPs like 192.168.56.101 and .102 etc.
What am I missing or completely misunderstanding ?
Thanks in advance for any insight on this !