GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
peval(1) FreeBSD General Commands Manual peval(1)

peval - Low level evaluation tool for writing router config generators

peval [options] [<expression>]

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, filter 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.

By default peval evaluates the expression for ipv4 unicast address family. Also the list of address families can be specified in order to restrict the results. The syntax is: afi <afi_list> <mp-filter>.

<afi_list> is a comma separated list of address families. The supported ones are: ipv4, ipv4.unicast (same as ipv4), ipv4.multicast, ipv6, ipv6.unicast (same as ipv6), ipv6.multicast, any.unicast (ipv4.unicast, ipv6.unicast), any.multicast (ipv4.multicast, ipv6.multicast), any (ipv4.unicast, ipv4.multicast, ipv6.unicast, ipv6.multicast). If the results are to be restricted to uncomparable address families (ipv4, ipv6), in the output they will be joined using 'OR' clause.

<mp-filter> is a valid RPSLng filter over AS-numbers, ipv4/ipv6 prefixes, range operators, filter-sets, route-sets, as-sets and logical operators. For more details about mp-filter format see RPSLng documentation.

-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 ENABLE_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), or ripe(bird). The default is irrd.
-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.
-f <file-name>
IRR cache file. You can have any RPSL object in this file, except route objects. They will override these objects in IRR. This option is intended for private objects, or to test new public objects before publishing. You can specify more than one cache file by specifying this option repeatedly.
-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.

-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.
-asdot
Print AS numbers as asdot, i.e. in "X.Y" format; the default is to use RFC-5396 recommended "asplain" format.
-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.

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.

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})

Evaluate the filter for ipv4 and ipv6 address families:

% ./peval 'afi ipv6, ipv4 rs-rpslng'
({1001:0:0:0:0:0:0:0/35, 1:0:0:0:0:0:0:0/35})
 OR ({1.0.0.0/8, 1.2.3.0/24})

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 irrtoolset-errors manpage, IRR Communication errors.

***Error: badly formed filter.

syntax error in RPSL filter specification.

For more error descriptions, please see irrtoolset-errors manual page.

Cengiz Alaettinoglu <cengiz@isi.edu>

Katie Petrusha <katie@ripe.net>

local

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.