0

We have an issue with DNS in our environment where the DNS record for a computer will not get updated when it moves to a new subnet. I manage our desktops so I have no access to nor am I involved with our DNS or DHCP servers. I know this a DNS or DHCP problem, however our server team has been unwilling or unable to fix it for several months now and I don't expect to have it fixed soon. I’m not looking for a solution to this DNS/DHCP problem, I’m looking for a workaround to find the computer's current IP when it does happen.

Take a look at the following CMD output:

C:\>nslookup pwd-d5767
Server:  dnsserver.mycity.nw.us
Address:  172.16.1.16

Name:    pwd-d5767.ci.mycity.nw.us
Address:  172.18.74.147

C:\>nslookup 172.18.45.174
Server:  dnsserver.mycity.nw.us
Address:  172.16.1.16

Name:    pwd-d5767.ci.mycity.nw.us
Address:  172.18.45.174

The computer PWD-D5767 was in use on one subnet and got the IP address 172.18.74.147. It was then moved to another subnet and got 172.18.45.174, which is it's current ip address. As you can see from the forward lookup, I get the old address when I lookup the hostname. As I did in this case, I normally have to call the user and have them do an ipconfig and tell me their current IP address. Calling the user and walking them through doing an ipconfig is a pain. However, it appears our DNS server knows the computers new ip address based on the result when I do the reverse lookup. I want to avoid calling users and having them read me their ip address. Is there an nslookup or some other command that would give me all the IP addresses the DNS server has for pwd-d5767?

2
  • 1
    SO basically you want to query all reverse dns lookup zones for a particular hostname. What type of DNS server? Windows? Linux?
    – Drifter104
    Apr 19, 2016 at 16:34
  • is this related to DNS-caching in any way? Check this article it has some helpful info
    – LHWizard
    Apr 19, 2016 at 18:08

2 Answers 2

0

Well since your DNS server is wrong why not talk directly to the computer like you are doing manually with the phone call

open Powershell:

Get-WmiObject win32_networkadapterconfiguration -ComputerName pwd-d5767
2
  • That is still going to use the wrong/old IP as it will do a DNS query for pwd-d5767
    – Drifter104
    Apr 19, 2016 at 16:24
  • 1
    actually yeah - how is anything working, must be a lot of stuff going into black holes
    – Sum1sAdmin
    Apr 19, 2016 at 16:40
0

From what I can tell is that your PTR records are updating but not your A records in DNS. If that is the case, you can search by subnet with nslookup.

ls -t PTR [subnet].18.172.in-addr.arpa

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .