AD, DHCP, DNS setup Server 2003 inside VMWare

Posted on 2007-11-28
Last Modified: 2012-06-27
My goal, is to setup a testing bed inside of VMWare and be able to install Active Directory, DHCP and DNS on Server 2003. I would like to accomplish this in two different ways.

1. I would like to set this up using NAT option so I can still have Internet access inside the Server. I also need to be able to allow a client machine (virtualized XP OS inside VMWare) to join the domain. The problem I am having is when using NAT, it has its own dhcp/dns servers. I would like my virtualized server to control the dhcp/dns. I am also having issues with getting my client to see my server. Is there a way to give my client access to the internet through my server as well. Is there anything special that needs to be setup to allow all of this to work properly.

I am doing this for testing purposes and to learn more about setting up various things on my servers and clients. I will eventaully be testing out exchange server, office communicator, sharepoint, and a few other things as well..

2. I would like to set this up using Host-Only option. I need to be able to allow a client machine (virtualized XP OS inside VMWare) to join the domain. I have not set this up before using the Host-Only option but have tried it using NAT and am not having any lick, I am wondering if the process to allow the client to see the server will be the same or different from when I do this same task above. I am also wondering if I give my Server two virtual network cards, one being Host-Only, and one being NAT that I can have internet come in to the server and distribute out to my client.

I am doing this for testing purposes and to learn more about setting up various things on my servers and clients. I will eventaully be testing out exchange server, office communicator, sharepoint, and a few other things as well including learning more about the features available inside of Server 2003. Eventually I will work with Server 2008 and Vista probably next year.
Question by:jimmyiowa
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
LVL 18

Expert Comment

ID: 20367951
I have done what you are trying to do with all flavors of Windows Server OS NT4 - 2008 and all I have had to do was use the bridged-networking option (the default choice I believe) and I was able to accomplish just what you are trying to do.

Author Comment

ID: 20368344
The important part of what im trying to accomplish here is to have the server distribute the internet connection to the client machines rather than getting it directly from the host. I also want the server to control dhcp and dns, not the virtual NAT device.
LVL 18

Expert Comment

ID: 20369671
Kinda tricky as your host machine will not be able to pull an IP until the VM is powered on but here we go...

Disable the DHCP Server on your Router/Firewall if there is one.

In VMware on the Virtual 2003 Server:
Assign the Router address in the DHCP Scope as the Internal IP of your Router/Firewall
Assign Primary DNS Server as the DNS of the Virtural Server
Assign the Secondary DNS as that of your ISP (Check the status page of your router to find this or do an ipconfig /all
Once this is all set and running and the scope is active to an ipconfig /release then ipconfig /renew (you should now pull an IP from the Virtual Server)
Once you have an IP join the machine to the domain.

That should be it really. Jut keep in mind that until you power on that VM your host will not be able to access the internet UNLESS you give it a static IP address, sm, gw and dns.

Author Comment

ID: 20370030
I think your missing the point.... Getting close, and I already tried some of this stuff excluding anything to do with a router...

Here we go... And this is tricky, wish it would work though..

2 Devices
Device A = Windows Server 2003
Device B = Windows XP Pro

All of this is done within vmware, my internet connection provided is from my host computer, which is on my corporate network, which is why I cannot go and change any dhcp settings or anything regarding a physical switch or router.

I want to be able to accomplish this inside of VMWare alone.

Setup Device A w/ AD, DHCP, DNS (easy)
Allow Device B to join Device A's domain (easy)
**to accomplish this, I had to disable dhcp inside of the vmware so that way Device A would take the role of DHCP rather than VMWare's virtual router/switch, ALL OF THIS USING HOST-ONLY CONNECTION**

This allows me to connect everything together without any internet

What I tried to do from here but could not figure out is setup a second ethernet device configured with NAT so I would get internet connection on Device A. This did not work.. If I can get this part to work, I believe all I would have to do is bridge my second ethernet to my first ethernet connection to get Device A to distribute the internet access to Device B.

I hope this was clear enought, I am having a hard time with this. If I am going backwards and there is an easier way to set this up, I would love to know. I am going off of what I have tried and what I currently know about setting up things in VMWare.

Thanks for the help

Accepted Solution

bdh113s earned 500 total points
ID: 20468874
I will take a stab at this even though I may be completely off.

This should be fairly straight forward using the networking tools in VMWare.  I assume you are using VMWare workstation?

1.  Install a VM Network card in both your server and Client.  
2.  Edit the properties of the VM Network card on both the client and server so they are attached to some network that is currently not in use (ie. VMNet4?)  This will create a a private network between those two machines.
3.  Configure vm server for dhcp
4.  Start up vm client and it should receive an address from the vm server that is configured for dhcp.
***Keep in mind we have not attached to a VMNetwork that is using NAT, DHCP, or any other VMWare feature.  We have accomplished this simply by attaching them virtualling using VMNet4. (Make sure whatever network you choose does not have these features enabled.)
5.  Add a second network card to vm server
6.  Attach this vm network Card to VMNet8 (Or whichever VMNetwork you have configured for NAT/DHCP.  You can verify this by selecting "edit --> Virtual network settings" from the toolbar and choosing the NAT tab within vmware.

***At this point you have the following:

- Server is connected to private network with client.
- Client receives dhcp via private network to server
- Server is connected to your REAL network via NAT. The server will get a DHCP address on this network adapter from VMNet8 which should be configured to give out DHCP and NAT any outbound requests.

At this point the client still can not get out to the internet.... this is mainly by design since Windows server 2003 is not a router.  If the client is configured to get dhcp from the server, it will receive default gateway information you configured in the 2003 DHCP configuration.  You will need to make sure you configured the DHCP pool on your vm 2003 server to hand out default gateway information (router) which designates the 2003 server as the default gateway (or router).

Now the client knows to send network requests to the vm 2003 server if they are not networking requests for the private network that is attached between the client and server (the local subnet).

So what's left?

You want the vm 2003 server to act as a router.  This can be done a few ways, but the easiest way is to use Internet Connection Sharing.  Basically the VM 2003 server has an internet connection but the rest of clients do not.  The only way for them to get internet access is by forwarding their requests to the 2003 server which does not act as a router by default.  To set up Internet connection Sharing you can follow steps found at this link:

Now you should have th2 vm 2003 server Internet connection sharing on the second adapter you added.
All of this being said..... is there a reason you are trying to do this?  It might just be easier to connect two NICs to each VM.  One can be natted to the outside while the other is privately connected to all the VMs.

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In-place Upgrading Dirsync to Azure AD Connect
Ransomware is a malware that is again in the list of security  concerns. Not only for companies, but also for Government security and  even at personal use. IT departments should be aware and have the right  knowledge to how to fight it.
Advanced tutorial on how to run the esxtop command to capture a batch file in csv format in order to export the file and use it for performance analysis. He demonstrates how to download the file using a vSphere web client (or vSphere client) and exp…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question