VMware Communities
srynoname
Contributor
Contributor

Need help using host-only networking

I configured a VM with a host-only network adapter, however I can't reach the VM from the host. According to the workstation network editor VMnet1 is of type host-only and the subnet is 192.168.120.0 with mask 255.255.255.0. Inside the VM I have assigned a static IP of 192.168.120.6 - shouldn't I now be able to reach the VM from the host? Do I have to configure anything else? I am running Workstation 8 on Win 7 x64. Thanks for any hint!

Tags (2)
0 Kudos
22 Replies
vmroyale
Immortal
Immortal

Hello.

That should be it. Have you tried with the Windows firewall out of the equation?

Good Luck!

Brian Atkinson | vExpert | VMTN Moderator | Author of "VCP5-DCV VMware Certified Professional-Data Center Virtualization on vSphere 5.5 Study Guide: VCP-550" | @vmroyale | http://vmroyale.com
0 Kudos
srynoname
Contributor
Contributor

Thanks, I disabled the windows firewall temporarily, but it still doesn't work 😞

0 Kudos
WoodyZ
Immortal
Immortal

What OS is installed in the Virtual Machine?

From a Command Prompt, what is the output of ipconfig /all on the Host (and Guest if a Windows OS)?

From a Terminal, what is the output of ifconfig on the Guest if a Linux OS?

0 Kudos
srynoname
Contributor
Contributor

according to your avatar you will be happy to hear that: there's freebsd (pfsense) installed in the VM :smileysilly:

ipconfig /all on my win 7 x64 host says (some tunnel interfaces removed)

Windows-IP-Konfiguration

   Hostname  . . . . . . . . . . . . : myhostname
   Primäres DNS-Suffix . . . . . . . :
   Knotentyp . . . . . . . . . . . . : Hybrid
   IP-Routing aktiviert  . . . . . . : Nein
   WINS-Proxy aktiviert  . . . . . . : Nein
   DNS-Suffixsuchliste . . . . . . . : localdomain

Ethernet-Adapter LAN-Verbindung:

   Verbindungsspezifisches DNS-Suffix: localdomain
   Beschreibung. . . . . . . . . . . : Realtek PCIe GBE Family Controller
   Physikalische Adresse . . . . . . : [removed]
   DHCP aktiviert. . . . . . . . . . : Ja
   Autokonfiguration aktiviert . . . : Ja
   Verbindungslokale IPv6-Adresse  . : [removed](Bevorzugt)
   IPv4-Adresse  . . . . . . . . . . : 192.168.1.229(Bevorzugt)
   Subnetzmaske  . . . . . . . . . . : 255.255.255.0
   Lease erhalten. . . . . . . . . . : Mittwoch, 28. September 2011 18:25:58
   Lease läuft ab. . . . . . . . . . : Mittwoch, 28. September 2011 21:25:58
   Standardgateway . . . . . . . . . : 192.168.1.1
   DHCP-Server . . . . . . . . . . . : 192.168.1.1
   DHCPv6-IAID . . . . . . . . . . . : [removed]
   DHCPv6-Client-DUID. . . . . . . . : [removed]

   DNS-Server  . . . . . . . . . . . : 192.168.1.1
   NetBIOS über TCP/IP . . . . . . . : Aktiviert

Ethernet-Adapter VMware Network Adapter VMnet1:

   Verbindungsspezifisches DNS-Suffix:
   Beschreibung. . . . . . . . . . . : VMware Virtual Ethernet Adapter for VMnet
1
   Physikalische Adresse . . . . . . : [removed]
   DHCP aktiviert. . . . . . . . . . : Nein
   Autokonfiguration aktiviert . . . : Ja
   Verbindungslokale IPv6-Adresse  . : [removed](Bevorzugt)
   IPv4-Adresse (Auto. Konfiguration): 169.254.203.160(Bevorzugt)
   Subnetzmaske  . . . . . . . . . . : 255.255.0.0
   Standardgateway . . . . . . . . . :
   DHCPv6-IAID . . . . . . . . . . . : [removed]
   DHCPv6-Client-DUID. . . . . . . . : [removed]

   DNS-Server  . . . . . . . . . . . : [removed]
                                       [removed]
                                       [removed]
   NetBIOS über TCP/IP . . . . . . . : Aktiviert

Ethernet-Adapter VMware Network Adapter VMnet8:

   Verbindungsspezifisches DNS-Suffix:
   Beschreibung. . . . . . . . . . . : VMware Virtual Ethernet Adapter for VMnet
8
   Physikalische Adresse . . . . . . : [removed]
   DHCP aktiviert. . . . . . . . . . : Nein
   Autokonfiguration aktiviert . . . : Ja
   Verbindungslokale IPv6-Adresse  . : [removed](Bevorzugt)
   IPv4-Adresse  . . . . . . . . . . : 192.168.198.1(Bevorzugt)
   Subnetzmaske  . . . . . . . . . . : 255.255.255.0
   Standardgateway . . . . . . . . . :
   DHCPv6-IAID . . . . . . . . . . . : [removed]
   DHCPv6-Client-DUID. . . . . . . . : [removed]

   DNS-Server  . . . . . . . . . . . : [removed]
                                       [removed]
                                       [removed]
   NetBIOS über TCP/IP . . . . . . . : Aktiviert

