A Location profile contains properties that define network configuration values that are not directly related to basic link and IP connectivity. Some examples include naming service and IP Filter settings that are applied together, when required. Exactly one Location profile and one NCP must be active on the system at all times.
You create Location profiles by using the netcfg command either interactively or in command-line mode. When you create a Location profile, you set properties for the Location by specifying values that define the particular configuration parameters when that particular Location is enabled. Location properties are categorized by group, where the group signifies a particular class of configuration preferences.
Location properties are also stored in a repository. When a particular Location is enabled, its properties are automatically applied to the running system. Creating and modifying Location profiles also involves setting properties that define when a particular Location is enabled. The properties that you are presented with during the configuration process are based on property values that were previously set.
For a complete description of all of the Location profile properties, including any rules, conditions, and dependencies that might apply when specifying any of these properties, see the netcfg(1M) man page.
The following procedure describes how to create a Location profile. The “walk” process that is performed during the initial profile creation only prompts you for those properties that are applicable, given the values that you entered previously.
$ netcfg netcfg>
In the following example, a Location named office is created:
netcfg> create loc office Created loc 'office'. Walking properties ... activation-mode (manual) [manual|conditional-any|conditional-all]> conditional-any conditions> ncu ip:net0 is active nameservices (dns) [dns|files|nis|ldap]> nameservices-config-file ("/etc/nsswitch.dns")> dns-nameservice-configsrc (dhcp) [manual|dhcp]> nfsv4-domain> ipfilter-config-file> /export/home/test/wifi.ipf.conf ipfilter-v6-config-file> ipnat-config-file> ippool-config-file> ike-config-file> /etc/inet/ike/ikev1.config ikev2-config-file> ipsecpolicy-config-file>
Creating the Location automatically moves you to into the profile scope for the Location.
In this example, the following properties were set:
The activation-mode property was set to conditional-any, which resulted in a command prompt that enabled the conditions for activation to be specified.
The condition for activation of the location was specified as ncu ip:net0 is active.
For the ipfilter-config-file property, the /export/home/test/wifi.ipf.conf file was specified.
For the ike-config-file property, the /etc/inet/ike/ikev1.config file was specified.
For the remaining properties, the default values were accepted by pressing Return.
netcfg:loc:office> list loc:office activation-mode conditional-any conditions "ncu ip:net0 is active" enabled false nameservices dns nameservices-config-file "/etc/nsswitch.dns" dns-nameservice-configsrc dhcp ipfilter-config-file "/export/home/test/wifi.ipf.conf" ike-config-file "/etc/inet/ike/ikev1.config"
netcfg:loc:office> verify All properties verified
The verify subcommand verifies the configuration and notifies you if any required values are missing.
netcfg:loc:office> commit Committed changes
Alternatively, you can use the end subcommand to end the session, which also saves the profile configuration and moves the session to the global scope.
netcfg:loc:office> end Committed changes netcfg>
netcfg> exit