< Home

rule move (NAT policy view)

Function

The rule move command allows you to move a NAT policy rule so that the priority of the NAT policy rule changes.

Format

rule move rule-name1{ { after | before } rule-name2 | up | down | top | bottom}

Parameters

Parameter Description Value
rule-name1 Specifies the name of a policy rule to be moved. The policy rule must exist. The value is a case-sensitive character string. The length of a name without spaces ranges from 1 to 32 characters. The length of a name with spaces ranges from 3 to 34 characters. If a name contains spaces, the name must be enclosed with quotation marks (for example, "user for test"). The name cannot contain any question marks (?), or quotation marks (").
after Moves rule-name1 after rule-name2. -
before Moves rule-name1 before rule-name2. -
rule-name2 Specifies the name of a reference policy rule. The policy rule must exist. The value is a case-sensitive character string. The length of a name without spaces ranges from 1 to 32 characters. The length of a name with spaces ranges from 3 to 34 characters. If a name contains spaces, the name must be enclosed with quotation marks (for example, "user for test"). The name cannot contain any question marks (?), or quotation marks (").
up Moves the rule before the upper one. -
down Moves the rule after the lower one. -
top Moves the rule to the top. -
bottom Move a rule to the bottom ( before the default policy ) . -

Views

NAT policy view

Default Level

2: Configuration level

Usage Guidelines

The position of a NAT policy rule determines the priority of the rule. NAT policy rules are arranged in descending order by priority. The system matches traffic with policy rules in descending order by priority.

By default, an earlier configured traffic policy rule has a higher priority.

An administrator can run the rule move command to move a policy rule to change the rule priority.

Example

# Move a rule named nat_rule_2 before a rule named nat_rule_1 so that nat_rule_2 has a higher priority than nat_rule_1.

<sysname> system-view
[sysname] nat-policy
[sysname-policy-nat] rule move nat_rule_2 before nat_rule_1
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >