When used interactively, the concept of a scope is used for the netcfg command. When you use the command interactively, the scope that you are in at any given time depends on the particular task that you are performing. When you type the netcfg command by itself in a terminal window, as shown in the following example, a prompt is displayed at the global scope:
$ netcfg netcfg>
To create or select an ENM, first initiate the netcfg interactive session.
From the global scope prompt, you can use the select or create subcommands to view, modify, or create an ENM. After you have created or selected an ENM, the syntax of the netcfg interactive prompt looks similar to the following example:
Use the netcfg command in the interactive mode to perform the following tasks:
Create an ENM.
Select and modify an ENM.
Verify that all of the required information about an ENM is valid.
Commit the changes for a new ENM.
Cancel the current ENM configuration without committing any changes to persistent storage.
Revert the changes that you made for an ENM.
Selecting or creating an ENM while in the interactive mode results in a command prompt that is displayed at the profile scope, as shown in the following example:
netcfg> select test-enm1 netcfg:enm:test-enm1>
At any given scope, the command prompt indicates the currently selected ENM. You can commit any changes that you make to the ENM in this scope, which means the changes are saved to persistent storage. Changes are also implicitly committed upon exiting the scope. If you do not want to commit the changes that you made, you can revert to the previously committed state for the ENM, which reverts any changes that you made to the ENM at that level. The revert and cancel subcommands work similarly.
ENMs enable you to specify when applications or scripts such as a VPN application should perform network configuration.
See the netcfg(8) man page.
Before You Begin
Ensure that your role has the appropriate rights profile to perform this procedure. See Using Rights Profiles to Perform Network Configuration.
$ netcfg netcfg>
netcfg> create test-enm Created enm 'test-enm'. Walking properties ... activation-mode (manual) [manual|conditional-any|conditional-all]> fmri> svc:/application/test-enm:default start> stop> netcfg:enm:test-enm>
Creating the ENM automatically moves you to the profile scope for the ENM and walks each of its properties.
In this example, the following properties are specified for the test-enm ENM:
The activation-mode property, which is set to manual, is accepted by pressing Return. Because this value is set to manual, the conditions property is not made available for setting.
The fmri property is set to svc:/application/test-enm:default.
The start and stop properties are not set for this ENM.
netcfg:enm:test-enm> list enm:test-enm activation-mode manual enabled false fmri "svc:/application/test-enm:default"
netcfg:enm:test-enm> verify All properties verified
The verify subcommand verifies the configuration and notifies you if any required values are missing.
netcfg:enm:test-enm> commit Committed changes netcfg>
The commit subcommand verifies and saves the configuration.
Alternatively, you can use the end subcommand to end the session, which also saves the profile configuration.
netcfg:enm:test-enm> end Committed changes