如何使用Linux的tftp功能上下載cisco router的配置
作者:吳阿亭 [北京Linux俱樂部]
在局域網環境中,如果有Cisco 路由器和Linux服務器。也許你需要利用Linux的TFTP服務去下載Cisco router配置文件 startup-config,在服務器上編輯后再上載到路由器,在實現中有一些特別注意的地方。
所用軟硬件:Redhat Linux 5.2 ,Cisco 2501 路由器
1. 開啟 Redhat Linux 服務器上的tftp服務,并指明下載目錄/tmp。
[jephe@sh89 /etc]$ more .netd.conf | grep tftp
tftp dgram udp wait root /usr/sbin/tcpd in.tftpd /tmp
然后用命令killall -HUP inetd啟動它。
2. 設定/tmp權限,讓其他人有寫權限(chmod 777 /tmp)。
[jephe@sh89 /]$ ls -l | grep tmp
drwxrwxrwx 5 root root 2048 Jun 16 07:44 tmp
3. 在/tmp目錄建立一個空文件(如isdn),并設定權限(chmod 777 /tmp/isdn)
[root@shopu /tmp]# touch isdn
[root@shopu /tmp]# chmod 777 isdn
[root@shopu /tmp]# ls -l isdn
-rwxrwxrwx 1 root root 0 Jun 16 11:24 isdn
4. 進入路由器,下載配置文件。
Shanghai-ISDN#copy run tftp
Remote host [192.168.13.2]?
Name of configuration file to write [shanghai-isdn-confg]? isdn
Write file isdn on host 192.168.13.2? [confirm]
Building configuration...
Writing isdn !! [OK]
原文轉自:http://www.anti-gravitydesign.com