< Home

action (PCP policy rule view)

Function

The action command specifies an action in a PCP policy rule.

Format

action { nat address-group address-group-name | no-nat }

Parameters

Parameter Description Value
nat Enables NAT for data flows. -
address-group Enables NAT to translate private IP addresses into specified addresses in a NAT address pool. -
address-group-name Specifies the name of a NAT address pool. The address pool must exist.
no-nat Disables NAT for data flows. -

Views

PCP policy rule view

Default Level

2: Configuration level

Usage Guidelines

The no-nat parameter is used for some clients. For example, when NAT is required for all addresses of the network segment 192.168.1.0/24 except 192.168.1.2, you can configure a translation rule in which the source address is set to 192.168.1.2 and disable NAT for packets originating at 192.168.1.2. Then configure another translation rule for performing NAT for packets originating at the network segment 192.168.1.0/24.

Example

# Configure a PCP policy rule named abc, in which NAT is enabled for data flows and an address pool group1 is used.

<sysname> system-view
[sysname] pcp-policy
[sysname-policy-pcp] rule name abc 
[sysname-policy-pcp-rule-abc] action nat address-group group1
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
Next topic >