簡談路由器TFTP的配置
這次我們來講解一下路由器TFTP的內容。在局域網(wǎng)環(huán)境中,如果有Cisco 路由器和Linux服務器。也許你需要利用Linux的TFTP服務去下載Cisco router配置文件 startup-config,在服務器上編輯后再上載到路由器,在實現(xiàn)中有一些特別注意的地方。
所用軟硬件:Redhat Linux 5.2 ,Cisco 2501 路由器
1. 開啟 Redhat Linux 服務器上的tftp服務,并指明下載目錄/tmp。
- [jephe@sh89 /etc]$ more inetd.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]
注釋:你必須正確地設置權限,而且必須在下載前創(chuàng)建一個空文件,否則會提示出錯。