Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
10.  Administering DHCP (Task) Moving Configuration Data Between DHCP Servers (Task Map)  Previous   Contents   Next 
   
 

How to Export Data From a DHCP Server (DHCP Manager)

  1. Become superuser on the server from which you want to move or copy data.

  2. Choose Export Data on the Service menu.

    The Export Data wizard opens as shown in Figure 10-20.

  3. Answer the wizard's prompts.

    If you have difficulty, click Help for detailed information about the prompts.

  4. Move the export file to a file system that is accessible to the DHCP server to which you want to move the data.

    Import the data as described in "How to Import Data On a DHCP Server (DHCP Manager)".

How to Import Data On a DHCP Server (DHCP Manager)

  1. Become superuser on the server to which you want to move data that you previously exported from a DHCP server.

  2. In DHCP Manager, choose Import Data from the Service menu.

    The Import Data Wizard opens, as shown in Figure 10-21.

  3. Answer the wizard's prompts.

    If you have difficulty, click Help for detailed information about the prompts.

How to Modify Imported DHCP Data (DHCP Manager)

  1. Become superuser on the server to which you imported data.

  2. Examine imported data for network-specific information that needs modification.

    For example, if you moved networks, you must open the Addresses tab and change the owning server of addresses in the imported networks. You might also need to open the Macros tab to specify the correct domain names for NIS, NIS+ or DNS in the macros that specify them.

  3. Open the Addresses tab and select a network that you imported.

  4. To select all the addresses, click the first address, press and hold the Shift key, and click the last address.

  5. From the Edit menu, choose Properties.

    The Modify Multiple Addresses dialog box opens.

  6. At the Managing Server prompt, select the new server's name.

  7. At the Configuration Macro prompt, select the macro that should be used for all clients on this network.

  8. Click OK.

  9. Open the Macros tab.

  10. Use the Find facility at the bottom of the window to locate the options that are likely to need modified values.

    DNSdmain, DNSserv, NISservs, NIS+serv, and NISdmain are examples of options that might need modification on the new server.

  11. When you locate an option that needs to be changed, select the macro name and choose Properties from the Edit menu and change its value.

How to Export Data From a DHCP Server (dhcpconfig -X)

  1. Become superuser on the server from which you want to move or copy data.

  2. Type a command of the following format:

    # /usr/sbin/dhcpconfig -X filename -a network-addresses -m macros -o options

    where filename is the full path name you want to use to store the compressed exported data. You can use the keyword ALL with the command options to export all the networks, macros, or options. For example:

    # /usr/sbin/dhcpconfig -X dhcp1065_data -a ALL -m ALL -o ALL

    Alternatively, you can specify particular network addresses, macros, and configuration options in comma-separated lists. For example:

    # /usr/sbin/dhcpconfig -X dhcp1065_data -a 10.63.0.0,10.62.0.0 \
    -m 10.63.0.0,10.62.0.0,SUNW.Ultra-5_10 -o Sterm

    See the dhcpconfig man page for more information about the dhcpconfig command.

  3. Move the file that contains the exported data to a location that is accessible to the server to which you want to move the data.

    Import the data as described in "How to Import Data on a DHCP Server (dhcpconfig -I)".

How to Import Data on a DHCP Server (dhcpconfig -I)

  1. Become superuser on the server to which you want to import the data.

  2. Type a command of the following format:
    # /usr/sbin/dhcpconfig -I filename

    where filename is the name of the file that contains the data exported from the first server.

    Be sure to modify the imported data as described in "How to Modify Imported DHCP Data (pntadm, dhtadm)"

How to Modify Imported DHCP Data (pntadm, dhtadm)

  1. Become superuser on the server to which you imported data.

  2. Examine the network tables for data that needs to be modified.

    If you moved networks, use pntadm -P network_address to print out the network tables for the networks you moved.

  3. Use the pntadm command to modify IP address information.

    You might need to change the owning server and the configuration macro used for imported addresses. For example, to change the owning server (10.60.3.4) and macro (dhcpsrv-1060) for address 10.63.0.2, you would use the following command:

    pntadm -M 10.63.0.2 -s 10.60.3.4 -m dhcpsrv-1060 10.60.0.0

    If you have a large number of addresses, you should create a script file that contains commands to modify each address, and then execute the script with the pntadm -B command, which runs pntadm in batch mode. See the pntadm man page.

  4. Examine the dhcptab macros for options with values that need modification.

    Use dhtadm -P to print the entire dhcptab, and use grep or some other tool to search for particular options or values that you might want to change.

  5. Use the dhtadm -M command to modify options in macros if necessary.

    For example, you might need to modify some macros to specify the correct domain names and servers for NIS, NIS+ or DNS. For example, the following command changes the values of DNSdmain and DNSserv in the macro mymacro:

    dhtadm -M -m mymacro -e 'DNSserv=dnssrv2:DNSdmain=example.net'

 
 
 
  Previous   Contents   Next