TRƯỜNG ĐẠI HỌC THỦ DẦU MỘT
VIỆN ĐÀO TẠO CÔNG NGHỆ THÔNG TIN VÀ CHUYỂN ĐỔI SỐ
BÁO CÁO MÔN HỌC
THỰC HÀNH MẠNG MÁY TÍNH
TỔNG HỢP NỘI DUNG
CÁC BÀI TẬP THỰC HÀNH
GVHD: ThS. Trịnh Quốc Thanh
SVTH: Nguyễn Phúc Khang
MSSV: 2224801030206
LỚP: D22KTPM02
BÌNH DƯƠNG - 03/2025
TRƯỜNG ĐẠI HỌC THỦ DẦU MỘT
VIỆN ĐÀO TẠO CÔNG NGHỆ THÔNG TIN VÀ CHUYỂN ĐỔI SỐ
BÁO CÁO MÔN HỌC
THỰC HÀNH MẠNG MÁY TÍNH
TỔNG HỢP NỘI DUNG
CÁC BÀI TẬP THỰC HÀNH
GVHD: ThS. Trịnh Quốc Thanh
SVTH: Nguyễn Phúc Khang
MSSV:2224801030206
LỚP: D22KTPM02
BÌNH DƯƠNG - 03/2025
Bài thực hành 1
Khang>enable
Khang#conf t
Hostname
Khang#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Khang(config)#hostname Khang
Khang(config)#end
Khang#
%SYS-5-CONFIG_I: Configured from console by console
Password
Khang#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Khang(config)#line console 0
Khang(config-line)#password 123
Khang(config-line)#login
Khang(config-line)#end
Khang#
%SYS-5-CONFIG_I: Configured from console by console
Configure Passwords
Khang#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Khang(config)#line vty 0 15
Khang(config-line)#password 123
Khang(config-line)#login
Khang(config-line)#end
Khang#
%SYS-5-CONFIG_I: Configured from console by console
Encrypt Passwords
Khang#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Khang(config)#service password-encryption
Khang(config)#exit
Khang#
%SYS-5-CONFIG_I: Configured from console by console
Khang#show running-config
Building configuration...
Current configuration : 1146 bytes
!
1
version 15.0
no service timestamps log datetime msec
no service timestamps debug datetime msec
service password-encryption
!
hostname Khang
!
!
!
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
interface FastEthernet0/1
!
interface FastEthernet0/2
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
2
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
no ip address
shutdown
!
!
!
!
line con 0
password 7 08701E1D
login
!
line vty 0 4
password 7 08701E1D
login
line vty 5 15
password 7 08701E1D
login
!
!
!
!
end
Banner Messages
Khang#
3
Khang#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Khang(config)# banner motd #Authorized Access Only!#
Khang(config)#exit
Khang#
%SYS-5-CONFIG_I: Configured from console by console
Khang#exit
Khang con0 is now available
Press RETURN to get started.
4
Bài thực hành 2
Packet Tracer - Navigate the IOS
Objectives:
Part 1: Establish Basic Connections, Access the CLI, and Explore Help
Part 2: Explore EXEC Modes
Part 3: Set the Clock
Background / Scenario:
In this activity, you will practice skills necessary for navigating the Cisco IOS,
such as different user access modes, various configuration modes, and common
commands used on a regular basis. You will also practice accessing the
context-sensitive Help by configuring the clock command.
Instructions
Part 1: Establish Basic Connections, Access the CLI, and Explore Help
Step 1: Connect PC1 to S1 using a console cable.
a. Click the Connections icon (the one that looks like a lightning bolt) in
the lower-left corner of the Packet Tracer window.
b. Select the light blue Console cable by clicking it. The mouse pointer
will change to what appears to be a connector with a cable dangling
from it.
c. Click PC1. A window displays an option for an RS-232 connection.
Connect the cable to the RS-232 port.
d. Drag the other end of the console connection to the S1 switch and
click the switch to access the connection list.
e. Select the Console port to complete the connection.
5
Step 2: Establish a terminal session with S1.
a. Click PC1 and then select the Desktop tab.
b. Click the Terminal application icon. Verify that the Port Configuration
default settings are correct.
Question:
What is the setting for bits per second?
Cài đặt mặc định cho bits per second là 9600.
c. The screen that appears may have several messages displayed. Somewhere
on the screen there should be a Press RETURN to get started! message. Press
ENTER.
Question:
What is the prompt displayed on the screen?
S1>
6
Step 3: Explore the IOS Help.
a. The IOS can provide help for commands depending on the level accessed.
The prompt currently displayed is called User EXEC, and the device is waiting
for a command. The most basic form of help is to type a question mark (?) at
the prompt to display a list of commands.
Question:
Which command begins with the letter ‘C’?
Lệnh bắt đầu bằng chữ cái C là connect Đây là lệnh dùng để thiết lập kết nối
với các thiết bị khác.
b. At the prompt, type t and then a question mark (?).
Question:
Which commands are displayed?
c. At the prompt, type te and then a question mark (?).
Question:
Which commands are displayed?
7
This type of help is known as context-sensitive help. It provides more
information as the commands are expanded.
Part 2: Explore EXEC Modes
Step 1: Enter privileged EXEC mode.
a. At the prompt, type the question mark (?).
Question:
What information is displayed for the enable command?
b. Type en and press the Tab key.
Question:
What displays after pressing the Tab key?
This is called command completion (or tab completion). When part of a
command is typed, the Tab key can be used to complete the partial command.
If the characters typed are enough to make the command unique, as in the case
of the enable command, the remaining portion of the command is displayed.
Question:
What would happen if you typed te<Tab> at the prompt?
S1>te
c. Enter the enable command and press ENTER.
Question:
How does the prompt change?
d. When prompted, type the question mark (?).
8
Question:
How many commands are displayed now that privileged EXEC mode is active?
(Hint: you could type c? to list just the commands beginning with ‘C’.)
Có nhiều lệnh hơn được hiển thị so với chế độ User EXEC. Ví dụ, các lệnh liên
quan đến cấu hình như configure cũng sẽ xuất hiện.
Step 2: Enter Global Configuration mode.
a. When in privileged EXEC mode, one of the commands starting with the
letter ‘C’ is configure. Type either the full command or enough of the
command to make it unique. Press the Tab key to issue the command and press
ENTER.
Question:
What is the message that is displayed?
b. Press Enter to accept the default parameter that is enclosed in brackets
[terminal].
Question:
How does the prompt change?
9
c. This is called global configuration mode. This mode will be explored
further in upcoming activities and labs. For now, return to privileged EXEC
mode by typing end, exit, or Ctrl-Z.
Part 3: Set the Clock
Step 1: Use the clock command.
a. Use the clock command to further explore Help and command syntax. Type
show clock at the privileged EXEC prompt.
Question:
What information is displayed? What is the year that is displayed?
b. Use the context-sensitive help and the clock command to set the time on the
switch to the current time. Enter the command clock and press ENTER.
Question:
What information is displayed?
c. The “% Incomplete command” message is returned by the IOS. This
indicates that the clock command needs more parameters. Any time more
information is needed, help can be provided by typing a space after the
command and the question mark (?).
Question:
What information is displayed?
10
d. Set the clock using the clock set command. Proceed through the command
one step at a time.
Question:
What information is being requested?
hh:mm:ss Current Time
What would have been displayed if only the clock set command had been
entered, and no request for help was made by using the question mark?
e. Based on the information requested by issuing the clock set ? command,
enter a time of 3:00 p.m. by using the 24-hour format of 15:00:00. Check to see
if more parameters are needed.
Question:
What does the output return?
f. Attempt to set the date to 01/31/2035 using the format requested. It may be
necessary to request additional help using context-sensitive help to complete
11
the process. When finished, issue the show clock command to display the clock
setting. The resulting command output should display as:
S1# show clock
*15:0:4.869 UTC Tue Jan 31 2035
g. If you were not successful, try the following command to obtain the output
above:
S1# clock set 15:00:00 31 Jan 2035
Step 2: Explore additional command messages.
a. The IOS provides various outputs for incorrect or incomplete commands.
Continue to use the clock command to explore additional messages that may be
encountered as you learn to use the IOS.
b. Issue the following commands and record the messages:
Command: S1# cl<Tab>
Question:
What information was returned?
S1#cl
Command: S1# clock
Question:
What information was returned?
% Incomplete command
Command: S1# clock set 25:00:00
Question:
What information was returned?
% Invalid input detected at '^' marker.
Command: S1# clock set 15:00:00 32
Question:
What information was returned?
% Invalid input detected at '^' marker.
Bài thực hành 3
12
Packet Tracer - Basic Switch and End Device Configuration
Addressing Table
Device Interface IP Address Subnet Mask
Class-A VLAN 1 128.107.20.10 255.255.255.0
Class-B VLAN 1 128.107.20.15 255.255.255.0
Student-1 NIC 128.107.20.25 255.255.255.0
Student-2 NIC 128.107.20.30 255.255.255.0
Objectives
· Configure hostnames and IP addresses on two Cisco Internetwork
Operating System (IOS) switches using the command-line interface
(CLI).
· Use Cisco IOS commands to specify or limit access to the device
configurations.
· Use IOS commands to save the running configuration.
· Configure two host devices with IP addresses.
· Verify connectivity between the two PC end devices.
Scenario
As a recently hired LAN technician, your network manager has asked you
to demonstrate your ability to configure a small LAN. Your tasks include
configuring initial settings on two switches using the Cisco IOS and
configuring IP address parameters on host devices to provide end-to-end
connectivity. You are to use two switches and two hosts/PCs on a cabled
and powered network.
Instructions
Configure the devices to fulfill the requirements below.
Requirements
· Use a console connection to access each switch.
· Name Class-A and Class-B switches.
· Use the 8ubRu password for all lines.
· Use the C9WrE secret password.
· Encrypt all clear text passwords.
· Configure an appropriate message-of-the-day (MOTD) banner.
· Configure addressing for all devices according to the Addressing
Table.
· Save your configurations.
13
· Verify connectivity between all devices.
Note: Click Check Results to see your progress. Click Reset Activity to
generate a new set of requirements. If you click on this before you complete
the activity, all configurations will be lost.
ID: 0102
Bài làm
1. Cấu hình hostname cho switch
ASw-1:
Switch>enable
Switch#configure terminal
Switch(config)#hostname ASw-1
ASw-2:
Switch>enable
Switch#configure terminal
Switch(config)#hostname ASw-2
2. Cấu hình mật khẩu
Console Password (R4Xe3)
ASw-1:
14
ASw-1(config)#line console 0
ASw-1(config-line)#password R4Xe3
ASw-1(config-line)#login
ASw-1(config-line)#exit
ASw-2:
ASw-2(config)#line console 0
ASw-2(config-line)#password R4Xe3
ASw-2(config-line)#login
ASw-2(config-line)#exit
VTY Password (R4Xe3)
ASw-1:
ASw-1(config)#line vty 0 4
ASw-1(config-line)#password R4Xe3
ASw-1(config-line)#login
ASw-1(config-line)#exit
ASw-2:
ASw-2(config)#line vty 0 4
ASw-2(config-line)#password R4Xe3
ASw-2(config-line)#login
ASw-2(config-line)#exit
Enable Secret Password (C4aJa)
ASw-1:
ASw-1(config)#enable secret C4aJa
ASw-2:
ASw-2(config)#enable secret C4aJa
3. Mã hóa mật khẩu
ASw-1:
ASw-1(config)#service password-encryption
ASw-2:
15
ASw-2(config)#service password-encryption
4. Cấu hình MOTD Banner
ASw-1:
ASw-1(config)#banner motd # Truy cap trai phep bi cam! #
ASw-2:
ASw-2(config)#banner motd # Truy cap trai phep bi cam! #
5. Cấu hình địa chỉ IP trên VLAN 1
ASw-1:
ASw-1(config)#interface vlan 1
ASw-1(config-if)#ip address 128.107.20.10 255.255.255.0
ASw-1(config-if)#no shutdown
ASw-2:
ASw-2(config)#interface vlan 1
ASw-2(config-if)#ip address 128.107.20.15 255.255.255.0
ASw-2(config-if)#no shutdown
6. Lưu cấu hình
ASw-1:
ASw-1#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
ASw-2:
ASw-2#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
7. Kiểm tra kết nối
16
Kiểm tra cấu hình IP của switch
ASw-1:
ASw-1#show ip interface brief
ASw-2:
ASw-2#show ip interface brief
Kiểm tra các thiết bị lân cận bằng CDP
ASw-1:
ASw-1#show cdp neighbors
Kiểm tra bảng MAC Address Table
ASw-1:
ASw-1#show mac address-table
Kiểm tra kết nối giữa các PC
Từ ASw-2 đến User-01
ASw-2>ping 128.107.20.25
Kết quả:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 0/3/7 ms
Từ User-01 đến User-02
C:\>ping 128.107.20.30
Kết quả:
C:\>ping 128.107.20.30
Kết quả:
Reply from 128.107.20.30: bytes=32 time<1ms TTL=128
Reply from 128.107.20.30: bytes=32 time=1ms TTL=128
Reply from 128.107.20.30: bytes=32 time<1ms TTL=128
Reply from 128.107.20.30: bytes=32 time<1ms TTL=128
17
Ping statistics for 128.107.20.30:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms
Bài thực hành 5
18
19
20
21
22
23
Bài thực hành 6
Router0>ena
Router0>enable
Router0#confi
Router0#configure ter
Router0#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router0(config)#lin
Router0(config)#line vt
Router0(config)#line vty 0 4
Router0(config-line)#pas
Router0(config-line)#password 123
Router0(config-line)#login
Router0(config-line)#exi
Router0(config-line)#exit
Router0(config)#tran
Router0(config)#line
Router0(config)#line vty
Router0(config)#line vty 0 4
Router0(config-line)#lgin
^
% Invalid input detected at '^' marker.
Router0(config-line)#login
Router0(config-line)#trans
Router0(config-line)#transport inp
Router0(config-line)#transport input tel
Router0(config-line)#transport input telnet
Router0(config-line)#ex
Router0(config-line)#exi
24
Router0(config-line)#exit
Router0(config)#enba
Router0(config)#ena
Router0(config)#enable sec
Router0(config)#enable secret 123
Router0(config)#end
Router0#
%SYS-5-CONFIG_I: Configured from console by console
Router0#exe
Router0#exec-ti
Router0#
Router0 con0 is now available
Press RETURN to get started.
Router>enab
Router>enable
Router#confi
Router#configure ter
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int
Router(config)#interface Gi
Router(config)#interface GigabitEthernet 192.168.2.1 255.255.255.0
^
% Invalid input detected at '^' marker.
Router(config)#no
Router(config)#no sho
Router(config)#no shut
Router(config)#no shut
Router(config)#no shut
Router(config)#no shutdo
Router(config)#no shut
Router(config)#no shut?
25
% Unrecognized command
Router(config)#in
Router(config)#interface Gi
Router(config)#interface GigabitEthernet 192.168.2.1 255.255.255.0
^
% Invalid input detected at '^' marker.
Router(config)#interface GigabitEthernet 192.168.2.1255.255.255.0
^
% Invalid input detected at '^' marker.
Router(config)#interface GigabitEthernet 192.168.2.1255.255.255.0
^
% Invalid input detected at '^' marker.
Router(config)#ẽi
Router(config)#exi
Router(config)#exit
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#^Z
Router#
Router#en
Router#enable
Router#con
Router#confi
Router#configure ter
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hos
Router(config)#hostname Router1
Router1(config)#inter
Router1(config)#interface Gig
Router1(config)#interface GigabitEthernet 0/0/0
Router1(config-if)#ip add
Router1(config-if)#ip address 192.168.2.1 255.255.255.0
Router1(config-if)#no sho
Router1(config-if)#no shut
Router1(config-if)#no shutdown
Router1(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0/0,
changed state to up
Router1(config-if)#int
Router1(config-if)#inter
Router1(config-if)#interface GigabitEthernet 0/0/1
Router1(config-if)#ip address 10.0.0.2 255.255.255.252
Router1(config-if)#no
Router1(config-if)#no shut
26
Router1(config-if)#no shutdown
Router1(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0/1,
changed state to up
Router1(config-if)#exi
Router1(config-if)#exit
Router1(config)#ip route 192.168.1.0 255.255.255.0 10.0.0.1
Router1(config)#
Router1 con0 is now available
Press RETURN to get started.
Switch>en
Switch>enable
Switch#hose
Switch#host
Switch#hostna
Switch#hostname
Switch#conf
Switch#configure ter
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#host
Switch(config)#hostname S1
S1(config)#pas
S1(config)#pass
S1(config)#line
S1(config)#line con
S1(config)#line console 0
S1(config-line)#pass
S1(config-line)#password 123
S1(config-line)#login
S1(config-line)#end
27
S1#
%SYS-5-CONFIG_I: Configured from console by console
S1#
S1#
S1 con0 is now available
Press RETURN to get started.
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed
state to up
User Access Verification
Password:
S1>en
S1>enable
S1#confi
S1#configure ter
S1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
S1(config)#hos
28
S1(config)#hostname Switch0
Switch0(config)#inter
Switch0(config)#interface Fas
Switch0(config)#interface FastEthernet 0/1
Switch0(config-if)#no shut
Switch0(config-if)#no shutdown
Switch0(config-if)#exi
Switch0(config-if)#exit
Switch0(config)#
Switch0 con0 is now available
Press RETURN to get started.
Switch>ena
Switch>enable
Switch#con
Switch#confi
Switch#configure ter
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#host
Switch(config)#hostname Switch1
Switch1(config)#inter
Switch1(config)#interface Fas
Switch1(config)#interface FastEthernet 0/1
Switch1(config-if)#no shut
Switch1(config-if)#no shutdown
Switch1(config-if)#exi
Switch1(config-if)#exit
Switch1(config)#
29
Switch1 con0 is now available
Press RETURN to get started.
Cisco Packet Tracer PC Command Line 1.0
C:\>ping 192.168.2.10
Pinging 192.168.2.10 with 32 bytes of data:
Request timed out.
Request timed out.
Ping statistics for 192.168.2.10:
Packets: Sent = 3, Received = 0, Lost = 3 (100% loss),
Control-C
^C
C:\>ping 192.168.2.10
Pinging 192.168.2.10 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Ping statistics for 192.168.2.10:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
C:\>ping 192.168.2.10
Pinging 192.168.2.10 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Ping statistics for 192.168.2.10:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
C:\>ping 192.168.1.10
Ping request could not find host 192.168..10. Please check the name and try again.
30
C:\>ping
C:\>
C:\>ping 192.168.1.10
Pinging 192.168.1.10 with 32 bytes of data:
Reply from 192.168.1.10: bytes=32 time=8ms TTL=128
Reply from 192.168.1.10: bytes=32 time=5ms TTL=128
Reply from 192.168.1.10: bytes=32 time=1ms TTL=128
Reply from 192.168.1.10: bytes=32 time=4ms TTL=128
Ping statistics for 192.168.1.10:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 8ms, Average = 4ms
C:\>telnet 192.168.1.1
Trying 192.168.1.1 ...Open
User Access Verification
Password:
% Password: timeout expired!
[Connection to 192.168.1.1 closed by foreign host]
C:\>telnet 192.168.1.1
Trying 192.168.1.1 ...Open
User Access Verification
Password:
Router0>
Router0>
Router0>
Router0>
Router0>
Router0>
Router0>enanbelen
Translating "enanbel"...domain server (255.255.255.255)
% Unknown command or computer name, or unable to find computer address
Router0>
[Connection to 192.168.1.1 closed by foreign host]
C:\>telnet 192.168.1.1
Trying 192.168.1.1 ...Open
31
User Access Verification
Password:
Router0>enable
Password:
Router0#
[Connection to 192.168.1.1 closed by foreign host]
Cisco Packet Tracer PC Command Line 1.0
C:\>ping 192.168.2.10
Pinging 192.168.2.10 with 32 bytes of data:
Reply from 192.168.2.10: bytes=32 time=4ms TTL=128
Reply from 192.168.2.10: bytes=32 time=7ms TTL=128
Reply from 192.168.2.10: bytes=32 time=1ms TTL=128
Reply from 192.168.2.10: bytes=32 time<1ms TTL=128
Ping statistics for 192.168.2.10:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 7ms, Average = 3ms
C:\>telnet 192.168.1.1
Trying 192.168.1.1 ...
% Connection timed out; remote host not responding
C:\>telnet 192.168.2.1
Trying 192.168.2.1 ...
% Connection timed out; remote host not responding
C:\>
32