Tải bản đầy đủ (.pdf) (64 trang)

Bài tập thực hành quản trị mạng 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 (2.76 MB, 64 trang )

Bài tập thực hành Quản trị mạng
I. MỤC TIÊU THỰC HÀNH
Giới thiệu cho sinh viên các kiến thức căn bản về các kỹ thuật được sử dụng trong quá
trình quản trị mạng.
II. HỌC LIỆU
Học liệu :
- Phần mềm (Packet Tracer 5.0 hoặc GNS3)
- Bài tập thực hành của giảng viên cung cấp
Dụng cụ :
- Projector, màn chiếu
- Máy tính
- Bảng, phấn
- Hệ thống máy tính được kết nối mạng
III. NỘI DUNG
Gồm 9 bài thực hành (lab) với các nội dung sau:
Lab 1: 3h
- Giới thiệu về các chương trình giả lập thiết bị mạng Cisco (Packet Tracert, Dynamip
và GNS3).
-

Cách cài đặt các chương trình giả lập và sử dụng.

-

Cấu hình cơ bản thiết bị chuyển mạch Switch.

Lab 2: 3h
- Cách chia VLAN.
-

Gán port vào VLAN.



-

Kiểm tra VLAN.

-

Cấu hình đường trung kế.

-

Thiết lập hệ thống mạng đồng bộ thông tin VLAN.

-

Kiểm tra sự đồng bộ.

Lab 3: 3h
- Cấu hình giao thức đồng bộ thông tin VLAN VTP
-

Kiểm tra hoạt động của VTP

-

Thiết lập các thông số VTP.

Trang 1



Bài tập thực hành Quản trị mạng
Lab 4: 3h
-

Cấu hình cơ bản cho thiết bị định tuyến Cisco.

-

Thực hiện kiểm tra kết nối giữa các thiết bị định tuyến.

-

Cơ bản về định tuyến tĩnh.

-

Kiểm tra bảng định tuyến.

Lab 5: 3h
-

Định tuyến RIP.

-

Kiểm tra bảng định tuyến.

Lab 6: 3h
-


Định tuyến OSPF.

-

Kiểm tra bảng định tuyến.

Lab 7: 3h
- Cấu hình DHCP trên thiết bị Cisco.
-

Cấu hình DHCP trên Microsoft.

Lab 8: 3h
- Cấu hình ACL chuẩn để lọc gói tin theo yêu cầu.
-

Kiểm tra việc lọc gói tin.

Lab 9: 3h
- Cấu hình NAT tĩnh.
-

Kiểm tra cấu hình.

Trang 2


Bài tập thực hành Quản trị mạng
VI.TÀI LIỆU THAM KHẢO
Tài liệu chính

[1]

Tập bài giảng Quản trị mạng,Võ Nhân Văn

Tài liệu tham khảo
Tài liệu tiếng Việt
[2] Nguyễn Thúc Hải, Mạng máy tính và các hệ thống mở, NXB GD, 1997
[3] MK.PUB, Giáo trình hệ máy tính CCNA2, Nhà sách Minh Khai, 2008
[4] Nguyễn Gia Như, Bài giảng mạng máy tính, 2010
[5] Trần Bàn Thạch, Quản trị mạng Window Server 2003, 2009
Tài liệu tiếng Anh
[6] CiscoPress CCNA ICND1 Official Exam Certification Guide
[7] Cisco Press CCNA ICND2 Official Exam Certification Guide
[8] Cisco Academy CCNA Explorer
[9] CCNP BCMSN Student Guide Version 4.0(2007)
[10] CCNP ROUTE 642-902 Official Certification Guide
[11] CCIE Network Design, Cisco Press
[12] Design a Microsoft Windows Server 2003 Active Directory and Nework
Infractructure, Microsoft Press, 2004
[13] Planning, Implementing, and Maintaining a Microsoft Windows Server 2003
Active Directory Infractructure, Microsoft Press, 2004
Website
[14] />[15] />[16] />[17]

Trang 3


Bài tập thực hành Quản trị mạng
TRƯỜNG ĐẠI HỌC DUY TÂN
KHOA CÔNG NGHỆ THÔNG TIN

BỘ MÔN KỸ THUẬT MẠNG

QUẢN TRỊ MẠNG

