Changing the IP Address of a Samba AD DC

Revision as of 16:59, 11 June 2013 by Mmuehlfeld (talk | contribs) (Initial version of this HowTo)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Introducion

This HowTo describes a way to change the IP address of your DC.

Until this line is removed, consider this document as a DRAFT, that may contain faults or is missing something and can break your system!

This HowTo comes WITHOUT ANY WARRANTY!



General

Changing the IP address of your DC can cause unexprected side effects! Always make sure you have a recoverable backup! And of course do intensive testing!

Notice: This HowTo was tested only in a single DC environment!



Preconditions

  • Current IP: 10.99.0.1
  • New IP: 10.99.0.200
  • NIC: eth0



Changing the IP of the DC

Make sure, that no clients are connected to the server, while you do the changes. They'll be disconnected and won't reconnect until the next reboot!

  • Add a NIC alias with the new IP:
# ifconfig eth0:0 10.99.0.200 up
  • If you use the „interfaces = “ option in your smb.conf, then add the new aliased interface to it:
interfaces = lo eth0 eth0:0
This parameter is not used per default. If you made changes to your smb.conf, restart Samba!
  • Update the DNS entries:
# samba_dnsupdate --verbose
  • In the output of „samba_dnsupdate“, at least three „Failed“ messages will appear:
Failed to find matching DNS entry A samdom.example.com 10.99.0.200
Failed to find matching DNS entry A dc1.samdom.example.com 10.99.0.200
Failed to find matching DNS entry A gc._msdcs.samdom.example.com 10.99.0.200
Remember these records. We'll change them in the next step.
  • Open the Windows DNS MMC and change the IP of all failed messages from the previous steps.
DNS Manager.png
  • Stutdown Samba.
  • Remove the NIC alias:
# ifconfig eth0:0 down
  • Change the IP address on your server, where ever it's necessary (NIC interface, /etc/hosts, etc.).
  • Start Samba again.

Notice: You have to restart all Windows clients, that where up during the IP change, because the OS had cached the old values.! Otherwise these clients won't connect to the new IP.