|Skip Navigation Links|
|Exit Print View|
|Connecting Systems Using Reactive Network Configuration in Oracle Solaris 11.1 Oracle Solaris 11.1 Information Library|
The netcfg command manipulates system network configuration profiles. The netcfg command can be invoked interactively, with an individual subcommand, or by specifying a command file that contains a series of subcommands. The netadm command administers the profiles and also interacts with nwamd by using the subcommands.
The following netcfg subcommands are supported in interactive mode and command-line mode. Note that certain subcommands have different semantics within each scope. If a subcommand cannot be used in a certain mode, the subcommand's description notes that. The subcommands are ordered alphabetically.
Ends the current profile specification without committing the current changes to persistent storage, then proceeds to the previous scope, which is one level higher.
Clears the value for the specified property.
Commits the current profile specification to persistent storage. A configuration must be correct to be committed. Therefore, this operation automatically performs a verify operation on the profile or object as well. The commit operation is attempted automatically upon exiting the current scope by using either the end or exit subcommand.
Creates an in-memory profile with the specified type and name. The -t template option specifies that the new profile be identical to template, where template is the name of an existing profile of the same type. If the -t option is not used, the new profile is created with the default values.
Removes all user-defined profiles from memory and persistent storage.
destroy object-type [ class ] object-name
Removes the specified user-defined profile from memory and persistent storage.
Caution - This operation is immediate and does not need to be committed. A removed profile cannot be reverted.
Ends the current profile specification and proceeds to the previous scope, which is one level higher. The current profile is verified and committed before the edit operation ends. If either the verify or commit operation fails, an error message is displayed. You are then given the opportunity to end the operation without committing the current changes. Alternatively, you can remain in the current scope and continue editing the profile.
Exits the netcfg interactive session. The current profile is verified and committed before the current session ends. If either the verify or commit operation fails, an error message is displayed. You are then given the opportunity to end the session without committing the current changes. Alternatively, you can remain in the current scope and continue editing the profile.
Prints the current configuration at the current or specified scope to standard output or to a file that is specified with the -f option. The -d option generates the destroy -a subcommand as the first line of output. This subcommand produces output in a form that is suitable for use in a command file. For information about how to export and restore profile configuration, see Exporting and Restoring a Profile Configuration.
Note - You cannot export system-defined profiles. System-defined profiles include the Automatic and DefaultFixed NCPs and the Automatic, NoNet, and DefaultFixed locations.
Gets the current, in-memory value of the specified property. By default, both the property name and value are printed. If the -V option is specified, only the property value is printed.
Displays general help or help about a specific subject.
Lists all profiles property-value pairs that are used at the current or specified scope. When listing properties of an object, the default behavior is to only list properties that apply to the specified configuration. That is, if listing an IP NCU for which ipv4-addrsrc is dhcp, the ipv4-addr property is not listed. Including the -a option results in all properties being listed, whether or not they apply to the current settings.
Deletes any current changes that were made to a profile, then reverts to the values from persistent storage.
Selects the object that is specified.
Sets the current, in-memory value of the specified property.
If performed in command-line mode, the change is also committed immediately to persistent storage.
The delimiter for properties with multiple values is a comma (,). If an individual value for a given property contains a comma, it must be preceded it with a backslash (\). Commas within properties that only have a single value are not interpreted as delimiters and do not need to be preceded by a backslash.
Verifies that the current, in-memory profile or object has a valid configuration.
“Walks” each property that is associated with the current profile. For each property, the name and current value are displayed. A prompt is provided to enable you to change the current value.
The delimiter for properties with multiple values is a comma (,). If an individual value for a given property contains a comma, it must be preceded by a backslash (\). Commas within properties that only have a single value are not interpreted as delimiters and do not need to be preceded by a backslash.
By default, only properties that are required based on properties that are already set are walked. If ipv4-addrsrc is set to dhcp, then ipv4-addr is not walked. Including the -a option iterates all available properties for the specified profile or object.
Note - The walkprop subcommand is meaningful when used in interactive mode only.
The following netadm subcommands are supported:
Enables the specified profile. If the profile name is not unique, the profile type must be specified. If the profile type is ncu, and the name is not unique, for example, if both a link and an interface NCU have the same name, both NCUs are enabled, unless the -c option is used to specify the NCU class.
The profile type must be one of the following:
The NCU class must be specified as either phys for link NCU or ip for interface NCU.
Disables the specified profile. If the profile name is not unique, the profile type must be specified to identify the profile that is to be disabled. If the profile type is ncu and the name is not unique, for example, if both a link and an interface ncu have the same name, both NCUs are disabled, unless the -c option is used to specify the NCU class.
The profile type must be one of the following:
The NCU class must be specified as either phys or ip.
Lists all of the available profiles and their current state. If a profile is specified by name, then only the current state of that profile is listed. If the profile name is not unique, all of the profiles with that specified name are listed. Alternatively, the profile type, the NCU class, or both can be included to identify a specific profile. If just the profile type is specified, all of the profiles of that type are listed.
Listing the enabled NCP includes all of the NCUs that make up that NCP.
If the -x option is specified, an expanded description of the auxiliary state of each listed profile is included in the output.
Possible profile auxiliary state values include the following:
Indicates a manually enabled profile that has not been enabled.
Indicates a conditionally enabled or system-enabled profile that has not been enabled. The profile might not be active because its conditions have not been satisfied. Alternatively, the profile might not be active because another profile with more specific conditions that are met has been enabled. This condition applies to profile types that must be enabled one at a time, for example, the Location profile.
Indicates a conditionally enabled or system-enabled profile whose conditions have been met and that has been successfully enabled. Alternatively, it might indicate a manually enabled profile that has been successfully enabled at the request of the user.
Indicates that activation of the profile was attempted, but failed.
Indicates that the profile represents a valid configuration object for which no action has yet been taken.
Indicates that the profile represents a configuration object that is not present on the system. For example, this state could indicate an NCU that corresponds to a physical link that was removed from the system.
Listens for and displays a stream of events from the network management daemon, nwamd.
Initiates a wireless scan on the link that is specified as link-name.
Selects a wireless network to connect to from scan results on the link that is specified as link-name.
Displays a usage message with a short description of each subcommand.