路由器與交換機配置——配置文件和系統映像備份與恢復

1、實驗目的:將交換機的配置文件和系統鏡像文件備份到TFTP服務器,而後將自身的配置和系統映像刪除,從TFTP服務器上恢復配置文件和系統鏡像服務器

2、拓撲圖以下:ui

 

3、實驗步驟:blog

一、先給服務器Srv1配置ip地址ip

 

二、開啓Srv1TFTP服務路由

三、配置交換機S1rem

Switch>enable  --進入特權模式
Switch#config terminal  --進入全局配置模式
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname S1  --修改交換機名爲S1
S1(config)#line vty 0 5  --指定虛擬終端個數
S1(config-line)#password 111  --設置遠程登陸密碼
S1(config-line)#login  --保存密碼配置(必設置)
S1(config-line)#interface vlan 1   --進入到vlan1端口
S1(config-if)#ip address 192.168.1.1  255.255.255.0  --配置vlan1ip地址
S1(config-if)#no shutdown  --激活端口terminal

S1(config-if)#end  --返回特權模式
%LINK-5-CHANGED: Interface Vlan1, changed state to upflash

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to upit

S1#
%SYS-5-CONFIG_I: Configured from console by consoleio

S1#copy running-config startup-config  --保存配置
Destination filename [startup-config]?
Building configuration...
[OK]

(1)備份系統鏡像文件到tftp服務器上(路由器也是同樣的操做)

S1#show flash:  --查看系統鏡像文件的文件名
Directory of flash:/

1 -rw- 4414921 <no date> c2960-lanbase-mz.122-25.FX.bin

64016384 bytes total (59601463 bytes free

S1#copy flash tftp  --將flash的鏡像文件備份到tftp
Source filename []? c2960-lanbase-mz.122-25.FX.bin
Address or name of remote host []? 192.168.1.2  --輸入Sr1地址
Destination filename [c2960-lanbase-mz.122-25.FX.bin]? S1.bin  --設置文件名

Writing c2960-lanbase-mz.122-25.FX.bin....!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 4414921 bytes]

4414921 bytes copied in 3.062 secs (1441000 bytes/sec)

備份完畢後能夠經過# copy tftp flash來下載備份

(2)備份配置文件(和備份系統鏡像操做一致,路由器也是相同操做)

S1#copy running-config tftp:   -- 將ftp服務器上的配置文件備份到RAM
Address or name of remote host []? 192.168.1.2  
Destination filename [S1-confg]?

Writing running-config...!!
[OK - 1092 bytes]

1092 bytes copied in 0 secs
備份完畢後使用# copy tftp running-config 來恢復備份

相關文章
相關標籤/搜索