VMware Cloud Community
oksanasdad
Contributor
Contributor
Jump to solution

How to stop DHCP in ESX 4.1

OK...first post...be gentle!

I have several servers running in an ESX 4.1 host that all have statically assigned IP addresses (v4) and DNS server names. However, from the network outside the ESX host, the VM's have obtained addresses via DHCP and have registered with our corporate DNS. I try to ping by name and because of the DNS registration my machine on the corp network tries to talk to the FQDN (machinex.company.corp.com) where I want to talk to just 'machinex'. I can ping by address to the statically assigned IP...but not to the name thanks to the 'wrong' configuration.

So, how do I tell ESX to NOT request external IP addresses for servers I have set static IP addresses for? I have been digging and have not come up with anything yet...

Thanks all,

Oksanasdad

0 Kudos
1 Solution

Accepted Solutions
PaulusG
Enthusiast
Enthusiast
Jump to solution

It seems you have some kind of DNS problem.

u10aio has fixed IP address 10.11.1.96

however you DNS responds with 10.11.1.148

Check your DNS and delete host record with IP address 10.11.1.148

Add a new host record for u10aio with the correct IP address.

Also delete obsolete records in the reverse lookup zone for 1.11.10 and also add a record for u10aio.

Paul Grevink

Twitter: @PaulGrevink

If you find this information useful, please award points for "correct" or "helpful".

Paul Grevink Twitter: @PaulGrevink http://twitter.com/PaulGrevink If you find this information useful, please consider awarding points for "correct" or "helpful".

View solution in original post

0 Kudos
9 Replies
PaulusG
Enthusiast
Enthusiast
Jump to solution

Hello Oksanasdad

Welcome to the VMware Forums Smiley Happy

A VMware ESXi host just offers virtual hardware to create Virtual Machines.

A NIC in a VM behaves just like a physical NIC.

So when you configure a NIC to have a fixed IP in your Operating System, it will have a fixed IP.

It seems that someting went wrong configuring your NICs.

Another possibility, do your VMs have more then one NIC? Usually a new NIC defaults to DHCP.

Which OS is installed in your VMs?

Paul Grevink

Twitter: @PaulGrevink

If you find this information useful, please award points for "correct" or "helpful".

Paul Grevink Twitter: @PaulGrevink http://twitter.com/PaulGrevink If you find this information useful, please consider awarding points for "correct" or "helpful".
0 Kudos
oksanasdad
Contributor
Contributor
Jump to solution

Hello and thanks for the quick response. To your questions :

There is only one NIC in the VM and has a static IP and DNS. From within the VM the command prompt shows just the one IP and DNS...no other entries. Everything inside the ESX and virtual network works well and as expected. Machines in the virtual network can communicate with no problem. However, from any machine outside the virtual network (my laptop, for example) cannot hit the VM by name but only by IP. This same problem is happening on all VM's.

Inside the virtual network :

ping u10aio yields IP of 10.11.1.96 and DNS name of u10aio and works as expected

Outside the virtual network :

ping u10aio yields IP of 10.11.1.148 and DNS of u10aio.company.corp.com and does not work

ping 10.11.1.96 works as expected.

The other major frustration is the microsoft implementation of DNS which DOES NOT apparently look at the local HOSTS file first and goes directly to DNS so I cannot even bypass the problem with a HOSTS file.

Thanks,

D

0 Kudos
PaulusG
Enthusiast
Enthusiast
Jump to solution

It seems you have some kind of DNS problem.

u10aio has fixed IP address 10.11.1.96

however you DNS responds with 10.11.1.148

Check your DNS and delete host record with IP address 10.11.1.148

Add a new host record for u10aio with the correct IP address.

Also delete obsolete records in the reverse lookup zone for 1.11.10 and also add a record for u10aio.

Paul Grevink

Twitter: @PaulGrevink

If you find this information useful, please award points for "correct" or "helpful".

Paul Grevink Twitter: @PaulGrevink http://twitter.com/PaulGrevink If you find this information useful, please consider awarding points for "correct" or "helpful".
0 Kudos
oksanasdad
Contributor
Contributor
Jump to solution

That was it! Apparently, when I was newly setting up the machines, the DHCP allocated info was in the DNS server and needed to be purged. I cleared the (A) record and all is good!

Thanks for the quick response and a positive first impression of the forums!

Oksanasdad

0 Kudos
PaulusG
Enthusiast
Enthusiast
Jump to solution

Hello Oksanasdad

Thank you very much for your feedback. Nice that everything is OK now.

Please do visit the forum again Smiley Happy

Paul Grevink

Twitter: @PaulGrevink

If you find this information useful, please award points for "correct" or "helpful".

Paul Grevink Twitter: @PaulGrevink http://twitter.com/PaulGrevink If you find this information useful, please consider awarding points for "correct" or "helpful".
0 Kudos
rickardnobel
Champion
Champion
Jump to solution

The other major frustration is the microsoft implementation of DNS which DOES NOT apparently look at the local HOSTS file first and goes directly to DNS so I cannot even bypass the problem with a HOSTS file.

Which version of Windows do you use here? I do belive Windows uses the HOSTS file.

If you already has looked up a name through DNS it will be in the local DNS client cache for some time. That could cause the illusion that the hosts file is not used.

You can check what is inside the dns cache by:

ipconfig /displaydns

and also clear it with:

ipconfig /flushdns

My VMware blog: www.rickardnobel.se
0 Kudos
oksanasdad
Contributor
Contributor
Jump to solution

For the life of me I do not understand why this was happening the way it was in relation to the HOSTS file. I had the entry in the HOSTS file and even disabled my laptop's access to our corporate DNS and it STILL would not access the information in my HOSTS file. Very odd occurence, indeed. I have been in the networking game for about 20 years and am well versed in this stuff and was caught off guard by this problem.

Oh well, problem is now solved by removing it from the primary corporate DNS and am able to move on.

Thanks for the response.

Oksanasdad

0 Kudos
rickardnobel
Champion
Champion
Jump to solution

>I had the entry in the HOSTS file and even disabled my laptop's access to our corporate DNS and it STILL would not access the information in my HOSTS file.

Did you clear the DNS cache? What Windows operating system are you using? Did you run any antivirus / antispyware that could prevent you from editing the HOSTS file?

I am totally certain that Windows does in fact use the hosts file and check it before going to DNS lookup.

My VMware blog: www.rickardnobel.se
0 Kudos
oksanasdad
Contributor
Contributor
Jump to solution

I know for a fact that it uses HOSTS as well as this has been our solution to not using DNS for our transient servers in the past which is what makes this one so 'odd'. The machines that would not resolve were Win2003R2 and the machine that would not resolve was WinXPProSP3. Now, in fairness, it could have just been my machine as I was not able to test with other machines (I have been doing all this over VPN which COULD have thrown a monkey wrench into it all). Clearing the (A) record from DNS solved the issue, but my machine should have hit the HOSTS first...and for some reason was not.

Thanks again...

O

0 Kudos