< Home

time-range (NAT policy rule view)

Function

The time-range command sets the time range during which a NAT policy rule takes effect.

The undo time-range command cancels the time range during which a NAT policy rule takes effect.

Format

time-range time-range-name

undo time-range

Parameters

Parameter Description Value
time-range-name Specifies the name of a time range. The specified time range must exist.

Views

NAT policy rule view

Default Level

2: Configuration level

Usage Guidelines

You must run the time-range or absolute-range command to set a time range and then run the time-range command to specify the time range for a NAT policy.

If you delete the effective duration of a NAT policy or do not configure an effective duration for a NAT policy, the NAT policy is always effective.

If a session is created for a service when a policy is valid, the device forwards subsequent packets of the service based on the session even if the policy expires. If the time range is also referenced by another policy, the FW will age the existing session, and therefore the service is interrupted.

Example

# Specify work_time as the time range during which NAT policy rule policy_nat takes effect.

<sysname> system-view
[sysname] NAT-policy
[sysname-policy-nat] rule name policy_nat
[sysname-policy-nat-rule-policy_nat] time-range work_time
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >