Archived - Mac OS X Server v10.2: How to change the IP address

The IPAddressChange script, which you may download from this document, allows you to change the IP address of a computer using Mac OS X Server versions 10.2 to 10.2.8. Note: The following script is not used for Mac OS X Server 10.3. Instead, type man changeip in Terminal for instructions on how to use the changeip command. You may also see the document Command Line Administration, which is part of Mac OS X Server Documentation.

This article has been archived and is no longer updated by Apple.
ChangeIPAddress v.1.0 script
Download Requirements
Operating System
Mac OS X Server 10.2 to 10.2.8
Software
N/A
Hardware
N/A
 
Download Help
For help with downloading, see Knowledge Base Document 75098 "Help: Downloading Software"
 
License Agreement
All software available from this document is governed by the terms of the software license agreement included with Mac OS X. By using or downloading this software you accept the terms of the software license agreement.

 

Language Version Release Date Read Me Software
English 1.0 2003-08-14
50 K

 

English

 

If the "Permanent IP Address" option was selected during the Open Directory Setup portion of the Setup Assistant, the primary IP address is not meant to be changed. However, you may need to change the IP address of the server at a later date. The script presented here is designed to help you change the IP address of your server, or to help you recover when you experience issues (described below) after having changed the primary IP Address of a Mac OS X Server. Please read the following documentation carefully.



Important: Apple does not provide complimentary support using the ChangeIPAddress.command or for the accompanying documentation. Apple only provides technical support on this issue to customers who have a current Mac OS X Server Support contract (http://www.apple.com/support/products/macosxserver_sw_supt.html).

If you have previously attempted to change the IP Address of the primary interface on a Mac OS X Server without use of the script found here, these symptoms may have occurred:

 

  • You cannot log in locally at the server, or there are delays.
  • Password Server uses cannot authenticate against the server.
  • Macintosh Manager clients cannot log in properly.
  • Managed Mac OS X Clients cannot log in properly.
  • Clients cannot locate home directories on the server.
  • Users cannot open web sites using virtual domains from web clients.
  • Failures connecting to the mail server.



How to change the IP address

The ChangeIPAddress script can assist in changing the IP address of Mac OS X Server. Follow the basic or advanced steps below, as appropriate for your configuration. First, review all of the following notes.



Important Notes:

    1. If the server is a Password Server which is not the Directory Service server, additional steps are required which are not covered in this document.

    2. If DNS records exist for the Mac OS X Server in question on associated DNS Servers, you must update any DNS records with the new IP address the server will have before running this script.

    3. This script will not change the hostname of any server. Do not change the hostname of a Password Server. The IPAddressChange script will not assist if the hostname has been changed.

    4. At the server, check the Network pane of System Preference to see if any DNS server addresses are specified. If there are any, beware that these settings must be updated manually (if necessary). The script will not change the DNS server settings.

    5. If you have NetInfo clones of the network domain and you run the script on the NetInfo master / Directory Service server, you should use the "-clones" option. This will cause the script to stop and wait for the modified NetInfo data to be copied to the clone server. The time you need to wait will depend on the size of the data, the number of clones and the speed of the network connection to the clone. The size of the data will be shown by the script when the "-clones" option is used. Details about this can be found in the Advanced section below.

    6. (If you do not have NetInfo clones on your network, this item can be safely ignored.) If you run the script on a NetInfo clone of the network domain you will see the warning message, "Can't write directory: No writes allowed: all objects are read-only". Since the clone's version of the NetInfo database is read only, no changes need be made on the clone's version. You will need to manually edit the netinfo domain and update the IP Address in the /machines/<clones_hostname> entry in NetInfo for this clone so that the master knows this clone system's new IP address. To update the IP address of the clone server, edit the IP address of the clone using NetInfo Manager or a command line tool such as nicl. If you do not make this change, the master will not have the correct IP address of the clone in its database and the clone will never be updated with changes.



Basic Instructions

Please follow these instructions if your server is a standalone server, or if it is a NetInfo master or NetInfo child configuration that is not excluded by the "important notes" above. If your computer is the netinfo master / Directory Service server and there are NetInfo clones, use the Advanced instructions found below. Follow these steps:

 

    1. Log in locally at the server as the root user. By default, the root user is enabled during the Setup Assistant in Mac OS X Server and has the same password of the primary Administrator (though they won't match of either has been subsequently changed). For more information on the root user and password, see About the root user and how to enable it.

    2. Download the IPAddessChange script. If the target computer cannot connect to the Internet, copy it to the target computer using a piece of removable media (such as burning a CD at another computer, or using a FireWire hard disk).

    3. Stop all work being done by the server. This includes having all clients log out, quitting any applications that are active on the server, and stopping all services that the server is offering.

    4. Double-click the "ChangeIPAddressV1.0.dmg" disk image. It will open (mount) and appear in the Finder as a disk.

    5. Open the mounted image, and double-click the ChangeIPAddress.command. This should cause Terminal to open.
    Note: Terminal will not open if it has been moved out of the Utilities folder. If it does not open, place Terminal back at /Applications/Utilities/.

    6. Follow the prompts offered in Terminal.
    Note: The Old IPAddress is the address given in Setup Assistant, before the IP Address was changed.

 

The last step of the script will restart the server, and normal operation should be restored.


Advanced instructions

Follow these steps if the Server in question is the netinfo master / Directory Service server and there are NetInfo clones:

    1. Log in locally at the server as the root user. If you need help with this step, see Mac OS X: About the root User and How to Enable It.

    2. Download the IPAddessChange script. If the target computer cannot connect to the Internet, copy it to the target computer using a piece of removable media (such as burning a CD at another computer, or using a FireWire hard disk).

    3. Stop all work being done by the server. This includes having all clients log out, quitting any applications that are active on the server, and stopping all services that the server is offering.

    4. Double-click the "ChangeIPAddressV1.0.dmg" disk image to mount it.

    5. Open the Terminal (/Applications/Utilities/).

    6. Type in the pathname of the ChangeIPAddress script, followed by the -clones flag. In most cases, that means you should type this:

    /Volumes/ChangeIPAddressV1.0/ChangeIPAddress.command -clones

    7. Press Return, and follow the prompts offered in Terminal.

 

The last step of the script will restart the server, and normal operation should be restored.


Additional Information

Additional information

This list summarizes the features of the script:

  • All changes are optional.
  • Must be run as the root user.
  • Backs up all changed files and NetInfo databases.
  • May be run interactively or unattended.
  • Changes the computer's IP address.
  • Changes the router address.
  • Changes the subnet mask.
  • Will not update DNS entries.
  • Checks for valid IP address input format.
  • Restart required for changes to take effect.
  • Asks if you want to restart.
  • Option to stop and wait for clones to be updated.
  • Warns you if the server is a NetInfo clone, reminds you to change IP on the master.
  • You can use the -help flag to learn more about script options.
Last Modified: Jul 11, 2012
Helpful?
Yes
No
  • Last Modified: Jul 11, 2012
  • Article: HT2695
  • Views:

    3295
  • Rating:
    • 20.0

    (1 Responses)

Additional Product Support Information

Start a Discussion
in Apple Support Communities
See all questions on this article See all questions I have asked