为防止设备故障或意外操作,通常网工们会将设备的配置文件进行备份,用得比较多的就是TFTP服务器,它小巧而实用,非常受欢迎。
操作过程非常简单,希望对那些刚刚入门的朋友们能有帮助,当然,高手就不用看了,直接飘过吧。。。
实验环境:
1.笔记本一台,使用无线网卡,其余禁掉
2.本机已安装Cisco TFTP服务器汉化绿色版
3.使用真实设备或GNS模拟器
实验拓扑:
![](https://i-blog.csdnimg.cn/blog_migrate/356356409317138dc6900d439f2792a5.png)
首先启动TFTP 服务器---》
Router的配置:
Router(config)#int f0/0
Router(config-if)#ip add 192.168.1.200 255.255.255.0 (此处必须与本机在同一网段)
Router(config-if)#no sh
Router(config-if)#ip add 192.168.1.200 255.255.255.0 (此处必须与本机在同一网段)
Router(config-if)#no sh
路由器PING笔记本测试:
Router#ping 192.168.1.100
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.100, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/24/60 ms
Sending 5, 100-byte ICMP Echos to 192.168.1.100, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/24/60 ms
测试OK!
笔记本PING路由器测试:
![](https://i-blog.csdnimg.cn/blog_migrate/88f3ed198b1ebd81d685a2474193c11d.png)
测试OK!
以上测试说明它们是互通的!
拷贝配置文件到本机:
Router#copy running-config tftp
Address or name of remote host []? 192.168.1.100 指定TFTP服务器IP地址
Destination filename [router-confg]? test888 (指定保存文件名称)
!! (拷贝OK)
555 bytes copied in 2.008 secs (276 bytes/sec)
Address or name of remote host []? 192.168.1.100 指定TFTP服务器IP地址
Destination filename [router-confg]? test888 (指定保存文件名称)
!! (拷贝OK)
555 bytes copied in 2.008 secs (276 bytes/sec)
查看TFTP服务器结果:
![](https://i-blog.csdnimg.cn/blog_migrate/5d838f8eecb4f79c0f6df22f4c3cd871.png)
文件名为test888的配置文件copy成功!
从TFTP服务器下载配置文件到路由器:
Router#copy tftp flash:
Address or name of remote host [192.168.1.100]? 确认文件存放的IP地址
Source filename [test888]? 源文件名
Address or name of remote host [192.168.1.100]? 确认文件存放的IP地址
Source filename [test888]? 源文件名
Destination filename [test888]? 目标文件名 (以上
自行指定)
%Warning:There is a file already existing with this name
Do you want to over write? [confirm] 可不理会,直接回车
Accessing tftp://192.168.1.100/test888...
Erase flash: before copying? [confirm]1 随便输入一个字符(不然FLASH中的文件会完全擦掉)
Loading test888 from 192.168.1.100 (via FastEthernet0/0): !
[OK - 555 bytes]
%Warning:There is a file already existing with this name
Do you want to over write? [confirm] 可不理会,直接回车
Accessing tftp://192.168.1.100/test888...
Erase flash: before copying? [confirm]1 随便输入一个字符(不然FLASH中的文件会完全擦掉)
Loading test888 from 192.168.1.100 (via FastEthernet0/0): !
[OK - 555 bytes]
Verifying checksum... OK (0xCFF9)
555 bytes copied in 0.224 secs (2478 bytes/sec)
Router#sh flash: 查看FLASH文件
555 bytes copied in 0.224 secs (2478 bytes/sec)
Router#sh flash: 查看FLASH文件
System flash directory:
File Length Name/status
1 555 test888 [deleted] 已删除
2 555 test888 新的配置文件已成功copy了
[1240 bytes used, 7863076 available, 7864316 total]
8192K bytes of processor board System flash (Read/Write)
File Length Name/status
1 555 test888 [deleted] 已删除
2 555 test888 新的配置文件已成功copy了
[1240 bytes used, 7863076 available, 7864316 total]
8192K bytes of processor board System flash (Read/Write)
转载于:https://blog.51cto.com/weixianfei/344532