nat64 time

Function

The nat64 time command sets the start time, end time, or timestamp in NAT64 syslogs to the local time or UTC time.

The undo nat64 time command deletes the setting of the local or UTC time for the start time, end time, or timestamp.

By default, a device displays the UTC time in flexible NAT64 syslogs.

This command is supported only on the NetEngine 8000 F1A.

Format

nat64 time { endtime-second-dec | endtime-second-hex | starttime-second-dec | starttime-second-hex | starttime } { local | utc }

nat64 time { timestamp-second-dec | timestamp-second-hex | timestamp } { local | utc }

undo nat64 time { endtime-second-dec | endtime-second-hex | starttime-second-dec | starttime-second-hex | starttime } { local | utc }

undo nat64 time { timestamp-second-dec | timestamp-second-hex | timestamp } { local | utc }

Parameters

Parameter Description Value
endtime-second-dec

Indicates the end seconds expressed in decimal notation included in a log.

-

endtime-second-hex

Indicates the end seconds expressed in hexadecimal notation included in a log.

-

starttime-second-dec

Indicates the start seconds expressed in decimal notation included in a log.

-

starttime-second-hex

Indicates the start seconds expressed in hexadecimal notation included in a log.

-

starttime

Indicates the start time, including the year, month, day, hour, minute, and second.

-

local

Indicates the local time.

-

utc

Indicates the UTC time.

-

timestamp-second-dec

Indicates the seconds expressed in decimal notation of a timestamp.

-

timestamp-second-hex

Indicates the seconds expressed in hexadecimal notation of a timestamp.

-

timestamp

Indicates the timestamp, including the year, month, day, hour, minute, and second.

-

Views

Flexible log template view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
nat write

Usage Guidelines

Usage Scenario

The format of NAT64 syslog information can be flexibly configured. To configure a device as the local time in NAT64 syslogs, run the nat64 time local command.

Prerequisites

A flexible NAT syslog template has been created, and the flexible log template view is displayed.

Precautions

The time format configured using the nat64 time command takes precedence over that configured using the nat64 time local command in the flexible log template view. If the nat time command is run, the time format of the end time, start time, or timestamp takes effect according to the configured format. If the nat64 time command is not run, the nat64 time local command takes effect. If neither the nat64 time command nor the nat64 time local command is run, the default UTC time takes effect.

Example

# Configure the device to display the local time in logs generated using the flexible NAT64 log template view.
<HUAWEI> system-view
[~HUAWEI] nat syslog flexible template session
[~HUAWEI-nat-syslog-template-user] nat64 time starttime-second-dec utc
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >