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