ADC Home > Reference Library > Reference > Mac OS X > Mac OS X Man Pages

 

This document is a Mac OS X manual page. Manual pages are a command-line technology for providing documentation. You can view these manual pages locally using the man(1) command. These manual pages come from many different sources, and thus, have a variety of writing styles.

This manual page is associated with Mac OS X Server. It is not available on standard Mac OS X (client) installations.

For more information about the manual page format, see the manual page for manpages(5).



changeip(8)               BSD System Manager's Manual              changeip(8)

NAME
     changeip -- Change service configuration files with hard-coded IP addresses

SYNOPSIS
     changeip [-v] [-d path] directory-node old-ip new-ip [old-hostname new-hostname]

     changeip -checkhostname

     changeip -h

DESCRIPTION
     changeip is used to update configuration records when a server's IP address or hostname changes.

     In typical usage, this command is used by an administrator to correct affected services when a server's
     network information changes. Preferably, changeip should be invoked before the change is applied. In
     this invocation, the arguments consist of a target directory, the server's current and pending IP
     addresses, and optionally the existing and new host name. Their usage and valid values include

           directory-node  For machines hosting an LDAP directory, this should be /LDAPv3/127.0.0.1.

                           For servers connecting to an external directory, the Open Directory path to the
                           directory node must be used, e.g.  /LDAPv3/192.12.0.43.

                           To manipulate only the local directory, use a dash (-).

                           Depending on the directory, the tool may prompt for administrator credentials to
                           the target directory node.

           old-ip          If the IP address has not yet been changed, this is the existing IP address of
                           the server. If the IP has already been changed, this is the previous address.
                           (This is the value that will be replaced in the server's directory service and
                           relevant configuration files.)

           new-ip          If the IP address has not yet been changed, this is the IP address that will be
                           assigned to the server. If the IP has already been changed, this is the existing
                           IP address. This value will replace old-ip in the machine's configuration.

           old-hostname    As with old-ip, the existing or previous fully qualified domain name ("FQDN" or
                           sometimes "DNS name") for this server. If only the IP address was affected, this
                           argument and the next may be omitted.

           new-hostname    If old-hostname was provided, this argument must also be provided. The machine's
                           fully qualified domain name and related service configuration will be set to this
                           value.

     Once the tool has successfully completed, the administrator must change the machine's network settings
     in the Network Control Panel to match new-ip and immediately reboot the server.

     The second invocation, -checkhostname, provides a diagnostic tool that compares the current IP address
     and hostname to the information returned by DNS.

     The final invocation prints usage information.

     changeip must be run as root.

OPTIONS
     The following options are available:
     -d path      Iterate over the executables in path instead of the default /usr/libexec/changeip.

     -h           Print usage summary and exit.

     -v           Run verbosely, that is with additional diagnostic output.

FILES & FOLDERS
     /usr/sbin/changeip
           -   daemon
     /usr/libexec/changeip/
           -   directory containing service-specific tools

EXAMPLES
     Standard examples can be extrapolated from the above description. One common invocation is to change
     the IP and name of an Open Directory master:
           changeip /LDAPv3/127.0.0.1 192.0.0.12 192.0.1.10 old.example.com new.example.com
     This prepares for changing the address and DNS names of a machine hosting an LDAP master. Note that it
     may still be necessary to change the configuration of machines binding to this master.

     For standalone machines, the above example only needs to replace the directory node:
           changeip - 192.0.0.12 192.0.1.10 old.example.com new.example.com

     As noted above, for machines connecting to another OD master, the master's node path must be used:
           changeip /LDAPv3/192.12.0.43 192.0.0.12 192.0.1.10 old.example.com new.example.com
     Authentication to the directory master will almost certainly be requested.

     It is also possible to leave the host name intact and only change the IP address:
           changeip - 192.0.0.12 192.0.1.10
     Its complement could be used to change only the host names, perhaps because the DNS tables have been
     changed:
           changeip - 192.0.0.12 192.0.0.12 old.example.com new.example.com
     Note how the IP addresses are required, but that they are identical.

DIAGNOSTICS
     The changeip utility exits 0 on success, and >0 if an error occurs.

     changeip must be run as root.  Because changeip modifies system-wide resources, it must be executed by
     the root user.

     Invalid IP Address:  One of the IP address arguments was invalid.

SEE ALSO
     dscl(1), DirectoryServiceAttributes(7), DirectoryService(8), scutil(8)

KNOWN ISSUES
     The script does not perform the actual change of IP address; this is by design.

HISTORY
     A version of changeip has been present in Mac OS X Server since at least version 10.3 (Panther).

Mac OS X Server 10.5           December 12, 2006          Mac OS X Server 10.5

Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.