0%

Cisco Packet Tracer Notes

Cisco Packet Tracer Notes

三種mode

靜態路由基本

Question 1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# 先拉路由器、交換器、PC、線
# 一開始問你要不要設定答 no
# 進入 Privileged Mode
en
enable
# 進入 Configure Mode
conf t
config terminal
hostname 隨意名稱
#
interface gigabitEthernet 0/0
ip address 192.168.1.1 255.255.255.0
no shutdown
interface gigabitEthernet 0/1
ip address 192.168.2.1 255.255.255.0
no shutdown
# privileged mode中儲存剛剛的設定
wr
write
copy running-config startup-config
#
interface gigabitEthernet 0/0
ip address 192.168.2.2 255.255.255.0
no shutdown
interface gigabitEthernet 0/1
ip address 192.168.3.1 255.255.255.0
no shutdown
# 看一下剛剛有沒有設對
show ip interface brief
# 設定PC ip 靜態的
# 太遠傳不到
# (左) 先看看routing table長怎樣
show ip route
# 果然沒有192.168.3.x這個網段,因此這裡設靜態路由
# Configure Mode下
#
ip route 192.168.3.0 255.255.255.0 192.168.2.2
# S 192.168.3.0/24 [1/0] via 192.168.2.2
# 意思是.3.0這個網段會經由.2.2的路由器負責射出
#
ip route 192.168.1.0 255.255.255.0 192.168.2.1
# 暢通了
# 設定user mode跟privileged mode的密碼
# 這個是剛進去時輸入的密碼
conf t
line console 0
password 123
login
#enable後輸入的密碼
conf t
enable secret 123
# 檢查剛剛的所有設定,用空白鍵來換頁
show running-config
show startup-config

靜態路由進階

Question 2

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# subnetting a /24 Network(200.200.200.*)
# /27 = 255.255.255.224(.11100000)
# 最多可以分成8個子網路,一個子網路30個hosts
#
interface gigabitEthernet 0/0
ip address 200.200.200.62 255.255.255.224
no shutdown
interface gigabitEthernet 0/1
ip address 200.200.200.94 255.255.255.224
no shutdown
interface gigabitEthernet 0/2
ip address 200.200.200.1 255.255.255.224
no shutdown
# 200.200.200.96(.01100000), 200.200.200.128(.10000000)
ip route 200.200.200.96 255.255.255.224 200.200.200.2
ip route 200.200.200.128 255.255.255.224 200.200.200.2
#
interface gigabitEthernet 0/0
ip address 200.200.200.126 255.255.255.224
no shutdown
interface gigabitEthernet 0/1
ip address 200.200.200.158 255.255.255.224
no shutdown
interface gigabitEthernet 0/2
ip address 200.200.200.2 255.255.255.224
no shutdown
# .32(.00100000)(.32~.63)
# (.32為網段 All 0s (binary) : Network segment)
# (.62當default gateway)
# (.63當All 1s (binary) : Broadcast address)
# 可用ip: .33~.62, 30個hosts
ip route 200.200.200.32 255.255.255.224 200.200.200.1
# .64(.01000000)
# 可用ip: .65~.94
ip route 200.200.200.64 255.255.255.224 200.200.200.1
# PC 0
IP Address: 200.200.200.33
Subnet Mask: 255.255.255.224
Default Gateway: 200.200.200.62
# 最後設密碼
conf t
line console 0
password 123
login
conf t
enable secret 123