The changeip command
From Mac OS X Server FAQ
The exact steps required to successfully change the server's IP address depend slightly on the role the server is currently fullfiling. Follow the instructions appropriate for your situation, which depends on the Open Directory role setting for your server. They each have at least two steps in common: Use of the 'changeip' terminal command, which basically does a find / replace, updating the IP address and hostname, and also use of the Network preference pane which actually updates the network interface configuration and stores it for the next reboot.
In order to carry out these steps, you will need to either be on the server's console, or connected via SSH. Performing these steps over the network using SSH will cause you to loose your connection at the end of the process. If you're not sure how to use ssh, this may help.
Standalone
This is the most simple directory services configuration. Follow these steps:
- Run the changeip command line tool to change all occurances of the IP address and hostname in the local netinfo database. If you don't know what the hostname is, oldhost and hewhost can be omited. Here is an example terminal command to change the server's IP from 192.0.0.12 to 192.0.1.10
sudo changeip - 192.0.0.12 192.0.1.10 oldhost newhost
- Use the Network preference pane to change the IP address as necessary.
- Note that as of Mac OS X Server 10.4.6, changeip now requires fully qualified domain names. See http://docs.info.apple.com/article.html?artnum=303495 for details.
