peval

Section: User Commands (1)
Updated: local
Index Return to Main Contents
 

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.  

IRRToolSet 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 a whois connection to host <host-name>. The default is whois.radb.net.
-p <port-no>
Establish a whois connection to port <port-no>. The default is 43.
-protocol <protocol>
Use the <protocol> to connect to the IRR server. <protocol> can be irrd(rawhoisd), ripe(bird), and ripe_perl. The default is irrd. The ripe_perl 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 IRR host to connect.
IRR_PORT
Specifies the IRR 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})

 

ERROR AND WARNING MESSAGES

Error: Internal error.

Fails if couldn't evaluate the filter to resulting normal expression.

Unknown protocol!

Connection to IRR server failed. This can be caused by various reasons, please see Errors manpage, IRR Communication errors.

***Error: badly formed filter.

syntax error in RPSL filter specification.

For more error descriptions, please see Errors manual page.  

AUTHORS

Cengiz Alaettinoglu <cengiz@isi.edu>


 

Index

NAME
SYNOPSIS
DESCRIPTION
IRRToolSet COMMON OPTIONS
OTHER OPTIONS
ENVIRONMENT VARIABLES
EXAMPLES
ERROR AND WARNING MESSAGES
AUTHORS

This document was created by man2html, using the manual pages.
Time: 09:48:45 GMT, July 03, 2002