當遇到路由器配置大於NVRAM的大小時,通常的建議是將配置保存在外部的TFTP服務器上,然後在路由器上使用命令boot network或boot host來調取配置文件。
我們這裏介紹一個方法可以避免藉助於外部主機:
我們這裏介紹一個方法可以避免藉助於外部主機:
|
1 配置路由器,在配置中,配置兩條從網絡上調用配置的命令:
ervice config
oot network tftp://10.10.10.10/host-config
oot host tftp://10.10.10.10/startup-config
10.10.10.10是路由器LAN口的地址
ervice config
oot network tftp://10.10.10.10/host-config
oot host tftp://10.10.10.10/startup-config
10.10.10.10是路由器LAN口的地址
2 再在配置中增加下面兩條alias命令,這樣路由器感覺是到網絡上的外接服務器去下載配置,實際上還是在本地的flash中下載配置:
tftp-server flash:/startup-config alias startup-config
tftp-server flash:/host-config alias host-config
tftp-server flash:/startup-config alias startup-config
tftp-server flash:/host-config alias host-config
3 保存配置
4 將配置文件傳到flash中
配置好了以後,路由器重起。就可以從本地的TFTP 服務器上讀取配置了,如果想保存running configuration:
copy running-config flash:startup-config