import from branch_1_1:
[freeradius.git] / man / man1 / radclient.1
1 .TH RADCLIENT 1 "7 April 2005" "" "FreeRADIUS Daemon"
2 .SH NAME
3 radclient - send packets to a RADIUS server, show reply
4 .SH SYNOPSIS
5 .B radclient
6 .RB [ \-d
7 .IR raddb_directory ]
8 .RB [ \-c
9 .IR count ]
10 .RB [ \-f
11 .IR file ]
12 .RB [ \-i
13 .IR id ]
14 .RB [ \-n
15 .IR num_requests_per_second ]
16 .RB [ \-p
17 .IR num_requests_in_parallel ]
18 .RB [ \-r
19 .IR num_retries ]
20 .RB [ \-s ]
21 .RB [ \-S
22 .IR shared_secret_file ]
23 .RB [ \-t
24 .IR timeout ]
25 .RB [ \-qvx ]
26 \fIserver {acct|auth|status|disconnect|auto} secret\fP
27 .SH DESCRIPTION
28 \fBradclient\fP is a radius client program. It can send arbitrary radius
29 packets to a radius server, then shows the reply. It can be used to
30 test changes you made in the configuration of the radius server,
31 or it can be used to monitor if a radius server is up.
32 .PP
33 \fBradclient\fP reads radius attribute/value pairs from it standard
34 input, or from a file specified on the command line. It then encodes
35 these attribute/value pairs using the dictionary, and sends them
36 to the remote server.
37 .PP
38 The \fIUser-Password\fP and \fICHAP-Password\fP attributes are
39 automatically encrypted before the packet is sent to the server.
40
41 .SH OPTIONS
42
43 .IP \-c\ \fIcount\fP
44 Send each packet \fIcount\fP times.
45 .IP \-d\ \fIraddb_directory\fP
46 The directory that contains the RADIUS dictionary files. Defaults to
47 \fI/etc/raddb\fP.
48 .IP \-f\ \fIfile\fP
49 File to read the attribute/value pairs from. If this is not specified,
50 they are read from stdin.  This option can be specified multiple
51 times, in which case packets are sent in order by file, and within
52 each file, by first packet to last packet.  A blank line separates
53 logical packets within a file.
54 .IP \-i\ \fIid\fP
55 Use \fIid\fP as the RADIUS request Id.
56 .IP \-n\ \fInum_requests_per_second\fP
57 Send \fInum_requests_per_second\fP, evenly spaced over time.  By
58 default, the requests are sent as fast as possible.  This option
59 allows you to slow down the rate at which radclient sends requests.
60 .IP \-p\ \fInum_requests_in_parallel\fP
61 Send \fInum_requests_in_parallel\fP, without waiting for a response
62 for each one.  By default, radclient sends the first request it has
63 read, waits for the response, and once the response is received, sends
64 the second request in its list.  This option allows you to send many
65 requests at simultaneously.  Once \fInum_requests_in_parallel\fP are
66 sent, radclient waits for all of the responses to arrive (or for the
67 requests to time out), before sending any more packets.
68 .IP \-q
69 Go to quiet mode, and do not print out anything.
70 .IP \-r\ \fInum_retries\fP
71 Try to send each packet \fInum_retries\fP times, before giving up on
72 it.  The default is 10.
73 .IP \-s
74 Print out some summaries of packets sent and received.
75 .IP \-S\ \fIshared_secret_file\fP
76 Rather than reading the shared secret from the command-line (where it
77 can be seen by others on the local system), read it instead from
78 \fIshared_secret_file\fP.
79 .IP \-t\ \fItimeout\fP
80 Wait \fItimeout\fP seconds before deciding that the NAS has not
81 responded to a request, and re-sending the packet.  The default
82 timeout is 3.
83 .IP \-v
84 Print out version information.
85 .IP \-x
86 Print out debugging information.
87 .IP server[:port]
88 The hostname or IP address of the remote server. Optionally a UDP port
89 can be specified. If no UDP port is specified, it is looked up in
90 \fI/etc/services\fP. The service name looked for is \fBradacct\fP for
91 accounting packets, and \fBradius\fP for all other requests. If a
92 service is not found in \fI/etc/services\fP, 1813 and 1812 are used
93 respectively.
94
95 The RADIUS attributes read by \fIradclient\fP can contain the special
96 attribute \fBPacket-Dst-IP-Address\fP.  If this attribute exists, then
97 that IP address is where the packet is sent, and the \fBserver\fP
98 specified on the command-line is ignored.
99
100 If the RADIUS attribute list always contains the
101 \fBPacket-Dst-IP-Address\fP attribute, then the \fBserver\fP parameter
102 can be given as \fB-\fP.
103
104 The RADIUS attributes read by \fIradclient\fP can contain the special
105 attribute \fBPacket-Dst-Port\fP.  If this attribute exists, then that
106 UDP port is where the packet is sent, and the \fB:port\fP specified
107 on the command-line is ignored.
108
109 .IP acct\ |\ auth\ |\ status\ |\ disconnect\ |\ auto
110 Use \fBauth\fP to send an authentication packet (Access-Request),
111 \fBacct\fP to send an accounting packet (Accounting-Request),
112 \fBstatus\fP to send an status packet (Status-Server), or
113 \fBdisconnect\fP to send a disconnection request. Instead of these
114 values, you can also use a decimal code here. For example, code 12 is
115 also \fBStatus-Server\fP.
116
117 The RADIUS attributes read by \fIradclient\fP can contain the special
118 attribute \fBPacket-Type\fP.  If this attribute exists, then that type
119 of packet is sent, and the \fItype\fP specified on the command-line
120 is ignored.
121
122 If the RADIUS attribute list always contains the
123 \fBPacket-Type\fP attribute, then the \fBtype\fP parameter can be
124 given as \fBauto\fP.
125
126 .IP secret
127 The shared secret for this client.  It needs to be defined on the
128 radius server side too, for the IP address you are sending the radius
129 packets from.
130
131 .SH EXAMPLE
132
133 A sample session that queries the remote server for
134 \fIStatus-Server\fP (not all servers support this, but FreeRADIUS has
135 configurable support for it).
136 .RS
137 .sp
138 .nf
139 .ne 3
140 $ echo "User-Name = fnord" | radclient 192.168.1.42 12 s3cr3t
141 Sending request to server 192.168.1.42, port 1812.
142 radrecv: Packet from host 192.168.1.42 code=2, id=140, length=54
143     Reply-Message = "FreeRADIUS up 21 days, 02:05"
144 .fi
145 .sp
146 .RE
147
148 .SH SEE ALSO
149 radiusd(8),
150 .SH AUTHORS
151 Miquel van Smoorenburg, miquels@cistron.nl.
152 Alan DeKok <aland@freeradius.org>