wificonfig - WLAN configuration
wificonfig [-R root_path] [-i interface] autoconf [wait={n|forever}]
wificonfig [-R root_path] [-i interface] connect profile [wait={n|forever}]
wificonfig [-R root_path] [-i interface] connect essid [wait={n|forever}]
wificonfig [-R root_path] [-i interface] disconnect
wificonfig [-R root_path] [-i interface] getparam [parameter []...]
wificonfig [-R root_path] [-i interface] setparam [parameter=value []...]
wificonfig [-R root_path] [-i interface] restoredef
wificonfig [-R root_path] [-i interface] scan
wificonfig [-R root_path] [-i interface] showstatus
wificonfig [-R root_path] [-i interface] setwepkey 1|2|3|4
wificonfig [-R root_path] createprofile profile [parameter=value []...]
wificonfig [-R root_path] deleteprofile profile1 [profile2 []...]
wificonfig [-R root_path] showprofile [profile]
wificonfig [-R root_path] setprofilewepkey profile 1|2|3|4
wificonfig [-R root_path] getprofileparam profile [parameter []...]
wificonfig [-R root_path] setprofileparam [parameter=value []...]
wificonfig [-R root_path] history
wificonfig [-R root_path] listprefer
wificonfig [-R root_path] removeprefer profile
wificonfig [-R root_path] setprefer profile [n]
wificonfig defines a set of subcommands and parameters to configure WiFi interfaces in the system. A driver may support all parameters or a subset of these parameters.
wificonfig uses rbac(5) to control user access to the interface. Only users with the "solaris.network.wifi.config" authorization can manage a WiFi interface, while only users with "solaris.network.wifi.wep"authorizations can configure the WEP (Wired Equivalent Privacy) key. Other users can only read parameters from the interface. By default, the "solaris.network.wifi.config" and "solaris.network.wifi.wep" authorizations are not granted to any user apart from root.
Wificonfig comes in two classes of forms. The first class, shown as the first set of synopsis combined with the optional interface name, is the subcommands used to a manipulate a particular WiFi network interface. The second class, shown as the second set of synopsis, is used to create and operate on WiFi Configuration Profiles. A Configuration Profile allows the user to pre-specify a set of parameters which can later be applied to a WiFi network interface using the connect or autoconf subcommands.
In the interface subcommands, if the interface is not specified (that is, the -i option is missing), wificonfig selects a random interface from the known WiFi interfaces on the system. If there are multiple WiFi network interfaces on the system, then the selection will be the same over time as long as the number of and names of the WiFi interfaces does not change.
A Configuration Profile can be created for a WLAN by using the createprofile subcommand (see the SUBCOMMANDS section). The actual WLAN may be present or not.
wificonfig also maintains a list of Configuration Profiles called the Preference List. This list makes automatic configuration possible. When the autoconf subcommand is used, wificonfig tries to connect to each pre-configured WLAN according to the order of the Preference List. If the Preference List is empty or none of the WLANs in the Preference List can be found, wificonfig uses its built-in heuristics to automatically configure the interface. (See the autoconf subcommand for the heuristics). A few subcommands (listprefer, setprefer, removeprefer) are defined to manipulate the Preference List.
The following options are supported:
-i interface
-R root_path
The following operand is supported:
profile
The following subcommands are supported:
autoconf [wait={n|forever}]
If the WLANs in the Preference list are available, the user can specify the number of seconds to wait before autoconf returns using the wait option. By default (without the wait option), autoconf returns within 10 seconds. If "forever" or -1 follows the wait option, wificonfig waits until the NIC is successfully connected to the WLAN specified by the profile in the Preference list.
The "solaris.network.wifi.config" authorization is required for this subcommand.
The WiFi device driver can not guarantee to retain the state for the connection when it is not held open. For this reason, it is strongly recommended that the plumb subcommand for ifconfig(1M) is done before the wificonfig autoconf subcommand is given.
connect profile[wait={n|forever}]
connect essid[wait={n|forever}]
If the WLANs in the Preference list are available, the user can specify the number of seconds to wait before connect returns using the wait option. By default (without the wait option), connect trys for 10 seconds. If "forever" or -1 follows the wait option, wificonfig tries until the NIC is successfully connected to the profile or essid that was specified.
The connect subcommand prints one of the following lines depending on whether or not a Configuration Profile was found for the specified name:
Connecting to profile <name> Connecting to essid <name>
The "solaris.network.wifi.config" authorization is required for this subcommand.
The WiFi device driver can not guarantee to retain the state for the connection when it is not held open. For this reason, it is strongly recommended that the plumb subcommand for ifconfig(1M) is done before the wificonfig autoconf subcommand is given.
disconnect
The "solaris.network.wifi.config" authorization is required for this subcommand.
getparam [parameter [...]]
setparam [parameter=value [...]]
The setparam subcommand without any parameters displays the set of parameters supported by the network interface, including whether they are read/write or read only. The getparam subcommand without any parameters displays all the parameters and
their values.
The setparam wepkey1|wepkey2|wepkey3|wepkey4 subcommand requires the "solaris.network.wifi.wep" authorization. For all other parameters, the setparam subcommand requires the "solaris.network.wifi.config"authorization.
For example,
$ wificonfig setparam <parameter1=value1> [parameter2=value2 [...]] $ wificonfig getparam <parameter1> [parameter2 [...]]
wificonfig currently supports the following parameters (the values are case insensitive).
bssid
essid
bsstype
createibss
channel
rates
powermode
authmode
encryption
wepkey1|wepkey2|wepkey3|wepkey4
When these subcommands are used to set a WEP key, any user on the system can read the key from the ps(1) output. Thus, the setwepkey subcommand is recommended for setting the WEP keys since it does not allow ps(1) to read the keys.
wepkeyindex
signal
radio
restoredef
The "solaris.network.wifi.config" authorization is required for this subcommand.
scan
showstatus
setwepkey 1|2|3|4
example% wificonfig -i ath0 setwepkey 2 input wepkey2: < user input here> confirm wepkey2: < user input here>
A WEP key can be 5 bytes or 13 bytes long. There are two ways to enter a WEP key, by ASCII values or by hex values. If the user enters 5 or 13 characters, it is considered the ASCII representation of the key. If the user enters 10 or 26 characters, it is considered the hex representation of the key. For example "1234" is equivalent to "6162636465". If the user enters other number of characters, the subcommand fails. WEP keys are write-only; they cannot be read back via wificonfig.
The WEP keys can also be set in plain text form by the setparam subcommand. This makes setting WEP keys scriptable (see the parameters of setparam for the details).
The "solaris.network.wifi.wep" authorization is required for this subcommand.
The following profile subcommands are supported:
createprofile profile [parameter=value] [...]
The "solaris.network.wifi.config" authorization is required for this subcommand.
deleteprofile profile1 [profile2 [...]]
The "solaris.network.wifi.config" authorization is required for this subcommand.
showprofile [profile]
setprofilewepkey 1|2|3|4
Other than that difference, the usage of setprofilewepkey is the same as the setwepkey subcommand. For example, to update wepkey 2 in profile "home":
example% wificonfig setprofilewepkey home 2 input wepkey2: < user input here> confirm wepkey2: < user input here>
The "solaris.network.wifi.wep" authorization is required for this subcommand.
getprofileparam profile [parameter] [...]]
setprofileparam profile [parameter=value] [...]]
A getprofileparam without any parameters will display all the parameters and their values.
"Solaris.network.wifi.wep" authorization is required when the setparam subcommand is used with the wepkey1|wepkey2|wepkey3|wepkey4 parameter. For all other parameters, the setparam subcommand requires "solaris.network.wifi.config"authorization.
For example, to change the settings for the "home" Configuration Profile, use:
$ wificonfig setprofileparam home <parameter1=value1> \ [parameter2=value2 [...]] $ wificonfig getprofileparam home <parameter1> [parameter2 [...]]
The set of parameters and their allowed values are the same as those specified for the setparam subcommand.
history
listprefer
removeprefer profile
The "solaris.network.wifi.config" authorization is required for this subcommand.
setprefer profile [n]
The "solaris.network.wifi.config" authorization is required for this subcommand.
Example 1 Listing the Parameters Supported by a Driver
To display what parameters the ath driver supports and the read/write modes of the parameters:
% wificonfig -i ath0 setparam parameter property bssid read only essid read/write bsstype read/write rates read/write authmode read/write encryption read/write wepkeyindex read/write signal read only
Example 2 Getting and Setting Parameters on the WiFi interface
To get the current rates and signal strength from the driver:
% wificonfig -i ath0 getparam rates signal ath0: rates = 1,2,5.5,11 signal = 10
Example 3 Managing Configuration Profiles
A Configuration Profile can be created offline and then connected to the network with the created Configuration Profile. The following series of commands creates the Configuration Profile, displays the contents of that profile, and connects to the network with the Configuration Profile:
% wificonfig createprofile myXXX essid=rover encryption=WEP \ wepkey1=12345 % wificonfig showprofile myXXX [myXXX] essid=rover encryption=WEP wepkey1=[secret] % ifconfig ath0 plumb % wificonfig -i ath0 connect myXXX
Example 4 Managing the Preference List
A profile can be added to the Preference List and then used by the autoconf subcommand. The following series of commands adds a profile named myXXX to the top of the Preference List, automatically connects ath0 to the first available WLAN in the Preference List, and removes my_neighbor from the Preference List
% wificonfig setprefer myXXX 1 % ifconfig ath0 plumb % wificonfig -i ath0 autoconf % wificonfig removeprefer my_neighbor
Example 5 Viewing the History List
To display the history of the WLANs:
% wificonfig history WLAN history: essid bssid encryption last seen myXXX 00:0f:24:11:12:14 WEP Fri Sep 13 09:15:24 2004 my_office_ssid 00:0f:24:11:12:15 WEP Fri Sep 13 13:20:04 2004 my_neighbor1 00:0f:24:11:12:16 NONE Fri Sep 14 08:01:26 2004 my_neighbor2 00:0f:24:11:12:17 WEP Fri Sep 18 21:33:12 2004
Example 6 Automatic Configuration
To configure the interface according to the previously saved Preference List:
% ifconfig ath0 plumb % wificonfig -i ath0 autoconf
If the Preference List is empty, or none of the WLANs listed by the Proference List can be found, wificonfig uses the default configuration, directs the interface to scan and join the WLAN using the built-in heuristics specified above.
Example 7 Connecting To a WLAN
To search for a Configuration Profile with the name myXXX and configure the interface accordingly:
% ifconfig ath0 plumb % wificonfig -i ath0 connect myXXX
If the specified Configuration Profile does not exist, wificonfig interprets it as an essid and sets ath0 to use essid myXXX, and no other parameters are set.
Example 8 Displaying the Content of a Configuration Profile
To print the parameters of the previously Configured Profile named my_home_ssid:
% wificonfig showprofile my_home_ssid
Example 9 Monitoring the link status
To monitor the link status:
% wificonfig -i ath0 showstatus ath0: linkstatus: not connected,
or
ath0: linkstatus: connected active profile: [home] essid: myhome bssid: 00:0b:0e:12:e2:02 encryption: WEP signal: medium(10)
Example 10 Scanning for available networks
To scan for available networks:
% wificonfig -i ath0 scan essid bssid type encryption signal level ietf64-secure 00:0b:0e:12:e2:02 access point WEP 9 roomlinx 00:40:96:a1:13:70 access point none 6 ietf64 00:0b:0e:13:32:00 access point none 3 ietf64-secure 00:0b:0e:13:32:02 access point WEP 3 ietf64 00:0b:0e:12:e2:00 access point none 9 ietf64-secure 00:0b:0e:12:e4:c2 access point WEP 8 ietf64 00:0b:0e:12:e4:c0 access point none 8 roomlinx 00:40:96:a0:aa:aa access point none 1 roomlinx 00:40:96:a0:ab:39 access point none 8
0
1
2
3
See attributes(5) for descriptions of the following attributes:
|
ps(1), ifconfig(1M), attributes(5), ath(7D)
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |