用
packet tracer
做路由器备份和升级实验
设备:
Pc
,路由器,
tftp
软件服务器各一台
1
、首先用
console
线连接
pc
机与路由器
2
、然后用鼠标单击
pc1
,弹出如下图,选中
Desktop
之后再选超级终端
Terminal,
弹出的对话框(这里如果对它不孰悉的话,按它默认设置即可)按确定之后进入路由器,输入“
n
”回车后
然后配置路由器
router1
Router>en
进入特权模式
Router#conf t
进入全局配置模式
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#no ip domain loo
关闭域名查找(如果不关闭会很麻烦)
Router(config)#ena
Router(config)#enable se
Router(config)#enable secret 0
Router(config)#enable secret 0 123 enable
密码,是以
MD5
方式加密的(这里等级是写
0
)
Router(config)#serv
Router(config)#service pass
Router(config)#service password-encryption
对明文密码以密文方式显示
Router(config)#line vty 0 4
进入线程
Router(config-line)#logg syn
输入同步
Router(config-line)#logg synchronous
Router(config-line)#exec
Router(config-line)#exec-timeout 0 0
设置会话时间(
0
分
0
秒,即不限时)
Router(config-line)#pass
Router(config-line)#password gdklgd
设置
telnet
密码
Router(config-line)#login
登录提示
Router(config-line)#exi
Router(config)#int f0/0
进入接口配置模式
Router(config-if)#ip add 192.168.1.1 255.255.255.0
设
f0/0
的
ip
地址
Router(config-if)#no sh
激活接口
Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#
之后配置
tftp
服务器
ip
地址
单击
tftp
服务器,选中
Desktop
,再单击
Ip Configuration
配置
ip
如下:
Ping
192.168.1.1
证明连接成功!
之后再
telnet 192.168.1.1,
输入
telnet
密码:
gdklgd
进入特权模式密码:
123,
如图:
备份
查看
flash,
然后复制
ios
文件(
c1841-advipservicesk9-mz.124-15.T1.bin
),连后缀也要复制。
Router#sh flash:
System flash directory:
File Length Name/status
3 33591768 c 1841-advipservicesk9-mz.124-15.T1.bin
这个是
ios
的文件
2 28282 sigdef-category.xml
1 227537 sigdef-default.xml
[33847587 bytes used, 30168797 available, 64016384 total]
63488K bytes of processor board System flash (Read/Write)
开始备份:
Router#copy flash: tftp:
这个格式说明是备份
Source filename []? c1841-advipservicesk9-mz.124-15.T1.bin
要备份的
ios
文件
Address or name of remote host []? 192.168.1.2
存放的地址
Destination filename [c1841-advipservicesk9-mz.124-15.T1.bin]?
存放备份文件的名称
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 33591768 bytes]
备份成功!
33591768 bytes copied in 2.502 secs (13425000 bytes/sec)
Router#
查看
tftp
上有没有这个备份的文件
升级
首先你要知道升级的
ios
名称。
之后再
telnet 192.168.1.1,
输入
telnet
密码:
gdklgd
进入特权模式密码:
123
开始升级:
Router#copy tftp: flash:
这个说明是升级
Address or name of remote host []? 192.168.1.2 tftp
服务器的
ip
地址
Source filename []? c2600-advipservicesk9-mz.124-15.T1.bin
升级的
ios
名称
Destination filename [c2600-advipservicesk9-mz.124-15.T1.bin]?
回车
Accessing tftp://192.168.1.2/c2600-advipservicesk9-mz.124-15.T1.bin...
回车
Loading c2600-advipservicesk9-mz.124-15.T1.bin from 192.168.1.2: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 33591768 bytes]
升级成功!
33591768 bytes copied in 2.525 secs (1396830 bytes/sec)
%Error copying tftp://192.168.1.2/c2600-advipservicesk9-mz.124-15.T1.bin (Not enough space on device)
Router#