Solved

Pointing to new IP temporarily

Posted on 2010-09-22
11
746 Views
Last Modified: 2012-05-10
Hello everyone,

We have a domain setup here, where the domain controller provides DHCP/DNS/Active Directory services.  All the client terminals have the domain controller in their DNS settings (Network Settings).

One of our mail servers went down, and we moved it's location.  So, current CNAMES/DNS resolution is not fully transferred, however clients need access to their emails while I wait for transition.

So, I thought I would modify the hosts file on the domain controller to have an entry like:  200.234.342.343     mail.somedomain.net.   It works great when I ping mail.somedomain.net from the domain controller itself, but client terminal doesn't resolve and try to go to the old IP.  I've already flushed dns on domain controller and client terminal, so I'm unsure of what to do at this point.  ANy clues?  We're using Win Serv 2008 R2.

0
Comment
Question by:metazend
  • 4
  • 2
  • 2
  • +2
11 Comments
 
LVL 39

Expert Comment

by:Krzysztof Pytko
ID: 33732686
Create for temp in your DNS server A record for this IP address.
0
 
LVL 39

Expert Comment

by:Krzysztof Pytko
ID: 33732703
of course clear hosts file on DC then :)
0
 
LVL 2

Accepted Solution

by:
DanAgaDK earned 500 total points
ID: 33732754
The hosts file on the server only circumvents local name resolution on that server - it does not influence the way clients get their name resolution though the DNS service in that same server.
As I understand, you want your internal client to find their way to the temporary IP address of the mail server and thus internally override the IP address they get when asking for mail.somedomain.net.
In the DNS management console, add a new zone under Forward Lookup Zones. You can choose to store it in AD or not (I'd prefer not to as it is irrelevant for your local AD). The name of the zone must be the name (the hostname) of your mail server, mail.somedomain.net.
Once the zone is created, you add an A record which must be blank - thus adding an IP address for the name of the zone, which is the mail server temporary IP.
Make sure the TTL is appropriately low, so when you need to change back, the changes take effect at the maximum of the TTL value - eg. 5 minutes.
Clients may need to clear their perception (client cache) of the old IP, which may be held for a much longer (outside) TTL for the same name. Top clear the clients cache either reboot them or simpley issue this command on each client:  ipconfig /flushdns
0
 
LVL 9

Expert Comment

by:rfportilla
ID: 33732758
If the transition is all at once, then
  if you have this set up correctly, you shoud be using a dns entry for your mail server.  Just modify the DNS entry.  They when they look for mail.somedomain.net, they will get the new address.  Once the new server is up with the old ip address, then just modify the DNS entry again.

If the transition is gradual, then
  set up a hosts file on a share and use gp to configure the effected clients to use the shared hosts file.  This way you can move over just a few at a time.
0
 
LVL 9

Expert Comment

by:rfportilla
ID: 33732765
@DanAgaDK I'm confused, why is a new zone required?
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 59

Expert Comment

by:Darius Ghassem
ID: 33734155
Host file will not work. You need to change the CNAME, MX, and other records for mail server to point to the new IP address
0
 
LVL 2

Expert Comment

by:DanAgaDK
ID: 33735433
The new zone is needed for the DNS server to have some (local only) data to serve to your clients internally. The A record insdide that zone file is exactly the data that the DNS server will feed your clients. Without that data, the DNS server would instead attempt to retrieve the publicly available data outside on the Internet. With the internal data you override the public data.
That answer is based on the assumption that you only need for YOUR local clients to point to this temporary address.
 
IF you need the whole Internet to repoint to the temporary address, then you need to make the change on the A record pointing to the old IP (and make that point to the new).
For any public host names referred to in an MX record please remember, that as per rfc's (can't remember which), you should use A records for mail servers and not CNAME records (pointing to an A record). Likewise, the PTR record for the IP involved should also point back to the correct name, also by which the server identifies itself when sending mails. Some receiving mail servers will otherwise reject connections if these requirements are not met.
- but the last half of this post is irrelevant for internal only visible changes... :-)
0
 

Author Closing Comment

by:metazend
ID: 33736231
That was brilliant. Clear, concise, and it works. Thanks Dan.
0
 
LVL 9

Expert Comment

by:rfportilla
ID: 33740723
I'm just trying to make sure I understand this so don't get upset, but...

@Dan are you assuming that there is no local dns?  Because I was assuming that an internal DNS already existed and there was an entry pointing to the email server.

@dariusg Why won't the host file work? You can point your operating system to use a shared host file on the network.  Windows will check the host file before the dns.  Using Group Policy, you can choose which computers use the shared host files and those who don't.  This is a workable solution for repointing some computers and not others.  Am I wrong here?  
0
 

Author Comment

by:metazend
ID: 33741258
Hi rfportilla,

Actually, I think that's a decent solution as well (group policy), but I have different ones setup for different groups, although I suppose I could have done this using a parent policy, but Dan's suggestion worked very quickly and it's fairly easy to keep track of it.  I had initially just tried it by modifying the hosts file on the dns server thinking that it would propagate to clients on the LAN since it affected the dns server it was modified on.  I think that's what dariusg was saying won't work, but he's thinking we didn't change the CNAME,MX,etc for public records, which it has been already, so he made that suggestion.

The situation stipulated was that this solution was only for local clients on the LAN to point to the new address, while CNAME,MX and such are in transition.  Although it's not supposed to take too long, users can't do with more than a few hours of no e-mail.  Just trying to minimize down time.

It's working great now thanks guys :)
0
 
LVL 9

Expert Comment

by:rfportilla
ID: 33741509
Thanks Metazend.  I'm glad that worked.  My last comment wasn't really directed at you.  I just wanted clarification from Dan and Dariusg.  Like Dan, I was proposing a DNS solution, but I assumed that you had a DNS entry in place already.  And if you have a DNS entry already, there is no need to create a new zone.  Regarding dariusg, I wanted to make sure he wasn't suggesting that my hosts solution would not work b/c I've done it before.  ;-)  
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

To effectively work with Diskpart on a Server Core, it is necessary to write some small batch script's, because you can't execute diskpart in a remote powershell session. To get startet, place the Diskpart batch script's into a share on your loca…
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 walk an individual through locating and launching the BEUtility application and how to execute it on the appropriate database. Log onto the server running the Backup Exec database. In a larger environment, this would generally be …
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…

707 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

12 Experts available now in Live!

Get 1:1 Help Now