BÀI THỰC HÀNH
Bài số :
01
Số giờ :
03giờ
GVHD : Võ Nhân Văn

Chương 2.
LAB 01
CẤU HÌNH CĂN BẢN SWITCH
I. MÔ TẢ
-

Cấu hình cơ bản thiết bị chuyển mạch Switch Cisco.

-

Thiết lập các thông số cơ bản, bao gồm đặ

ật khẩu.

II. NỘI DUNG

10.1.1.251/24

10.1.1.10/24


1. Cấu hình thiết bị:

6
-

stop bit, no flow control.
2. Khởi động switch: sau khi bật switch thì
6

sẽ diễn ra

C2960 Boot Loader (C2960-HBOOT-M) Version 12.2(25r)FX,
RELEASE SOFTWARE (fc4)
Cisco WS-C2960-24TT (RC32300) processor (revision C0) with
21039K bytes of memory.
2960-24TT starting...
Base ethernet MAC Address: 0001.9695.DA3D
Xmodem file system is available.
Initializing Flash...
flashfs[0]: 1 files, 0 directories
flashfs[0]: 0 orphaned files, 0 orphaned directories

Trang 4


Bài tập thực hành Quản trị mạng
flashfs[0]: Total bytes: 64016384
flashfs[0]: Bytes used: 4414921
flashfs[0]: Bytes available: 59601463

flashfs[0]: flashfs fsck took 1 seconds.
...done Initializing Flash.
Boot Sector Filesystem (bs:) installed, fsid: 3
Parameter Block Filesystem (pb:) installed, fsid: 4
Loading "flash:/c2960-lanbase-mz.122-25.FX.bin"...
#############################################################
############# [OK]
Restricted Rights Legend
Use, duplication, or disclosure by the Government is
subject to restrictions as set forth in subparagraph
(c) of the Commercial Computer Software - Restricted
Rights clause at FAR sec. 52.227-19 and subparagraph
(c) (1) (ii) of the Rights in Technical Data and Computer
Software clause at DFARS sec. 252.227-7013.
cisco Systems, Inc.
170 West Tasman Drive
San Jose, California 95134-1706
Cisco IOS Software, C2960 Software (C2960-LANBASE-M), Version
12.2(25)FX, RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2005 by Cisco Systems, Inc.
Compiled Wed 12-Oct-05 22:05 by pt_team
Image text-base: 0x80008098, data-base: 0x814129C4

Cisco WS-C2960-24TT (RC32300) processor (revision C0) with
21039K bytes of memory.
24 FastEthernet/IEEE 802.3 interface(s)
2 Gigabit Ethernet/IEEE 802.3 interface(s)
63488K bytes of flash-simulated non-volatile configuration
memory.
Base ethernet MAC Address

: 0001.9695.DA3D
Trang 5


Bài tập thực hành Quản trị mạng
Motherboard assembly number
Power supply part number
Motherboard serial number
Power supply serial number
Model revision number
Motherboard revision number
Model number
System serial number
Top Assembly Part Number
Top Assembly Revision Number
Version ID
CLEI Code Number
Hardware Board Revision Number

:
:
:
:
:
:
:
:
:
:
:

:
:

Switch
Ports Model
Image
---------- -----------*
1
26
WS-C2960-24TT
C2960-LANBASE-M

73-9832-06
341-0097-02
FOC103248MJ
DCA102133JA
B0
C0
WS-C2960-24TT
FOC1033Z1EY
800-26671-02
B0
V02
COM3K00BRA
0x01
SW Version

SW

----------


--

12.2

Cisco IOS Software, C2960 Software (C2960-LANBASE-M), Version
12.2(25)FX, RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2005 by Cisco Systems, Inc.
Compiled Wed 12-Oct-05 22:05 by pt_team
--- 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]:
Nh

no



Switch>
3. Chế độ privileged:
Switch>enable
Switch#
4.

các mật khẩu truy cập cho Switch

Trang 6



Bài tập thực hành Quản trị mạng

