Go to main content

Configuring and Managing Network Components in Oracle® Solaris 11.4

Exit Print View

Updated: January 2019

Configuring ENMs Interactively

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

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

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.

Note -  The walkprop subcommand is used to display each property that is associated with an ENM. This command is meaningful only when used interactively.

How to Create an ENM Interactively

ENMs enable you to specify when applications or scripts such as a VPN application should perform network configuration.

Note -  The system does not automatically recognize an application for which you might create an ENM. These applications must first be installed and then configured on the system before creating an ENM for them by using the netcfg command.

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.

  1. Initiate the netcfg interactive session.
    $ netcfg
  2. Create the ENM.
    netcfg> create test-enm
    Created enm 'test-enm'.  Walking properties ...
    activation-mode (manual) [manual|conditional-any|conditional-all]>
    fmri> svc:/application/test-enm:default

    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.

  3. (Optional) Display the profile configuration.
    netcfg:enm:test-enm> list
         activation-mode   manual
         enabled           false
         fmri              "svc:/application/test-enm:default"
  4. Verify that the profile configuration is correct.
    netcfg:enm:test-enm> verify
    All properties verified

    The verify subcommand verifies the configuration and notifies you if any required values are missing.

  5. Save the ENM by committing the changes.
    netcfg:enm:test-enm> commit
    Committed changes

    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
  6. Exit the interactive session.
    netcfg> exit