Solved

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

Posted on 2015-01-06
3
448 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
Comment Utility
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
Comment Utility
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 25

Accepted Solution

by:
DrDave242 earned 500 total points
Comment Utility
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

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

Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
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 show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

771 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

10 Experts available now in Live!

Get 1:1 Help Now