[ Previous |
Next |
Contents |
Glossary |
Home |
Search ]
AIX Version 4.3 Commands Reference, Volume 4
nimdef Command
Purpose
Defines Network Installation Manager (NIM) clients from a stanza file. This command only applies to AIX Version 4.2 or later.
nimdef [ -p | -d | -c ] -f Name
Description
The nimdef command parses a definition stanza file to build the commands required to add NIM client definitions to the NIM environment.
The nimdef command can also create NIM networks and NIM machine groups automatically in the NIM environment to support the new client definitions.
Note: Before using the nimdef command, you must configure the NIM master.
Client Definition File Rules
The format of the client definition file must comply with the following rules:
- After the stanza header, follow attribute lines of the form Attribute = Value.
- If you define an attribute value multiple times within the same stanza, only the last definition is used unless the attribute is machine_group. If you specify multiple machine_group attributes, all are applied to the machine definition.
- If you use an invalid attribute keyword, then that attribute definition is ignored.
- Each line of the file can have only one header or attribute definition.
- Only one stanza may exist in a definition file for each machine hostname.
- If the stanza header entry is the keyword default, this specifies to use it for the purpose of defining default values.
- You can specify a default value for any machine attribute except the machine hostname. If you do not specify an attribute for a machine but define a default value, then the default value is used.
- You can specify and change default values at any location in the definition file. After a default value is set, it applies to all definitions following it.
- To turn off a default value for all following machine definitions, set the attribute value to nothing in a default stanza.
- To turn off a default value for a single machine definition, set the attribute value to nothing in the machine stanza.
- You can include comments in a client definition file. Comments begin with the pound (#) character.
- When parsing the definition file for header/attribute keywords and values, tab characters and spaces are ignored.
Client Definition File Keywords
The client definition file uses the following keywords to specify machine attributes:
Required Attributes
cable_type |
Specifies the cable type of the machine. Required if network_type is ent. |
gateway |
Specifies the hostname or IP address of the default gateway used by the machine. If the machine does not use a gateway, then specify the value 0 (zero) for this attribute. |
machine_type |
Specifies the type of the machine: standalone, diskless, or dataless. |
network_type |
Specifies the type of the machine's network adapter: ent or tok. |
ring_speed |
Specifies the ring speed of the machine. Required if network_type is tok. |
subnet_mask |
Specifies the subnet mask used by the machine. |
Optional Attributes
nim_name |
Specifies the NIM name to use for a machine. Use this attribute if something other than the hostname is used for the NIM name. By default, the NIM name given to a machine is the hostname of the machine with any domain information stripped off. If you use non-unique hostnames in different domains, a conflict occurs because the same NIM name is used for both machines. In such an environment, define this attribute for the affected machine definitions. |
platform |
Specifies the machine hardware platform. If you do not specify this attribute, default is rs6k. |
net_adptr_name |
Specifies the name of the network adapter used by the machine (tok0, ent0, etc.). |
netboot_kernel=NetbootKernelType |
Specifies the type of kernel to use when booting the client over the network. The netboot_kernel values are up or mp. |
ipl_rom_emulation |
Specifies the device to use for IPL ROM emulation (/dev/fd0, /dev/rmt0, etc.). |
primary_interface |
Specifies the hostname used for the original machine definition. Use this attribute if the current stanza is only to define an additional interface to a machine that is defined in the NIM environment. |
master_gateway |
Specifies the gateway that the NIM master uses to reach this machine if this machine is on a different network. This attribute is not necessary if this machine is defined on a network that is already defined in the NIM environment, or if the NIM master network has a default gateway specified. |
machine_group |
Specifies the group or groups to add the machine to when it is defined. |
comment |
Specifies a comment to include in the machine definition. The comment string should be in double quotes ("). |
Client Definition File Stanza Errors
A definition stanza is incorrect under any of the following conditions:
- The hostname used in the stanza header for the definition is unresolvable.
- A required attribute is missing.
- You specify an invalid value for an attribute.
- An attribute mismatch occurs. For example, you can not specify network_type=tok and cable_type=bnc in the same stanza.
- A group-type mismatch occurs. For example, you can not specify a group for a machine if the group includes standalone machines and you specify machine_type=diskless.
- Machine definitions occur mutiple times for the same hostname.
- A machine definition occurs for a machine that is already defined in the NIM environment.
- The primary_interface value in a machine definition does not match the hostname of any defined machine or stanza definition.
- The primary_interface value in a machine definition matches the hostname of another machine definition, but that definition is incorrect.
Sample Client Definition File
# Set default values.
default:
machine_type = standalone
subnet_mask = 255.255.240.0
gateway = gateway1
network_type = tok
ring_speed = 16
platform = rs6k
machine_group = all_machines
# Define the machine "lab1"
# Take all defaults.
lab1:
# Define the machine "lab2"
# Take all defaults and specify 2 additional attributes.
# The machine "lab2" uses IPL ROM emulation, and will be added to
# the machine groups "all_machines" and "lab_machines".
lab2:
ipl_rom_emulation = /dev/fd0
machine_group = lab_machines
# Define the machine "lab3"
# Take all defaults, but do not add the machine to the default
# group.
lab3:
machine_group=
# Define the machine "lab4"
# Take all defaults, but do not add "lab4" to the default group
# "all_machines".
# Instead add it to the groups "lab_machines" and "new_machines".
lab4:
machine_group =
machine_group = lab_machines
machine_group = new_machines
# Change the default "platform" attribute.
default:
platform = rspc
# define the machine "test1"
# Take all defaults and include a comment.
test1:
comment = "This machine is a test machine."
Flags
-c |
Generates commands from a client definition file. This flag processes the definition file and generates the commands to add the definitions. The commands are not invoked but displayed as a KSH script that you can redirect to a file and invoke at a later time. |
-d |
Defines machines from a client definition file. This flag processes the definition file and invokes the commands to add the definitions to the NIM environment. |
-f Name |
Specifies the name of the client definition file. |
-p |
Displays a preview of the client definition file. This flag processes the definition file but does not add machines to the NIM environment. Displays the following:
All complete and valid NIM definition stanzas.
All additional interfaces that will be defined for machines.
All invalid definitions stanzas and the reason for failure.
All new machine groups and the members to add.
All existing machine groups and the members to add.
All network definitions to add to the NIM environment.
The commands to invoke to add each new machine.
The commands to invoke to add each additional machine interface.
The commands to invoke to create new machine groups and add their members.
The commands to invoke to add new members to existing machine groups.
Note: We recommend that you specify the -p flag on a client definition file to verify that all stanzas are correct before using it for adding machines.
|
Exit Status
This command returns the following exit values:
0 |
Successful completion. |
!0 |
An error occurred. |
Security
Access Control: You must have root authority to run this command.
Auditing Events: N/A
Examples
- To preview the client definition file client.defs, enter:
nimdef -p -f client.defs
- To add the NIM clients described in the client definition file client.defs, enter:
nimdef -d -f client.defs
- To create a kshell script called client.add to add the NIM clients described in the client definition file client.defs, enter:
nimdef -c -f client.defs > client.add
Files
/usr/sbin/nimdef |
Contains the nimdef daemon/command. |
Related Information
The lsnim command, nim command, nimclient command, nimconfig command.
[ Previous |
Next |
Contents |
Glossary |
Home |
Search ]