免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1568 | 回复: 0
打印 上一主题 下一主题

FreeBSD上使用tftpd 備份 cisco 路由器的設定檔 [复制链接]

论坛徽章:
2
丑牛
日期:2013-09-29 09:47:222015七夕节徽章
日期:2015-08-21 11:06:17
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-04-08 10:06 |只看该作者 |倒序浏览
Description :

在 FreeBSD 下,使用 tftpd 保存 cisco 路由器的配置檔及cisco 路由器的 IOS 作業系統, FreeBSD 下配置狀況如下:
Environment :
作業系統: FreeBSD 5.3 Release
假設 FreeBSD Server IP:88.88.88.88
Setp 1.
修改 #vi /etc/inetd.conf 將有 tftp 的這行注解去掉

#tftp    dgram   udp     wait    root    /usr/libexec/tftpd      tftpd -l -s /tftpboot
tftp    dgram   udp     wait    root    /usr/libexec/tftpd      tftpd -l -s /tftpboot
Setp 2.
建立 /tftpboot目錄及文件,修改權限,要從 Cisco Router 裡 copy runing-config tftp: 必需於 FreeBSD 上先建立文件檔名,之後修改文件的權限為 -rw-rw-rw-,否則不能建立備份文件。

#mkdir /tftpboot
#cd /tftpboot
#touch cisco-config
#touch cisco-is-mz.122-2.T.bin
#chmod 666 cisco-config
#chmod 666 cisco-is-mz.122-2.T.bin
#ls -l cisco-config
-rw-rw-rw- 1 root wheel 0 Dec 1 14:42 cisco-config
-rw-rw-rw- 1 root wheel 0 Dec 1 14:42 cisco-is-mz.122-2.T.bin
Setp 3.
修改 #vi /etc/rc.conf 讓 tftp service 開機自動啟動
inetd_enable="YES"
#/usr/sbin/inetd      #  手動啟動 inetd
# netstat -na |grep LISTEN     # 查看 tftp 的 service port 8021 有無 runing
tcp4       0      0  *.8021                 *.*                    LISTEN
Setp 4.
CISCO Router 上的操作
cisco#show version      #  檢視 IOS 的檔名
System image file is "flash:cisco-is-mz.122-2.T.bin"
cisco#copy cisco-is-mz.122-2.T.bin tftp:      #  備份 IOS
Address or name of remote host []? 88.88.88.88
Destination filename [cisco-is-mz.122-2.T.bin]?
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
6952332 bytes copied in 25.564 secs (278093 bytes/sec)
cisco#copy running-config tftp:      #  備份 runing-config
Address or name of remote host []? 88.88.88.88
Destination filename [cisco-confg]?
!!
2510 bytes copied in 0.324 secs


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/4206/showart_521435.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP