For BGP, the general GateD policy syntax is as follows:
import proto bgp ( as <ASN > | aspath <aspath_spec > ) restrict;
import proto bgp ( as <ASN > | aspath <aspath_spec > )
[ preference <GateD preference > ] {
#Here is the "restrict" form for a single NRLI:
<NLRI specification > restrict;
#Here is the non-"restrict" form for a single NRLI:
<NLRI specification > [ preference <GateD preference > ] ;
...
};
export proto bgp as <ASN > restrict;
export proto bgp as <ASN >
[ metric <BGP metric > ] {
#Here is the "restrict" form for an entire source:
proto <source > restrict;
#Here is the non-"restrict" form for a source:
proto <source > [ metric <BGP metric > ] {
#Here is the "restrict" form for a single NRLI:
<NLRI specification > restrict;
#Here is the non-"restrict" form for a single NRLI:
<NLRI specification > metric <BGP metric >;
...
};
...
};
where, for both import and export we have:
<ASN > is an IP AS number,
<aspath_spec > is an AS path specification,
<NLRI specification > is any of:
exact or refines match modifier
host ( <IP address > | <DNS name > )
all or default.
Also, import can have a
< a number which GateD uses as an
internal, GateD-specific metric, different from protocol-specific metrics in that
GateD's preference is used during route selection; it allows for comparison of routes
on a "normalized" scale, so that one need not compare different, generally
incompatible ideas of "metric" which exist internal to the various routing protocols.
Thus, GateD tags inbound routing
information, where routes come from various routing protocols, with a preference,
which is really a metric internal to GateD.
(For more about "preference" as used in IDRP and GateD, and the "metrics" used
by routing protocols, with an explanation of the differences between them, see
this note about the difference between the
IDRP preference and the GateD preference.)
Upon export, one can set the
<