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