交换机配置NTP

交换机配置NTP


华为NTP广播模式:

#核心
ntp-service refclock-master 3		#主时间服务器,使用本地时钟作为NTP主时钟,层数为3,这个按需配置,也可不配置

ntp-service authentication enable 		#启用NTP认证
ntp-service authentication-keyid 15 authentication-mode hmac-sha256 cipher superman
ntp-service reliable authentication-keyid 15

int vlan 200		#从VLANIF200发送NTP广播报文,并指定使用密钥ID 15加密
ntp-service broadcast-server authentication-keyid 15

ntp-service unicast-server 203.107.6.88 	#使用aliyun NTP同步本机
undo ntp-service server disable			#使能NTP服务器功能
dis clock 			#查看时间
#其他汇聚、接入设置
ntp-service authentication enable 
ntp authentication-keyid 15 authentication-mode hmac-sha256 cipher superman
ntp-service reliable authentication-keyid 15

int vlan 200
ntp-service broadcast-client 

华三NTP广播模式:

#核心
<H3C>sys
[H3C]ntp-service enable
[H3C]clock protocol ntp
[H3C]ntp-service refclock-master 3
[H3C]ntp-service unicast-server 203.107.6.88
[H3C]ntp-service authentication enable
[H3C]ntp-service authentication-keyid 15 authentication-mode hmac-sha256 simple superman
[H3C]ntp-service reliable authentication-keyid 15

[H3C]int vlan 200
[H3C-Vlan-interface200]ntp-service broadcast-server
[H3C-Vlan-interface200]ntp-service broadcast-server authentication-keyid 15
#汇聚接入
<SwitchA> system-view
[SwitchA] ntp-service enable
[SwitchA] clock protocol ntp
[SwitchA] ntp-service authentication enable
[SwitchA] ntp-service authentication-keyid 15 authentication-mode hmac-sha256 simple superman
[SwitchA] ntp-service reliable authentication-keyid 15

[SwitchA] interface vlan-interface 200
[SwitchA-Vlan-interface200] ntp-service broadcast-client

  • 1
    点赞
  • 25
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
配置华为交换机NTP(网络时间协议),您可以按照以下步骤进行操作: 1. 进入交换机的用户视图(user view): ``` <Switch> system-view ``` 2. 配置NTP服务器地址: ``` [Switch] ntp-service server ip-address ``` 其中,ip-address 是您要使用的NTP服务器的IP地址。您可以配置多个NTP服务器地址,以提高时间同步的可靠性。 3. 配置时区(可选): ``` [Switch] clock timezone zone-name add minutes ``` 其中,zone-name 是时区的名称,例如"CST"表示中国标准时间。minutes 是与UTC时间之间的差异,以分钟为单位。 4. 启用NTP服务: ``` [Switch] ntp-service enable ``` 5. (可选)配置交换机自身作为NTP服务器: ``` [Switch] ntp-service local-clock stratum-level level ``` 其中,level 是一个整数值,表示交换机自身作为NTP服务器的层级。 6. (可选)配置交换机作为NTP客户端主动和外部服务器进行时间同步: ``` [Switch] ntp-service unicast-server ip-address [source interface interface-type interface-number] ``` 其中,ip-address 是外部NTP服务器的IP地址。如果需要指定源接口,则需要提供 interface-type 和 interface-number。 7. (可选)配置交换机作为NTP客户端被动接收时间同步请求: ``` [Switch] ntp-service broadcast-client ``` 8. 保存配置: ``` [Switch] save ``` 以上是一个基本的NTP配置示例,您可以根据实际需要进行相应的调整。请确保交换机能够与NTP服务器正常通信,并具备权限访问所配置NTP服务器。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值