Solved

dhcp for virtual machines

Posted on 2012-03-17
16
467 Views
Last Modified: 2012-03-18
I have a question I have 3 esx hosts on 1 host I have a dc doing dns my router does dhcp

so I want my vm's to use the dc dns and all others use my router

what I do at the moment is give the vm a static dns 1st to my router and 2nd to my dc so over 1 they get out to the net and on 2nd they can do domain stuff as if I dont have the 2nd dns pointing to my dc I cannot join the vm's to the domain for instance

so how can I do this automatically
0
Comment
Question by:IanTh
  • 8
  • 7
16 Comments
 
LVL 4

Assisted Solution

by:ltsweb
ltsweb earned 100 total points
Comment Utility
On the Virtual Machines, you should keep them static and point their DNS to your AD/Domain Controller DNS.  There should be ONLY one entry to that DNS Server.  Once set, do an IPConfig /flushdns and you will be able to join the DNS.

On the AD/DNS create a DNS Forwarder to your outside DNS servers for Internet Resolution.  That is done simply in the DNS program, right click the server and find Forwarder.  You can put in external DNS Servers or even an internal DNS.  Anytime a system queries the DNS and can't find the host, the forwarder will relay to the next DNS server.  This allows you to control the DNS for internal systems and even redirect a host to an internal ip.  Very useful to convert something like "mail.xxxx.com" to an internal IP address behind a firewall instead of pushing it out to the Internet."  

If I understand your scenario, this will allow you to have:

1) Join the domain from VM machine
2) Access external sites from VM w
3) Find internal systems/sites within the AD/DNS
4) Allow your router assigned DHCP systems to continue to use external/internal DNS

As for DHCP, you can leave it on the router and hand out internal DNS or external DNS.  However, to worktations that need to join the domain you should always use the DNS on the AD or you will have slow login!  In other words, make the DHCP server hand out the internal AD ip address that you added DNS Forwarders.  

If that DNS server should fail, you can always change dhcp to use an external DNS to keep the users surfing while you are repairing.

Please reply back if I did not understand the scenario.

Regards!
0
 
LVL 117

Assisted Solution

by:Andrew Hancock (VMware vExpert / EE MVE)
Andrew Hancock (VMware vExpert / EE MVE) earned 400 total points
Comment Utility
I would recommend, you disable DHCP on your router, and add DHCP role to your Server.

DNS and DHCP can be then integrated on your servers.

and then setup DNS forwarders to point to your ISP DNS servers beyond on the internet.

The only item, on your server DHCP server specify the routers IP addressbas the Default Gateway.

The issue with domain joining is your router is not AD integrated.

if you still wanted to use your router for DNS and DHCP, program the router to issue DNS IP address of your DC.

Configure DC DNS as forwarders to either router IP address or better your ISP IP DNS servers.
0
 
LVL 30

Author Comment

by:IanTh
Comment Utility
I was hoping to have a different dns setting inside the vm's only

the dc is not on most of the time its on my vsphere lab I am getting in to wds

what is the dns inside vmware for if I could just use 2nd dns ie dc in the esx host that would mean only the vm's using the dc dns
wouldn't that work?
0
 
LVL 117

Assisted Solution

by:Andrew Hancock (VMware vExpert / EE MVE)
Andrew Hancock (VMware vExpert / EE MVE) earned 400 total points
Comment Utility
ESX has no DNS. ESX is a host server that hosts your VMs, it does not play any role in offering DNS requets.

the settings on a host server are to configure for your DNS servers on your LAN.
0
 
LVL 30

Author Comment

by:IanTh
Comment Utility
ee dns
so if I just use 192.168.1.202 my dc inside the host would that work
0
 
LVL 117

Expert Comment

by:Andrew Hancock (VMware vExpert / EE MVE)
Comment Utility
I do not know, what you are trying to achieve here?
0
 
LVL 30

Author Comment

by:IanTh
Comment Utility
just my vm are on the domain nothing else
0
 
LVL 117

Expert Comment

by:Andrew Hancock (VMware vExpert / EE MVE)
Comment Utility
use your DC DNS.
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 30

Author Comment

by:IanTh
Comment Utility
I dont get you ?
0
 
LVL 117

Assisted Solution

by:Andrew Hancock (VMware vExpert / EE MVE)
Andrew Hancock (VMware vExpert / EE MVE) earned 400 total points
Comment Utility
just my vm are on the domain nothing else

use your DC DNS.
0
 
LVL 30

Author Comment

by:IanTh
Comment Utility
but when I build a new vm from wds wont it need to have the dc dns done manually then
0
 
LVL 117

Accepted Solution

by:
Andrew Hancock (VMware vExpert / EE MVE) earned 400 total points
Comment Utility
if you want VMs to be part of your domain and register with your domain, you must use a Windows DNS (Active Directory Domain Controller if Integrated)

if a client connects and uses a non Windows DNS, and a Router is not a true DNS, it's just a Proxy DNS, that proxys the request upstream to your ISP DNS.

Domain Join is likely to fail, because it will not find the SRV DOMAIN records, because a Router is not a DC.

ESX cannot do anything to help with this, it's not a VMware ESX issue.

My advice

1. When DC is UP and running in your lab, re-configure the router to issue DC IP Address as DNS, use DNS forwarders.

2, When DC is Down, reconfigure Router DHCP, to issue it's IP as DNS.
0
 
LVL 30

Author Comment

by:IanTh
Comment Utility
actually couldn't that be done from wds to set dns and joinjom or is that always going to be manual step
0
 
LVL 117

Assisted Solution

by:Andrew Hancock (VMware vExpert / EE MVE)
Andrew Hancock (VMware vExpert / EE MVE) earned 400 total points
Comment Utility
It's possible.
0
 
LVL 30

Author Comment

by:IanTh
Comment Utility
asking new question for thanks andy
0
 
LVL 30

Author Comment

by:IanTh
Comment Utility
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

David Varnum recently wrote up his impressions of PRTG, based on a presentation by my colleague Christian at Tech Field Day at VMworld in Barcelona. Thanks David, for your detailed and honest evaluation!
In this step by step tutorial with screenshots, we will show you HOW TO: Enable SSH Remote Access on a VMware vSphere Hypervisor 6.5 (ESXi 6.5). This is important if you need to enable SSH remote access for additional troubleshooting of the ESXi hos…
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…
This video shows you how easy it is to boot from ISO images for virtual machines with the ISO images stored on a local datastore on the ESXi host.

743 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now