Solved

Windows Computer with 2 IP addresses - how does DNS handle it?

Posted on 2015-01-06
3
511 Views
Last Modified: 2015-01-15
We've had a few end user complaints recently where the user is trying to remote desktop their laptop from a remote location in the office (like a lab or some other cube) and the remote desktop connection won't work because the DNS server thinks their computer is at one IP address, but maybe their laptop is on wireless at the moment and DNS won't resolve their computer name to the wireless IP.    If their LAN IP is registered on the DNS server as 192.168.1.50 (for example), and their wireless IP is 192.168.1.242, Windows DNS only seems to "know" one of the IP addresses...usually the LAN.  So in the above scenario, they can remote desktop the wireless IP address (not the computer name) and remote desktop will work.  Of course, who really knows what the numeric wireless IP address is when it's dynamic.  I hope I've explained the issue properly, and I don't understand Windows server/Windows DNS enough to know how to fix this so the users can always use remote desktop to their computer name, regardless of how the laptop is connected to the LAN.  Any ideas?
0
Comment
Question by:jbobst
3 Comments
 
LVL 7

Expert Comment

by:Deadman
ID: 40534970
Create VPN server for your remote users to connect remote desktop connection

http://technet.microsoft.com/en-us/library/cc725734(v=ws.10).aspx
http://technet.microsoft.com/en-us/library/cc770798(v=ws.10).aspx

and create vpn connection in remote users laptop.

http://support.microsoft.com/kb/314076
0
 
LVL 1

Author Comment

by:jbobst
ID: 40535920
Deadman, I think you are missing my question...probably my fault since it's somewhat difficult to explain over text.  VPN is not the issue here...the scenario I tried to explain was all happening in our main office building.  Nobody is remote in the sense that they are working from home or in a hotel.  We have many lab facilities where our engineers will work on lab computers (usually desktop machines running windows).  They will occasionally want to open up a remote desktop session back to their laptop computer which is sitting on their desk in their cubical (in the same building on the same LAN).  They could walk to their desk, but our building has multiple floors and can take awhile to walk from their cube/desk back to the lab.

My question is this - a laptop, when on wireless and plugged into a physical ethernet connection has two IP addresses.  If another computer in the building on the same LAN does a "ping" command to this laptop by pinging their computer name (host name), the DNS resolves to one of the IP addresses, usually the physical ethernet port.  IF the ethernet cable is unplugged, and the laptop is ONLY on wireless, and we ping the host name from a machine elsewhere in our building, the ping will time out and not resolve, because DNS is trying to resolve the host name to the Ethernet IP address...which is currently unplugged.  However, if we look at the wireless IP address of the laptop and ping the numeric address, we get a reply with no problem.  We could also do a remote desktop session to the laptop's wireless IP with no problem, but the users rarely know the wireless IP, where as they do know their computer name.  So, given this scenario, WHY doesn't DNS somehow try both IP addresses when it tries to resolve a host name?
0
 
LVL 26

Accepted Solution

by:
DrDave242 earned 500 total points
ID: 40536193
If both IP addresses are registered in DNS, the DNS server will return both in response to a query for the host name. You can see this by using nslookup to query the server rather than ping. Ping simply picks one of the addresses returned in the query, most likely the first one. Round-robin DNS (which is enabled by default in Windows) causes the order of those addresses to change for every query, so you can't necessarily predict which address ping (or, say, Remote Desktop Connection) will use.

If you query the server using nslookup and only get one address in return, that means that only one address is registered in DNS. There could be a number of reasons for this (the wireless adapter may not be configured to register its address in DNS, for example, or it may be using the wrong DNS servers). Here's the kicker, though: when a machine registers a second IP address in DNS, the DNS server doesn't remove the host record associated with the first address. If it did that, you could never have more than one address registered in DNS for a given machine, and this is sometimes necessary.

In short, I can't think of a solution to this. Even if a laptop's wireless NIC always registers its address in DNS, the other NIC's address is going to stick around as well. You could possibly unregister it by terminating its DHCP lease (via ipconfig /release) before disconnecting it from the network, but I'm not positive the DHCP server will contact the DNS server and remove the corresponding record.
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

There have been a lot of times when we have seen the need to enter a large number of DNS entries in a forward lookup zone. The standard procedure would be to launch the DNS Manager console, create the Zone and start adding new hosts using the New…
Resolve DNS query failed errors for Exchange
This tutorial will give a short introduction and overview of Backup Exec 2012 and how to navigate and perform basic functions. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as conne…
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…

786 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