Configuring and Administering Network Components in Oracle® Solaris 11.2

Exit Print View

Updated: September 2014
 
 

Setting Property Values for a Profile by Using the walkprop Subcommand

Use the walkprop subcommand to interactively view and change individual property values for a profile. After initiating the interactive session, typing the walkprop subcommand enables you to display the name and current value for each of the properties of the profile, one property at a time. As you view the various properties, you can set or change the current or default value, as desired.


Note -  The walkprop subcommand is meant to be used in the interactive mode only.

How to "Walk" and Set Property Values for a Given Profile

The following procedure describes how to use the walkprop subcommand to interactively view and change property values for a given profile. As shown in the following examples, when you use the walkprop subcommand to set the properties of a profile, you do not have to use the set subcommand.

  1. Initiate the netcfg interactive session.
    $ netcfg
    netcfg>
    
  2. Select the profile for which you want to view and change properties.

    In the following example, a Location named test-loc is selected:

    netcfg> select loc test-loc
    netcfg:loc:test-loc>
  3. Type the walkprop subcommand to start the walk.

    In the following example, after the walkprop subcommand is issued, the first property that is displayed is the activatation-mode property. Note the default value of the property, which is currently set to manual (shown in parentheses).

    netcfg:loc:test-loc> walkprop
    activation-mode (manual) [manual|conditional-any|conditional-all]>
    
  4. To modify a property's value, type the new value at interactive prompt, then press Return.

    For example, you would change the activation-mode property for the Location from manual to conditional-all as follows:

    netcfg:loc:test-loc> walkprop
    activation-mode (manual) [manual|conditional-any|conditional-all]> conditional-all

    Pressing Return saves the current setting and walks the next property.

  5. Repeat the walk process until all of the properties for the profile have been displayed, making modifications as needed, per the instructions in Step 4.
    netcfg:loc:test-loc> walkprop
    activation-mode (manual) [manual|conditional-any|conditional-all]> conditional-all
    conditions> advertised-domain is example.com
    nameservices (dns) [dns|files|nis|ldap]>
    nameservices-config-file ("/etc/nsswitch.dns")>
    dns-nameservice-configsrc (dhcp) [manual|dhcp]>
    nfsv4-domain>
    ipfilter-config-file>
    ipfilter-v6-config-file>
    ipnat-config-file>
    ippool-config-file>
    ike-config-file>
    ikev2-confg-file>
    ipsecpolicy-config-file>

    Pressing Return without making any changes to a property retains the existing default value and then advances the walk to the next property.


    Note -  Only the relevant properties for a given profile are displayed, as described in How to Create a Location Interactively.
  6. List the current default property values for the profile. For example:
    netcfg:loc:test-loc> list
    loc:test-loc
    	activation-mode 			conditional-all
    	conditions 				 "advertised-domain is example.com"
    	enabled 					false
    	nameservices 			   dns
    	nameservices-config-file    "/etc/nsswitch.dns"
    	dns-nameservice-configsrc   dhcp

    Note that in the previous output, the activation-mode property is now set to conditional-all.

  7. Exit the interactive session to commit the changes.
    netcfg:loc:test-loc> exit
    Committed changes