CISCO

Giúp các bạn làm bước đầu cấu hình trên thiết bị thật: Bộ định tuyến Router và Bộ chia cổng Switch của CISCO

KHÔI PHỤC MẬT KHẨU SWITCH
Recovery password for cisco switch

Vị trí thiết bị thực hành: thiết bị thứ 2 tính từ dưới lên:
Địa chỉ IP 192.168.1.104
Tài khoản đăng nhập: (User, pass)=(cisco; minh123)

Thực hành:
1.Nối máy tính với console port của switch(SW)
2.Máy tính kết nối với SW mở phần mềm Hyper Terminal
3.Chọn các thông số cho chương trình terminal như sau:
Bits per second (baud): 9600
Data bits: 8
Parity: None
Stop bits: 1
Flow Control: Xon/Xoff

4.Tháo dây nguồn của switch.
5.Giữ nút Mode của switch trong khi gắn nguồn lại cho switch
Với thiết bị khác:
+Đối với 2900/3500XL và 3550 Series switches: Giữ nút Mode cho đến khi đèn của port 1 tắt
(Vị trí đèn có thể khác nhau ở các dòng sản phẩm)
+Đối với 2950 Series switches: Giữ nút Mode cho đến khi đèn STAT tắt

6.Bạn sẽ thấy xuất hiện:
Hai dòng lệnh
flash_init
boot
-Thì rời tay khỏi nút Mode
-Xuất hiện dấu đợi lệnh [switch:]

7.Gõ lệnh flash_init
switch: flash_init

Kết quả:
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:

Vài lệnh khác để kiểm tra sự hoạt động

8. Gõ lệnh load_helper
switch: load_helper

9.Gõ lệnh dir flash:
switch: dir flash:
Kết quả:
Directory of flash:/
2 -rwx 1803357 c3500xl-c3h2s-mz.120-5.WC7.bin
!--- This is the current version of software.
4 -rwx 1131 config.text
!--- This is the configuration file.
5 -rwx 109 info
6 -rwx 389 env_vars
7 drwx 640 html
18 -rwx 109 info.ver
403968 bytes available (3208704 bytes used)
switch:

10. Ghõ lệnh: rename flash:config.text flash:config.old
(để thay đổi tên của file cấu hình)

switch:

11. Gõ lệnh boot để restart lại SW
switch: boot

Kết quả:
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...

12. Sau khi switch khởi động lại
Ta đổi lại tên file cấu hình 1 lần nữa: Switch#rename flash:config.old flash:config.text

Kết quả:
Destination filename [config.text]
!--- Press Return or Enter.
Switch#

13. Copy file cấu hình lênh bộ nhớ Ram:

Switch#copy flash:config.text system:running-config

Destination filename [running-config]?
!--- Press Return or Enter.
1131 bytes copied in 0.760 secs
Switch#

14. Xóa password cũ và cấu hình lại password mới.

Switch#configure terminal
Switch(config)#no enable secret
Switch(config)#enable password Cisco
(Cisco: là mật khẩu mới)

15. Cuối cùng bạn lưu lại cấu hình mới: write memory
Switch#write memory

Kết quả:
Building configuration...
[OK]
Switch#

ĐƯA CISCO 2960 VỀ MẶC ĐỊNH
Reset a Cisco 2960 Switch To Factory Default Settings

Bước 1:
Kết nối cáp vào máy tính
Mở phần mềm tera term
Cấp nguồn đồng thời giữ nút [Mode]
Rời tay khỏi nút Mode khi thấy:

Using driver version 1 for media type 1
Base ethernet MAC Address: 4c:30:2d:81:ef:80
Xmodem file system is available.
The password-recovery mechanism is enabled.
The system has been interrupted prior to initializing the
flash filesystem. The following commands will initialize
the flash filesystem, and finish loading the operating
system software:
flash_init
boot
switch:

Bước 2.
Nhập lệnh: switch: flash_init

Kết quả:
Initializing Flash...
mifs[2]: 10 files, 1 directories
mifs[2]: Total bytes : 1806336
mifs[2]: Bytes used : 612352
mifs[2]: Bytes available : 1193984
mifs[2]: mifs fsck took 1 seconds.
mifs[3]: 0 files, 1 directories
mifs[3]: Total bytes : 3870720
mifs[3]: Bytes used : 1024
mifs[3]: Bytes available : 3869696
mifs[3]: mifs fsck took 0 seconds.
mifs[4]: 5 files, 1 directories
mifs[4]: Total bytes : 258048
mifs[4]: Bytes used : 9216
mifs[4]: Bytes available : 248832
mifs[4]: mifs fsck took 0 seconds.
mifs[5]: 5 files, 1 directories
mifs[5]: Total bytes : 258048
mifs[5]: Bytes used : 9216
mifs[5]: Bytes available : 248832
mifs[5]: mifs fsck took 1 seconds.
-- MORE --
mifs[6]: 566 files, 19 directories
mifs[6]: Total bytes : 57931776
mifs[6]: Bytes used : 28429312
mifs[6]: Bytes available : 29502464
mifs[6]: mifs fsck took 21 seconds.
...done Initializing Flash.

Bước 3:Xóa tập tin config.text
switch: del flash:config.text

Are you sure you want to delete "flash:config.text" (y/n)?y
File "flash:config.text" deleted

Bước 4: Xóa vlan.dat
switch: del flash:vlan.dat

Are you sure you want to delete "vlan.dat" (y/n)?y
File "flash:vlan.dat" deleted

Bước 5: Khởi động lại thiết bị
switch: boot

Kết quả:
Loading "flash:c2960s-universalk9-mz.122-58.SE2.bin"...
--- System Configuration Dialog ---
Enable secret warning
----------------------------------
In order to access the device manager, an enable secret is required
If you enter the initial configuration dialog, you will be prompted for the enable secret
If you choose not to enter the intial configuration dialog, or if you exit setup without setting the enable secret,
please set an enable secret using the following CLI in configuration mode-
enable secret 0
----------------------------------
Would you like to enter the initial configuration dialog? [yes/no]:
% Please answer 'yes' or 'no'.

ROUTER
1.Thêm người dùng
-Khởi động router bằng cách cấp nguồn
-Đăng nhập bằng tài khoản (username/passwprd): mặc định là (cisco/cisco)
-Nhập lệnh:
#enable
#username privilege 15 secret 0
#exit

2.Cấu hình cổng g0/0
#config t
#enable secret minh
#int g0/0
#ip address 192.168.1.1 255.255.255.0
#desc connection to NETWORK 1
#no shut
#exit
line vty 0 1114
password minh
login
exit
exit
sh run

3.Lấy lại mật khẩu
Khởi động lại router, sau 30s gõ phím ALT+B (trong ứng terminal: Tera term VT)
Vào:
rommon1>
rommon1>confreg 0x2142
rommon1>reset
(Hỏi cấu hình khác, trả lời:) no
Router>enable
Router#copy startup-config running-config
Router(config)#enable secret minh
Router(config)#exit

Router#show ip interface brief
Router#config t
Router(config)#int e0/0
Router(config)#exit
Router# copy running-config startup-config
Router#show version
Router#config t
Router(config)#config-register 0x2102
Router#show version

4.Lưu vào NVRAM
Router# copy running-config startup-config

5.Lưu vào RAM
Router# copy startup-config running-config

Kết nối với thiết bị CISCO để quản lý trên môi trường web tại đây https://ciscoactiveadvisor.com

Related Posts
Disqus Comments