1.\" $NetBSD: wlanctl.8,v 1.3 2005/01/27 21:01:18 hubertf Exp $ 2.\" Copyright (c) 2004 David Young. All rights reserved. 3.\" 4.\" This code was written by David Young. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 3. The name of David Young may not be used to endorse or promote 15.\" products derived from this software without specific prior 16.\" written permission. 17.\" 18.\" THIS SOFTWARE IS PROVIDED BY DAVID YOUNG ``AS IS'' AND ANY 19.\" EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 20.\" THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 21.\" PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DAVID 22.\" YOUNG BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 23.\" EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 24.\" TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 26.\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29.\" POSSIBILITY OF SUCH DAMAGE. 30.\" 31.Dd July 15, 2004 32.Dt WLANCTL 8 33.Os 34.Sh NAME 35.Nm wlanctl 36.Nd examine IEEE 802.11 wireless LAN client/peer table 37.Sh SYNOPSIS 38.Nm wlanctl 39.Ar interface 40.Op Ar ... 41.Nm 42.Fl a 43.Sh DESCRIPTION 44Use the 45.Nm 46utility to print node tables from IEEE 802.11 interfaces. 47Use the 48.Fl a 49flag to print the nodes for all interfaces, or list one or more 50802.11 interfaces to select their tables for examination. 51For example, to examine the node tables for atw0, use: 52.Pp 53.Bd -literal -offset indent -compact 54wlanctl atw0 55.Ed 56.Pp 57.Nm 58may print this node table, for example: 59.Pp 60.Bd -literal -offset indent -compact 61atw0: mac 00:02:6f:20:f6:2e bss 02:02:6f:20:f6:2e 62 node flags 0001\*[Lt]bss\*[Gt] 63 ess \*[Lt]netbsd\*[Gt] 64 chan 11 freq 2462MHz flags 00a0\*[Lt]cck,2.4GHz\*[Gt] 65 capabilities 0022\*[Lt]ibss,short preamble\*[Gt] 66 beacon-interval 100 TU tsft 18425852102545544165 us 67 rates [1.0] 2.0 5.5 11.0 68 assoc-id 0 assoc-failed 0 inactivity 0s 69 rssi 161 txseq 10 rxseq 1420 70atw0: mac 00:02:2d:2e:3c:f4 bss 02:02:6f:20:f6:2e 71 node flags 0000 72 ess \*[Lt]netbsd\*[Gt] 73 chan 11 freq 2462MHz flags 00a0\*[Lt]cck,2.4GHz\*[Gt] 74 capabilities 0002\*[Lt]ibss\*[Gt] 75 beacon-interval 100 TU tsft 18425852105450086784 us 76 rates [1.0] 2.0 5.5 11.0 77 assoc-id 0 assoc-failed 0 inactivity 0s 78 rssi 159 txseq 2 rxseq 551 79atw0: mac 00:02:6f:20:f6:2e bss 02:02:6f:20:f6:2e 80 node flags 0000 81 ess \*[Lt]netbsd\*[Gt] 82 chan 11 freq 2462MHz flags 00a0\*[Lt]cck,2.4GHz\*[Gt] 83 capabilities 0022\*[Lt]ibss,short preamble\*[Gt] 84 beacon-interval 100 TU tsft 18425852102558548069 us 85 rates [1.0] 2.0 5.5 6.0 9.0 11.0 12.0 18.0 24.0 36.0 48.0 54.0 86 assoc-id 0 assoc-failed 0 inactivity 145s 87 rssi 163 txseq 9 rxseq 2563 88.Ed 89.Pp 90This example is taken from a network consisting of three stations 91running in ad hoc mode. 92The key for interpreting the node print-outs follows: 93.Bl -tag -width "do_not_adapt" -compact 94.It Fa mac 95In the example node table, the first network node has MAC number 9600:02:6f:20:f6:2e. 97.It Fa bss 98The first node belongs to the 802.11 network identified 99by Basic Service Set Identifier (BSSID) 02:02:6f:20:f6:2e. 100.It Fa "node flags" 101Only one node flag, 102.Dq bss , 103is presently defined. 104The first node is distinguished from the rest by its node flags: 105flag 106.Dq bss 107indicates that the node represents the 802.11 network 108that the interface has joined or created. 109The MAC number for the node is the same as the MAC number for the 110interface. 111.It Fa ess 112the name of the (Extended) Service Set 113we have joined. 114This is the same as the network name set by 115.Xr ifconfig 8 116with the 117.Dq ssid 118option. 119.It Fa chan 120.Nm 121prints the channel number, the center frequency in megahertz, and 122the channel flags. 123The channel flags indicate the frequency band ( 124.Po Dq 2.4GHz 125or 126.Dq 5GHz Pc , 127modulation 128.Po Dq cck , 129.Dq gfsk , 130.Dq ofdm , 131.Dq turbo , 132and 133.Dq dynamic cck-ofdm Pc , 134and operation constraints 135.Pq Dq passive scan . 136Common combinations of band and modulation are these: 137.Bl -column 2.4GHz "dynamic cck-ofdm" "1-2Mb/s frequency-hopping 802.11" 138.It Sy Band Modulation Description 139.It 2.4GHz cck 11Mb/s DSSS 802.11b 140.It 2.4GHz gfsk 1-2Mb/s FHSS 802.11 141.It 2.4GHz ofdm 54Mb/s 802.11g 142.It 2.4GHz dynamic cck-ofdm mixed 802.11b/g network 143.It 5GHz ofdm 54Mb/s 802.11a 144.It 5GHz turbo 108Mb/s 802.11a 145.El 146.It Fa capabilities 147ad hoc-mode and AP-mode 802.11 stations advertise their capabilities 148in 802.11 Beacons and Probe Responses. 149.Nm 150understands these capability flags: 151.Bl -column "channel agility" "adapt channel to protect licensed services" 152.It Sy Flag Description 153.It ess infrastructure (access point) network 154.It ibss ad hoc network (no access point) 155.It cf pollable TBD 156.It request cf poll TBD 157.It privacy WEP encryption 158.It short preamble reduce 802.11b overhead 159.It pbcc 22Mbps ``802.11b+'' 160.It channel agility change channel for licensed services 161.It short slot-time TBD 162.It rsn TBD Real Soon Now 163.It dsss-ofdm TBD 164.El 165.It Fa beacon-interval 166In the example, beacons are sent once every 100 Time Units. 167A Time Unit (TU) is 1024 microseconds (a 168.Dq kilo-microsecond 169or 170.Dq kus ) . 171Thus 100 TU is about one tenth of a second. 172.It Fa tsft 173802.11 stations keep a Time Synchronization Function Timer (TSFT) 174which counts up in microseconds. 175Ad hoc-mode stations synchronize time with their peers. 176Infrastructure-mode stations synchronize time with their access 177point. 178Power-saving stations wake and sleep at intervals measured by the 179TSF Timer. 180The TSF Timer has a role in the coalescence of 802.11 ad hoc networks 181.Pq Dq IBSS merges . 182.It Fa rates 183802.11 stations indicate the bit-rates they support, in units of 184100kb/s in 802.11 Beacons, Probe Responses, and Association Requests. 185.Nm 186prints a station's supported bit-rates in 1Mb/s units. 187A station's basic rates are flagged by an asterisk 188.Pq Sq * . 189The last bit-rate at which a packet was sent to the station is 190enclosed by square brackets. 191.It Fa assoc-id 192In an infrastructure network, the access point assigns each client 193an Association Identifier which is used to indicate traffic for 194power-saving stations. 195.It Fa assoc-failed 196The number of times the station tried and failed to associate 197with its access point. 198Only 199.It Fa inactivity 200Seconds elapsed since a packet was last received from the station. 201When this value reaches net.link.ieee80211.maxinact, the station 202is eligible to be purged from the node table. 203See 204.Xr sysctl 8 . 205.It Fa rssi 206Unitless Received Signal Strength Indication (RSSI). 207Higher numbers indicate stronger signals. 208Zero is the lowest possible RSSI. 209On a hostap- or adhoc-mode interface, the node with 210.Fa "node flag" 211.Dq bss 212set uses 213.Fa rssi 214to indicate the signal strength for the last packet received from 215a station that does not belong to the network. 216On an infrastructure-mode station, the node with 217.Fa "node flag" 218.Dq bss 219set indicates the strength of packets from the access point. 220.It Fa txseq 221The next 802.11 packet sent to this station will carry this transmit 222sequence number. 223The 802.11 MAC uses the transmit sequence number to detect duplicate 224packets. 225.It Fa rxseq 226The last packet received from this station carried this transmit 227sequence number. 228.El 229.Sh SEE ALSO 230.Xr sysctl 8 231.Sh HISTORY 232.Nm 233first appeared in 234.Nx 3.0 . 235.Sh AUTHORS 236.An David Young Aq dyoung@NetBSD.org 237