一、环境说明
服务器操作系统版本:CentOS Linux release 7.6.1810 (Core)
TFTP server版本:tftp-hpa 5.2, with readline
H3C设备型号:F100-C-G2
二、服务搭建目的
搭建TFTP服务器用于保存H3C网络设备配置,通过在H3C设备上添加scheduler任务定时或者周期性将设备配置保存到TFTP服务器,提高运维自动化能力,减轻运维工作量,避免网络设备意外故障情况下配置丢失,提高故障响应效率,减小RTO时间。
三、配置步骤
1、安装tftp软件包
[root@wuhs tftp]# yum install xinetd tftp tftp-server
2、配置tftp-server
#
vim
/etc/xinetd.d/tftp
service tftp
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /data/tftp –c
#运行上传需要加-c参数,指定文件存储目录
disable = no
#默认是yes,tftp为关闭状态,改为no,启用tftp服务
per_source = 11
cps = 100 2
flags = IPv4
3、TFTP服务
# systemctl start xinetd.service
[root@wuhs tftp]# netstat -tunpl |grep 69
udp 0 0 0.0.0.0:69 0.0.0.0:* 4622/xinetd
4、墙上开放UDP 69端口
# firewall-cmd --zone=public --add-port=69/udp --permanent
5、网络设备添加schedule配置
配置模式下添加如下配置:
scheduler job confbackup
command 1 save force
command 2 backup startup-configuration to 192.168.0.186 IDC-FW-F100-1.cfg
scheduler schedule confbackup
user-role level-3
user-role network-operator
user-role network-admin
user-role admin
job confbackup
time repeating interval 1440
6、配置,3分钟后检查TFTP服务器文件存储目录
[root@wuhs tftp]# ll
总用量 24
-rw-rw-rw- 1 nobody nobody 21173 11月 12 15:11 IDC-FW-F100-1.cfg
1、上传时出现
"
连接请求失败
"
的提示,
解决办法:
#chmod 0777 /data/tftp
或者 #chown -R nobody.nobody /data/tftp
一、环境说明服务器操作系统版本:CentOS Linux release 7.6.1810 (Core)TFTP server版本:tftp-hpa 5.2, with readlineH3C设备型号:F100-C-G2二、服务搭建目的搭建TFTP服务器用于保存H3C网络设备配置,通过在H3C设备上添加scheduler任务定时或者周期性将设备配置保存到TFTP服务器,提高运维自动化能力,减轻运维工作量,避免网络设备意外故障情况下配置丢失,提高故障响应效率,减小RTO时间。三、配置步