Thực hiện Password recovery và factory reset trên Switch, Router Cisco

Thảo luận trong 'Basic Network' bắt đầu bởi thanhduysi, 12/5/18.

  1. thanhduysi

    thanhduysi Member

    Vào một ngày đẹp trời bạn không thể nhớ nổi password để login cũng như cấu hình các thiết bị Switch của mình hoặc bạn là nhân viên mới vào công ty và anh IT cũ đã mang theo thông số cấu hình của các thiết bị mạng theo anh ấy ra đi. Để tiếp tục làm việc với các thiết bị mình sẽ quản lý thì bạn phải
    • Recovery Password và renew lại pasword mới mà vẫn không làm mất Start/Run Configuration
    • Factory Reset về trạng thái xuất xưởng của thiết bị
    Bài này mình sẽ hướng dẫn các bạn 1 cách để recovery password và reset về mặc định các thiết lập của Switch Cisco và Router Cisco khác cách đã đề cập trước đây trên diễn đàn, và thiết bị mình chọn là Cisco 3650

    passwordrecovery.jpg

    passwordrecovery-1.jpg
    • Rút dây nguồn
    • Giữ nút MODE đồng thời kết nối cable nguồn vào Switch
    Đối với dòng 2960, 2970 bạn giữ nút Mode từ lúc đèn chuyển từ màu cam sang xanh
    Đối với dòng 3560, 3750 bạn giữ nút Mode 15s cho đến khi đèn chớp màu xanh
    • Hệ thống sẽ ngừng cho tới khi khởi chạy xong flash
    • Cắm dây console với cấu hình như sau
    • Bits per second (baud): 9600
    • Data bits: 8
    • Parity: None
    • Stop bits: 1
    • Flow Control: Xon/Xoff
    • Dòng lệnh đầu tiên bạn nhập là flash_init
    Mã:
    switch: flash_init Initializing Flash... flashfs[0]: 143 files, 4 directories flashfs[0]: 0 orphaned files, 0 orphaned directories flashfs[0]: Total bytes: 3612672 flashfs[0]: Bytes used: 2729472 flashfs[0]: Bytes available: 883200 flashfs[0]: flashfs fsck took 86 seconds ....done Initializing Flash. Boot Sector Filesystem (bs:) installed, fsid: 3 Parameter Block Filesystem (pb:) installed, fsid: 4 switch: <em style="color: #0000ff; ">!--- This output is from a 2900XL switch. Output from !--- other switches will vary slightly
    • Tiếp theo là lệnh load_helper
    Mã:
    switch: load_helper switch:

    • rename flash:config.text flash:config.old để thay đổi file cấu hình
    Mã:
    switch: rename flash:config.text flash:config.old switch: !--- The config.text file contains the password !--- definition.
    • Boot để chạy flash
    Mã:
    switch: boot Loading "flash:c3500xl-c3h2s-mz.120-5.WC7.bin"...############################### ################################################################################ ###################################################################### File "flash:c3500xl-c3h2s-mz.120-5.WC7.bin" uncompressed and installed, entry po int: 0x3000 executing... !--- Output suppressed. !--- This output is from a 3500XL switch. Output from other switches !--- will vary slightly.
    • Nhấn n để bỏ qua thông báo cấu hình hệ thống
    Mã:
    --- System Configuration Dialog --- At any point you may enter a question mark '?' for help. Use ctrl-c to abort configuration dialog at any prompt. Default settings are in square brackets '[]'. Continue with configuration dialog? [yes/no]: n !--- Type "n" for no. Press RETURN to get started. !--- Press Return or Enter. Switch> !--- The Switch> prompt is displayed.
    • en để vào Privileged mode
    Mã:
    Switch>en Switch#
    1. Để thực hiện recovery password
    • Gõ lệnh rename flash:config.old flash:config.text
    Mã:
    Switch#rename flash:config.old flash:config.text Destination filename [config.text] !--- Press Return or Enter. Switch#
    • copy flash:config.text system:running-config để chép cấu hình vào NVRam
    Mã:
    Switch#copy flash:config.text system:running-config Destination filename [running-config]? !--- Press Return or Enter. 1131 bytes copied in 0.760 secs Sw1#
    Quá trình reload sẽ bắt đầu, sau khi khởi động bạn tiến hành cấu hình password mới và kết thúc bằng câu lệnh Write memory
    1. Để thực hiện factory reset
    • Gõ lệnh sau
      copy flash:config.text system:running-config
    Mã:
    Switch#copy flash:config.text system:running-config
    Bài viết liên quan:

    - Khôi phục mật khẩu (Password recovery) Router Cisco - Khôi phục bộ định tuyến Cisco bị mất mật khẩu
     

trang này