1

enter image description here

PC 1 is the host computer and PC2 is the virtual computer.

My understanding about "host-only":

I use VMware 7, Vmnet1 is the host-only adapter for host and it's IP is 192.168.209.1. I'm really confused about this, does it connect to the Vmnet 1 switch and Vmnet has DHCP also?

It provides the IP range:

alt text

Why does the virtual host adapter (Vmnet 1) have an IP which isn't in the range while it's just an adapter in the virtual network? It connects through the Vmnet switch like the guest adapter.

2 Answers 2

0

Your diagram is NAT, not host-only. Host-only does not create a host gateway to the internet.

In your example the host vNIC is probably statically addressed, not DHCP.

I think the solution to do what you want is to just switch to the NAT vmnet.

1
  • if this picture displays standard vmware networking, then it is host-onlyas vmnet1 by default maps to host-only as documented here You are right when saying that host-only by default does not connect to internet. But how shall it display, that PC1 is connected. There for I added a better picture Jun 22, 2015 at 15:19
0

Your network settings

In your network setting they are all on the same network. Confusion comes from the DHCP IP range, that cuts the possible adresses to .128 - .254

This network works like this.

  1. network adress 192.168.209.0

  2. net mask 255.255.255.0 results in 254 possible client IP adresses inside one big subnet

  3. router IP adress 192.168.209.1 (normaly first IP of network) he knows who is inside and outside his network by comparing subnet masks. (compares binaries of subnet masks)

  4. broadcast adress 192.168.209.255 (normaly last IP of network) multicast traffic goes here and then to all inside network

  5. client IP range (distributed by DHCP) all IPs inside netmask exept first (router) and last (broadcast) here: not all possible are used, only 192.168.209.128 - 192.168.209.254

There are several reason for not using all IP adresses. One would be, if all clients get adresses dynamically, that you can split vmnet1 network into several subnets by changing the mask.

For your understanding of host-only you can read further

host-only network

vmnet1 is a virtual switch, by default mapped to a host-only network with an adress coming from VMware DHCP, here it is 192.168.209.0 with mask 255.255.255.0

PC1-host

external IP: from ISP
internal IP: 192.168.209.128 (VMware runs the DHCP)

PC2-guest

internal IP is one of 192.168.209.128 - 192.168.209.254 connects to Router on IP 192.168.209.1 (vmnet1)

Broadcast IP: 192.168.209.255

Host-only network means, that IP of internal network will come from internal DHCP. Every connection from internal network to internet will only be possible, if host will share his internet connection with vmnet1.

Host-only network

More often, there is a router between PC1 and Internet. Then Router will only see external IP of PC1. Traffic from PC2 to router will go through virtual switch vmnet1 to host network adapter eth0 if host shares his connection. Router doesn't know, that PC2 exists.

Read more about networking in virtual environments in the documentation

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .