Tải bản đầy đủ (.docx) (32 trang)

BÀI BÁO CÁO THỰC TẬP-Tìm Hiểu Thông Tin và Backup - Restore-Password, Config, IOS trên một vài thiết bị Cisco

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (4.22 MB, 32 trang )

Công ty TNHH Dịch vụ Hệ thống Thông tin FPT
Báo Cáo Thực Tập 1
Tìm Hiểu Thông Tin và Backup - Restore: Password, Config, IOS
trên một vài thiết bị Cisco
Hướng dẫn: Nguyễn Văn Dủ
Thực tập viên: Phùng Quốc Triệu Triệu
Page 1 of 32
TP. Hồ Chí Minh 12/2011
Mục Lục
Page 2 of 32
I. Tổng quan
i. Thiết bị hỗ trợ
Cáp console
Cáp chuyển
Com sang usb
ii. Phần mềm hỗ trợ
Giả lập terminal giao tiếp thiết bị
qua cổng console
Hyperterminal
Server TFTP SolarWind, Ciscotftp
Page 3 of 32
iii. Thành phần cơ bản
RAM/DRAM
Lưu trữ những bảng routing, ARP cache, fast-switching cache, packet buffering
(shared RAM), và packet hold queues; RAM cũng cung cấp bộ nhớ tạm thời
(running memory) cho file cấu hình của router khi router đang hoạt động; nội
dung RAM mất khi tắt nguồn hoặc restart router.
NVRAM
Non-volatile RAM lưu trữ file cấu hình backup/startup của router; nội dung
của NVRAM vẫn được giử khi tắt nguồn hoặc restart router.
FLASH


Có thể xóa, có thể lập trình lại, nơi lưu trữ hệ điều hành và một số mã lệnh
(microcode); Bộ nhớ Flash cho phép cập nhập phần mềm mà không cần lấy và
thay thế chip xử lý; Nội dung Flash vẫn được giử khi tắt nguồn hoặc restart; Bộ
nhớ Flash có thể chứa nhiều versions của phần mềm IOS.
ROM
Chứa chương trình kiểm tra khi bật nguồn router, chương trình bootstrap, và
phần mềm hệ điều hành; nâng cấp phần mềm trong ROM đòi hỏi phải lấy và
thay thế chip cắm trên CPU.
Cisco IOS
Có 3 phần dạng: xxxx-yyyy-zzzz
- xxxx: (Platform) thể hiện dòng sản phẩm sử dụng IOS này
- yyyy: (Feature sets) tập các tính năng của IOS, Ví dụ: v3 (Voice Feature Card), o
(Firewall),
- zzzz: (Format) định dạng file, kiểu nén, Ví dụ: f (IOS được chạy từ flash), m (IOS
được chạy từ RAM), z (kiểu nén zip),
II. Router
i. Router Cisco 1841
a.Thông tin cơ bản
+ Ta dùng các lệnh :
Router>en
Router #sh ver
Dùng phím Spacebar để lệnh cho thiết bị hiển thị thêm
phần chi tiết chưa hiển thị.
Thiết bị sẽ hiển thị thông tin như bên cạnh
Cisco IOS Software, 1841 Software (C1841-
ADVENTERPRISEK9-M), Version 12.4(11)XJ4
(Cho biết version của thiết bị)
, RELEASE SOFTWARE (fc2)
Technical Support: />Copyright (c) 1986-2007 by Cisco Systems, Inc.
Compiled Fri 13-Jul-07 21:17 by prod_rel_team

ROM: System Bootstrap, Version 12.3(8r)T8, RELEASE
SOFTWARE (fc1) (version của ROM)
Vib_Hamnghi uptime is 3 minutes
System returned to ROM by power-on
System image file is "flash:c1841-adventerprisek9-
mz.124-11.XJ4.bin" (Tên file ios đang dùng của thiết
bị)
This product contains cryptographic features and is subject
to United
States and local country laws governing import, export,
transfer and
Page 4 of 32
use. Delivery of Cisco cryptographic products does not
imply
third-party authority to import, export, distribute or use
encryption.
Importers, exporters, distributors and users are
responsible for
compliance with U.S. and local country laws. By using this
product you
agree to comply with applicable laws and regulations. If
you are unable
to comply with U.S. and local laws, return this product
immediately.
A summary of U.S. laws governing Cisco cryptographic
products may be found at:
/>If you require further assistance please contact us by
sending email to

Cisco 1841 (revision 5.0) with 117760K/13312K bytes

of memory.(tổng cộng 128MB Ram, dùng 13MB Ram
cho việc nhập xuất)
Processor board ID FHK093430VX (Số hiệu cũng là
CPU)
2 FastEthernet interfaces
1 Virtual Private Network (VPN) Module
DRAM configuration is 64 bits wide with parity disabled.
191K bytes of NVRAM.(NVRAM lưu file config cụ thể
là start-up config)
62720K bytes of ATA CompactFlash (Read/Write) (bộ
nhớ flash 64MB lưu trữ 1 hay nhiều IOS)
Configuration register is 0x2102 (trạng thái thanh ghi)
Page 5 of 32
b.Backup – Restore Config
 Phương pháp copy tftpserver
Backup
Lần đầu cài đặt hyperterminal,
thiết lập quốc gia (vietnam), mã
vùng (70999 –TPHCM), mã điện
thoại (084)
- Chọn cổng COM tương ứng driver
dây chuyển USB
- Thiết lập cơ bản:
Bits per second: 9600
Data bits: 0
Parity: none
Stop bits 0
Flow control None
Page 6 of 32
- Thiết lập IP cho máy tính cũng là

TFTP server đảm bảo cùng net với
interface đang kết nối với thiết bị
- Ping đảm bảo kết nối giữa thiết bị
là TFTP server
Page 7 of 32
- Dùng lệnh
“copy [running-config/startup-
config] tftp”
- Điền địa chỉ ip tftp server
- Điền tên file muốn lưu (nên kèm
theo đuôi .txt)
Restore
- Dùng lệnh
“copy tftp [running-config/startup-config]”
- Điền địa chỉ ip tftp server
- Điền tên file lấy từ tftp server
(nên mở ra đường dẫn và copy tên file rồi paste vào hyperterminal
 Phương pháp capture text của hyperterminal
Backup
- Chọn Transfer trên thanh menu
của hyper terminal.
- Tiếp theo chọn Capture text để
kích hoạt chức năng.
Page 8 of 32
- Chỉ định đường dẫn lưu file
bằng nút Browse.
- Sau đó bấm Start để bắt đầu
quá trình Capture Text
- Dùng lệnh “show run”
- Dùng phím Spacebar để hiển thị

toàn bộ file running-config.
- Sau đó chọn lại Transfer
Capture text—Stop để kết thúc
quá trình Capture Text
- Dữ liệu file runnning-config sẽ
được capture lại thành file text
có nội dung ví dụ như bên cạnh.
- Ta nên xóa bớt các dòng: sh
run, more, !, các dòng sau dòng
“end”
sh run
Building configuration
Current configuration : 640 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname FISSERV
!
boot-start-marker
boot-end-marker
!
enable password 123
!
no aaa new-model
!
Page 9 of 32
resource policy

!
mmi polling-interval 60
no mmi auto-configure
no mmi pvc
mmi snmp-timeout 180
More ip subnet-zero
ip cef
!
!
no ip dhcp use vrf connected
!
!
!
!
!
!
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
More ip classless
!

ip http server
!
!
control-plane
!
!
line con 0
line aux 0
line vty 0 4
login
!
end
FISSERV#
Restore
- Mở file cấu hình ta đã lưu trước đó
- Chuột phải Select all (Ctrl+A), Chuột phải copy(Ctrl+C)
- Chuyển sang giao diện Hyperterminal
- Vào mode global qua các lệnh: enable conf t
- Chuột phải paste to host
- Ta có thể kiểm tra lại qua lệnh: sh run
Page 10 of 32
- Lưu lại vào startup-config bằng lệnh: write
c. Backup – Restore iOS
 Phương pháp copy với tftpserver (chạy trên ram)
Backup
- Sau khi đảm bảo kết nối giữa
thiết bị với tftpserver, ta dùng
lệnh:
Copy flash tftp
- Chỉ định tên file ios cần backup

(trước đó ta nên dùng lệnh: sh
ver / sh flash, và copy tên file)
- Chỉ định địa chỉ ip tftpserver
- Chỉ định tên file sau khi backup
(nên giữ nguyên tên)
Restore
- Đảm bảo kết nối giữa thiết bị với tftpserver
- Ta dùng lệnh :
Copy tftp flash:
- Chỉ định địa chỉ ip tftp server và tên file lấy từ tftp server
 Phương pháp tftpdnld (monitor mode)
Download
Đây là trường hợp thiết bị ko có ios, để có file ios ta truy cập trang www.cisco.com để tìm down ios phù
hợp
Restore
Page 11 of 32
- Khi thiết bị boot, hiển thị phần bộ
nhớ, bấm tổ hợp phím Ctrl+Break để
vào monitor mode
- Dùng lệnh SET để xem cấu hình hiện
tại.
- Thay đổi các cấu hình (cần thiết) theo
ý muốn qua các lệnh:
IP_ADDRESS=x.x.x.x(ip interface
IP_SUBNET_MASK=x.x.x.x
TFTP_SERVER=x.x.x.x(ip tftpser
TFTP_FILE=<tên file ios từ tftpserver>
- Khởi động lại nếu cần thiết lệnh:
reset hoặc i
- Dùng lệnh tftpdnld để phục hồi

- Sau khi phục hồi thành công
ios, ta vẫn ở môi monitor mode,
khởi động lại thiết bị để sử dụng
ios
 Phương pháp copy Xmodem (chạy trên ram)
(Phương pháp copy bằng giao thức Xmodem rất chậm và mất nhiều thời gian vì vậy ít được
sử dụng và lúc sử dụng thì cần chuyển tốc độ kết nối cao để tăng hiệu quả)
Restore
Page 12 of 32
- Chuyển tốc độ kết nối sang
115200 với lệnh speed 115200
mode (config-line)
- Dùng lệnh copy
xmodem:<tên file ios từ máy
tính> flash:<tên file ios>
- Tại giao diện Hyper terminal,
trên thanh menu chọn
Transfer Sendfile
- Chọn file ios trong máy tính
với nút Browse và giao thức
Xmodem tại phần Protocol,
cuối cùng bấm Send để bắt đầu
 Phương pháp copy Xmodem (monitor mode)
Restore
Page 13 of 32
- Tại monitor mode dùng lệnh
confreg chọn y để kích hoạt
- Enter mặc định đến mục
change console baud rate chọn
y

- Ta chọn 7 ứng với tốc độ
115200
- Enter mặc định và sau đó khởi
động lại thiết bị qua lệnh: reset
hoặc i
- Ta đóng giao diện hyper
terminal hiện tại, mớ hyper
terminal với thiết lập tốc độ
mới : bits per second 115200
Page 14 of 32
- Dùng lệnh xmodem <tên file
ios cần nhận>
- Thiết bị sẵn sàng nhận file
- Tại thanh menu của hyper
terminal, chọn Transfer—
Sendfile.
- Chọn file ios trong máy tính
với nút Browse và giao thức
Xmodem tại phần Protocol, cuối
cùng bấm Send để bắt đầu
d.Phục hồi Password
Page 15 of 32
- Tại monitor mode dùng lệnh :
confreg 0x2142 để chuyển đổi
giá trị thanh ghi và để thiết bị
không load cấu hình trong
NVRAM
- Khởi động lại thiết bị
- Sau khi khởi động và từ chối
thiết lập ban đầu, ta đang sử

dụng cấu hình rỗng
- Dùng lệnh copy startup-config
running-config- Chọn file ios
trong máy tính với nút Browse
và giao thức Xmodem tại phần
Protocol, cuối cùng bấm Send
để bắt đầu để phục hồi cấu hình
cũ trong NVRAM
- Kiểm tra cũng như thay đổi
password
- Chuyển giá trị thanh ghi lại
như mặc định ở mode (config):
config 0x2102
Page 16 of 32
ii. Router Cisco 2811
a.Thông tin cơ bản
+ Ta dùng các lệnh :
Router>en
Router #sh ver
Dùng phím Spacebar để lệnh cho thiết bị hiển thị thêm
phần chi tiết chưa hiển thị.
Thiết bị sẽ hiển thị thông tin như bên cạnh
Cisco IOS Software, 2800 Software (C2800NM-
ADVIPSERVICESK9-M), Version 12.4(25c)
, RELEASE SOFTWARE (fc2) (Cho biết version của thiết
bị)
Technical Support: />Copyright (c) 1986-2010 by Cisco Systems, Inc.
Compiled Thu 11-Feb-10 23:55 by prod_rel_team
ROM: System Bootstrap, Version 12.4(1r) [hqluong
1r], RELEASE SOFTWARE (fc1) (version của ROM)

Router uptime is 6 minutes
System returned to ROM by power-on
System image file is "flash:c2800nm-advipservicesk9-
mz.124-25c.bin"(Tên file ios đang dùng của thiết bị)
This product contains cryptographic features and is subject
to United
States and local country laws governing import, export,
transfer and
use. Delivery of Cisco cryptographic products does not
imply
third-party authority to import, export, distribute or use
encryption.
Importers, exporters, distributors and users are
responsible for
compliance with U.S. and local country laws. By using this
product you
agree to comply with applicable laws and regulations. If
you are unable
to comply with U.S. and local laws, return this product
immediately.
A summary of U.S. laws governing Cisco cryptographic
products may be found at:
/>If you require further assistance please contact us by
sending email to

Cisco 2811 (revision 53.50) with 237568K/24576K
bytes of memory.(tổng cộng 262MB Ram, dùng 24MB
Ram cho việc nhập xuất)
Processor board ID FHK1110F3GT(Số hiệu cũng là CPU)
2 FastEthernet interfaces

Page 17 of 32
1 Virtual Private Network (VPN) Module
DRAM configuration is 64 bits wide with parity enabled.
239K bytes of non-volatile configuration memory. .
(NVRAM lưu file config cụ thể là start-up config)
125440K bytes of ATA CompactFlash (Read/Write) (bộ
nhớ flash 125MB lưu trữ 1 hay nhiều IOS)
Configuration register is 0x2102(trạng thái thanh ghi)
b.Backup – Restore Config
(cách thực hiện giống router 1841)
c. Backup – Restore iOS
(cách thực hiện giống router 1841)
d.Phục hồi Password
(cách thực hiện giống router 1841)
III. Switch
(Tùy vào Dòng sản phẩm, để vào monitor mode, trong lúc boot, ta bấm hoặc giữ nút mode trên thiết bị và
có thể cần kết hợp thêm tổ hợp phím Ctrl+Break)
i. Switch 2960
a.Thông tin cơ bản
+ Ta dùng các lệnh :
Router>en
Router #sh ver
Dùng phím Spacebar để lệnh cho thiết bị hiển thị thêm
phần chi tiết chưa hiển thị.
Thiết bị sẽ hiển thị thông tin như bên cạnh
Cisco IOS Software, C2960 Software (C2960-
LANBASEK9-M), Version 12.2(44)SE6, RELEASE
SOFTWARE (fc1) (Cho biết version của thiết bị)
Copyright (c) 1986-2009 by Cisco Systems, Inc.
Compiled Mon 09-Mar-09 18:10 by gereddy

Image text-base: 0x00003000, data-base: 0x01100000
ROM: Bootstrap program is C2960 boot loader
BOOTLDR: C2960 Boot Loader (C2960-HBOOT-M)
Version 12.2(44)SE6, RELEASE SOFTWARE
(fc1) (version của ROM)
Switch uptime is 1 minute
System returned to ROM by power-on
System image file is "flash:/c2960-lanbasek9-mz.122-
44.SE6/c2960-lanbasek9-mz.12
2-44.SE6.bin" (Tên file ios đang dùng của thiết bị)
Page 18 of 32
This product contains cryptographic features and is subject
to United
States and local country laws governing import, export,
transfer and
use. Delivery of Cisco cryptographic products does not
imply
third-party authority to import, export, distribute or use
encryption.
Importers, exporters, distributors and users are
responsible for
compliance with U.S. and local country laws. By using this
product you
agree to comply with applicable laws and regulations. If
you are unable
to comply with U.S. and local laws, return this product
immediately.
A summary of U.S. laws governing Cisco cryptographic
products may be found at:
/>If you require further assistance please contact us by

sending email to

cisco WS-C2960-48TT-L (PowerPC405) processor
(revision F0) with 61440K/4088K bytes of memory. .
(tổng cộng 65MB Ram, dùng 4MB Ram cho việc nhập
xuất)
Processor board ID FOC1342W0SN(Số hiệu cũng là
CPU)
Last reset from power-on
1 Virtual Ethernet interface
48 FastEthernet interfaces
2 Gigabit Ethernet interfaces
The password-recovery mechanism is enabled.
64K bytes of flash-simulated non-volatile
configuration memory.(NVRAM lưu file config cụ thể
là start-up config)
Base ethernet MAC Address : F4:AC:C1:C1:4B:00
Motherboard assembly number : 73-10391-06
Power supply part number : 341-0097-02
Motherboard serial number : FOC1342246G
Power supply serial number : DCA13388677
Model revision number : F0
Motherboard revision number : A0
Model number : WS-C2960-48TT-L
System serial number : FOC1342W0SN
Top Assembly Part Number : 800-27222-05
Top Assembly Revision Number : A0
Version ID : V05
Page 19 of 32
CLEI Code Number : 459541

Hardware Board Revision Number : 0x02
Switch Ports Model SW Version SW Image

* 1 50 WS-C2960-48TT-L 12.2(44)SE6 C2960-
LANBASEK9-M
Configuration register is 0xF(trạng thái thanh ghi)
b.Backup – Restore Config
(cách thực hiện giống router 1841)
c. Backup – Restore iOS
(cách thực hiện giống router 1841)
Không hỗ trợ phương pháp tftpdnld (monitor mode)
Vì vậy khi bị mất ios ta phải dùng phương pháp copy Xmodem
d.Phục hồi Password
(cách thực hiện giống switch 3550)
ii. Switch 3550
a.Thông tin cơ bản
+ Ta dùng các lệnh :
Router>en
Router #sh ver
Dùng phím Spacebar để lệnh cho thiết bị hiển thị thêm
phần chi tiết chưa hiển thị.
Thiết bị sẽ hiển thị thông tin như bên cạnh
Cisco IOS Software, C3550 Software (C3550-
IPSERVICESK9-M), Version 12.2(35)SE3,
RELEASE SOFTWARE (fc1) (Cho biết version của thiết
bị)
Copyright (c) 1986-2007 by Cisco Systems, Inc.
Compiled Fri 16-Mar-07 00:43 by antonino
Image text-base: 0x00003000, data-base: 0x00E86000
ROM: Bootstrap program is C3550 boot loader

Switch uptime is 1 minute
System returned to ROM by power-on
System image file is "flash:c3550-ipservicesk9-mz.122-
35.SE3/c3550-ipservicesk9-
mz.122-35.SE3.bin"(Tên file ios đang dùng của thiết
Page 20 of 32
bị)
This product contains cryptographic features and is subject
to United
States and local country laws governing import, export,
transfer and
use. Delivery of Cisco cryptographic products does not
imply
third-party authority to import, export, distribute or use
encryption.
Importers, exporters, distributors and
compliance with U.S. and local country laws. By using this
product you
agree to comply with applicable laws and regulations. If
you are unable
to comply with U.S. and local laws, return this product
immediately.
A summary of U.S. laws governing Cisco cryptographic
products may be found at:
/>If you require further assistance please contact us by
sending email to

Cisco WS-C3550-24 (PowerPC) processor (revision L0)
with 65526K/8192K bytes of
memory. (tổng cộng 65MB Ram, dùng 8MB Ram cho

việc nhập xuất)
Processor board ID CAT0807N1P5(Số hiệu cũng là CPU)
Last reset from warm-reset
Running Layer2/3 Switching Image
Ethernet-controller 1 has 12 Fast Ethernet/IEEE 802.3
interfaces
Ethernet-controller 2 has 12 Fast Ethernet/IEEE 802.3
interfaces
FastEthernet0/23 failed POST
Ethernet-controller 3 has 1 Gigabit Ethernet/IEEE 802.3
interface
Ethernet-controller 4 has 1 Gigabit Ethernet/IEEE 802.3
interface
24 FastEthernet interfaces
2 Gigabit Ethernet interfaces
The password-recovery mechanism is enabled.
384K bytes of flash-simulated NVRAM. (NVRAM lưu
file config cụ thể là start-up config)
Page 21 of 32
Base ethernet MAC Address: 00:0F:24:FC:36:00
Motherboard assembly number: 73-5700-11
Power supply part number: 34-0966-04
Motherboard serial number: CAT0807067E
Power supply serial number: DTH08052W97
Model revision number: L0
Motherboard revision number: A0
Model number: WS-C3550-24-SMI
System serial number: CAT0807N1P5
Configuration register is 0x10F(trạng thái thanh ghi)
b.Backup – Restore Config

(cách thực hiện giống switch 2960)
c. Backup – Restore iOS
(cách thực hiện giống switch 2960)
d.Phục hồi Password
- Bấm 2 lần nút mode trên thiết bị
trong lúc boot ( sau khi hiển thị bộ
nhớ), ta có thể truy cập monitor
mode
Page 22 of 32
- Dùng lệnh Dir flash: (bắt cuộc có
dấu : ) để liệt kê các file trong flash
và ta có thể thấy file config.text đó
chính là file cấu hình
- Dùng lệnh
rename flash:config.text
flash:config.old
để ngầm xóa config.text và lưu lại
thành config.old
- Dùng lệnh boot để khởi động vào
ios với cấu hình rỗng
Page 23 of 32
- Sau khi bỏ qua thiết lập ban đầu,
ta vào ios với cấu hình rỗng
- Tiến hành phục hồi file cấu hình
cũ bằng: rename flash:config.old
flash:config.text
Và thực thi copy flash:config.text
runnig-config
- Kiểm tra, thay đổi password
- Lưu lại cấu hình mới vào NVRAM:

write
Page 24 of 32
IV. ASA (Adaptive Security Appliances)
i. ASA 5520
a.Thông tin cơ bản
+ Ta dùng các lệnh :
Router>en
Router #sh ver
Dùng phím Spacebar để lệnh cho thiết bị hiển thị thêm
phần chi tiết chưa hiển thị.
Thiết bị sẽ hiển thị thông tin như bên cạnh
Cisco Adaptive Security Appliance Software Version
8.0(4)
Device Manager Version 6.1(3)
(Cho biết version của thiết bị)
Compiled on Thu 07-Aug-08 20:53 by builders
System image file is "disk0:/asa804-k8.bin"
Config file at boot was "startup-config"
ASA5520 up 5 mins 19 secs
Hardware: ASA5520, 512 MB RAM, CPU Pentium 4
Celeron 2000 MHz
Internal ATA Compact Flash, 256MB
BIOS Flash M50FW080 @ 0xffe00000, 1024KB
(cấu hình phần cứng)
Encryption hardware device : Cisco ASA-55x0 on-board
accelerator (revision 0x0)
Boot microcode : CN1000-MC-BOOT-
2.00
SSL/IKE microcode: CNLite-MC-SSLm-
PLUS-2.03

IPSec microcode : CNlite-MC-IPSECm-
MAIN-2.05
0: Ext: GigabitEthernet0/0 : address is 0021.a0ec.fefa,
irq 9
1: Ext: GigabitEthernet0/1 : address is 0021.a0ec.fefb,
irq 9
2: Ext: GigabitEthernet0/2 : address is 0021.a0ec.fefc,
irq 9
3: Ext: GigabitEthernet0/3 : address is 0021.a0ec.fefd,
irq 9
4: Ext: Management0/0 : address is 0021.a0ec.fefe,
irq 11
5: Int: Not used : irq 11
6: Int: Not used : irq 5
Licensed features for this platform:
Maximum Physical Interfaces : Unlimited
Maximum VLANs : 150
Inside Hosts : Unlimited
Failover : Active/Active
VPN-DES : Enabled
VPN-3DES-AES : Enabled
Security Contexts : 2
GTP/GPRS : Disabled
VPN Peers : 750
WebVPN Peers : 2
Page 25 of 32

×