nimadapters Command
Purpose
Defines Network Installation Management (NIM) secondary adapter definitions from a stanza file.
Syntax
nimadapters {-p | -d | -r } -f SecondaryAdapterFileName adapter_def_name
or
nimadapters {-p | -d | -r }-a client=Client [-a info=AttributeList] adapter_def_name
Description
Secondary Adapters File Rules
The format of the secondary adapters file must comply with the following rules:
- After the stanza header, follow attribute lines of the form: Attribute = Value
- If you define the value of an attribute multiple times within the same stanza, only the last definition is used.
- If you use an invalid attribute keyword, that attribute definition is ignored.
- Each line of the file can have only one header or attribute definition.
- More than one stanza can exist in a definition file for each machine host name.
- Each stanza for a machine host name represents a secondary adapter definition on that NIM client. No two secondary adapter definitions for the same machine host name can have the same location or interface_name. There should be only one definition per adapter or interface on a given NIM client.
- If the stanza header entry is the keyword default, this specifies to use that stanza for the purpose of defining default values.
- You can specify a default value for any secondary adapter attribute. However, the netaddr and secondary_hostname attribute must be unique. Also, the location and interface_name must be unique on a NIM client.
- If you do not specify an attribute for a secondary adapter but define a default value, 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 # character.
- Tab characters and spaces are ignored when parsing the definition file for header and attribute keywords and values.
Secondary Adapter File Keywords
The secondary adapter file uses the following keywords to specify machine attributes:
Required Attributes
- machine_type = secondary | etherchannel | install
- Specifying the machine_type attribute as secondary clearly distinguishes
the nimadapters input from nimdef input. If a secondary adapters file
is mistakenly passed to the nimdef command,
the error can be easily detected. Stanzas with a machine_type of
install
will be ignored. - netaddr
- Specifies the network address for the secondary adapter.
- network_type = en | et | sn | ml | vi
- Specifies the type of network interface, which can be one of en, et, sn, ml, or vi. This attribute replaces the deprecated network_type attribute.
- subnet_mask
- Specifies the subnet mask used by the secondary adapter.
Optional Attributes
- adapter_attributes
- Blank-separated list of physical adapter attributes and values (for example, "Attribute1=Value1 Attribute2=Value2"). To see the list of attributes that can be set for the requested physical adapter, run the command lsattr -E -l AdapterName.
- interface_attributes
- Blank-separated list of interface attributes and values (for example, "Attribute1=Value1 Attribute2=Value2"). To see the list of attributes that can be set for the requested interface, run the command lsattr -E -l InterfaceName. This attribute replaces the attributes attribute.
- cable_type
- Specifies the cable type (optional if network_type is en or et).
- comments
- Specifies a comment to include in the secondary adapter definition. Enclose the comment string in double quotes (").
- interface_name
- Specifies the name of the network interface for the secondary
adapter (for example, en1, sn0, ml0). Do not specify both location
and interface_name. Note: The interface_name must be consistent with the interface_type.
- location
- Specifies the physical location of the adapter corresponding to
this network interface. Do not specify both location and interface_name. Note: Except for the multilink pseudo-device, use of the location is highly recommended. If the location is not specified and the user adds multiple adapters or adds an adapter at the same time that the operating system is reinstalled, the adapter and network interface names might be reassigned by the operating system in unexpected ways.
- multiple_physloc
- This attribute can be used with etherchannel or VIPA stanzas to specify the physical adapters to associate with the interface.
- media_speed
- Specifies the media speed (optional if network_type is en or et).
- secondary_hostname
- Host name to save in the /etc/hosts file with the netaddr attribute. This host name will not be set using the hostname command or uname -S command.
- bos_preconfig
- Specifies that the tunchange command is to change the value
of tuning parameters. With the bos_preconfig attribute, you
can change tunable parameters that have been set by the /usr/lpp/bos.sysmgt/nim/methods/c_cfgadptrs script
with default values. The bos_preconfig attribute is used for
the nim -o bos_inst command. For more information about the
valid stanza and the respected stanza commands for tunable values,
see the tunchange command. The format for the bos_preconfig attribute is as follows:
bos_preconfig="tunchange -f nextboot -t Stanza [ -o tunable=value ... ]"
Requirement: You must restart the system in order for any new setting you made using the bos_preconfig attribute to take effect. - cust_preconfig
- Specifies that the vmo command is to change the value of
tuning parameters. With the cust_preconfig attribute, you can
change tunable parameters that have been set by the /usr/lpp/bos.sysmgt/nim/methods/c_cfgadptrs script
with default values. The cust_preconfig attribute is used for
the nim -o cust command. For more information about valid tunable
parameters, see the vmo command. The format for the cust_preconfig attribute is as follows:
cust_preconfig="vmo -r [ -o tunable=value ... ]"
Note: You must restart the system to use the cust_preconfig attribute to set tunable parameters. - route
- Specifies the route value to be added into network routing tables.
You must specify the following values, or leave a blank space for
any value that you do not want to specify:
- Destination IP
- The host or network for directing the route to. Specify the value as a numeric address.
- Destination subnet mask
- The mask for determining which network the destination IP belongs to. Specify the value as a numeric address.
- Gateway IP
- The network to which the packets are sent. Specify the value as a numeric address.
For values that do not apply, you can leave it as blank but they still must be separated by a double colon as in the following example:route="DestHostA::MaskHostA::GatewayHostA, DestHostB::MaskHostB::GatewayHostB, ..."
When you add the route attribute, using the nimadapters command with the -a info flag, you must separate the value for route with a double colon, and you must separate each additional set of three values with a space.route="1.2.3.4::::5.6.7.8"
Secondary Adapter File Stanza Errors
- The host name that was used in the stanza header for the definition cannot be resolved.
- A required attribute is missing.
- An invalid value was specified for an attribute.
- An attribute mismatch occurs. For example, if the interface_type is not en or et, you cannot specify cable_type=bnc or media_speed=1000_Full_Duplex.
- The stanza contains both a location attribute and an interface_name attribute.
- Secondary adapter definitions occur multiple times for the same adapter location and the same host name.
- Secondary adapter definitions occur multiple times for the same interface_name and the same host name.
If a secondary adapter stanza is incorrect, the errors are reported, the stanza is ignored, and the following input is processed without regard to the incorrect stanza.
Example Secondary Adapter File
# Set default values.
default:
machine_type = secondary
subnet_mask = 255.255.240.0
network_type = en
media_speed = 100_Full_Duplex
# Define the machine "lab1"
# Take all defaults and specify 2 additional attributes.
# Unlike the case of the client definitions that are input to the
# nimdef command, the secondary adapter definition includes at least
# one required field that cannot be defaulted.
lab1:
netaddr = 9.53.153.233
location = P2-I1/E1
# Change the default "media_speed" attribute.
default:
media_speed = 100_Half_Duplex
# define the machine "test1"
# Take all defaults and include a comment.
test1:
comments = "This machine is a test machine."
# define a machine with a VIPA interface that uses interfaces en2 and en3.
lab2:
machine_type = secondary
interface_type = vi
interface_name = vi0
netaddr = 9.53.153.235
subnet_mask = 255.255.255.0
secondary_hostname = lab3
interface_attributes = "interface_names=en2,en3"
# define a machine with an etherchannel adapter that uses the adapters at
# the following location codes P1-I4/E1 and P1/E1
lab4:
machine_type = etherchannel
interface_type = en
interface_name = en2
netaddr = 9.53.153.237
subnet_mask = 255.255.255.0
multiple_physloc = P1-I4/E1,P1/E1
# define a machine with an etherchannel adapter that uses the
# ent2 and ent3 adapters and uses mode 8023ad.
lab6:
machine_type = etherchannel
interface_type = en
interface_name = en2
netaddr = 9.53.153.239
subnet_mask = 255.255.255.0
adapter_attributes = "adapter_names=ent2,ent3 mode=8023ad"
Flags
Item | Description |
---|---|
-a | Assigns the following attribute=value pairs:
|
-d | Defines secondary adapters. A Client.adapter file is created in the adapter_def location for each valid secondary adapter definition. If the nimadapters command encounters existing secondary adapter definitions for a NIM client, the existing definitions are replaced. |
-f | SecondaryAdapterFileName Specifies the name of the secondary adapter file. |
-p | Displays a preview operation to identify any
errors. This flag processes the secondary adapter file or info attribute
but does not add adapter definitions to the NIM environment. The
preview shows the following:
|
-r | Removes the secondary adapter definitions of a specific client or all the clients listed in a secondary adapter stanza file. If the client attribute or secondary adapter stanza file are not specified, then all the secondary adapter definitions in the adapter_def resource will be removed. |
Parameters
Item | Description |
---|---|
adapter_def | This parameter is required to run the nimadapters command. Specifies the adapter_def NIM resource that is the directory containing secondary adapter definition files. An adapter_def resource must be defined using the nim -o define operation before the adapter_def can be used with the nimadapters command. |
Exit Status
- 0
- The command completed successfully.
- >0
- An error occurred.
Security
Access Control: You must have root authority to run the nimadapters command.
Attention RBAC users and Trusted AIX® users: This command can perform privileged operations. Only privileged users can run privileged operations. For more information about authorizations and privileges, see Privileged Command Database in Security. For a list of privileges and the authorizations associated with this command, see the lssecattr command or the getcmdattr subcommand.
Examples
- To add the NIM secondary adapters described in the secondary adapters
definition file secondary_adapters.defs to the my_adapter_def resource,
type:
nimadapters -d -f secondary_adapters.defs my_adapter_def
- To preview the client definition file secondary_adapters.defs,
type:
nimadapters -p -f secondary_adapters.defs my_adapter_def
- To define a NIM secondary adapter for a client called pilsner,
type:
nimadapters -d \ -a info="en,P2-I1/E1,n/a,bnc,1000_Full_Duplex,9.53.153.233,255.255.254.0,n/a,n/a,n/a,n/a,n/a" \ -a client=pilsner my_adapter_def
- To remove the NIM secondary adapter definitions for a client called
pilsner from the my_adapter_def resource, type:
nimadapters -r -a client=pilsner my_adapter_def
- To remove the NIM secondary adapter definitions for clients defined
in the file secondary_adapters.defs, type:
nimadapters -r -f secondary_adapters.defs my_adapter_def
- To remove all the NIM secondary adapter definitions from the my_adapter_def
resource, type:
nimadapters -r my_adapter_def
Files
Item | Description |
---|---|
/usr/sbin/nimadapters | Contains the nimadapters command. |