API Guide

配置 NTP
OS10(config)# ntp authenticate
OS10(config)# ntp trusted-key 345
OS10(config)# ntp authentication-key 345 mdf 0 5A60910FED211F02
OS10(config)# ntp server 1.1.1.1 key 345
OS10(config)# ntp master 7
查看 NTP 配置
OS10(config)# do show running-configuration
!
ntp authenticate
ntp authentication-key 345 mdf 0 5A60910FED211F02
ntp server 1.1.1.1 key 345
ntp trusted-key 345
ntp master 7
...
Identifier GUID-2345BFA1-854C-4031-9CEB-95AEEDC3FB8B
Version 2
Status Translation approved
示例 NTP 配置
以下示例显示了通过非默认 VRF 实例 (VRF Red) 连接的 NTP 主节点 r (11.0.0.2)、服务器 (10.0.0.1) 和客户端 (10.0.0.2)OS10 用作
NTP 服务器以使其时钟与非默认 VRF 实例中的可用 NTP 主节点保持同步并为 NTP 中的客户端提供时间。
要创建此示例 NTP 配置请执行以下操作
1. 配置 NTP 服务器
a. 创建非默认 VRF 实例并为 VRF 分配接口。
OS10(conf-vrf)# exit
OS10(config)# interface ethernet 1/1/1
OS10(conf-if-eth1/1/1)# no switchport
OS10(conf-if-eth1/1/1)# ip vrf forwarding red
OS10(conf-if-eth1/1/1)# ip address 10.0.0.1/24
OS10(conf-if-eth1/1/1)# exit
OS10(config)# interface ethernet 1/1/5
OS10(conf-if-eth1/1/5)# no switchport
OS10(conf-if-eth1/1/5)# ip vrf forwarding red
OS10(conf-if-eth1/1/5)# ip address 11.0.0.1/24
OS10(conf-if-eth1/1/5)# exit
OS10(config)#
176
系统管理