Jump to content

Recommended Posts

Posted

Hello,

 

I would like to create a test environment for a Windows Server 2022 and a Windows 10 and 11 station on Workstation Pro 16.

 

My host computer has physical 4 network connections. Two go to our admin network and obtain DHCP IP addresses from the server on that network. And the other two go to a second curriculum network and obtain DHCP IP addresses from a different server. The two networks are on different VLANS and have separate DHCP servers.

 

For my test environment, I would like my VMs to not talk to either of these networks (I also want to run DHCP from the testing server which would conflict with the DHCP on the non-test server) but I need an internet connection so I can get the server VM to connect to Microsoft for Azure. Can anyone tell me how best this can be done?

 

I have taken a look at the Virtual Network Editor on VMware Workstation but I can't see an option that would work.

Posted
I would use a LAN segment (another link) for your test network, then use an opnsense VM as a router to provide internet access to VMs on the LAN segment.

 

Client/Server VMs > opnsense (2 nics, one WAN, one connected to LAN segment) > WAN (via one of your curriculum networks)

 

Thank you. It has worked a treat. Just one question.....

 

I have set the virtual test server up with two NICs.

The first one is the NAT one so it brings the internet in from our physical host.

The second one is LanSegment1. I have created a static IP of 10.75.44.10 with a subnet of 255.255.252.0

The test server has working internet connection thanks to the first NIC which connects to the VMware NAT.

I have then set up DNS and DHCP with a pool of 10.75.44.18-10.75.47.254 just as it would be in a real word example with lots of hosts.

 

Host VM has one nic which is LanSegment1 (same as the second NIC on the virtual test server). When booting, it gets the DHCP mentioned above perfectly, but it is struggling to connect to the internet. Is it possible to get virtual test hosts to connect to the internet via my virtual test server?

I have added my ISP DNS IPs in the DNS forwarders as I would usually for a non-test server.

Posted (edited)

I've done this a lot in the following way:

 

I use the Virtual Network Editor and create two VMnets

 

One is bridged directly to my physical ethernet connection.

The second is host only - untick Connect a host virtual adapter and untick use local DHCP service. Input the Subnet IP and mask details.

 

My Router VM is connected to both VMnets

All other VMs are connected just to the host only one.

 

Configure the Router as appropriate.

I use pfSense, so I configure:

 

At the console:

IP

Subnet Mask

Disable DHCP

Revert to HTTP Configurator (yes)

 

Via the Web interface:

Hostname

Domain

TimeZone

Install Open-VMTools

Change Admin Password

 

The default routing prevents the traffic from your lab spilling out onto your real physical network.

Edited by originofsymmetry
  • Thanks 1
Posted
I've done this a lot in the following way:

 

I use the Virtual Network Editor and create two VMnets

 

One is bridged directly to my physical ethernet connection.

The second is host only - untick Connect a host virtual adapter and untick use local DHCP service. Input the Subnet IP and mask details.

 

My Router VM is connected to both VMnets

All other VMs are connected just to the host only one.

 

Configure the Router as appropriate.

I use pfSense, so I configure:

 

At the console:

IP

Subnet Mask

Disable DHCP

Revert to HTTP Configurator (yes)

 

Via the Web interface:

Hostname

Domain

TimeZone

Install Open-VMTools

Change Admin Password

 

The default routing prevents the traffic from your lab spilling out onto your real physical network.

 

Thanks for your post. I have tried to replicate it as much as possible.

Here is what I have done.

 

On VMServer, I have allocated two NICs:

1. Bridged (Dynamic 10.232.160.191)- set to auto bridging. This gives the server the internet connection needed.

2. Host-only (Static 10.75.44.10) - as you suggested, 'connect a host virtual adapter' and 'use local DHCP service both disabled'.

 

On VMWindows10 Client, I allocated one NIC:

1. Host-only (Dynamic 10.75.44.18)

 

Initially, the host was unable to pick up a DHCP address from my VMServer which is running Server 2022 with DHCP configured. I realised that this was because the second NIC (the host-only one) was set to dynamic. I gave it a statically assigned address, and the client immediately obtained a DHCP address from my VMServer, but it is not able to get an internet connection. Is there any way to provide this?

 

The DHCP scope options have DNS, Router and WINS Servers set as 10.75.44.10.

If I add 10.232.160.191 (the server bridged connection) as a router, it updates on the DHCP but after a release and renew on the client, I still can't seem to ping out to the internet.

 

Any ideas?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...