用
packet tracer
做路由器备份和升级实验
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
设备:
Pc,路由器,tftp软件服务器各一台
1、首先用console线连接pc机与路由器
<?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml" />
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如下:
<?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" />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 c1841-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#
转载于:https://blog.51cto.com/gdklgd/299523