Attached Screenshots:

virtual.png -> Screenshot of the virtual entwork editor showing IP-Range for host-only network

pfsense.png -> configured ip in pfsense

em1.png -> outut in freebsd (pfsense) of the relevant interface

Thank you very much for any help!

0 Kudos
RDPetruska
Leadership
Leadership

Don't know why the network editor shows 192.168.120.0 for the VMnet1 range - your host's ipconfig shows a 169.254.x.y auto-config IP.  Did you make any manual changes to the host's VMNet1 adapter?

0 Kudos
srynoname
Contributor
Contributor

RDPetruska, thank you for your hint. Well, as far as I know I never touched it, but if the setting is taken from an older workstation version during upgrading, it's maybe a long time since I changed it, so I can't remember it. The strange thing is: If I check the network properties, then it shows a static IP of 192.168.120.1 - how can then the commandline show something different? I attached a screenshot of the network properties in windows.

So, how should the network properties in windows be defined by default?

0 Kudos
RDPetruska
Leadership
Leadership

That is quite strange.  You can try disabling the IPv6 on the VMNet1 nic on the host, see if that changes anything.

All in all, everything else you've done looks correct.

0 Kudos
srynoname
Contributor
Contributor

1) I used the restore defaults button in vmware workstation's network editor. didn't change much though.

2) I just noticed a really strange thing: in the advanced entwork settings, there are two IPs assigned to my vmnet1 interface. if I remove the 192.168.120.1 and confirm the changes using OK and open the network settings again, it's there again. Does this make any sense? I doubt it? How does that setting look at your computer?

I'd like to try to fix that before changing IPv6 stuff.

0 Kudos
srynoname
Contributor
Contributor

OK, it now works if I use 192.168.134.1 inside the VM. 192.168.134.0/24 is also what the vmware virtual network editor shows after I restored the default values. I am just still wondering, where the 192.168.120.1 comes from and why I can't remove it. Anyone else has a 192.168.120.1 on his vmnet1 interface (or another second IP)?

0 Kudos
RDPetruska
Leadership
Leadership

I'm currently on an XP host, so don't have as many options in the NIC properties.  But I only have one IP in the IP setting.

IPs.png

0 Kudos
srynoname
Contributor
Contributor

thank you, but what happens if you click the "advanced" button (in the right window of your screenshot)? that is, where the second IP shows up.

0 Kudos
RDPetruska
Leadership
Leadership

Just one IP.  192.168.17.1 in my case...

1836783.png

0 Kudos
srynoname
Contributor
Contributor

ok, well strange problem, anyway, thank you very much for your help! guess I will open a new topic on another community for the second ip problem, it's probably not directly related to vmware.

0 Kudos
JanW00
Contributor
Contributor

This does not look like a second ip

If you remove it, Windows (W7 64-bit here) will complain you're removing the only IP address.

I have an identical problem.

For some reason the VMnet interfaces on Windows wil use a IPv4 APIPA address (169.254/16) despite the interface having a static IP address configured.

It only occurred after I customized the VMnet's interface IP ranges using the Virtual Network Editor.

I remember Worstation 7 used to have a similar problem, but there was a patch available for it...

Anyone?

0 Kudos
srynoname
Contributor
Contributor

I meanwhile re-installed windows 7 and then workstation 8 and don't have this problem anymore. I even could change the vmnet 1 ip address using workstation's network editor and there luckily still no second IP. I know, patch = reinstall windows isn't that good :smileysilly:

0 Kudos
srynoname
Contributor
Contributor

host-only wasn't working again. on the vmnet1 interface changed from static to dynamic IP, then it works. reproducely not workign with static IP. strange thing.

0 Kudos
WoodyZ
Immortal
Immortal

Was the static IP Address you were using outside of the Scope of the DHCP Server IP Address Pool?

0 Kudos
srynoname
Contributor
Contributor

yes and no. it was set to 192.168.x.1, while the dhcp range starts at .128. however when i activated dhcp I got the 192.168.x.1. guess that's by convention. btw inside the virtual machine I have set up a static IP, there it is no problem. just at the host it (vmnet 1 adapter) it is/was a problem. somehow i feel there's something wrong with vmware's implementation of the virtual adapter.

0 Kudos
WoodyZ
Immortal
Immortal

VMware always defaults the last octet of the Host's Virtual Network Adapter's VMnet1 ~ VMnet9 to 1 on the Subnets it assigns and this is always outside the scope of the DHCP Servers IP Address Pool (and of course should be).  If you are using DHCP, then any Static IP Address you assign to the Guest(s) should always be outside scope of the DHCP Servers IP Address Pool but not that of the Host's Virtual Network Adapter's IP Address.

0 Kudos