Configuring the NAT64 Log Function

You can configure the NAT64 log function to record NAT operation information in real time, which strengthens device maintainability.

Context

NAT64 logs are system information generated by a NAT64 device during NAT64 translation. The information contains basic user information and NAT64 translation information. The logs record internal users' access to external networks. When internal users access an external network through a NAT64 device, they share a public IP address. For this reason, the users accessing the external network cannot be located. The log function helps trace and record internal users' access to external networks in real time, enhancing network maintainability.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run nat64 instance instance-name [ id id ]

    The NAT64 instance view is displayed.

  3. Run nat64 log session enable [ elog | syslog ]

    The NAT64 session log function is enabled.

  4. Run nat64 log host host-ip-address host-port source source-ip-address source-port [ name host-name ] [ vpn-instance vpn-instance-name ]

    A NAT64 log server is created.

  5. (Optional) Configure a flexible NAT64 log template.

    1. Run quit

      Return to the system view.

    2. (Optional) Run nat64 time local

      The time in syslogs is configured as the local time.

    3. (Optional) Run nat64 time { endtime-second-dec | endtime-second-hex | starttime-second-dec | starttime-second-hex | starttime | timestamp-second-dec | timestamp-second-hex | timestamp } { local | utc }

      The end time, start time, or timestamp in the logs is set to the local time or UTC time.

      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 nat64 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 configured, the nat64 time local command takes effect. If neither the nat64 time nor nat64 time local command is run, the default UTC time takes effect.

    4. Enter the NAT64 flexible flow log template view and run the nat64 position command to configure a NAT64 flexible flow log template.

    5. Run quit

      Return to the system view.

  6. Run commit

    The configuration is committed.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
Next topic >