Routing Policy File Syntax

A routing policy file contains one or more policy rule entries. Each routing policy entry consists of:

  • A policy entry rule name, unique within the same policy.

  • Zero or one match type. If no type is specified, the match type is all, so all match conditions must be satisfied.

  • Zero or more match conditions. If no match condition is specified, then every routing entity matches.

  • Zero or more actions. If no action is specified, the packet is permitted by default.

Each policy entry in the file uses the following syntax:

entry <routingrulename>{
	if <match-type> {
		<match-conditions>;
	} then {
		<action>;
	}
}

The following is an example of a policy entry:

entry ip_entry {
	if match any {
		nlri  10.203.134.0/24;
		nlri  10.204.134.0/24;
	} then {
		next-hop   192.168.174.92;
		origin   egp;
	}
}

Policy entries are evaluated in order, from the beginning of the file to the end, as follows:

  • If a match occurs, the action in the then statement is taken:
    • if the action contains an explicit permit or deny, the evaluation process terminates.

    • if the action does not contain an explicit permit or deny, the action is an implicit permit, and the evaluation process terminates.

  • If a match does not occur, the next policy entry is evaluated.

  • If no match has occurred after evaluating all policy entries, the default action is deny.

Often a policy has a rule entry at the end of the policy with no match conditions. This entry matches anything not otherwise processed, so that the user can specify an action to override the default deny action.

Policy match type, match conditions and action statements are discussed in the following sections: