SlideShare a Scribd company logo
BACHKHOA-APTECH CHUYÊN MÔN MẠNG NĂM 2021
Khôi phục Password cho Router và Switch.
Lab - Khôi phục Password cho Router.
I. Mô tả bài Lab:
- Bài Lab bao gồm một Router và một PC kết nối bằng cable Console. Sinh viên thực
hiện thao tác khôi phục lại Password cho Router trong TH quên Password đăng
nhập.
II. Yêu cầu:
- Kết nối giữa Router và PC bằng cable Console.
- Đăng nhập vào Router.
- Trong trường hợp quên mất Password, khôi phục lại Password cho Router theo quy
tắc không load thông tin đã lưu lại trong NVRAM.
III. Mô hình bài Lab:
IV. Thực hiện
B1: Thao tác đăng nhập và xác nhận Pasword trong Router
- Sinh viên đăng nhập vào trong Router
- Trong trường hợp quên mất Password đăng nhập, giao diện Router sẽ thông báo là
Password sai bằng thông báo:% Bad Passwords
Processor board ID JAD05190MTZ (4292891495)
M860 processor: part number 0, mask 49
Bridging software.
X.25 software, Version 3.0.0.
2 FastEthernet/IEEE 802.3 interface(s)
32K bytes of non-volatile configuration memory.
63488K bytes of ATA CompactFlash (Read/Write)
Press RETURN to get started!
User Access Verification
Password:
Password:
Password:
% Bad passwords
BACHKHOA-APTECH CHUYÊN MÔN MẠNG NĂM 2021
- Tiến hành khởi động lại Router, trong quá trình POST của Router ấn tổ hợp phím
Ctrl + Break trên bàn phím (lưu ý: bàn phím laptop có rất ít loại có nút Break). Giao
diện command line Rommon của Router.
System Bootstrap, Version 12.1(3r)T2, RELEASE SOFTWARE (fc1)
Copyright (c) 2000 by cisco Systems, Inc.
Initializing memory for ECC
..
c2811 processor with 524288 Kbytes of main memory
Main memory is configured to 64 bit mode with ECC enabled
Readonly ROMMON initialized
Self decompressing the image :
###############
monitor: command "boot" aborted due to user interrupt
rommon 1 >
- Nguyên lý là không khởi động các cấu hình đã được lưu trong NVRAM, trong mode
Rommon gõ câu lệnh confreg 0x2142 – cho phép Router khởi động nhưng không
load các cấu hình trong NVRAM. Tiến hành Reset Router.
rommon 1 > confreg 0x2142
rommon 2 > reset
- Router không load NVRAM sẽ quay trở về trạng thái ban đầu – trạng thái không có
cấu hình.
Cisco Internetwork Operating System Software
IOS (tm) C2600 Software (C2600-I-M), Version 12.2(28), RELEASE SOFTWARE (fc5)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2005 by cisco Systems, Inc.
Compiled Wed 27-Apr-04 19:01 by miwang
Cisco 2621 (MPC860) processor (revision 0x200) with 253952K/8192K bytes of memory
.
Processor board ID JAD05190MTZ (4292891495)
M860 processor: part number 0, mask 49
Bridging software.
X.25 software, Version 3.0.0.
2 FastEthernet/IEEE 802.3 interface(s)
32K bytes of non-volatile configuration memory.
63488K bytes of ATA CompactFlash (Read/Write)
--- System Configuration Dialog ---
Continue with configuration dialog? [yes/no]:
BACHKHOA-APTECH CHUYÊN MÔN MẠNG NĂM 2021
- Vì ở đây mục tiêu là đăng nhập được vào Router từ mode Privilege và mode Global
để thao tác, nên phải giữ lại các cấu hình cũ đã triển khai. Sử dụng câu lệnh Show
startup-config để kiểm tra những cấu hình cũ đã được triển khai.
Router#show startup-config
Using 579 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname ROUTER-R1
!
!
!
enable secret 5 $1$mERr$9jKJNgUEZtVMiVXVkyrKK.
…………
line con 0
password ROUTER@365
login
!
line aux 0
!
line vty 0 4
password ROUTER@365
login
- Copy lại những cấu hình đã lưu trong NVRAM.
Router#copy startup-config running-config
Destination filename [running-config]?
579 bytes copied in 0.416 secs (1391 bytes/sec)
ROUTER-R1#
%SYS-5-CONFIG_I: Configured from console by console
- Thay đổi Password mới để đăng nhập.
ROUTER-R1(config)#enable secret ROUTER@365
ROUTER-R1(config)#line console 0
ROUTER-R1(config-line)#password ROUTER@365
ROUTER-R1(config-line)#login
ROUTER-R1(config-line)#exit
ROUTER-R1(config)#line vty 0
ROUTER-R1(config-line)#password ROUTER@365
ROUTER-R1(config-line)#login
ROUTER-R1(config-line)#exit
ROUTER-R1(config)#line aux 0
ROUTER-R1(config-line)#password ROUTER@365
ROUTER-R1(config-line)#login
ROUTER-R1(config-line)#exit
BACHKHOA-APTECH CHUYÊN MÔN MẠNG NĂM 2021
ROUTER-R1(config)#service password-encryption
ROUTER-R1(config)# do write
- Sau khi đã đặt password mới xong, khởi động lại Router và vào lại mode Rommon
để thay đổi lại thông số : confreg 0x2102 – cho phép Router khởi động và load thông
tin trong NVRAM (các Password mới đã đặt).
Readonly ROMMON initialized
Self decompressing the image :
########
monitor: command "boot" aborted due to user interrupt
rommon 1 > confreg 0x2102
rommon 2 > reset
- Khởi động lại Router để kiểm tra những Password mới đã thay đổi
User Access Verification
Password:
ROUTER-R1>enable
Password:
ROUTER-R1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
ROUTER-R1(config)#
BACHKHOA-APTECH CHUYÊN MÔN MẠNG NĂM 2021
Lab - Khôi phục Password trên Switch.
- Giống với trên Router, nếu người dùng quên mất Password đăng nhập vào Switch
cũng sẽ có thông báo : % bad password
Press RETURN to get started.
User Access Verification
Password:
Password:
Password:
% Bad passwords
- Trên Switch có nút MODE, ấn MODE để Switch khởi động trong chế độ trắng, chế
độ không load các câu lệnh cũ đã triển khai (bao gồm cả các câu lệnh triển khai
Password).
32K bytes of flash-simulated non-volatile configuration memory.
Base ethernet MAC Address: 00:09:7C:76:8B:40
Motherboard assembly number: 73-5781-09
Power supply part number: 34-0965-01
Motherboard serial number: FOC06150A9Y
Power supply serial number: DAB061520N3
Model revision number: C0
Motherboard revision number: A0
Model number: WS-C2950-24
System serial number: FHK0616Z150
--- System Configuration Dialog ---
Would you like to enter the initial configuration dialog? [yes/no]:
00:00:12: %SPANTREE-5-EXTENDED_SYSID: Extended SysId enabled for type vlan
- Lưu ý: lúc khởi động lại dưới chế độ trắng, các cấu hình cũ đã được triển khai vẫn
sẽ được lưu lại, nhưng không load. Những file đó sẽ được chuyển đổi thành:
File cũ File bị chuyển khi khởi động ở chế độ trắng
Config.text Config.text.renamed
Vlan.dat Vlan.dat.renamed
- Khôi phục lại các cấu hình cũ
Switch#copy config.text.renamed running-config
Destination filename [running-config]?
1187 bytes copied in 1.172 secs (1013 bytes/sec)
ROUTER-SW1#copy vlan.dat.renamed vlan.dat
Destination filename [vlan.dat]?
Copy in progress...C
676 bytes copied in 0.028 secs (24143 bytes/sec)
ROUTER-SW1#
BACHKHOA-APTECH CHUYÊN MÔN MẠNG NĂM 2021
- Đặt password mới cho Switch và Reload lại Switch
SW1(config)#enable secret ROUTER@365
SW1(config)#line console 0
SW1(config-line)#password ROUTER@365
SW1(config-line)#login
SW1(config-line)#exit
SW1(config)#
SW1(config)#service password-encryption
SW1(config)#exit
SW1#
SW1#reload
System configuration has been modified. Save? [yes/no]: yes
Building configuration...
[OK]
- Switch khởi động lại, đăng nhập bằng password mới đã thiết lập.
User Access Verification
Password:
SW1>enable
Password:
SW1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
SW1(config)#

More Related Content

DOC
Khôi phục mật khẩu trên router cisco
 
DOCX
St2. Nhung cau lenh co ban tren Router - Switch Cisco.docx
DOCX
Ccna lap
DOCX
Chương 2 căn bản cisco ios
PDF
Athena lab Hướng Dẫn Học CCNA
PDF
AThena_Lab_HuongDan_Hoc_CCNA.pdf
DOC
Lab 1 2 đặt mật khẩu cho router
PPTX
Cau hinh router coban
Khôi phục mật khẩu trên router cisco
 
St2. Nhung cau lenh co ban tren Router - Switch Cisco.docx
Ccna lap
Chương 2 căn bản cisco ios
Athena lab Hướng Dẫn Học CCNA
AThena_Lab_HuongDan_Hoc_CCNA.pdf
Lab 1 2 đặt mật khẩu cho router
Cau hinh router coban

Similar to St5. Khoi phuc Password cho Router va Switch Cisco.docx (20)

PPTX
Cấu hình Router cơ bản(Cisco)
PDF
CCNA Lab Guide Tieng Viet v4.0.pdf
DOCX
Bao cao thuc tap tuan2
PPTX
Báo cáo thực tập tuần 2
DOCX
Báo cáo tuần 2
DOCX
PPT
Cau hinh Router mon mang may tinh 123455
PDF
lab ccna ttg v3
DOC
Báo cáo thực tập tuần 1
DOC
Thực hành cơ sở mạng truyền thông
DOC
Báo cáo thực tập tuần 4
PDF
Lab can ban ccna
DOC
Khái niệm về vlan và cách cấu hình các vlan
PDF
Lab ccna ttg_v1
DOCX
Hướng dẫn sử dụng gns3
PDF
Baithuchanhso4 5
PDF
Dir 300
DOCX
Trang status hiển thị trạng thái và cấu hình hiện tại của router
PPTX
Lab_basic_config_router.pptx
PDF
CCNA Cơ Bản_Tiếng Việt
Cấu hình Router cơ bản(Cisco)
CCNA Lab Guide Tieng Viet v4.0.pdf
Bao cao thuc tap tuan2
Báo cáo thực tập tuần 2
Báo cáo tuần 2
Cau hinh Router mon mang may tinh 123455
lab ccna ttg v3
Báo cáo thực tập tuần 1
Thực hành cơ sở mạng truyền thông
Báo cáo thực tập tuần 4
Lab can ban ccna
Khái niệm về vlan và cách cấu hình các vlan
Lab ccna ttg_v1
Hướng dẫn sử dụng gns3
Baithuchanhso4 5
Dir 300
Trang status hiển thị trạng thái và cấu hình hiện tại của router
Lab_basic_config_router.pptx
CCNA Cơ Bản_Tiếng Việt
Ad