Switch#config terminal
Switch(config)#host DuyTan
DuyTan(config)#
Đặt mật khẩu cho cổng Console (hay mật khẩu cho mode User)
DuyTan(config)#line con 0
DuyTan(config-line)#password cisco
DuyTan(config-line)#login
Đặt mật khẩu cho mode Privilege
DuyTan(config)#enable password class
5.
witch: mục đích là
trên mạng. Switch là một thiết bị lớp 2 nên việc đặt IP address cho switch chỉ nhằm mục
đích quản trị.
DuyTan#config terminal
DuyTan(config)#interface vlan 1
DuyTan(config-if)#ip address 10.1.1.251 255.255.255.0
DuyTan(config-if)#no shutdown

DuyTan(config)#ip default-gateway 10.1.1.10
6. Telnet vào switch:
Để thực hiện việc telnet từ PC vào thiết bị thì phải đáp ứng được 2 điều kiện:
- PC ping thành công thiết bị:
sao cho
bằng cáp thẳng
- Thiết bị phải cấu hình hỗ trợ telnet:
DuyTan(config-line)#line vty 0 15
DuyTan(config-line)#password cisco
DuyTan(config-line)#login


Trang 7


Bài tập thực hành Quản trị mạng
1 bằng cách: vào
Start/Run/Telnet 10.1.1.251.
7. Kiểm tra và lưu cấu hình
Kiểm tra trạng thái cổng của switch
Duytan#show interface
FastEthernet0/1 is down, line protocol is down (disabled)
Hardware is Lance, address is 000a.415c.8301 (bia
000a.415c.8301)
BW 100000 Kbit, DLY 1000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Half-duplex, 100Mb/s
input flow-control is off, output flow-control is off
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:00:08, output 00:00:05, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total
output drops: 0
Queueing strategy: fifo
Output queue :0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
956 packets input, 193351 bytes, 0 no buffer
Received 956 broadcasts, 0 runts, 0 giants, 0 throttles

0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0
abort
0 watchdog, 0 multicast, 0 pause input
0 input packets with dribble condition detected
2357 packets output, 263570 bytes, 0 underruns
--More—
Kiểm tra
DuyTan#show version
Cisco IOS Software, C2960 Software (C2960-LANBASE-M), Version
12.2(25)FX, RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2005 by Cisco Systems, Inc.
Compiled Wed 12-Oct-05 22:05 by pt_team

Trang 8


Bài tập thực hành Quản trị mạng
ROM: C2960 Boot Loader (C2960-HBOOT-M) Version 12.2(25r)FX,
RELEASE SOFTWARE (fc4)
System returned to ROM by power-on
Cisco WS-C2960-24TT (RC32300) processor (revision C0) with
21039K bytes of memory.
24 FastEthernet/IEEE 802.3 interface(s)
2 Gigabit Ethernet/IEEE 802.3 interface(s)
63488K bytes of flash-simulated
memory.
Base ethernet MAC Address
Motherboard assembly number
Power supply part number
Motherboard serial number

Power supply serial number
Model revision number
Motherboard revision number
Model number
System serial number
Configuration register is 0xF
DuyTan#

non-volatile configuration
:
:
:
:
:
:
:
:
:

0001.9695.DA3D
73-9832-06
341-0097-02
FOC103248MJ
DCA102133JA
B0
C0
WS-C2960-24TT
FOC1033Z1EY

Lưu cấu hình:

DuyTan#copy running-config startup-config

Trang 9


Bài tập thực hành Quản trị mạng

TRƯỜNG ĐẠI HỌC DUY TÂN
KHOA CÔNG NGHỆ THÔNG TIN

BÀI THỰC HÀNH

QUẢN TRỊ
MẠNG

LAB số :

BỘ MÔN KỸ THUẬT MẠNG

Số giờ :

02
03

GVHD :Võ Nhân Văn

LAB 02
VIRTUAL LAN
I.
+ VLAN 1: default, gồm Fa0/1 – Fa0/3

+ VLAN 2: Phòng kế toán gồm Fa0/4 – Fa0/7
+ VLAN 3: Phòng bán hàng gồm Fa0/8 – Fa0/15
+ VLAN 4: Phòng kỹ thuật gồm Fa0/16 – Fa0/23
II. NỘI DUNG

10.1.1.251/24

10.1.1.10/24

B.
.
-

Cách 1:
h cho VLAN database:
DuyTan#Config ter
-

Trang 10


Bài tập thực hành Quản trị mạng

DuyTan(config)# vlan 2
DuyTan(config)#name ketoan
Cách 2:
base:
DuyTan#vlan database
DuyTan(vlan)# vlan 2 name ketoan
edge mode.

DuyTan(vlan)# exit
2.

-

-

máy trạm
Gán cổng một cổng fastEthernet0/4 vào VLAN 2
DuyTan(config)#interface fa0/4
DuyTan(config-if)#switchport mode access
DuyTan(config-if)#switchport access Vlan 2
Gán cổng nhiều cổng (fastEthernet0/5 - fastEthernet0/7) vào VLAN 2
DuyTan(config)#interface range fa0/5 - 7
DuyTan(config-if)#switchport mode access
DuyTan(config-if)#switchport access Vlan 2
Tương tự cho Vlan 3 và VLan 4:
DuyTan(config)#interface range fastEthernet 0/8 - 15
DuyTan(config-if-range)#switchport mode access
DuyTan(config-if-range)#switchport access vlan 3
DuyTan(config-if-range)#exit

Trang 11


Bài tập thực hành Quản trị mạng
DuyTan(config)#interface range fastEthernet 0/16 - 23
DuyTan(config-if-range)#switchport mode access
DuyTan(config-if-range)#switchport access vlan 4
DuyTan(config-if-range)#exit

K

stEthernet 0/1 - fathEthernet
.

3.
Switch#sh vlan
VLAN Name
Status
Ports
---- -------------------------------- --------- -----------------------------1
default
active
Fa0/1, Fa0/2,
Fa0/3, Fa0/24
Gig1/1,
Gig1/2
2
ketoan
active
Fa0/4, Fa0/5,
Fa0/6, Fa0/7
3
banhang
active
Fa0/8, Fa0/9,
Fa0/10, Fa0/11
Fa0/12,
Fa0/13, Fa0/14, Fa0/15
4

kythuat
active
Fa0/16,
Fa0/17, Fa0/18, Fa0/19
Fa0/20,
Fa0/21, Fa0/22, Fa0/23
1002 fddi-default
act/unsup
1003 token-ring-default
act/unsup
1004 fddinet-default
act/unsup
1005 trnet-default
act/unsup
VLAN Type SAID
MTU
BrdgMode Trans1 Trans2
---- ----- ---------- ------- ------ -----1
enet 100001
1500
0
0
2
enet 100002
1500
0
0
3
enet 100003
1500

0
0

Parent RingNo BridgeNo Stp
------ ------ -------- ---- -----

-

-

-

-

-

-

-

-

-

-

-

-


-

-

Trang 12


Bài tập thực hành Quản trị mạng
4
enet
0
0
1002 fddi
0
0

100004

1500

-

-

-

-

-


101002

1500

-

-

-

-

-

Trang 13


Bài tập thực hành Quản trị mạng

TRƯỜNG ĐẠI HỌC DUY TÂN
KHOA CÔNG NGHỆ THÔNG TIN
BỘ MÔN KỸ THUẬT MẠNG

QUẢN TRỊ MẠNG

LAB số :
Số giờ :

BÀI THỰC HÀNH
03

03 giờ

GVHD : Võ Nhân Văn

LAB 03
VLAN TRUNKING PROTOCOL
I.

VLAN.

trên port F0/24
VLAN với nhau.
II. Nội dung

- -

và cấu hình giao thức VTP để 2 switch đồng bộ thông tin

TRUNK

192.168.1.1

192.168.1.2

1. Đặt tên và địa chỉ IP cho 2 switch
Switch(config)#hostname DuyTan1
DuyTan1(config)#int
DuyTan1(config)#interface vlan 1
DuyTan1(config-if)#ip add
Trang 14



Bài tập thực hành Quản trị mạng
DuyTan1(config-if)#ip address 192.168.1.1 255.255.255.0
DuyTan1(config-if)#no shut
Switch(config)#hostname DuyTan2
DuyTan2(config)#int
DuyTan2(config)#interface vlan 1
DuyTan2(config-if)#ip add
DuyTan2(config-if)#ip address 192.168.1.2 255.255.255.0
DuyTan2(config-if)#no shut
2

24

