搭建一个公共的tftp服务器,不管是网络设备IOS升级有了一个公共的仓库,还是自动化设备配置备份,也有了一个可以指定的接口。
Ubuntu18.04
#tftp服务器端
apt-get install tftpd-hpa
vim /etc/default/tftpd-hpa
TFTP_USERNAME="tftp"
#选择一个tftp根目录,权限设置777
TFTP_DIRECTORY="/home/admin/tftp-backup"
#设置监听地址
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="-l -c -s"
/etc/init.d/tftpd-hpa start
[ ok ] Starting tftpd-hpa (via systemctl): tftpd-hpa.service.
/etc/init.d/tftpd-hpa status
● tftpd-hpa.service - LSB: HPA's tftp server
Loaded: loaded (/etc/init.d/tftpd-hpa; generated)
Active: active (running) since Mon 2019-05-13 02:10:40 UTC; 3 weeks 1 days ago
Docs: man:systemd-sysv-generator(8)
Tasks: 1 (limit: 4662)
CGroup: /system.slice/tftpd-hpa.service
└─1646 /usr/sbin/in.tftpd --listen --user tftp --address 0.0.0.0:69 -l -c -s /home/admin/tftp-backup
May 13 02:10:39 backup systemd[1]: Starting LSB: HPA's tftp server...
May 13 02:10:39 backup tftpd-hpa[1529]: * Starting HPA's tftpd in.tftpd
May 13 02:10:40 backup tftpd-hpa[1529]: ...done.
May 13 02:10:40 backup systemd[1]: Started LSB: HPA's tftp server.