rad-bulk-make - Generate test files for rad-bulk
rad-bulk-make --template files --sessions num --ports num --max-acct num --iterations num
rad-bulk-make produces packet files suitable for using with rad-bulk(1) for testing RADIUS server configurations. It uses its own template files to build large numbers of typical RADIUS packets.
The resulting packet file will be sent to STDOUT, so that it can be redirected. It is recommended that you create a number of packet files and stick to them for testing, so that you can consistently excercise your RADIUS server.
Various classes of packets can be generated, depending on the specific configuration.
Specifies the basenames of the templates to use for packet generation. The template is composed of three files: The session script, the port script and the packet template.
The packet template is located in the file whose name is specified in the command line option. This file is composed of sections that are evaluated with Text::Template(3).
This file specifies what attributes should be placed on each packet.
This script resides in a file with the same name as the template file, with the extension .session appended to it. It contains Perl code that will be evaluated once at session creation, once for each "Alive" packet to be generated and once for the "Stop" packet.
.session
It is supposed to work on $s, which is a reference to a hash -- initially empty -- provided by rad-bulk-make.
$s
Note that each different session will receive its own $s, and the $p corresponding to the port where it was created.
$p
This script resides in a file with the same name as the template file, with the extension .port appended to it. It contains Perl code that will be evaluated once at port creation.
.port
It is supposed to work on $p, which is a reference to a hash -- initially empty -- provided by rad-bulk-make.
The number of ports to be created. Each of this ports is capable of carrying a number of concurrent sessions, depending on the configuration.
For each port, a number between 1 and num sessions will be active at any time. A session has a 20% chance of being created during each iteration.
num
Each session will generate between 0 and num "Alive" accounting packets. Start and Stop are always generated.
Each session has a 10% chance of being terminated after the "Start" and the randomly selected number of "Alive" accounting packets have been generated.
This controls how many iterations of the generator will be run. Each iteration is a scan through the list of ports / sessions. Defaults to 1000.
Shows basic usage information and then exit.
Show version numbers of this program and the libraries that are used.
Packets are specified with a keyword (Authentication, Start, Alive or Stop) and a number of input lines, with each line specifying an attribute. Blank lines delimit packets. Lines whose first non-blank character is # are ignored as comments.
Authentication
Start
Alive
Stop
#
The keyword specifies which kind of packet can be generated with this template. Each fragment is interpreted as a Text::Template(3) template.
Radius attributes are as follows:
[vendor.]attribute=value
Where vendor and attribute are the labels specified in the dictionary.
This code and all accompanying software comes with NO WARRANTY. You use it at your own risk.
This code and all accompanying software can be used freely under the terms of the GNU General Public License version 2.
Luis E. Muñoz <luismunoz@cpan.org>
perl(1), Getopt::Long(3), Net::Radius::Packet(3), Net::Radius::Dictionary(3), Text::Template(3).
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in 'Muñoz'. Assuming UTF-8
To install Net::Radius::Server, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Radius::Server
CPAN shell
perl -MCPAN -e shell install Net::Radius::Server
For more information on module installation, please visit the detailed CPAN module installation guide.