Added REQUEST to soh_verify() parameters
[freeradius.git] / man / man1 / radclient.1
1 .TH RADCLIENT 1 "2 April 2009" "" "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 Try to send \fInum_requests_per_second\fP, evenly spaced.  This option
58 allows you to slow down the rate at which radclient sends requests.
59 When not using -n, the default is to send packets as quickly as
60 possible, with no inter-packet delays.
61
62 Due to limitations in radclient, this option does not accurately send
63 the requested number of packets per second.
64 .IP \-p\ \fInum_requests_in_parallel\fP
65 Send \fInum_requests_in_parallel\fP, without waiting for a response
66 for each one.  By default, radclient sends the first request it has
67 read, waits for the response, and once the response is received, sends
68 the second request in its list.  This option allows you to send many
69 requests at simultaneously.  Once \fInum_requests_in_parallel\fP are
70 sent, radclient waits for all of the responses to arrive (or for the
71 requests to time out), before sending any more packets.
72
73 This option permits you to discover the maximum load accepted by a
74 RADIUS server.
75 .IP \-q
76 Go to quiet mode, and do not print out anything.
77 .IP \-r\ \fInum_retries\fP
78 Try to send each packet \fInum_retries\fP times, before giving up on
79 it.  The default is 10.
80 .IP \-s
81 Print out some summaries of packets sent and received.
82 .IP \-S\ \fIshared_secret_file\fP
83 Rather than reading the shared secret from the command-line (where it
84 can be seen by others on the local system), read it instead from
85 \fIshared_secret_file\fP.
86 .IP \-t\ \fItimeout\fP
87 Wait \fItimeout\fP seconds before deciding that the NAS has not
88 responded to a request, and re-sending the packet.  The default
89 timeout is 3.
90 .IP \-v
91 Print out version information.
92 .IP \-x
93 Print out debugging information.
94 .IP server[:port]
95 The hostname or IP address of the remote server. Optionally a UDP port
96 can be specified. If no UDP port is specified, it is looked up in
97 \fI/etc/services\fP. The service name looked for is \fBradacct\fP for
98 accounting packets, and \fBradius\fP for all other requests. If a
99 service is not found in \fI/etc/services\fP, 1813 and 1812 are used
100 respectively.
101
102 The RADIUS attributes read by \fIradclient\fP can contain the special
103 attribute \fBPacket-Dst-IP-Address\fP.  If this attribute exists, then
104 that IP address is where the packet is sent, and the \fBserver\fP
105 specified on the command-line is ignored.
106
107 If the RADIUS attribute list always contains the
108 \fBPacket-Dst-IP-Address\fP attribute, then the \fBserver\fP parameter
109 can be given as \fB-\fP.
110
111 The RADIUS attributes read by \fIradclient\fP can contain the special
112 attribute \fBPacket-Dst-Port\fP.  If this attribute exists, then that
113 UDP port is where the packet is sent, and the \fB:port\fP specified
114 on the command-line is ignored.
115
116 .IP acct\ |\ auth\ |\ status\ |\ disconnect\ |\ auto
117 Use \fBauth\fP to send an authentication packet (Access-Request),
118 \fBacct\fP to send an accounting packet (Accounting-Request),
119 \fBstatus\fP to send an status packet (Status-Server), or
120 \fBdisconnect\fP to send a disconnection request. Instead of these
121 values, you can also use a decimal code here. For example, code 12 is
122 also \fBStatus-Server\fP.
123
124 The RADIUS attributes read by \fIradclient\fP can contain the special
125 attribute \fBPacket-Type\fP.  If this attribute exists, then that type
126 of packet is sent, and the \fItype\fP specified on the command-line
127 is ignored.
128
129 If the RADIUS attribute list always contains the
130 \fBPacket-Type\fP attribute, then the \fBtype\fP parameter can be
131 given as \fBauto\fP.
132
133 .IP secret
134 The shared secret for this client.  It needs to be defined on the
135 radius server side too, for the IP address you are sending the radius
136 packets from.
137
138 .SH EXAMPLE
139
140 A sample session that queries the remote server for
141 \fIStatus-Server\fP (not all servers support this, but FreeRADIUS has
142 configurable support for it).
143 .RS
144 .sp
145 .nf
146 .ne 3
147 $ echo "Message-Authenticator = 0x00" | radclient 192.168.1.42 status s3cr3t
148 Sending request to server 192.168.1.42, port 1812.
149 radrecv: Packet from host 192.168.1.42 code=2, id=140, length=54
150     Reply-Message = "FreeRADIUS up 21 days, 02:05"
151 .fi
152 .sp
153 .RE
154
155 .SH SEE ALSO
156 radiusd(8),
157 .SH AUTHORS
158 Miquel van Smoorenburg, miquels@cistron.nl.
159 Alan DeKok <aland@freeradius.org>