< Home

rule copy (NAT policy view)

Function

The rule copy command allows you to clone a NAT policy rule.

Format

rule copy rule-name new-rule-name

Parameters

Parameter Description Value
rule-name Specifies the name of a NAT rule to be cloned. 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 (").
new-rule-name Specifies the new name of a NAT rule. 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 (").

Views

NAT policy view

Default Level

2: Configuration level

Usage Guidelines

If a new policy rule is similar to an existing policy rule, you can run the rule copy command to clone the existing policy rule as a new rule.

A rule name contains a maximum of 32 characters. If a new rule has a name that contains more than 32 characters, the system saves only the first 32 characters.

Example

# Clone a NAT policy rule named abc and save it as efg.

<sysname> system-view
[sysname] nat-policy
[sysname-policy-nat] rule copy abc efg
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >