peval(1)

NAME
peval

SYNOPSIS
peval [options] [<expression>]

DESCRIPTION

peval is a low level policy evaluation tool that can be used to write router configuration generators. peval, in a command loop, inputs policy expressions, expands the AS sets, route sets, AS numbers (unless specified otherwise using command line options), evaluates the resulting expression and outputs the result. Instead of a command loop, the expression can be given as an argument.

RAToolSet COMMON OPTIONS

    -help
        Print summary of command-line options and abort.

    -T [whois_query | whois_response | input | all]
        Trace the argument. Useful for debugging.

    -D <integer>
        Print debugging messages of debug channel <integer> (if compiled with DEBUG defined).

    -version
        Print the version number and quit.

    -h <host-name>
        Establish an radbserver connection to host <host-name>.

    -p <port-no>
        Establish an radbserver connection to port <port-no>.

    -protocol <protocol>
        Use the <protocol> to connect to the IRR server. <protocol> can be irrd, ripe, and bird. The default is irrd. The ripe option should be used with the old ripe server.

    -s <source-list>
        Consider the sources specified in the comma separated <source-list>. If an object is defined in multiple sources in <source-list>, peval uses the definition first encountered in <source-list> from left to right.

    -rusage
        Print resource usage upon completion.

    -prompt <string>
        Set the interactive prompt to <string>.

    -ignore_errors
        Do not print error and warning messages due to communication to the database server or parsing policy objects.

    -report_errors
        Print error and warning messages due to communication to the database server or parsing policy objects.

OTHER OPTIONS

    -no-as-set
        Do not expand AS sets into AS numbers.

    -no-route-set
        Do not expand route sets into prefixes.

    -no-as
        Do not expand AS numbers into prefixes.

    -none
        Do not expand anything.

    -symbolic
        Do a prior symbolic evaluation, then do the expansions and then re-evaluate. This may be faster for some policies.

    -compressed
        Print prefix lists using the more specific operators. Otherwise, an expression like 128.9.0.0/16^24 will result in 256 prefixes being printed.

    -e <expression>
        Evaluate expression.

ENVIRONMENT VARIABLES

    IRR_HOST
        Specifies the radbserver host to connect.

    IRR_PORT
        Specifies the radbserver port number to connect.

    IRR_SOURCES
        Specifies the source list (comma separated) to consider.

Command line options take precedence over environment variables.

EXAMPLES

Perform only symbolic evaluation:

% ./peval -none
peval> (AS1 OR AS2) AND AS1
((AS1))
peval> AS1 AND NOT AS1
NOT ANY
peval>

Expand AS macros and evaluate:

% ./peval -no-as AS-ANSCT
((AS1326 AS2002 AS2538 AS2752 AS3723))

Expand all and evaluate (e.g. multihomed routes to AS1220 and AS226):

% ./peval 'AS1220 AND AS226'
({192.237.125.0/24, 192.92.56.0/24, 196.2.41.0/24, 196.2.40.0/24})

AUTHORS
Cengiz Alaettinoglu <cengiz@isi.edu>