DuyTan1(config)#interface fastEthernet 0/24
DuyTan1(config-if)#switchport mode trunk
DuyTan2(config)#interface fastEthernet 0/24
DuyTan2(config-if)#switchport mode trunk
Kiểm tra kết nối trunk:
DuyTan1#show interfaces trunk
Port
Mode
Encapsulation
vlan
Fa0/24
on
802.1q

Status


Native

trunking

1

Port
Fa0/24

Vlans allowed on trunk
1-1005

Port
Fa0/24

Vlans allowed and active in management domain
1

Port
pruned
Fa0/24
1

Vlans in spanning tree forwarding state and not

3. Cấu hình 2 switch có cùng VTP domain
DuyTan1(config)#vtp domain DTU
Changing VTP domain name from NULL to DTU
DuyTan2(config)#vtp domain DTU

Changing VTP domain name from NULL to DTU

Trang 15


Bài tập thực hành Quản trị mạng
4. Cấu hình 2 switch cùng có chế độ VTP server
DuyTan1(config)#vtp mode server
DuyTan2(config)#vtp mode server
5. Kiểm tra thông tin VLAN trên Switch DuyTan1 và DuyTan2
DuyTan1#show vlan
VLAN Name
Status
Ports
---- -------------------------------- --------- -----------------------------1
default
active
Fa0/1, Fa0/2,
Fa0/3, Fa0/4
Fa0/5, Fa0/6,
Fa0/7, Fa0/8
Fa0/9,
Fa0/10, Fa0/11, Fa0/12
Fa0/13,
Fa0/14, Fa0/15, Fa0/16
Fa0/17,
Fa0/18, Fa0/19, Fa0/20
Fa0/21,
Fa0/22, Fa0/23, Gig1/1
Gig1/2

1002 fddi-default
act/unsup
1003 token-ring-default
act/unsup
1004 fddinet-default
act/unsup
1005 trnet-default
act/unsup
VLAN Type SAID
MTU
BrdgMode Trans1 Trans2
---- ----- ---------- ------- ------ -----1
enet 100001
1500
0
0
1002 fddi 101002
1500
0
0
1003 tr
101003
1500
0
0
1004 fdnet 101004
1500
0
0
1005 trnet 101005

1500
0
0

Parent RingNo BridgeNo Stp
------ ------ -------- ---- -----

-

-

-

-

-

-

-

-

-

-

-

-


-

-

-

-

-

ieee -

-

-

-

ibm

-

Trang 16


Bài tập thực hành Quản trị mạng

DuyTan2#show vlan
VLAN Name

Status
Ports
---- -------------------------------- --------- -----------------------------1
default
active
Fa0/1, Fa0/2,
Fa0/3, Fa0/4
Fa0/5, Fa0/6,
Fa0/7, Fa0/8
Fa0/9,
Fa0/10, Fa0/11, Fa0/12
Fa0/13,
Fa0/14, Fa0/15, Fa0/16
Fa0/17,
Fa0/18, Fa0/19, Fa0/20
Fa0/21,
Fa0/22, Fa0/23, Gig1/1
Gig1/2
1002 fddi-default
act/unsup
1003 token-ring-default
act/unsup
1004 fddinet-default
act/unsup
1005 trnet-default
act/unsup
VLAN Type SAID
MTU
BrdgMode Trans1 Trans2
---- ----- ---------- ------- ------ -----1

enet 100001
1500
0
0
1002 fddi 101002
1500
0
0
1003 tr
101003
1500
0
0
1004 fdnet 101004
1500
0
0
1005 trnet 101005
1500
0
0

Parent RingNo BridgeNo Stp
------ ------ -------- ---- -----

-

-

-


-

-

-

-

-

-

-

-

-

-

-

-

-

-

ieee -


-

-

-

ibm

-

Nhận xét: cả 2 switch đều chỉ có vlan mặc định và VLAN chưa có sự thay đổi.
6. Thay đổi Vlan trên switch DuyTan1

Trang 17


Bài tập thực hành Quản trị mạng
DuyTan1(config)#vlan 2
DuyTan1(config-vlan)#vlan 3
DuyTan1(config-vlan)#vlan 4
DuyTan1(config-vlan)#vlan 5
DuyTan1(config-vlan)#
Tiếp theo, kiểm tra vlan ở trên Switch DuyTan2 ta sẽ thấy sự đồng bộ vlan từ
switch DuyTan2
DuyTan2#show vlan
VLAN Name
Status
Ports
---- -------------------------------- --------- -----------------------------1

