在 H3C Comware V7 平台上,ntp-service unicast-server 命令是支持 vpn-instance 参数的。如果无法输入,通常是当前登录的用户角色权限不足,或命令输入有误。
请使用系统视图下的完整命令:
vpn-instance vpn-instance-name:指定NTP服务器所属的VPN实例。
source interface-type interface-number:(可选)指定发送NTP报文的源接口。
priority:(可选)指定该服务器为优先选择。
version number:(可选)指定NTP版本号(1-4),缺省为4。
配置示例(假设VPN实例名为 MGMT,NTP服务器IP为 10.184.18.1):
暂无评论
ntp-service unicast-server 命令 原生不支持携带 vpn-instance 参数,这条完整语法:ntp-service unicast-server x.x.x.x vpn-instance XXX
vpn-instance 关键字;ntp-service unicast-server 地址 vpn-instance 实例名。system-view
# 1、开启NTP
ntp-service enable
# 可选开启NTP认证(安全规范)
ntp-service authentication enable
ntp-service authentication-keyid 10 authentication-mode hmac-sha256 cipher NTP@pass123
ntp-service reliable authentication-keyid 10
# 2、指定NTP发起请求的源接口(该接口已经绑定目标VPN实例)
interface Vlan-interface 99
ip binding vpn-instance TIME_VPN # 此接口归属NTP服务器所在VPN
ip address 10.255.99.1 255.255.255.0
ntp-service source Vlan-interface 99
# 3、全局路由表配置静态路由,访问NTP服务器时送入对应VPN转发
ip route-static 【NTP服务器IP】 255.255.255.255 NULL 0 vpn-instance TIME_VPN
# 4、配置NTP服务器(不带vpn-instance,依靠上面路由+源接口控制转发域)
ntp-service unicast-server 【NTP服务器IP】 keyid 10
ntp-service source Vlan-interface 99:所有 NTP 报文统一从绑定 VPN 的三层口发出;ntp-service unicast-server x.x.x.x vpn-instance xx。ntp-service unicast-server 10.99.0.1 vpn-instance TIME_VPN keyid 10
# 查看NTP会话、是否建立连接
display ntp-service sessions
# 查看系统时间同步状态
display ntp-service status
# 跟踪去往NTP服务器的路由,确认路由送入了VPN实例
tracert -a 源接口IP NTP_IP
display ip routing-table NTP_IP
VPN_INSTANCE: TIME_VPN 代表路由转发正确。ntp-service source 但是没有配置全局静态路由指向 VPN:NTP 报文依旧走公网路由,无法连通私网 NTP;# 在绑定VPN的VLANIF接口抓包,观察是否发出NTP(UDP 123)报文
diagnose capture interface Vlan-interface 99 port 123
diagnose capture start
# 触发一次NTP同步
diagnose capture stop
diagnose capture display
暂无评论
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论