Question : Does UNC (\\) bypass host and lmhost.sam file

We are setting up some DR stuff in a co-lo. To do some testing without messing with the rest of the network (DNS mostly) we went ahead and manually put in some ip to names in the host file. when we ping the name it does some back with the ip we put in the host file. however when using a unc path it goes to the ip we have in our DNS. Example

REAL: serverA, ip=192.168.1.1
Host entry - 192.168.3.1 serverA

when pinging from the computer we changed the host file is does come back with 192.168.3.1, but when using UNC, \\serverA it displays the shares from 192.168.1.1

does UNC bypass host file?

Answer : Does UNC (\\) bypass host and lmhost.sam file

Developers hard coding server names into their source code!?! Line them up and shoot them! :0)

I'm afraid it would matter if you weren't using Windows. You need the DFS service running on each fileserver and this is a Windows 2003 R2 / 2008 feature.

I'm sorry but I'm still not getting exactly what you're doing. I know it can be hard sometimes on these forums. You've got your local office, right, and an existing server (\\oldserver). Where is this? At your office or at the co-lo? And the DR server is at the co-lo?

>> "so on serverA i changed the hosts file so that when someone tries to go to \\oldserver it will reolve to serverA. "


The hosts file is something you change locally on the client that is trying to resolve the name, not the server. So you would need to change the hosts file on your workstation for your requests to be redirected. You would add oldserver.domain.local with the IP of the new server. Then when you try to browse to \\oldserver it should redirect to the IP of the new server. But this will only affect your workstation.

But - if \\oldserver is on the same subnet as the workstation you're trying to do this on, then this would not work as the name would be resolved using a NetBIOS broadcast before consulting hosts. In this case you would have to add an entry into the LMHosts file on your workstation, using #PRE and then run 'nbtstat -R' before trying to resolve.

 

Random Solutions  
 
programming4us programming4us