歡迎您光臨本站 註冊首頁

使用Linux的tftp功能配置cisco router

←手機掃碼閱讀     火星人 @ 2014-03-29 , reply:0

在區域網環境中,如果有Cisco 路由器和Linux伺服器。也許你需要利用Linux的TFTP服務去下載Cisco router配置文件 startup-config,在伺服器上編輯后再上載到路由器,在實現中有一些特別注意的地方。

所用軟硬體: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]

註釋:你必須正確地設置許可權,而且必須在下載前創建一個空文件,否則會提示出錯。

[火星人 ] 使用Linux的tftp功能配置cisco router已經有398次圍觀

http://coctec.com/docs/linux/show-post-202733.html