(Optional) Configuring the Client/Server Mode

In client/server mode, the clock on the client synchronizes with the master clock on the server.

Procedure

  • Configure the NTP client.
    1. Run system-view

      The system view is displayed.

    2. Run ntp-service authentication-keyid keyId authentication-mode { md5 | hmac-sha256 } { password | cipher password }

      The NTP authentication key is set.

      Using the HMAC-SHA256 algorithm for NTP authentication is recommended.

      The system automatically verifies the strength of an entered key. Only the key that meets the strength requirements can be configured. To disable key strength check, run the ntp authentication-password complexity-check disable command.

      Disabling the key strength check function causes security risks. Therefore, you are advised not to run this command.

    3. (Optional) Run ntp-service [ ipv6 ] source-interface { interface-name | interface_type interface_number } [ vpn-instance vpnName ]

      The source interface for sending NTP packets is specified.

    4. Configure an IP address for the NTP server.

      • Run ntp-service unicast-server ip-address [ version number | authentication-keyid key-id | source-interface interface-type interface-number | vpn-instance vpn-instance-name | preference | maxpoll max-number | minpoll min-number | burst | iburst | preempt | port port-number] *

        The NTP server IPv4 address is configured.

      • Run ntp unicast-server ipv6 ipv6-address [ authentication-keyid key-id | source-interface interface-type interface-number | vpn-instance vpn-instance-name | preference | maxpoll max-number | minpoll min-number | burst | iburst | preempt | port port-number ] *

        The NTP server IPv6 address is configured.

      ip-address is the NTP server IP address. It can be a host address, but not the IP address of the reference clock. If a source interface to send NTP packets is specified on the server, the server IP address specified on the client must be this specified source interface address. Otherwise, the client cannot process NTP packets sent from the server and clock synchronization fails.

      If step 2 is performed, and source-interface is configured in step 3, the source interface specified in step 3 is preferred.

      When the unicast NTP server is specified, the local router functions as the client automatically. No additional configurations are required on the server except the NTP master clock.

    5. Run commit

      The configuration is committed.

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