Recently uploaded (7)

DOCX
Truyền Giá Trị Và Tham Chiếu trong Java | Các Cách Truyền Dữ Liệu vào Phương ...
DOCX
GIẢI PHÁP BẢO MẬT THÔNG TIN LOGISTICS CHO DOANH NGHIỆP VIETTEL POST TRONG KỶ ...
PPTX
bài thuyết trình thi công cầu elearning 3.pptx
PPTX
thi công cầu thuyết trình elearning 2.pptx
PDF
Bài giảng - Phat Trien UD Tren Linux_Final_14092023.pdf
DOCX
Đệ Quy (Recursion) trong Java | Giải thích và Ứng dụng
DOCX
Đánh giá độ tin cậy lưới điện Khu II Trường Đại học Cần Thơ
Truyền Giá Trị Và Tham Chiếu trong Java | Các Cách Truyền Dữ Liệu vào Phương ...
GIẢI PHÁP BẢO MẬT THÔNG TIN LOGISTICS CHO DOANH NGHIỆP VIETTEL POST TRONG KỶ ...
bài thuyết trình thi công cầu elearning 3.pptx
thi công cầu thuyết trình elearning 2.pptx
Bài giảng - Phat Trien UD Tren Linux_Final_14092023.pdf
Đệ Quy (Recursion) trong Java | Giải thích và Ứng dụng
Đánh giá độ tin cậy lưới điện Khu II Trường Đại học Cần Thơ
Ad