default
active
Fa0/1, Fa0/2,
Fa0/3, Fa0/4
Fa0/5, Fa0/6,
Fa0/7, Fa0/8
Fa0/9,
Fa0/10, Fa0/11, Fa0/12
Fa0/13,
Fa0/14, Fa0/15, Fa0/16
Fa0/17,
Fa0/18, Fa0/19, Fa0/20
Fa0/21,
Fa0/22, Fa0/23, Gig1/1
Gig1/2
2
VLAN0002
active
3
VLAN0003
active
4
VLAN0004
active
5
VLAN0005
active
1002 fddi-default
act/unsup
1003 token-ring-default

act/unsup
1004 fddinet-default
act/unsup
7

trạng thái VTP và revision number

DuyTan1#show vtp status
VTP Version
:2
Configuration Revision
:4
Maximum VLANs supported locally : 255
Number of existing VLANs
:9
VTP Operating Mode
: Server

Trang 18


Bài tập thực hành Quản trị mạng
VTP Domain Name
: DTU
VTP Pruning Mode
: Disabled
VTP V2 Mode
: Disabled
VTP Traps Generation
: Disabled

MD5 digest
: 0xA8 0xDF 0x41 0x55 0x72 0x8E 0x8A 0x5B
Configuration last modified by 192.168.1.1 at 3-1-93 00:12:52
Local updater ID is 192.168.1.1 on interface Vl1 (lowest numbered VLAN interface)
DuyTan2#show vtp status
VTP Version
:2
Configuration Revision
:4
Maximum VLANs supported locally : 255
Number of existing VLANs
:9
VTP Operating Mode
: Server
VTP Domain Name
: DTU
VTP Pruning Mode
: Disabled
VTP V2 Mode
: Disabled
VTP Traps Generation
: Disabled
MD5 digest
: 0xA8 0xDF 0x41 0x55 0x72 0x8E 0x8A 0x5B
Configuration last modified by 192.168.1.1 at 3-1-93 00:12:52
Local updater ID is 192.168.1.2 on interface Vl1 (lowest numbered VLAN interface found)

DuyTan1#show vtp counters
VTP statistics:
Summary advertisements received

Subset advertisements received
Request advertisements received
Summary advertisements transmitted
Subset advertisements transmitted
Request advertisements transmitted
Number of config revision errors
Number of config digest errors
Number of V1 summary errors

:
:
:
:
:
:
:
:
:

5
4
0
6
5
0
0
0
0

Trang 19



Bài tập thực hành Quản trị mạng
VTP pruning statistics:
Trunk
Join Transmitted Join Received
advts received from

Summary
non-

pruning-capable device
---------------- ---------------- ---------------- --------------------------

Trang 20


Bài tập thực hành Quản trị mạng

TRƯỜNG ĐẠI HỌC DUY TÂN
KHOA CÔNG NGHỆ THÔNG TIN
BỘ MÔN KỸ THUẬT MẠNG

QUẢN TRỊ MẠNG

LAB số :
Số giờ :

BÀI THỰC HÀNH
03

03 giờ

GVHD : Võ Nhân Văn

Chương 3.
LAB 04
ĐỊNH TUYẾN TĨNH
I. Mô tả
- Đặt địa chỉ IP như hình vẽ, sau đó cấu hình định tuyến tĩnh trên tất cả các router.
- Mục đích: Các máy tính phải ping được tới tất cả các mạng trong hình vẽ.
II. Nội dung
192.168.2.0/24
192.168.4.0/24
.1
.2
.2
.3
DuyTan1

.1

DuyTan2 .2

.10

192.168.1.0/24

DuyTan3

.10


192.168.3.0/24

.3

.10

192.168.5.0/24

1.
tên và địa chỉ IP cho router DuyTan1
Router(config)#hostname DuyTan1
DuyTan1(config)#interface fa0/0
DuyTan1(config-if)#ip address 192.168.1.1 255.255.255.0
DuyTan1(config-if)#no shut
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

Trang 21


Bài tập thực hành Quản trị mạng
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed
state to up
DuyTan1(config-if)#interface serial 0/1/0
DuyTan1(config-if)#ip address 192.168.2.1 255.255.255.0
DuyTan1(config-if)#clock rate 64000
DuyTan1(config-if)#no shutdown
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1/0, changed state
to u
2.

