224

To create a static map:

$ sudo serveradmin settings

dhcp:static_maps:_array_id:examplehost/9681BABD-3329-402E-A7AB-F0C3608E231D = create

dhcp:static_maps:_array_id:examplehost/9681BABD-3329-402E-A7AB- F0C3608E231D:ip_address = "1.2.3.4"

dhcp:static_maps:_array_id:examplehost/9681BABD-3329-402E-A7AB- F0C3608E231D:name = "examplehost"

dhcp:static_maps:_array_id:examplehost/9681BABD-3329-402E-A7AB- F0C3608E231D:en_address = "00:30:a1:a2:a1:23"

Control-D

The static map entries are stored in the local NetInfo database in the computers record, so they can also be manipulated with NetInfo tools, such as nidump. (See the nidump man page for details.) For example, the static map created by the servreadmin tool above could be viewed as follows:

$ nidump -r /machines .

{

"name" = ( "machines" ); CHILDREN = (

...

{

"name" = ( "examplehost" );

"en_address" = ( "00:30:a1:a2:a1:23" ); "ip_address" = ( "1.2.3.4" );

"uuid" = ( "9681BABD-3329-402E-A7AB-F0C3608E231D" );

}

...

)

}

List of DHCP serveradmin Commands

You can use the following command with the serveradmin tool to manage DHCP service.

Command

(dhcp:command=)Description

getLogPaths

Determine the location of the DHCP service logs.

Viewing the DHCP Service Log

You can use tail or any other file listing tool to view the contents of the DHCP service log.

To view the latest entries in a log:

$ tail log-file

You can use the serveradmin getLogPaths command to see where the current DHCP log is located.

Chapter 14 Working with Network Services

Page 224
Image 224
Apple Mac OS X Server manual List of Dhcp serveradmin Commands, Viewing the Dhcp Service Log, To create a static map