xref: /netbsd-src/usr.sbin/wlanctl/wlanctl.8 (revision 274254cdae52594c1aa480a736aef78313d15c9c)
1.\" $NetBSD: wlanctl.8,v 1.5 2009/03/11 18:47:52 joerg 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 Do 2.4GHz Dc or Do 5GHz Dc Pc ,
131modulation
132.Po Do cck Dc , Do gfsk Dc , Do ofdm Dc , Do turbo Dc , and \
133Do dynamic cck-ofdm Dc 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