Configuring and Administering Network Components in Oracle® Solaris 11.2

Exit Print View

Updated: September 2014

Working in the netcfg Interactive Mode

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 profile type and 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 a profile, you must first initiate the netcfg interactive session.

    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

After you have created or selected a profile, 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 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.

For Location profiles and ENMs, selecting or creating a top-level profile while in the netcfg interactive mode results in a command prompt that is displayed at the profile scope, as shown in the following example:

netcfg> select loc test-loc

When an NCP is selected, the command prompt is at the NCP scope. NCUs are selected and created at this scope. Selecting or creating an NCU moves the session to the profile scope for the selected NCP. 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 office NCP is selected, which moves the interactive session into the NCP scope for the NCP, from where an NCU is then selected. This action results in the profile scope for the selected NCU. In this scope, the properties of the NCU can be viewed or set.

$ netcfg
netcfg> select ncp office
netcfg:ncp:office> select ncu phys net2

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, which means 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, you can revert to the previously committed state for that profile. Doing so reverts any changes that you made to the profile at that level. The revert and cancel subcommands work similarly.

For instructions, see Creating NCPs.

Note -  The walkprop subcommand is used to display each property that is associated with a profile individually. This command is meaningful only when used in the interactive mode.