Skip Navigation Links | |
Exit Print View | |
Connecting Systems Using Reactive Network Configuration in Oracle Solaris 11.1 Oracle Solaris 11.1 Information Library |
1. Reactive Network Configuration (Overview)
2. Creating and Configuring Reactive Network Profiles (Tasks)
Creating User-Defined Profiles
How to Interactively Create an NCP With NCUs
How to Interactively Create a Location Profile
How to Interactively Create an ENM Profile
How to Interactively Create a Known WLAN Profile
Setting and Changing Property Values for a Profile
How to Interactively Set Property Values
Listing Profile Configuration Information on a System
Listing All of the Profile Configuration Information on a System
Listing All Property Values for a Specific Profile
Obtaining the Value of a Specific Property
How to Interactively Obtain a Single Property Value
Viewing and Changing Property Values by Using the walkprop Subcommand
Enabling and Disabling Profiles
3. Administering Your Reactive Network Configuration (Tasks)
4. Using the Network Administration Graphical User Interface
You can use the netcfg command to select, create, modify, and remove user-defined profiles. For information about the netcfg subcommands, see netcfg Subcommands. The netcfg command can be used in either interactive mode or command-line mode. This command also supports the export of profile configuration information to an output file.
You can use the netcfg command to display profile configuration data, and to display, create, and modify Known WLAN objects, if you have the Console User privileges. These privileges are automatically assigned to any user who is logged in to the system from /dev/console. Users who have the Network Autoconf Admin rights profile can also create and modify all types of reactive network (NWAM-managed) profiles and configuration objects. For more information, see Network Configuration Security and Authorizations.
You can create and configure your profiles in any of the following modes:
Command-line mode
Interactive mode
Command-file mode
When you are in netcfg 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.
The concept of a scope is used for the netcfg command. When you use the command interactively, the scope you are in at any given time depends on the profile type and the task that you are performing. When you type the netcfg command in a terminal window, a prompt is displayed at the global scope.
From the global scope prompt, you can use the select or create subcommands to view, modify, or create the following profile types, which are the top-level profiles:
NCPs
Locations
ENMs
Known WLANs
Before you can create or select a profile, the netcfg interactive prompt is displayed in the following form:
netcfg>
After you have created or selected a profile, the netcfg interactive prompt is displayed as follows:
netcfg:profile-type:profile-name>
You can use the netcfg command in interactive mode to perform the following tasks:
Create a profile.
Select and modify a profile.
Verify that all of the required information about a profile is set and valid.
Commit the changes for a new profile.
Cancel the current profile configuration without committing any changes to persistent storage.
Revert the changes that you made for a profile.
Selecting or creating a top-level profile while working in netcfg interactive mode results in a command prompt that is displayed in the profile scope for Location profiles and ENMs. For example:
netcfg> select loc test-loc netcfg:loc:test-loc>
If an NCP is selected, the command prompt is displayed is 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.
In the following example, the User NCP is first selected, then an NCU is created in the NCP scope. This action results in the profile scope for the newly created NCU. In this scope, the properties of the NCU can be viewed or set.
netcfg> select ncp User netcfg: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 that the changes are saved to the persistent storage. 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.
Note - The walkprop subcommand, which “walks” you through each property that is associated with a profile is meaningful when used in interactive mode. For information about the netcfg subcommands, see netcfg Subcommands.
In command-line mode, any subcommand that affects a selected profile or property must be performed in the particular scope in which the selected profile or property exists. Thus, to obtain the value of a property of an NCU, you would use the get subcommand in the scope of that particular NCU.
For example, to obtain the value of a property ip-version which is an attribute of an NCU called myncu in the User NCP, you would use the following syntax:
$ netcfg "select ncp User; select ncu ip myncu; get ip-version"
In this syntax, note the following:
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 ip-version exists.
Straight quotation marks are required to prevent the shell from interpreting the semicolons.
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 netcfg command in command-line mode are committed to the persistent storage as soon as you finish typing the command.
You can use any of the subcommands listed in netcfg Subcommands in command-line mode except the walkprop subcommand.
In command-file mode, profile configuration information and commands are taken from a file. The commands in the file are same as that in the interactive mode or those that are given by the export subcommand. The export subcommand is used to produce this file. The configuration can then be printed to standard output, or the -f option can also be used to specify an output file. For example, the following command exports the current configuration to a file:
$ netcfg export -f /tmp/nwam.config
To import configuration from a file, type the following command:
$ netcfg -f /tmp/nwam.config
The export subcommand can also be used interactively. For information about how to export profile configuration by using netcfg command-file mode see, Example 3-4.