Eu tenho o VirtualBox mais recente instalado no Windows 7 Pro. Eu criei NatNetwork com 10.10.10.0/27 e DHCP habilitado e rede somente de host com 172.17.24.0/27 e DHCP ativado também.
Criou a Virtual Machine como Red Hat Linux e instalou o CentOS 7 nela.
Após vários problemas, por qualquer motivo, tenho um IP incorreto dado pelo servidor DHCP à interface enp0s8.
Este é o lado do cliente:
[root@smu1 ~]# ifconfig enp0s8
enp0s8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.2.6 netmask 255.255.255.224 broadcast 10.0.2.31
inet6 fe80::a00:27ff:fe41:58ae prefixlen 64 scopeid 0x20<link>
ether 08:00:27:41:58:ae txqueuelen 1000 (Ethernet)
RX packets 13 bytes 3430 (3.3 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 207 bytes 23996 (23.4 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[root@smu1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-enp0s8
TYPE="Ethernet"
BOOTPROTO="dhcp"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT=no
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_PEERDNS="yes"
IPV6_PEERROUTES="yes"
IPV6_FAILURE_FATAL="no"
IPV6_ADDR_GEN_MODE="stable-privacy"
NAME="enp0s8"
UUID="77e14c77-358e-48c3-be0c-e18d75cecc5a"
DEVICE="enp0s8"
ONBOOT="yes"
PEERDNS=no
PEERROUTES=yes
Este é o lado do host:
C:\Program Files\Oracle\VirtualBox>VBoxManage.exe list natnetworks
NetworkName: NatNetwork
IP: 10.10.10.1
Network: 10.10.10.0/27
IPv6 Enabled: No
IPv6 Prefix: fd17:625c:f037:2::/64
DHCP Enabled: Yes
Enabled: Yes
loopback mappings (ipv4)
127.0.0.1=2
C:\Program Files\Oracle\VirtualBox>VBoxManage.exe list dhcpservers
NetworkName: HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter
IP: 172.17.24.4
NetworkMask: 255.255.255.224
lowerIPAddress: 172.17.24.5
upperIPAddress: 172.17.24.30
Enabled: Yes
NetworkName: NatNetwork
IP: 10.10.10.4
NetworkMask: 255.255.255.224
lowerIPAddress: 10.10.10.5
upperIPAddress: 10.10.10.30
Enabled: Yes
Exatamente as mesmas configurações para rede somente host funcionam muito bem! Sem problemas em tudo.
[root@smu1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-enp0s3
TYPE=Ethernet
BOOTPROTO=dhcp
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=no
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=enp0s3
UUID=b012704e-cc06-4ece-b4ea-7a12bed03f27
DEVICE=enp0s3
ONBOOT=yes
PEERDNS=no
PEERROUTES=no
[root@smu1 ~]# ifconfig enp0s3
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.17.24.6 netmask 255.255.255.224 broadcast 172.17.24.31
inet6 fe80::a00:27ff:fe46:c2b prefixlen 64 scopeid 0x20<link>
ether 08:00:27:46:0c:2b txqueuelen 1000 (Ethernet)
RX packets 292 bytes 29717 (29.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 238 bytes 46906 (45.8 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Eu tentei reinicializações de host e guest, excluir e recriar natnetwork e dhcp server a partir da linha de comando (fiz isso mais uma vez depois de desativar completamente o UAC no Windows).