Link to home
Start Free TrialLog in
Avatar of patmoli
patmoli

asked on

Hostname ping returns wrong IP

Setup:
2 x Server 2003 DC's
Server 2003 Application Server

We have a server that came out of the rack and ended up on the workbench.  It is still up and in use in a degraded mode. (1 array went down)  When it was plugged into the network both the onboard and the pci gigabit cards were plugged in, but only the gigabit should have been.  The gigabit card is static, the onboard 10/100 is DHCP.  The 2nd cable into the DCHP nic was removed, but we are now running into DNS resolution issues to that server's hostname.  If I ping it by hostname, I get the DHCP address.  I tried rebooting the server, checked all the settings in the DNS/Wins portion of the gigabit tcp/ip, ipconfig /release, ipconfig /flushdns (on client, not on dc yet) nslookup hostname.  Any help is appreciated.
Avatar of gnar
gnar
Flag of United States of America image

First, I'm check the DNS zones and make sure there aren't any records sitting around, then clear the  DNS cache on the DNS servers yet.  After that, flush the local DNS cache again and try the ping.  

If that still doesn't work, verify there isn't a hosts file entry, WINS entry, etc., that might be providing that old address.
Avatar of patmoli
patmoli

ASKER

There is a wrong entry in the Forward Lookup Zone.  Delete it?  What is the best way to clear the dns cache?
There is no issue with deleting the wrong record in the forward lookup zone.  I assume there is the correct record as well...
After you delete it then have the client renew the IP and see if the new record is created in DNS
Avatar of DCenaculo
If you ping by hostname and it replays with the IP address from the DHCP it's because that IP address was given to someone else. I say this because you wrote: "The 2nd cable into the DCHP nic was removed".

Run this command if you want to know who has the IP now: nbtstat -a ip address.

Go to your DNS server, sort records by name and see if there are more then one record for the same name. If there are more then one entrie for that server name delete them. Verify if it has only one record and if the IP is the corerct, the one from the static configuration.

-Clear all entries in WINS for that server name.
-On the server run the command: nbtstat -RR
-Go to some workstation, and run the command: ipconfig /flushdns
-Ping the server's name, and I think it will be fine.

If you need more help, please feel free to ask for it :)
If your nic is statically configured you must create manually a record in DNS.
Yeah, patmoli.  If there's a bad, old record, just delete it.

And to clear the cache on other DNS servers, just right-click the server in the DNS MMC and choose "Clear Cache."  
ASKER CERTIFIED SOLUTION
Avatar of DCenaculo
DCenaculo
Flag of Portugal image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of patmoli

ASKER

too late... already deleted it.  There was no correct entry.  What now?
create a new one :) Need help on that ? Just right-click you zone name and create a new host record. If you need help on that please feel free to ask :) You really have to create it :)
Avatar of patmoli

ASKER

I have 2 dc's here.  Will the entry replicate or shout I create a new entry on both?
Sometimes you must click the zone first to select it and only after thar you can rigth-click it and choose the option New Host :)
It will replicate automatically :)
If it's an active directory integrated zone, it'll replicate on it's own soon enough.  You can always reload the zone on the other DC/DNS server sooner if you're impatient.  
If that server is a DC, I suggest you to run ipconfig /registerdns and then dcdiag /fix.
A domain controller registers a lot of things besides its IP address in DNS, so client workstations can use its services (SRV records in DNS).

If you nedd more help, plesa feel free to ask :)
Avatar of patmoli

ASKER

Ok, here's where I'm at.  I recreated the record on the DC's with the correct IP.  Left it for a bit, then pinged.  Was the wrong IP again. The server in question is NOT a DC, just a member server in the domain.  Comments?
From the machine you pinged from (client machine)
start run cmd
ipconfig /flushdns

Now try and ping
Avatar of patmoli

ASKER

It changed the record on the DNS back to the old IP

I'm confused.  Just cleared the DNS Cache on the DC's, same problem.  Flush DNS ond it's ok.  Am I missing something here?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of patmoli

ASKER

I out of here to take care of the kids.  Will continue this at home.  You guys around for a bit?
Avatar of patmoli

ASKER

It seems that after about 30 minutes, the DNS record changes to reflect the DHCP address again.  I need to fix this.
Could the DHCP server be freaking out and reregistering it with DNS?  Maybe look for an active DHCP lease for that machine and delete it?
Avatar of patmoli

ASKER

No leases for that IP, sequential IP on either side is there, but not that one.  This is really weird
Ok, we're going to need a chicken, some duct tape, and tears from a virgin...

Or at least maybe delete those records again, enable debug logging on the DNS server, then see what they look like after the records are recreated.

You can enable debug logging by right-clicking the server in the DNS MMC, going to Properties, and checking Log packets for debugging on the Debug Logging tab.  The log file's location can be specified at the bottom of the screen.

Avatar of patmoli

ASKER

done, will wait a bit and review.
Avatar of patmoli

ASKER

Of course as soon as I turn on the logging, it smartens up!  Will update again in a bit.
Avatar of patmoli

ASKER

Thanks!  Seems to be ok now.
Avatar of patmoli

ASKER

While this problem was a bit finicky, I tried just about everything on this topic and it seemed to work.  What I did end up doing was going into the DHCP server hosting on the the 2nd DC and killing the new DHCP session that has that IP...  not sure which solution/combo solution was the final answer here, but to anyone else having a problem like this, the answer is in here!  Thanks for the help guys!