tên và địa chỉ IP cho router DuyTan2
Router(config)#hostname DuyTan2
DuyTan2(config)#interface fastEthernet 0/0
DuyTan2(config-if)#ip address 192.168.3.2 255.255.255.0
DuyTan2(config-if)#no shut
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed
state to up
DuyTan2(config-if)#exit
DuyTan2(config)#interface serial 0/1/0
DuyTan2(config-if)#ip address 192.168.2.2 255.255.255.0
DuyTan2(config-if)#no shut
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1/0, changed state
to up
DuyTan2(config-if)#exit
DuyTan2(config)#interface serial 0/1/1
DuyTan2(config-if)#ip address 192.168.4.2 255.255.255.0
DuyTan2(config-if)#no shutdown
DuyTan2(config-if)#clock rate 64000
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1/1, changed state
to up
3.

tên và địa chỉ IP cho router DuyTan3

Router(config)#hostname DuyTan3
DuyTan3(config)#interface fastEthernet 0/0
DuyTan3(config-if)#ip address 192.168.5.3 255.255.255.0
Trang 22



Bài tập thực hành Quản trị mạng
DuyTan3(config-if)#no shutdown
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed
state to up
DuyTan3(config-if)#exit
DuyTan3(config)#interface serial 0/1/1
DuyTan3(config-if)#ip address 192.168.4.3 255.255.255.0
DuyTan3(config-if)#no shut
%LINK-5-CHANGED: Interface Serial0/1/1, changed state to down
DuyTan3(config-if)#
%LINK-5-CHANGED: Interface Serial0/1/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1/1, changed state
to u
4.
DuyTan1, DuyTan3
DuyTan2
DuyTan3#ping 192.168.4.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.0.3.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/3/4 ms
-

-

DuyTan2#ping 192.168.2.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds:

!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/3/4 ms
DuyTan2#ping 192.168.4.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/3/4 ms
DuyTan1#ping 192.168.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.2, timeout is 2 seconds:
Trang 23


Bài tập thực hành Quản trị mạng
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/3/4 ms
DuyTan3#ping 192.168.2.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.4.2, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)

DuyTan1#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is not set
C 192.168.1.0/24 is directly connected, FastEthernet0/0
C 192.168.2.0/24 is directly connected, Serial0/1/0
DuyTan2#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
C 192.168.2.0/24 is directly connected, Serial0/1/0
C 192.168.3.0/24 is directly connected, FastEthernet0/0
C 192.168.4.0/24 is directly connected, Serial0/1/1
DuyTan3#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
Trang 24


Bài tập thực hành Quản trị mạng
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
C 192.168.4.0/24 is directly connected, Serial0/1/1
C 192.168.5.0/24 is directly connected, FastEthernet0/0

5.


uter DuyTan3

DuyTan2 và Router A:

DuyTan3(config)#ip route 192.168.1.0 255.255.255.0 192.168.4.2
DuyTan3(config)#ip route 192.168.2.0 255.255.255.0 192.168.4.2
DuyTan3(config)#ip route 192.168.3.0 255.255.255.0 192.168.4.2
DuyTan3(config)#exit
02:06:37: %SYS-5-CONFIG_I: Configured from console by console



DuyTan2

DuyTan3 và Router A:

DuyTan2(config)#ip route 192.168.1.0 255.255.255.0 192.168.2.1
DuyTan2(config)#ip route 192.168.5.0 255.255.255.0 192.168.4.3
DuyTan2(config)#exit
02:06:37: %SYS-5-CONFIG_I: Configured from console by console


DuyTan1

DuyTan3 và Router B:

DuyTan1(config)# ip route 192.168.3.0 255.255.255.0 192.168.2.2

DuyTan1(config)#ip route 192.168.4.0 255.255.255.0 192.168.2.2
DuyTan1(config)#ip route 192.168.5.0 255.255.255.0 192.168.2.2
DuyTan1(config)#exit
02:06:37: %SYS-5-CONFIG_I: Configured from console by console
Kiểm tra
DuyTan1 sau khi định tuyến
show ip route:
DuyTan1#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
Trang 25


×