< Home

rule name (PBR view)

Function

The rule name command creates a PBR rule and displays the PBR rule view.

The undo rule name command deletes a PBR rule.

Format

rule name rule-name

undo rule { name rule-name | id rule-id | all }

Parameters

Parameter Description Value
rule-name

Specifies the name of a PBR 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 (").

rule-id

Specifies the ID of a PBR rule.

Before deleting a rule by ID, run the display policy-based-route rule all command to view the ID of the rule to be deleted.

The policy rule ID must exist.

all

Indicates all PBR rules.

-

Views

PBR view

Default Level

2: Configuration level

Usage Guidelines

In hot backup and cross-DC cluster scenarios, the rule IDs on devices may be different. The undo rule id rule-id command will not be synchronized to other devices. You are advised to delete rules by name. If you want to delete rules by ID, find the rule name based on the ID of the rule to be deleted on the local device and delete the rule with the same name on other devices to ensure configuration consistency. Before running the undo rule id rule-id command, run the hrp standby config enable command in the hot backup scenario and run the cluster standby config enable command in the cross-DC cluster scenario.

Example

# Create PBR rule abc.

<sysname> system-view
[sysname] policy-based-route
[sysname-policy-pbr] rule name abc
[sysname-policy-pbr-rule-abc] 
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >