The IDRP policy statements were developed with an eye to conforming to the
general sense of the current GateD policy syntax; however, the presence of
a much richer set of path attributes in IDRP than are available in,
< <= = == <
import and export PolicyThe GateD policy language for Merit IDRP is based upon the pre-existent policy language for BGP; and understanding of the latter aids in understanding the former, and it is hoped that users of the GateD's BGP will find the transition to IDRP smoother, as a result. As a review, here is an explanation of the BGP policy language in GateD.
import and export Policyimport" statements, for the
GateD configuration file, is:
import proto idrp rdi <osi_rdi_or_any > <idrp_import_optional_info >
<idrp_import_option > ;
import proto idrp rdpath <rdpath_spec > <idrp_import_optional_info >
<idrp_import_option > ;
where:
<> is either a specific RDI or the keyword "any";
<
<
<idrp_import_option >
::= restrict
| <idrp_preference_option > '{' <idrp_parse_import_list > '}'
;
<idrp_preference_option >
::= /* Empty */
/* just a GateD preference; same form as other GateD imports */
| gated-pref <preference >
| idrp-pref <idrp_preference >
| gated-pref <preference > idrp-pref <idrp_preference >
| idrp-pref <idrp_preference > gated-pref <preference >
;
HOWEVER...the <idrp_import_optional_info > is whole set of tests which can
appear in any order:
<idrp_import_optional_info > ::= /* Empty */
| <idrp_local_intf_test >
| <idrp_policy_atts_clause >
| <idrp_atts_clause >
| <idrp_local_intf_test > <idrp_policy_atts_clause >
| <idrp_local_intf_test > <idrp_atts_clause >
| <idrp_policy_atts_clause > <idrp_atts_clause >
| <idrp_atts_clause > <idrp_policy_atts_clause >
| <idrp_local_intf_test > <idrp_policy_atts_clause > <idrp_atts_clause >
| <idrp_local_intf_test > <idrp_atts_clause > <idrp_policy_atts_clause >
;
The sub-pieces are as follows:
<idrp_local_intf_test > ::= local-interface <host >
| local-NET <osi_address >
;
<idrp_policy_atts_clause > is another curly-brace-delimited
set of tests for incoming destinations, based upon path attributes:
idrp-ps-policy-atts {
<idrp_ps_policy_attribute_entries >
}
with
<idrp_ps_policy_attribute_entries > a series of one or more of the following:
<idrp_ps_policy_attribute_entry >::= <idrp_ps_policy_route_option > ';'
| <idrp_ps_policy_hopcount > ';'
| <idrp_ps_policy_nexthop > ';'
| <idrp_ps_policy_dist_option > ';'
| <idrp_ps_policy_QOS_option > ';'
;
and
<idrp_ps_policy_route_option > ::= route-server <null_or_restrict >
| extinfo <null_or_restrict >
| hierarchical-recording <null_or_restrict >
| multi-exit <null_or_restrict >
| multi-exit <number_compare_op > <idrp_multiexit_value >
;
<idrp_ps_policy_hopcount > ::=
hopcount <number_compare_op > <idrp_rd_hopcount_value >
;
<idrp_ps_policy_nexthop > ::= NET <osi_address >
| NET <osi_address > SNPA <idrp_snpa >
| gateway <host >
| interface <host >
;
<idrp_ps_policy_dist_option > ::= dist-list-include '{' <idrp_ps_dist_list > '}'
| dist-list-exclude '{' <idrp_ps_dist_list > '}'
;
<idrp_ps_policy_QOS_option > ::= rd-transit-delay <null_or_restrict >
| rd-transit-delay <number_compare_op > <idrp_transit_delay_value >
| rdlre <null_or_restrict >
| rdlre <number_compare_op > <idrp_rdlre_value >
| expense <null_or_restrict >
| expense <number_compare_op > <idrp_expense_value >
| priority <null_or_restrict >
| priority <number_compare_op > <idrp_priority_value >
| capacity <null_or_restrict >
| capacity <number_compare_op > <idrp_capacity_value >
;
<number_compare_op > ::= /* empty */
| '<'
| "<="
| '=' | "=="
| "!=" | "< >"
| ">="
| '>'
;
<null_or_restrict > ::= /* empty */
| restrict
;