radtest(8)

NAME
radtest - test the Radius daemon functionality

SYNOPSIS
radtest [-d radius_dir][-x debug_level][-p port][-q][r retries][-s server][-t timeout][-v] [ filename ... ]

radtest -h

radtest -l

radtest -V

NOTE
The information in this manpage may be obsolete or incomplete. Please refer to texinfo documentation for full information about GNU Radius tools.

DESCRIPTION
Radtest sends Radius daemon arbitrary requests and displays the replies it gets.

After processing command line options, radtest checks the existence of two startup files: /radtestrc and $HOME/.radtestrc and processes them if they do exist. Then it processes in turn any filenames given. If no filenames are specified, radtest enters the interactive mode and reads its commands from the standard input.

OPTIONS
A number of options can be used to alter the behaviour of the program. The options with their corresponding long equivalents are:

-d radius_dir, --directory radius_dir
    Specifies the directory where Radius startup files reside. The default is .

-x debug_level, --debug debug_level
    Specifies the debugging level. The argument should consist of two decimal numbers separated by dot. The first number corresponds to the source module, and the second sets the debugging level itself.

-p port, --port port
    Sets the port number to use when sending authentication requests. port can be either a decimal number or string representing a valid service from /etc/services. Accounting port is computed as port + 1.

-n, --quick
    Quick startup. When given this flag radtest does not process startup files.

-r number, --retry number
    Sets the number of times radtest should retry sending requests if the server does not respond within the timeout interval.

-t number, --timeout value
    Specifies the amount of time radtest should wait for the reply before giving up.

-v, --verbose
    Verbose mode. When enabled, radtest verbosely lists the contents of the messages it sends and receives.

When given any of the following options, radtest displays the corresponding information and exits.

-h, --help
    Display short usage summary.

-l, --license
    Display the license.

-V, --version
    Display the program version.

INPUT LANGUAGE SYNTAX
The input to radtest consists of a series of statements separated by semicolons. The following statements are recognized:

Assignment statement
    The assignment statement takes the form:

    NAME = value

    Where NAME is any admissible variable name. Value can be one of the following:

    Decimal number.

    IP address in dotted quad form.

    String of characters enclosed in double quotes.

    Vector of attribute-value pairs

    Dereferenced variable.

Print statement
    Print statement takes the form:

    print pritem [ pritem ...]

    The statement prints on the standard output the values of the pritems. Each pritem is either a value or a string.

Send request statement
    The statement takes two forms:

    send auth code pairs

    send acct code pairs

    Where code is the request code. It can be either numeric or string representing a valid Radius dictionary value. Pairs is a vector of attribute-value pairs to be sent.

    The AUTH form of the statement sends the request to the authentication port, ACCT form of the statement sends it to the accounting port.

Expect statement
    The statement takes the forms:

    expect code

    expect code pritem [ pritem ... ]

    The statement instructs radtest to expect the code in the reply to its previous request. If the expected code is received, the execution continues from the next statement. Otherwise the message is printed, and the execution is aborted. The kind of the message depends on the form of the statement used. In the first form, radtest displays the message "expect failed", in the second form, it prints the pritems just as the print command does.

PREDEFINED VARIABLES
The following variables are predefined. The data type of each variable is given in parentheses.

auth_server (IPADDRESS)
    Keeps the IP address of the authentication server.

acct_server (IPADDRESS)
    Keeps the IP address of the accounting server.

auth_port (INTEGER)
    Keeps the authentication port number.

acct_port (INTEGER)
    Keeps the accounting port number.

timeout (INTEGER)
    Keeps the timeout value.

retry (INTEGER)
    Keeps the number of retries before giving up.

secret (STRING)
    Keeps the shared secret string.

AUTHORS
Sergey Poznyakoff, gray@farlep.net

SEE ALSO
radiusd(8rad)