St5. Khoi phuc Password cho Router va Switch Cisco.docx

  • 1. BACHKHOA-APTECH CHUYÊN MÔN MẠNG NĂM 2021 Khôi phục Password cho Router và Switch. Lab - Khôi phục Password cho Router. I. Mô tả bài Lab: - Bài Lab bao gồm một Router và một PC kết nối bằng cable Console. Sinh viên thực hiện thao tác khôi phục lại Password cho Router trong TH quên Password đăng nhập. II. Yêu cầu: - Kết nối giữa Router và PC bằng cable Console. - Đăng nhập vào Router. - Trong trường hợp quên mất Password, khôi phục lại Password cho Router theo quy tắc không load thông tin đã lưu lại trong NVRAM. III. Mô hình bài Lab: IV. Thực hiện B1: Thao tác đăng nhập và xác nhận Pasword trong Router - Sinh viên đăng nhập vào trong Router - Trong trường hợp quên mất Password đăng nhập, giao diện Router sẽ thông báo là Password sai bằng thông báo:% Bad Passwords Processor board ID JAD05190MTZ (4292891495) M860 processor: part number 0, mask 49 Bridging software. X.25 software, Version 3.0.0. 2 FastEthernet/IEEE 802.3 interface(s) 32K bytes of non-volatile configuration memory. 63488K bytes of ATA CompactFlash (Read/Write) Press RETURN to get started! User Access Verification Password: Password: Password: % Bad passwords
  • 2. BACHKHOA-APTECH CHUYÊN MÔN MẠNG NĂM 2021 - Tiến hành khởi động lại Router, trong quá trình POST của Router ấn tổ hợp phím Ctrl + Break trên bàn phím (lưu ý: bàn phím laptop có rất ít loại có nút Break). Giao diện command line Rommon của Router. System Bootstrap, Version 12.1(3r)T2, RELEASE SOFTWARE (fc1) Copyright (c) 2000 by cisco Systems, Inc. Initializing memory for ECC .. c2811 processor with 524288 Kbytes of main memory Main memory is configured to 64 bit mode with ECC enabled Readonly ROMMON initialized Self decompressing the image : ############### monitor: command "boot" aborted due to user interrupt rommon 1 > - Nguyên lý là không khởi động các cấu hình đã được lưu trong NVRAM, trong mode Rommon gõ câu lệnh confreg 0x2142 – cho phép Router khởi động nhưng không load các cấu hình trong NVRAM. Tiến hành Reset Router. rommon 1 > confreg 0x2142 rommon 2 > reset - Router không load NVRAM sẽ quay trở về trạng thái ban đầu – trạng thái không có cấu hình. Cisco Internetwork Operating System Software IOS (tm) C2600 Software (C2600-I-M), Version 12.2(28), RELEASE SOFTWARE (fc5) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2005 by cisco Systems, Inc. Compiled Wed 27-Apr-04 19:01 by miwang Cisco 2621 (MPC860) processor (revision 0x200) with 253952K/8192K bytes of memory . Processor board ID JAD05190MTZ (4292891495) M860 processor: part number 0, mask 49 Bridging software. X.25 software, Version 3.0.0. 2 FastEthernet/IEEE 802.3 interface(s) 32K bytes of non-volatile configuration memory. 63488K bytes of ATA CompactFlash (Read/Write) --- System Configuration Dialog --- Continue with configuration dialog? [yes/no]:
  • 3. BACHKHOA-APTECH CHUYÊN MÔN MẠNG NĂM 2021 - Vì ở đây mục tiêu là đăng nhập được vào Router từ mode Privilege và mode Global để thao tác, nên phải giữ lại các cấu hình cũ đã triển khai. Sử dụng câu lệnh Show startup-config để kiểm tra những cấu hình cũ đã được triển khai. Router#show startup-config Using 579 bytes ! version 12.2 no service timestamps log datetime msec no service timestamps debug datetime msec no service password-encryption ! hostname ROUTER-R1 ! ! ! enable secret 5 $1$mERr$9jKJNgUEZtVMiVXVkyrKK. ………… line con 0 password ROUTER@365 login ! line aux 0 ! line vty 0 4 password ROUTER@365 login - Copy lại những cấu hình đã lưu trong NVRAM. Router#copy startup-config running-config Destination filename [running-config]? 579 bytes copied in 0.416 secs (1391 bytes/sec) ROUTER-R1# %SYS-5-CONFIG_I: Configured from console by console - Thay đổi Password mới để đăng nhập. ROUTER-R1(config)#enable secret ROUTER@365 ROUTER-R1(config)#line console 0 ROUTER-R1(config-line)#password ROUTER@365 ROUTER-R1(config-line)#login ROUTER-R1(config-line)#exit ROUTER-R1(config)#line vty 0 ROUTER-R1(config-line)#password ROUTER@365 ROUTER-R1(config-line)#login ROUTER-R1(config-line)#exit ROUTER-R1(config)#line aux 0 ROUTER-R1(config-line)#password ROUTER@365 ROUTER-R1(config-line)#login ROUTER-R1(config-line)#exit
  • 4. BACHKHOA-APTECH CHUYÊN MÔN MẠNG NĂM 2021 ROUTER-R1(config)#service password-encryption ROUTER-R1(config)# do write - Sau khi đã đặt password mới xong, khởi động lại Router và vào lại mode Rommon để thay đổi lại thông số : confreg 0x2102 – cho phép Router khởi động và load thông tin trong NVRAM (các Password mới đã đặt). Readonly ROMMON initialized Self decompressing the image : ######## monitor: command "boot" aborted due to user interrupt rommon 1 > confreg 0x2102 rommon 2 > reset - Khởi động lại Router để kiểm tra những Password mới đã thay đổi User Access Verification Password: ROUTER-R1>enable Password: ROUTER-R1#configure terminal Enter configuration commands, one per line. End with CNTL/Z. ROUTER-R1(config)#
  • 5. BACHKHOA-APTECH CHUYÊN MÔN MẠNG NĂM 2021 Lab - Khôi phục Password trên Switch. - Giống với trên Router, nếu người dùng quên mất Password đăng nhập vào Switch cũng sẽ có thông báo : % bad password Press RETURN to get started. User Access Verification Password: Password: Password: % Bad passwords - Trên Switch có nút MODE, ấn MODE để Switch khởi động trong chế độ trắng, chế độ không load các câu lệnh cũ đã triển khai (bao gồm cả các câu lệnh triển khai Password). 32K bytes of flash-simulated non-volatile configuration memory. Base ethernet MAC Address: 00:09:7C:76:8B:40 Motherboard assembly number: 73-5781-09 Power supply part number: 34-0965-01 Motherboard serial number: FOC06150A9Y Power supply serial number: DAB061520N3 Model revision number: C0 Motherboard revision number: A0 Model number: WS-C2950-24 System serial number: FHK0616Z150 --- System Configuration Dialog --- Would you like to enter the initial configuration dialog? [yes/no]: 00:00:12: %SPANTREE-5-EXTENDED_SYSID: Extended SysId enabled for type vlan - Lưu ý: lúc khởi động lại dưới chế độ trắng, các cấu hình cũ đã được triển khai vẫn sẽ được lưu lại, nhưng không load. Những file đó sẽ được chuyển đổi thành: File cũ File bị chuyển khi khởi động ở chế độ trắng Config.text Config.text.renamed Vlan.dat Vlan.dat.renamed - Khôi phục lại các cấu hình cũ Switch#copy config.text.renamed running-config Destination filename [running-config]? 1187 bytes copied in 1.172 secs (1013 bytes/sec) ROUTER-SW1#copy vlan.dat.renamed vlan.dat Destination filename [vlan.dat]? Copy in progress...C 676 bytes copied in 0.028 secs (24143 bytes/sec) ROUTER-SW1#
  • 6. BACHKHOA-APTECH CHUYÊN MÔN MẠNG NĂM 2021 - Đặt password mới cho Switch và Reload lại Switch SW1(config)#enable secret ROUTER@365 SW1(config)#line console 0 SW1(config-line)#password ROUTER@365 SW1(config-line)#login SW1(config-line)#exit SW1(config)# SW1(config)#service password-encryption SW1(config)#exit SW1# SW1#reload System configuration has been modified. Save? [yes/no]: yes Building configuration... [OK] - Switch khởi động lại, đăng nhập bằng password mới đã thiết lập. User Access Verification Password: SW1>enable Password: SW1#configure terminal Enter configuration commands, one per line. End with CNTL/Z. SW1(config)#