zoukankan      html  css  js  c++  java
  • 路由器与交换机配置——配置文件和系统映像备份与恢复

    一、实验目的:将交换机的配置文件和系统镜像文件备份到TFTP服务器,然后将自身的配置和系统映像删除,从TFTP服务器上恢复配置文件和系统镜像

    二、拓扑图如下:

    三、实验步骤:

    1、先给服务器Srv1配置ip地址

    2、开启Srv1TFTP服务

    3、配置交换机S1

    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  --激活端口

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

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

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

    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 来恢复备份

     

     

  • 相关阅读:
    手写堆排序和归并排序
    海量数据处理
    HDU 1532 --&&-- POJ1273 dinic 算法
    POJ 3159 最短路 SPFA
    POJ 1459 网络流 EK算法
    8.14比赛j题 http://acm.hust.edu.cn/vjudge/contest/view.action?cid=87813#overview
    单链表---邻接表
    poj 1273 ---&&--- hdu 1532 最大流模板
    HDU 2603 二分匹配
    UVA 796 连通图求桥
  • 原文地址:https://www.cnblogs.com/evolve/p/9149966.html
Copyright © 2011-2022 走看看