|Skip Navigation Links|
|Exit Print View|
|man pages section 1M: System Administration Commands Oracle Solaris 11 Express 11/10|
- administer network configuration profiles
nwamadm enable [ -p profile-type ] [ -c ncu-class ] profile-name
nwamadm disable [ -p profile-type ] [ -c ncu-class ] profile-name
nwamadm list [ -x ] [ -p profile-type ] [ -c ncu-class ] [ profile-name ]
nwamadm scan-wifi linkname
nwamadm select-wifi linkname
The nwamadm help utility is used to administer NWAM profiles and interact with the NWAM daemon.
There are three types of NWAM profiles: Network Configuration Profiles (NCPs), Locations, and External Network Modifiers (ENMs).
At any given time, there is one active NCP and one active Location on a system. Enabling a different NCP or Location (with activation-mode manual) will implicitly disable the current active NCP or Location. The current Location (if its activation-mode is manual) can also be disabled, though the effect of this will be to “turn off” some aspects of the system's networking capabilities, such as name services. Explicitly disabling an NCP is not permitted, as that would effectively shut down the basic network connectivity of the system. An NCP is only disabled implicitly when a different NCP is enabled.
Conversely, there can be zero or more active ENMs at any given time. Thus enabling or disabling one ENM has no effect on other active ENMs.
Enabling and disabling of individual NCUs is also allowed; the specified NCU must be part of the currently active NCP, and must have its activation mode set to manual. If an NCU class is not specified, all NCUs (one link and/or one interface) with the given name will be enabled or disabled.
Enabling and disabling of objects is performed asynchronously. Thus, the request to enable or disable can succeed, while the action itself fails. A failure of this sort will be reflected in the object state; maintenance state indicates that the last action taken failed.
The following subcommands are supported:
Enable the specified profile. If the profile name is not unique, the profile type must be specified to identify the profile to be enabled. If the profile type is NCU and the name is not unique (that is, there is both a link and interface NCU with the same name), both NCUs will be enabled, unless the -c option is used to specify the NCU class. Profile type must be one of ncp, ncu, loc, or enm; NCU class must be one of phys or ip.
Disable the specified profile. If the profile name is not unique, the profile type must be specified to identify the profile to be disabled. If the profile type is NCU and the name is not unique (that is, there is both a link and interface NCU with the same name), both NCUs will be disabled, unless the -c option is used to specify the NCU class. Profile type must be one of ncu, loc, or enm; NCU class must be one of phys or ip.
List all available profiles and their current state. If a specific profile is specified by name, list only the current state of that profile. If the profile name is not unique, all profiles with the given name will be listed; or the profile type and/or NCU class can be included to identify a specific profile. If only a type is provided, list all profiles of that type. Listing the active NCP will include the NCUs that make up that NCP.
Possible state values are:
A manually-activated profile that has not been activated.
A conditionally- or system-activated profile that has not been activated. It might not be active because its conditions have not been satisfied; or it might be that another profile has more specific conditions that are met and has been activated instead (in the case of profile types that must be activated one at a time, such as Locations).
A conditionally- or system-activated profile whose conditions have been met and that has been successfully activated; or a manually-activated profile that has been successfully activated at the request of the user.
Activation of the profile was attempted, but failed.
The profile represents a valid configuration object for which no action has yet been taken.
The profile represents a configuration object not present in the system; for example, an NCU corresponding to a physical link that has been removed.
Listen for stream of events from the NWAM daemon and display them.
Initiate a wireless scan on link linkname.
Select a wireless network to connect to from scan results on link linkname. Prompts for selection, WiFi key, and so forth, if necessary.
Display a usage message with short descriptions for each subcommand.
Example 1 Enabling a User-Specified Location
The following command enables a user-specified location.
# nwamadm enable -p loc office Disabled loc 'home'. Enabled loc 'office'
Example 2 Disabling an ENM
The following command disables an ENM.
# nwamadm disable -p enm myvpn Disabled enm 'myvpn'.
Example 3 Listing All NCPs
The following command lists all NCPs.
# nwamadm list -xp ncp TYPE PROFILE STATE AUXILIARY STATE ncp Automatic disabled disabled by administrator ncp User online active ncu:phys nge0 online interface/link is up ncu:ip nge0 online interface/link is up ncu:phys nge1 offline interface/link is down ncu:ip nge1 offline conditions for activation are unmet
Example 4 Listing NCUs in Active NCP
The following command lists all ip NCUs in the active NCP.
# nwamadm list -c ip TYPE PROFILE STATE ncu:ip bge0 online ncu:ip bge1 disabled
Example 5 Forcing a Scan
The following command forces a scan on the wireless interface wpi0.
# nwamadm scan-wifi wpi0
Example 6 Selecting a WiFi Network
The following command selects a WiFi network that is broadcasting its ESSID.
# nwamadm select-wifi wpi0 1: ESSID testing BSSID 0:40:96:29:e9:d8 2: ESSID sunwifi BSSID 0:b:e:9f:b5:80 3: ESSID sunwifi BSSID 0:b:e:85:26:c0 4: ESSID sunwifi BSSID 0:b:e:49:2f:80 5: Other Choose WLAN to connect to [1-5]: 2 #
Example 7 Selecting a WiFi Network (Alternative)
The following command selects a WiFi network that is not broadcasting its ESSID.
# nwamadm select-wifi wpi0 1: ESSID testing BSSID 0:40:96:29:e9:d8 2: ESSID sunwifi BSSID 0:b:e:85:26:c0 3: ESSID sunwifi BSSID 0:b:e:9f:b5:80 4: ESSID sunwifi BSSID 0:b:e:49:2f:80 5: ESSID sunwifi BSSID 0:b:e:49:62:c0 6: Other Choose WLAN to connect to [1-6]: 6 Enter WLAN name: oraclewifi 1: None 2: WEP 3: WPA Enter security mode: 2 Enter WLAN key for ESSID oraclewifi: 123456 Enter key slot [1-4]: 1 #
Example 8 Monitoring nwamd
The following command monitors nwamd(1M) when switching locations.
# nwamadm show-events EVENT DESCRIPTION OBJECT_ACTION loc Automatic -> action refresh OBJECT_STATE loc Automatic -> state offline*, method/service executi OBJECT_STATE loc Automatic -> state online, active OBJECT_ACTION loc home -> action refresh OBJECT_ACTION loc NoNet -> action refresh OBJECT_ACTION loc User -> action refresh OBJECT_ACTION loc home -> action enable OBJECT_STATE loc home -> state offline*, method/service executing OBJECT_STATE loc Automatic -> state offline, conditions for activati OBJECT_STATE loc home -> state online, active ^C #
See attributes(5) for descriptions of the following attributes:
See also nwam-manager(1M), available in the JDS/GNOME man page collection.