Skip Navigation Links | |
Exit Print View | |
Oracle Solaris Administration: Network Interfaces and Network Virtualization Oracle Solaris 11 Express 11/10 |
2. NWAM Configuration and Administration (Overview)
Overview of NWAM Configuration
Description of the Automatic and User NCPs
Description of a Location Profile
Property Values of System-Defined Locations
How NWAM Profiles Are Activated
Location Activation Selection Criteria
Using the nwamadm Command to Administer Profiles
Description of the NWAM Policy Engine Daemon (nwamd)
Description of the NWAM Repository Daemon (netcfgd)
SMF Network Services and the NWAM Process
Refresh and Restart Behavior of the NWAM Service
Authorizations and Profiles That Are Related to NWAM
Authorizations That Are Required to Use the NWAM User Interfaces
3. NWAM Profile Configuration (Tasks)
4. NWAM Profile Administration (Tasks)
5. About the NWAM Graphical User Interface
Part II Administering Single Interfaces
6. Overview of the Networking Stack
7. Datalink Configuration and Administration
8. Configuring an IP Interface
9. Configuring Wireless Interface Communications on Oracle Solaris
Part III Administering Interface Groups
11. Administering Link Aggregations
Part IV Network Virtualization and Resource Management
15. Introducing Network Virtualization and Resource Control (Overview)
16. Planning for Network Virtualization and Resource Control
17. Configuring Virtual Networks (Tasks)
18. Using Link Protection in Virtualized Environments
19. Managing Network Resources
The nwamcfg command, which is described in the nwamcfg(1M) man page, is used to configure properties and values of network profiles.
You can use the nwamcfg command to perform the following tasks:
Create or destroy a user-defined profile.
Note - You cannot create or destroy a system-defined profile.
List all of the profiles that exist on a system and their property values.
List all of the property values and resources for a specified profile.
Display each property that is associated with a profile.
Set or modify one or all of the properties of a specified profile.
Export the current configuration for a user-defined profile to standard output or a file.
Note - You cannot export a system-defined profile.
Delete any changes that were made to a profile and revert to the previous configuration for that profile.
Verify that a profile has a valid configuration.
You can use the nwamcfg user interface in interactive mode, command-line mode, or command-file mode. Because the nwamcfg command is hierarchical, it more easily understood when used in the interactive mode.
The concept of a scope is used for the nwamcfg command. When using the command interactively, the scope you are in at any given time depends on the profile type and the task you are performing. When you type the nwamcfg command in a terminal window, a prompt is displayed at the global scope.
From here, you can use the select or create subcommands to view, modify, or create the following top-level profiles:
NCPs
Locations
ENMs
Known WLANs
Before creating or selecting a profile, the nwamcfg interactive prompt is displayed with the following form:
nwamcfg>
After you have created or selected a profile, the nwamcfg interactive prompt is displayed as follows:
nwamcfg:profile-type:profile-name>
Note - In command-line mode, you must type the complete command on a single line. Changes that you make to a selected profile by using the nwamcfg command in command-line mode are committed to the persistent repository as soon as you finish typing the command.
For step-by-step instructions on using the nwamcfg command, see Chapter 3, NWAM Profile Configuration (Tasks). For more information about using the nwamcfg command, see the nwamcfg(1M) man page.
Selecting or creating a top-level profile while working in the nwamcfg interactive mode results in a command prompt that is displayed in the profile scope for Location profiles and ENMs. For example:
nwamcfg> select loc foo nwamcfg:loc:foo>
If an NCP is selected, the command prompt is displayed is in the NCP scope. From the NCP scope, an NCU can be selected or created. Selecting or creating an NCU results in a profile scope prompt for the selected NCU. In this scope, all of the properties that are associated with the currently selected profile can be viewed and set, as shown in the following example where the User NCP was first selected, then an NCU was created in the NCP scope. This action resulted in the profile scope for the newly created NCU. In this scope, the properties of the NCU can be viewed or set:
nwamcfg> select ncp User nwamcfg:ncp:User> create ncu phys net2 Created ncu 'net2'. Walking properties ... activation-mode (manual) [manual|prioritized]>
At any given scope, the command prompt indicates the currently selected profile. Any changes that you make to the profile in this scope can be committed, meaning the changes are saved to the persistent repository. Changes are implicitly committed upon exiting the scope. If you do not want to commit the changes that you made to the selected profile, you can revert to the last committed state for that profile. Doing this action reverts any changes that you made to the profile at that level. The revert and cancel subcommands work similarly.
In command-line mode, any subcommands that affect a selected profile or property must be performed in the particular scope that the selected profile or property exists. For example, to obtain the value of a property of an NCU, you would use the get subcommand in the scope of that particular NCU. When you are in the nwamcfg interactive mode, it is fairly easy to understand the syntax to use for this command. However, in command-line mode, the syntax might be less obvious.
For example, to obtain the value of a property “foo” which is an attribute of an NCU called “myncu” in the User NCP, you would use the following syntax:
$ nwamcfg "select ncp User; select ncu ip nyncu; get foo"
In this example, note the following information:
Each scope is separated by a semicolon.
The select subcommand is issued at each scope, once at the global scope and once at the profile scope.
The get subcommand is used within the scope in which the property “foo” exists.
Straight quotation marks are required to prevent the shell from interpreting semicolons.
In command-file mode, configuration information is taken from a file. The export subcommand is used to produce this file. The configuration can then be printed to standard output or the -f option can be used to specify an output file. The export subcommand can be used interactively also. For more information, see nwamcfg Supported Subcommands.
The following nwamcfg subcommands are supported in interactive and command-line mode. Note that certain subcommands have different semantics within each scope. If a subcommand cannot be used in a certain mode, it has been noted in the subcommand's description.
cancel
Ends the current profile specification without committing the current changes to persistent storage, then proceeds to the previous scope, which is one level higher.
clear prop-name
Clears the value for the specified property.
commit
Commits the current profile to persistent storage. A configuration must be correct to be committed. Therefore, this operation automatically performs a verify 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.
create [ -t template ] object-type [ class ] object-name
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.
destroy -a
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 destroyed profile cannot be reverted. |
end
Ends the current profile specification and proceeds to the previous scope, which is one level higher. The current profile is verified and committed before ending the edit operation. 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. Or, you can remain in the current scope and continue editing the profile.
exit
Exits the nwamcfg interactive session. The current profile is verified and committed before ending the current session. 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. Or, you can remain in the current scope and continue editing the profile.
export [ -d ] [- f output-file ] [ object-type [ class ] object-name ]
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.
Note - System-defined profiles, including the Automatic NCP and the Automatic, NoNet, and Legacy locations, cannot be exported.
get [ -V ] prop-name
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.
help [ subcommand ]
Displays general help or help about a specific subject.
list [-a] [object-type [ class ] object-name ]
Lists all profiles, property-value pairs and resources that will be used at the current or specified scope. If the -a option is specified, all properties are listed, including those that will be ignored, based on current settings.
revert
Deletes any current changes that were made to a profile, then reverts to the values from persistent storage.
select object-type [ class ] object-name
Selects the object that is specified.
set prop-name=value
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 multi-valued properties 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.
verify
Verifies that the current, in-memory profile or object has a valid configuration.
walkprop [-a]
“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. If a given property is used, based on the previously specified values, it is not displayed.
When used, the -a option iterates all available properties for the specified profile or object.
The delimiter for multi-valued properties 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.
Note - This subcommand is meaningful when used in interactive mode only.
For task-related information, see Chapter 3, NWAM Profile Configuration (Tasks).