route-policy

Use route-policy to create a routing policy and a node and enter routing policy node view, or enter the view of an existing routing policy node.

Use undo route-policy to remove a routing policy or a node of it.

Syntax

route-policy route-policy-name { deny | permit } node node-number

undo route-policy route-policy-name [ deny | permit ] [ node node-number ]

Default

No routing policies exist.

Views

System view

Predefined user roles

network-admin

Parameters

route-policy-name: Specifies a routing policy name, a case-sensitive string of 1 to 63 characters.

deny: Specifies the deny match mode for the routing policy node. If a route matches all the if-match clauses of the node, it is denied without being compared with the next node. If a route does not match any if-match clauses of the node, the route is compared with the next node.

permit: Specifies the permit match mode for the routing policy node. If a route matches all the if-match clauses of the node, it is handled by the apply clauses of the node. If a route does not match any if-match clauses of the node, the route is compared with the next node.

node node-number: Specifies a node number in the range of 0 to 65535. A node with a smaller number is matched first.

Usage guidelines

Use a routing policy to filter routing information. A routing policy can contain several nodes and each node contains a set of if-match and apply clauses. The if-match clauses define the match criteria of the node and the apply clauses define the actions to be taken on packets matching the criteria. The relation between the if-match clauses of a node is logical AND. All the if-match clauses must be met. The relation between nodes is logical OR. A packet passing a node passes the routing policy. If a packet does not pass any nodes, the packet does not pass the routing policy.

Examples

# Create node 10 in permit mode for routing policy policy1 and enter routing policy node view.

<Sysname> system-view
[Sysname] route-policy policy1 permit node 10
[Sysname-route-policy-policy1-10]

Related commands

display route-policy