Need to fool DNS for legit purposes...


We have a business continuity site.  
The dev team coded to host name prior to being told to code to DFS name...
Now their code will not work because their code points to a non-existent box.
We tried changing the host file on the Bus Continuity server to try and fool his programs into thinking that the old host name pointed to the ip address of the new server.
When we ping the old server name it points to the new ip address.  Good
However - he needs to map a drive that references the old servers unc path but have it point to the new ip address...

When we map a drive using the old server name it still references the old offline server even though the host file is changed...


Who is Participating?
abelenkiyConnect With a Mentor Commented:
Yes, you need to make sure they both look the same.
Or make an alias on the folder2 dfs share to look like folder1
map the drive using the new UNC path, the code should not be looking at the UNC path of a mapped drive, just at the shortcut drive letter you've created.
javajoAuthor Commented:
Thanks bouscal -

yup....i wish that was the case..

Code is referencing host name...
Will You Be GDPR Compliant by 5/28/2018?

GDPR? That's a regulation for the European Union. But, if you collect data from customers or employees within the EU, then you need to know about GDPR and make sure your organization is compliant by May 2018. Check out our preparation checklist to make sure you're on track today!

Rick JohnsonSystems AdministratorCommented:
make sure you aren't using WINS...

For example, you should have your HOST file look something like this:



In the former, you are using "DNS", in the latter, you are using WINS and the NETBIOS name.

When referencing the server to map the drive, make sure you also use the FQDN, i.e. and not the NETBIOS name of someserver

Hope this helps
javajoAuthor Commented:
thanks n1wqk
easily changes the host file..

However...cannot map a drive letter share using FQDN...
receiving no network error
Rick JohnsonSystems AdministratorCommented:
actually, ordinarily you can. The question is this: can the 2 networks talk to each other? (IP addresses, that is)
As a stupid workaround try this:
point the hosts file to the local server.
Map the network drives with the auto reconnect switch under the same context as the account which runs your application.
Share those drives out to match the old server to trick the application into thinking its actually going there.
javajoAuthor Commented:
N1wqk -

Yep - two networks can talk to each other by ip - no issue there.

abelenkiy -

here's the test im doing.

changing the host file to point new old server name to new server ip address - - can ping old server name and it does indeed resolve to new ip address.

When i try and map the drive however i cannot get it to resolve to the new server..

Let me ask this...what if the paths are different but the share names are the same?  For instance:

Old server UNC:

New server UNC:

Now if i change the host file as stated above so the new ip address of server_b points to the old host name of server_a - i can do that and ping works...

but if i try and map a drive using the old server name and share it doesn't point to the new server.  
Am i getting a no network error because the underlying paths are different??  I wouldn't think so...

Can you try to browse to the old server name? What if any shares show up? can you map them by hand from there?
All Courses

From novice to tech pro — start learning today.