Route Control Tool - Route-Policy
OBJECTIVE
The purpose of this post is to present an introduction to Routing Policy and Routing Control - Route Control Tool - Route-Policy.
Policy Tool 2: Route-Policy
• A route-policy is a policy tool used to filter routes and set route attributes for the filtered routes.
• A route-policy consists of one more nodes. Each node can be a set of conditional statements (matching conditions) and executive statements (actions). These statements are arranged in ascending order by sequence number.

• When a route-policy is used, the node with a smaller ID is matched first. After a route matches a node, the route is not matched against other nodes. If a route fails to match all nodes, the route is filtered out.
Components of a Route-Policy
A route-policy consists of one or more nodes. Each node contains multiple if-match and apply clauses.

• permit or deny: The matching mode of a route-policy node is "permit" or "deny".
• node: specifies the node ID of a route-policy. The value is an integer ranging from 0 to 65535.
• if-match clause: defines the matching condition of a node.
• apply clause: defines an action to be performed on a matching route.
Matching Order for a Route-Policy
Route-policies use different matching conditions and modes to select routes and change route attributes.

• A route-policy contains N (N >= 1) nodes. After routes match the route-policy, the system checks whether the routes match the nodes in ascending order by node ID. The matching condition is defined in the if-match clause.
▫ After a route matches all if-match clauses of a node, the system proceeds to select a matching mode and no longer matches the route against other nodes. The matching mode can be "permit" or "deny."
▪ permit: The route is permitted, and the apply clause of the node is used to set some attributes of the route.
▪ deny: The route is rejected.
▫ If a route fails to match any if-match clause of the node, the route is further matched against the next node. If a route does not match any node, the route is rejected.
Basic Configuration Commands of a Route-Policy (1)

• Command: route-policy route-policy-name { permit | deny } node node
▫ permit: sets the matching mode of a route-policy node to permit. If a route matches all if-match clauses of a node, the apply clause of the node is executed. Otherwise, the system goes to the next node.
▫ deny: indicates that the matching mode of the route-policy node is deny. If a route matches all if-match clauses of a node, the route is rejected. Otherwise, the system goes to the next node.
▫ node node: specifies the node ID of a route-policy. When a route-policy is used, the node with the smallest node ID is matched first. After a route matches a node, the route is not matched against other nodes. If a route fails to match any nodes, the route is filtered out. The value is an integer ranging from 0 to 65535.
Basic Configuration Commands of a Route-Policy (2)

• The apply clause is used to specify an action for the route-policy and set the attributes of the routes that match the route-policy. If no apply clause is configured for a node, the node only filters routes. If one or more apply clauses are configured, all apply clauses are applied to the routes that match the node.
Reference:
HCIP-Datacom-Core Technology V1.0 Training Material
--- End


