2010年6月18日 星期五

Config Cisco

1. Change IP Cisco
- hypertrm
- en
- pass
- conf t
- int fa0
- ip add 172.22.73.252 255.255.252.0
- Ctl/Z
- wr
2. Change pass telnet
- conf t
- line vty 0 4
- login
- passwork ...
- Ctl/Z
- wr
3. Change enable pass
- conf t
- enable passwork ...
- Clt/Z
- wr
4. Dat ten cho Router
- conf t
- hostname ...
- Clt/Z
6. Cau hinh password telnet va password console
- conf t
- line vty 0 4
- password ...
- login
- exit
- line console 0
- password ...
- login
- exit
7. Cau hinh dia chi IP va su dung interface
- conf t
- interface serial 0
- ip address 192.168.1.1 255.255.255.0
- no shutdown
- exit
8. Show ip interface brief kiem tra trang thai cac cong
- show ip int brief
9. Kiem tra version Cisco
- show version
10. Ma hoa mat khau hien co cua Router
- conf t
- service password-encryption
11. Bat chuc nang SNMP
- conf t
- snmp-server community public RO
- snmp-server community private RW
12. Khôi phục Mật khẩu cho Cisco Router
  • Bước 1 : bạn khởi động lại Router
System Bootstrap, Version 5.2(8a), RELEASE SOFTWARE
Copyright (c) 1986-1995 by cisco Systems
2500 processor with 8192 Kbytes of main memory <-- Nhấn Ctrl Break không cho Router nạp dữ liệu từ NVRAM
Abort at 0x103AA7E (PC) >o/r 0x2142 ( hoặc sử dụng lệnh confreg 0x2142) <- Sử dụng lệnh này để thay đổi thanh ghi sang 0x2142
  • Bước 2 : khởi động lại Router, lúc này Router sẽ nạp cấu hình từ thanh ghi 0x2142 (cấu hình trắng)
vsic>ena <- password sẽ không yêu cầu kiểm tra khởi động đăng nhập
vsic#show start <- dùng lệnh Show start xem cấu hình trong NVRAM
Using 456 out of 32762 bytes
!
version 12.1
no service single-slot-reload-enable
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname Router
!
enable secret 5 $1$AqeQ$yB00zFjHxIiVoHLnbLEhh1 <- password secret đã
được mã hoá enable password cisco <- Mật khẩu enable password là cisco ! end
  • Bước 3 : Cấu hình lại Mật khẩu cho Router:
vsic#config t
Enter configuration commands, one per line. End with CNTL/Z.
vsic(config)#ena secret Vsic <- Mật khẩu secret được cấu hình lại là Vsic
vsic(config)#exit
vsic#conf t
vsic(config)#ena pass class <- Mật khẩu enable password là class
vsic(config)#exit
  • Bước 4 : Thay đổi thanh ghi hiện hành từ 0x2142 trở về 0x2102
Dùng lệnh Show version để xem thanh ghi hiện hành
vsic#show ver
Cisco Internetwork Operating System Software
IOS (tm) 2500 Software (C2500-I-L), Version 12.1(26), RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2004 by cisco Systems, Inc.
Compiled Sat 16-Oct-04 02:44 by cmong
Image text-base: 0x03042000, data-base: 0x00001000
.
2 Serial network interface(s)
32K bytes of non-volatile configuration memory.
16384K bytes of processor board System flash (Read ONLY)
Configuration register is 0x2142 <-Thanh ghi 0x2142 dang được sử dụng
*Thay đổi thanh ghi:
vsic(config)#config-register 0x2102 <- dùng lệnh config-register
vsic(config)#exit
*Xem lại thanh ghi hiện hành:
vsic#show ver
Cisco Internetwork Operating System Software
IOS (tm) 2500 Software (C2500-I-L), Version 12.1(26), RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2004 by cisco Systems, Inc.
Compiled Sat 16-Oct-04 02:44 by cmong .
2 Serial network interface(s)
32K bytes of non-volatile configuration memory.
16384K bytes of processor board System flash (Read ONLY)
Configuration register is 0x2142 (will be 0x2102 at next reload) <- thanh ghi hiện hành là 0x2102
  • Bước 5 : lưu cấu hìnhđãthay đổi vào thanh ghi 0x2102
vsic#wr me
Building configuration...
[OK]
Dùng lệnh show start xem cấu hình khởi động trong NVRAM
vsic#show start
Using 488 out of 32762 bytes
!
version 12.1
no service single-slot-reload-enable
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname vsic
!
enable secret 5 $1$49cD$jrvYyRSQhpTAHuDA1/R1v.
enable password class
!
!
!
End
Sau khi reload lại, đăng nhập vào Router,Mật khẩu secret là Vsic sẽ được kiểm tra
vsic con0 is now available
Press RETURN to get started.
vsic>ena Password: <- Mật khẩu là Vsic sẽ được kiểm tra và chấp nhận
vsic#

沒有留言:

張貼留言