Go to main content

Configuring and Managing Network Components in Oracle® Solaris 11.3

Exit Print View

Updated: December 2017
 
 

Working in the netcfg Command-Line Mode

In command-line mode, any netcfg subcommand that affects a selected profile or property must be performed within the particular scope in which the selected profile or property exists. Selecting a profile in command-line mode is the same as selecting it in the interactive mode. The only difference is that in command-line mode all of the subcommands are written on the command-line. For example, to list the contents of an NCP, you would first select the NCP and then use the list subcommand to display the NCUs for that NCP, as shown in the following example:

$ netcfg "select ncp myncp; list"
ncp:myncp
management-type  reactive
NCUs:
phys  net0
phys  net1
ip    net0
ip    net1

    Refer to the following guidelines when using the netcfg command in this mode:

  • Separate each subcommand by a semi-colon.

  • Specify the select subcommand from the global scope to move to the NCP scope.

  • Specify the list subcommand from the NCP scope to list the properties that are within that scope.

  • Use straight quotation marks to prevent the shell from interpreting the semi-colons.


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 persistent storage when the command is executed.

You can use any of the netcfg subcommands in command-line mode, except for the walkprop subcommand.