xref: /netbsd/usr.sbin/wlanctl/wlanctl.8 (revision 6550d01e)
1.\" $NetBSD: wlanctl.8,v 1.6 2009/05/04 20:47:48 wiz 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.Op Fl p
40.Ar interface
41.Op ...
42.Nm
43.Op Fl p
44.Fl a
45.Sh DESCRIPTION
46Use the
47.Nm
48utility to print node tables from IEEE 802.11 interfaces.
49Use the
50.Fl a
51flag to print the nodes for all interfaces, or list one or more
52802.11 interfaces to select their tables for examination.
53The
54.Fl p
55flag causes only nodes that do not have encryption enabled to be printed.
56For example, to examine the node tables for atw0, use:
57.Pp
58.Bd -literal -offset indent -compact
59wlanctl atw0
60.Ed
61.Pp
62.Nm
63may print this node table, for example:
64.Pp
65.Bd -literal -offset indent -compact
66atw0: mac 00:02:6f:20:f6:2e bss 02:02:6f:20:f6:2e
67	node flags 0001\*[Lt]bss\*[Gt]
68	ess \*[Lt]netbsd\*[Gt]
69	chan 11 freq 2462MHz flags 00a0\*[Lt]cck,2.4GHz\*[Gt]
70	capabilities 0022\*[Lt]ibss,short preamble\*[Gt]
71	beacon-interval 100 TU tsft 18425852102545544165 us
72	rates [1.0] 2.0 5.5 11.0
73	assoc-id 0 assoc-failed 0 inactivity 0s
74	rssi 161 txseq 10 rxseq 1420
75atw0: mac 00:02:2d:2e:3c:f4 bss 02:02:6f:20:f6:2e
76	node flags 0000
77	ess \*[Lt]netbsd\*[Gt]
78	chan 11 freq 2462MHz flags 00a0\*[Lt]cck,2.4GHz\*[Gt]
79	capabilities 0002\*[Lt]ibss\*[Gt]
80	beacon-interval 100 TU tsft 18425852105450086784 us
81	rates [1.0] 2.0 5.5 11.0
82	assoc-id 0 assoc-failed 0 inactivity 0s
83	rssi 159 txseq 2 rxseq 551
84atw0: mac 00:02:6f:20:f6:2e bss 02:02:6f:20:f6:2e
85	node flags 0000
86	ess \*[Lt]netbsd\*[Gt]
87	chan 11 freq 2462MHz flags 00a0\*[Lt]cck,2.4GHz\*[Gt]
88	capabilities 0022\*[Lt]ibss,short preamble\*[Gt]
89	beacon-interval 100 TU tsft 18425852102558548069 us
90	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
91	assoc-id 0 assoc-failed 0 inactivity 145s
92	rssi 163 txseq 9 rxseq 2563
93.Ed
94.Pp
95This example is taken from a network consisting of three stations
96running in ad hoc mode.
97The key for interpreting the node print-outs follows:
98.Bl -tag -width "do_not_adapt" -compact
99.It Fa mac
100In the example node table, the first network node has MAC number
10100:02:6f:20:f6:2e.
102.It Fa bss
103The first node belongs to the 802.11 network identified
104by Basic Service Set Identifier (BSSID) 02:02:6f:20:f6:2e.
105.It Fa "node flags"
106Only three node flags,
107.Dq bss ,
108.Dq sta ,
109and
110.Dq scan ,
111are presently defined.
112The first node is distinguished from the rest by its node flags:
113flag
114.Dq bss
115indicates that the node represents the 802.11 network
116that the interface has joined or created.
117The MAC number for the node is the same as the MAC number for the
118interface.
119.It Fa ess
120the name of the (Extended) Service Set
121we have joined.
122This is the same as the network name set by
123.Xr ifconfig 8
124with the
125.Dq ssid
126option.
127.It Fa chan
128.Nm
129prints the channel number, the center frequency in megahertz, and
130the channel flags.
131The channel flags indicate the frequency band
132.Po Do 2.4GHz Dc or Do 5GHz Dc Pc ,
133modulation
134.Po Do cck Dc , Do gfsk Dc , Do ofdm Dc , Do turbo Dc , and \
135Do dynamic cck-ofdm Dc Pc ,
136and operation constraints
137.Pq Dq passive scan .
138Common combinations of band and modulation are these:
139.Bl -column 2.4GHz "dynamic cck-ofdm" "1-2Mb/s frequency-hopping 802.11"
140.It Sy Band	Modulation	Description
141.It 2.4GHz	cck	11Mb/s DSSS 802.11b
142.It 2.4GHz	gfsk	1-2Mb/s FHSS 802.11
143.It 2.4GHz	ofdm	54Mb/s 802.11g
144.It 2.4GHz	dynamic cck-ofdm	mixed 802.11b/g network
145.It 5GHz	ofdm	54Mb/s 802.11a
146.It 5GHz	turbo	108Mb/s 802.11a
147.El
148.It Fa capabilities
149ad hoc-mode and AP-mode 802.11 stations advertise their capabilities
150in 802.11 Beacons and Probe Responses.
151.Nm
152understands these capability flags:
153.Bl -column "channel agility" "adapt channel to protect licensed services"
154.It Sy Flag	Description
155.It ess	infrastructure (access point) network
156.It ibss	ad hoc network (no access point)
157.It cf pollable	TBD
158.It request cf poll	TBD
159.It privacy	WEP encryption
160.It short preamble	reduce 802.11b overhead
161.It pbcc	22Mbps ``802.11b+''
162.It channel agility	change channel for licensed services
163.It short slot-time	TBD
164.It rsn	TBD Real Soon Now
165.It dsss-ofdm	TBD
166.El
167.It Fa beacon-interval
168In the example, beacons are sent once every 100 Time Units.
169A Time Unit (TU) is 1024 microseconds (a
170.Dq kilo-microsecond
171or
172.Dq kus ) .
173Thus 100 TU is about one tenth of a second.
174.It Fa tsft
175802.11 stations keep a Time Synchronization Function Timer (TSFT)
176which counts up in microseconds.
177Ad hoc-mode stations synchronize time with their peers.
178Infrastructure-mode stations synchronize time with their access
179point.
180Power-saving stations wake and sleep at intervals measured by the
181TSF Timer.
182The TSF Timer has a role in the coalescence of 802.11 ad hoc networks
183.Pq Dq IBSS merges .
184.It Fa rates
185802.11 stations indicate the bit-rates they support, in units of
186100kb/s in 802.11 Beacons, Probe Responses, and Association Requests.
187.Nm
188prints a station's supported bit-rates in 1Mb/s units.
189A station's basic rates are flagged by an asterisk
190.Pq Sq * .
191The last bit-rate at which a packet was sent to the station is
192enclosed by square brackets.
193.It Fa assoc-id
194In an infrastructure network, the access point assigns each client
195an Association Identifier which is used to indicate traffic for
196power-saving stations.
197.It Fa assoc-failed
198The number of times the station tried and failed to associate
199with its access point.
200Only
201.It Fa inactivity
202Seconds elapsed since a packet was last received from the station.
203When this value reaches net.link.ieee80211.maxinact, the station
204is eligible to be purged from the node table.
205See
206.Xr sysctl 8 .
207.It Fa rssi
208Unitless Received Signal Strength Indication (RSSI).
209Higher numbers indicate stronger signals.
210Zero is the lowest possible RSSI.
211On a hostap- or adhoc-mode interface, the node with
212.Fa "node flag"
213.Dq bss
214set uses
215.Fa rssi
216to indicate the signal strength for the last packet received from
217a station that does not belong to the network.
218On an infrastructure-mode station, the node with
219.Fa "node flag"
220.Dq bss
221set indicates the strength of packets from the access point.
222.It Fa txseq
223The next 802.11 packet sent to this station will carry this transmit
224sequence number.
225The 802.11 MAC uses the transmit sequence number to detect duplicate
226packets.
227.It Fa rxseq
228The last packet received from this station carried this transmit
229sequence number.
230.El
231.Sh SEE ALSO
232.Xr sysctl 8
233.Sh HISTORY
234.Nm
235first appeared in
236.Nx 3.0 .
237.Sh AUTHORS
238.An David Young Aq dyoung@NetBSD.org
239