Syntax of GateD Configuration File Policy Statements for BGP


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: