TFTP(Trivial File Transfer Protocol)来实现文件的传送是一种基于UDP连接的文件传输。
如果想通过tftp取得网络设备上的配置,首先在计算机上(我的操作系统为ubuntu)打开69监听(tftp server),建立/tftpboot目录,并chmod 777 该目录。通过netstat -an | grep udp可以看到这样的条目 :
$ netstat -an | grep udp
udp 0 0 0.0.0.0:69 0.0.0.0:*
1. 华为6500交换机
<SW-S6506>tftp 192.168.0.25 put vrpcfg.cfg
Transfer file in binary mode.
Copying file to remote tftp server. Please wait... /
TFTP: 15635 bytes sent in 0 second(s).
File uploaded successfully.
2. cisco3800路由器
C3845#copy running-config tftp
Address or name of remote host []? 192.168.0.25
Destination filename [c3845-confg]?
!!
4207 bytes copied in 0.308 secs (13659 bytes/sec)
C3845#
3. 港湾M582
copy flash config tftp:// 192.168.0.25
4. 华为3050
[3050]tftp put vrpcfg.txt //10.1.1.5/vrpcfg_floor1.txt