Problem setting up fixed IP address for host-only adapter on Windows host
Posted: 5. Apr 2019, 18:26
Dear community,
I observe strange behaviour on my Windows Host when I try to set an IP address of host-only adapter. What I did on WindowsA box running Windows7:
After above steps, the configuration was the following:
I thought: OK, it's not good that IP address is taken from DHCP range. So I set Lower Address Bound to 192.168.5.30, hit apply, and (or magic) the IP address of the adapter was set to 192.168.5.31:
I decided not to experiment further. I have created a new virtual machine & installed Debian Buster which I could access via host-only adapter and vice versa, for example, there is how I could connect to host port:
I was happy only until the reboot when IP address was set to 169.254.73.235 and I couldn't access Debian guest anymore:
My further attempts to set the fixed IP address of host-only adapter where unsuccessful: all the time the radio button was switching back to "Configure Adapter Automatically" and some random address was chosen.
Further things got more interesting. On WindowsB box (also running Windows7) I have:
It could be related to some Windows7 update and/or missing update... I don't have (and never had) any VPN software. I tried running VirtualBox as normal user, as administrator – all fails this way or another.
I am puzzled. Any feedback is welcomed.
I observe strange behaviour on my Windows Host when I try to set an IP address of host-only adapter. What I did on WindowsA box running Windows7:
- Downloaded VirtualBox v5.2.26 and installed it on the top of existing 5.x version.
- Removed existing host-only Ethernet adapter.
- Created new host-only Ethernet adapter, selected "Configure Adapter Manually" and configured as following:
Adapter:
IP address: 192.168.5.1
Network: 255.255.255.0
DHCP Server:
Address: 192.168.5.10
Network: 255.255.255.0
Lower Address Bound: 192.168.5.20
Upper Address Bound: 192.168.5.50 - I clicked "Apply" button and unexpectedly the radio button is switched to "Configure Adapter Automatically" plus IP address is set to 192.168.5.21 (input field is disabled / greyed out).
After above steps, the configuration was the following:
Code: Select all
C:\Program Files\VirtualBox> VBoxManage list dhcpservers
NetworkName: HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter
IP: 192.168.5.10
NetworkMask: 255.255.0.0
lowerIPAddress: 192.168.5.20
upperIPAddress: 192.168.5.50
Enabled: Yes
C:\Program Files\VirtualBox> VBoxManage list hostonlyifs
Name: VirtualBox Host-Only Ethernet Adapter
GUID: 4dbda501-a436-4de5-903a-dcb01da7f3ef
DHCP: Enabled
IPAddress: 192.168.5.21
NetworkMask: 255.255.255.0
IPV6Address: fe80::d84c:e50c:7e39:49eb
IPV6NetworkMaskPrefixLength: 64
HardwareAddress: 0a:00:27:00:00:20
MediumType: Ethernet
Wireless: No
Status: Up
VBoxNetworkName: HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter
Code: Select all
user@debian:~$ ping 192.168.5.31
PING 192.168.5.31 (192.168.5.31) 56(84) bytes of data.
64 bytes from 192.168.5.31: icmp_seq=1 ttl=128 time=0.843 ms
64 bytes from 192.168.5.31: icmp_seq=2 ttl=128 time=0.467 ms
^C
--- 192.168.5.31 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 4ms
rtt min/avg/max/mdev = 0.467/0.655/0.843/0.188 ms
user@debian:~$ telnet 192.168.5.31 445
Trying 192.168.5.31...
Connected to 192.168.5.31.
Escape character is '^]'.
blabla
Connection closed by foreign host.
Code: Select all
C:\Program Files\VirtualBox> VBoxManage list hostonlyifs
Name: VirtualBox Host-Only Ethernet Adapter
GUID: 4dbda501-a436-4de5-903a-dcb01da7f3ef
DHCP: Enabled
IPAddress: 169.254.73.235
NetworkMask: 255.255.0.0
IPV6Address: fe80::d84c:e50c:7e39:49eb
IPV6NetworkMaskPrefixLength: 64
HardwareAddress: 0a:00:27:00:00:20
MediumType: Ethernet
Wireless: No
Status: Up
VBoxNetworkName: HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter
Further things got more interesting. On WindowsB box (also running Windows7) I have:
- Uninstalled VirtualBox.
- Uninstalled anti-virus Microsoft Security Essentials v4.x.
- Installed VirtualBox v5.2.26.
- Created host-only Ethernet adapter with same settings as above.
- I can ping guest (192.168.5.50) from host and connect to it.
- I cannot ping host (192.168.5.1) from guest, neither connect to it.
- When I start Wireshark, host-only adapter is not in the list of adapters I can capture from (I have sort of DejaVu with my previous post but I then was able to capture IP packets).
It could be related to some Windows7 update and/or missing update... I don't have (and never had) any VPN software. I tried running VirtualBox as normal user, as administrator – all fails this way or another.
I am puzzled. Any feedback is welcomed.