1 .TH RADCLIENT 1 "28 February 2017" "" "FreeRADIUS Daemon"
3 radclient - send packets to a RADIUS server, show reply
13 .IR dictionary_directory ]
21 .IR num_requests_per_second ]
23 .IR num_requests_in_parallel ]
29 .IR shared_secret_file ]
34 \fIserver {acct|auth|status|disconnect|auto} secret\fP
36 \fBradclient\fP is a radius client program. It can send arbitrary radius
37 packets to a radius server, then shows the reply. It can be used to
38 test changes you made in the configuration of the radius server,
39 or it can be used to monitor if a radius server is up.
41 \fBradclient\fP reads radius attribute/value pairs from it standard
42 input, or from a file specified on the command line. It then encodes
43 these attribute/value pairs using the dictionary, and sends them
46 The \fIUser-Password\fP and \fICHAP-Password\fP attributes are
47 automatically encrypted before the packet is sent to the server.
56 Send each packet \fIcount\fP times.
57 .IP \-d\ \fIraddb_directory\fP
58 The directory that contains the user dictionary file. Defaults to
60 .IP \-D\ \fIdictionary_directory\fP
61 The directory that contains the main dictionary file. Defaults to
62 \fI/usr/share/freeradius\fP.
63 .IP \-f\ \fIfile[:file]\fP
64 File to read the attribute/value pairs from. If this is not specified,
65 they are read from stdin. This option can be specified multiple
66 times, in which case packets are sent in order by file, and within
67 each file, by first packet to last packet. A blank line separates
68 logical packets within a file. If a pair of files separated by a
69 colon is specified, the second file will be used to filter the
70 responses to requests from the first. The number of requests and
71 filters must be the same. A summary of filter results will be displayed
74 Print the file name, packet number and reply code.
76 Print usage help information.
78 Use \fIid\fP as the RADIUS request Id.
79 .IP \-n\ \fInum_requests_per_second\fP
80 Try to send \fInum_requests_per_second\fP, evenly spaced. This option
81 allows you to slow down the rate at which radclient sends requests.
82 When not using \-n, the default is to send packets as quickly as
83 possible, with no inter-packet delays.
85 Due to limitations in radclient, this option does not accurately send
86 the requested number of packets per second.
87 .IP \-p\ \fInum_requests_in_parallel\fP
88 Send \fInum_requests_in_parallel\fP, without waiting for a response
89 for each one. By default, radclient sends the first request it has
90 read, waits for the response, and once the response is received, sends
91 the second request in its list. This option allows you to send many
92 requests at simultaneously. Once \fInum_requests_in_parallel\fP are
93 sent, radclient waits for all of the responses to arrive (or for the
94 requests to time out), before sending any more packets.
96 This option permits you to discover the maximum load accepted by a
98 .IP "\-P\ \fIproto\fP"
99 Use \fIproto\fP transport protocol ("tcp" or "udp").
100 Only available if FreeRADIUS is compiled with TCP transport support.
102 Go to quiet mode, and do not print out anything.
103 .IP \-r\ \fInum_retries\fP
104 Try to send each packet \fInum_retries\fP times, before giving up on
105 it. The default is 10.
107 Print out some summaries of packets sent and received.
108 .IP \-S\ \fIshared_secret_file\fP
109 Rather than reading the shared secret from the command-line (where it
110 can be seen by others on the local system), read it instead from
111 \fIshared_secret_file\fP.
112 .IP \-t\ \fItimeout\fP
113 Wait \fItimeout\fP seconds before deciding that the NAS has not
114 responded to a request, and re-sending the packet. The default
117 Print out version information.
119 Print out debugging information.
121 The hostname or IP address of the remote server. Optionally a UDP port
122 can be specified. If no UDP port is specified, it is looked up in
123 \fI/etc/services\fP. The service name looked for is \fBradacct\fP for
124 accounting packets, and \fBradius\fP for all other requests. If a
125 service is not found in \fI/etc/services\fP, 1813 and 1812 are used
128 If a host name is specified, then radclient will do a DNS lookup, and
129 use the A record to find the IP address of the RADIUS server. If
130 there is no A record, then radclient will look for an AAAA record. If
131 there is no AAAA record, an error will be produced.
133 IPv6 addresses may be specified by surrounding it in square brackets.
134 For example, [2002:c000:0201:0:0:0:0:0], or with a port,
135 [2002:c000:0201:0:0:0:0:0]:18120.
137 The RADIUS attributes read by \fIradclient\fP can contain the special
138 attribute \fBPacket-Dst-IP-Address\fP. If this attribute exists, then
139 that IP address is where the packet is sent, and the \fBserver\fP
140 specified on the command-line is ignored.
142 If the RADIUS attribute list always contains the
143 \fBPacket-Dst-IP-Address\fP attribute, then the \fBserver\fP parameter
144 can be given as \fB-\fP.
146 The RADIUS attributes read by \fIradclient\fP can contain the special
147 attribute \fBPacket-Dst-Port\fP. If this attribute exists, then that
148 UDP port is where the packet is sent, and the \fB:port\fP specified
149 on the command-line is ignored.
151 .IP acct\ |\ auth\ |\ status\ |\ disconnect\ |\ auto
152 Use \fBauth\fP to send an authentication packet (Access-Request),
153 \fBacct\fP to send an accounting packet (Accounting-Request),
154 \fBstatus\fP to send an status packet (Status-Server), or
155 \fBdisconnect\fP to send a disconnection request. Instead of these
156 values, you can also use a decimal code here. For example, code 12 is
157 also \fBStatus-Server\fP.
159 The RADIUS attributes read by \fIradclient\fP can contain the special
160 attribute \fBPacket-Type\fP. If this attribute exists, then that type
161 of packet is sent, and the \fItype\fP specified on the command-line
164 If the RADIUS attribute list always contains the
165 \fBPacket-Type\fP attribute, then the \fBtype\fP parameter can be
169 The shared secret for this client. It needs to be defined on the
170 radius server side too, for the IP address you are sending the radius
175 A sample session that queries the remote server for
176 \fIStatus-Server\fP (not all servers support this, but FreeRADIUS has
177 configurable support for it).
182 $ echo "Message-Authenticator = 0x00" | radclient 192.0.2.42 status s3cr3t
183 Sending request to server 192.0.2.42, port 1812.
184 radrecv: Packet from host 192.0.2.42 code=2, id=140, length=54
185 Reply-Message = "FreeRADIUS up 21 days, 02:05"
193 Miquel van Smoorenburg, miquels@cistron.nl.
194 Alan DeKok <aland@freeradius.org>