點樣用 Packet Tracer、點樣睇 show 指令嘅 output。撳下面個掣跳去嗰部份,或者用搜尋框過濾(例如打「trunk」、「CRC」、「FULL」)。
Packet Tracer 介面點睇
| 位置 / 元素 | 用途 | 點用 |
|---|
| 左上 Logical / Physical | Logical = 拓撲圖;Physical = 機櫃、大樓、城市 | 平時用 Logical;計線長、Wi-Fi 距離先用 Physical |
| 右下 Realtime / Simulation | Realtime = 即時運行;Simulation = 逐個 packet 慢慢睇 | 學 ARP、DHCP、ping 流程用 Simulation |
| 左下 Device-Type Selection | 揀 router、switch、PC、server、線 | 拖落 workspace |
| 閃電 icon(Connections) | 自動揀線(Automatically Choose Connection Type) | 考試建議自己揀啱嘅線 |
| 撳 device → Physical tab | 加 module(例如 HWIC-2T serial) | 加之前要撳開關 power off,加完再開 |
| 撳 device → Config tab | GUI 設定;下面會顯示對應嘅 IOS 指令 | 學指令嘅好方法,但考試多數要用 CLI |
| 撳 device → CLI tab | 打 IOS 指令 | Router / switch 主要喺度設定 |
| 撳 PC → Desktop tab | IP Configuration、Command Prompt、Web Browser、Terminal | Terminal 經 console 線入 router |
| 放大鏡(Inspect) | 直接睇 ARP、MAC、routing、NAT table | 撳放大鏡 → 撳 device → 揀 table |
| 信封(Add Simple PDU) | 快速 ping 兩部機 | 撳信封 → 撳 source → 撳 destination;右下 PDU list 睇 Successful / Failed |
| 開咗嘅信封(Add Complex PDU) | 自訂 protocol、port、size | 測 ACL 擋唔擋某個 port |
| Note(文字) | 喺圖上寫標註 | 標 IP、VLAN、subnet |
| Fast Forward Time(Realtime) | 加快時間 | STP、DHCP、OSPF converge 等唔切時撳 |
| Activity Wizard / Check Results | 功課 .pka 檔睇完成度 | Assessment Items 會話你邊項未啱 |
線嘅種類
| 線 | 樣 | 用喺 |
|---|
| Console | 淺藍色 | PC RS-232 → router / switch console |
| Copper Straight-Through | 黑色實線 | PC–switch、switch–router |
| Copper Cross-Over | 黑色虛線 | switch–switch、PC–PC、router–router、PC–router |
| Fiber | 橙色 | Fiber port(例如 GLC-LH-SMD module) |
| Serial DCE | 紅色,有時鐘 icon 嗰邊 | Router serial;DCE 一邊要 clock rate |
| Serial DTE | 紅色 | Router serial 另一邊 |
Link 燈號
| 顏色 | 意思 | 點處理 |
|---|
| 綠色 | Up,正常 forwarding | — |
| 橙色 / 琥珀色 | STP 未 forward(listening / learning 約 30 秒,或者 blocking) | 等一陣或撳 Fast Forward Time;一直橙色就係 STP block 咗(正常後備) |
| 紅色 | Down | 檢查 shutdown、線種、對面有冇開 |
| 冇燈 / 一邊紅 | 其中一邊 interface shutdown | Router interface 預設 shutdown,要 no shutdown |
Simulation Mode 逐步睇 packet
| 步 | 做咩 | 睇咩 |
|---|
| 1 | 撳右下角 Simulation | 出現 Simulation Panel 同 Event List |
| 2 | Event List Filters → Edit Filters,只剔要睇嘅 protocol(例如 ARP、ICMP) | 減少雜訊(STP、CDP 會好多) |
| 3 | 用信封 Add Simple PDU:PC A → PC B | PC A 旁邊出現信封 |
| 4 | 撳 Capture / Forward(▶|)逐步行 | 信封沿住線郁;Event List 每步加一行 |
| 5 | 睇 Event List 欄位 | Time、Last Device(由邊度嚟)、At Device(而家喺邊)、Type(protocol) |
| 6 | 撳 Event List 入面個色格或者 workspace 個信封 | 打開 PDU Information |
| 7 | OSI Model tab | In Layers / Out Layers:device 喺每層做咗咩決定(例如「查 routing table,next-hop 係 …」) |
| 8 | Inbound / Outbound PDU Details tab | 每層 header 欄位:MAC、IP、TTL、port、flags |
| 9 | 用 Inspect 睇 ARP / MAC table 點樣更新 | 對照 notes 嘅 ARP、MAC learning 流程 |
| 10 | Reset Simulation 再試另一個情境 | 例如第二次 ping,ARP 已經有 cache,少咗 ARP packet |
| PDU list 結果 | 意思 |
|---|
| Successful | 去到又返到 |
| Failed | 中途被丟棄:撳 Simulation 重做,睇喺邊部 device 出現紅色 ✕,再睇 OSI Model 解釋原因 |
| In Progress | 仲行緊 |
注意第一次 ping 頭一兩個 timeout 係正常,因為要先等 ARP。
Show 指令總表
| 類別 | 指令 | 用途 | 重點睇 | 正常 | 有問題嘅樣 | 下一步 |
|---|
| Interface | show ip interface brief | 所有 interface IP 同狀態 | Status / Protocol | up / up | admin down、down/down、up/down | no shutdown、查線、clock rate |
| Interface | show interfaces g0/0 | 詳細狀態、速度、error | duplex、BW、CRC、collisions | 0 error、full duplex | CRC 多、late collision | 換線、對齊 duplex |
| Interface | show interfaces status | Switch port 一覽 | Status、Vlan、Duplex | connected | notconnect、err-disabled | 查線;修 port security 再 shut/no shut |
| Interface | show ip interface g0/0 | Interface 嘅 L3 詳細 | access list 套用咗乜 | 啱嘅 ACL、方向 | ACL 方向錯 | 改 ip access-group |
| Interface | show controllers s0/0/0 | Serial cable 類型 | DCE / DTE、clock rate | DCE 有 clock rate | DCE 冇 clock | 加 clock rate |
| Switching | show vlan brief | VLAN 同 access port | Ports 欄 | Port 喺啱 VLAN | Port 喺 VLAN 1、VLAN 冇開 | switchport access vlan |
| Switching | show interfaces trunk | Trunk 狀態 | Mode、Native、Allowed | trunking、native 一致 | 冇 trunk、VLAN 唔喺 allowed | switchport mode trunk、allowed vlan add |
| Switching | show mac address-table | MAC table | Vlan、Mac、Ports | MAC 喺固定 port | 空白、MAC 喺兩個 port 跳 | 查 VLAN、查 loop |
| Switching | show spanning-tree | STP 狀態 | Root ID、Role、Sts | 預期嘅 root、有 BLK 後備 | Root 唔係預期 | spanning-tree vlan X root primary |
| Switching | show etherchannel summary | EtherChannel | Po flags、member flags | Po1(SU)、Gi0/1(P) | (SD)、(I)、(s) | 對齊 mode、速度、VLAN |
| Switching | show port-security interface f0/5 | Port security | Port Status、Violation Count | Secure-up | Secure-shutdown | 清 MAC,shut / no shut |
| Switching | show cdp neighbors | 隔籬係咩 device | Device ID、Local / Port ID | 見到所有鄰居 | 見唔到 → L1/L2 問題 | 查線 |
| Routing | show ip route | Routing table | Code、[AD/metric]、via | 有齊所有 network | 缺 route、冇 default | 加 route / 查 protocol |
| Routing | show ip route 10.1.1.9 | 某個 IP 用邊條 route | Routing entry | Match 到 | % Network not in table | 加 route |
| Routing | show ip protocols | Routing protocol 設定 | Networks、Passive、Router ID | Network 包齊 | 漏 network、passive 錯 | 改 network / passive |
| Routing | show ip ospf neighbor | OSPF 鄰居 | State | FULL(或 2WAY/DROTHER) | 冇鄰居、卡 INIT / EXSTART | 跟程序 4 |
| Routing | show ip ospf interface brief | OSPF interface | Area、Cost、State | Area 啱、cost 合理 | Interface 冇出現 | 加 network |
| Routing | show ip eigrp neighbors | EIGRP 鄰居 | Address、Uptime、Q Cnt | 有鄰居、Q Cnt 0 | 冇鄰居 | 對 AS number、K values |
| Routing | show ip eigrp topology | EIGRP successor / FS | FD / RD | 有 successor | — | — |
| Services | show ip dhcp binding | 派咗嘅 IP | IP、MAC | 見到 client | 空白 | 跟程序 3 |
| Services | show ip dhcp pool | Pool 用量 | Leased addresses | 未用晒 | 用晒 | 擴大 pool |
| Services | show ip nat translations | NAT table | Inside local / global | 有記錄 | 空白 | 跟程序 5 |
| Services | show ip nat statistics | NAT 統計 | Inside / outside interface、Hits、Misses | Hits 增加 | Misses 增加 | 查 ACL / pool |
| Services | show standby brief | HSRP | State、Active、Virtual IP | 一部 Active 一部 Standby | 兩部都 Active | 查 group、VLAN、連線 |
| Security | show access-lists | ACL 同 match 數 | 每行 match(es) | Match 數合理 | Deny match 晒 | 跟程序 6 |
| Security | show ip ssh | SSH 狀態 | Enabled、version | SSH Enabled - version 2.0 | Disabled | crypto key generate rsa |
| Device | show running-config | 而家生效嘅設定 | 成份 config | — | — | | include / section / begin 過濾 |
| Device | show startup-config | 已儲存嘅設定 | 同 running 比較 | 一樣 | 唔一樣 = 未 save | copy run start |
| Device | show version | IOS、uptime、config register | Configuration register | 0x2102 | 0x2142(唔讀 startup-config) | config-register 0x2102 |
| Device | show flash: | Flash 入面檔案 | IOS image、vlan.dat | — | — | — |
| Device | show clock / show ntp status | 時間同步 | Clock is synchronized | synchronized | unsynchronized | 查 NTP server |
| Device | show history | 啱啱打過嘅指令 | — | — | — | — |
解讀:show ip interface brief
R1# show ip interface brief
Interface IP-Address OK? Method Status Protocol
GigabitEthernet0/0 192.168.1.1 YES manual up up
GigabitEthernet0/1 unassigned YES unset administratively down down
Serial0/0/0 10.0.0.1 YES manual up down
Serial0/0/1 10.0.0.5 YES manual down down
| 欄 / 行 | 意思 | 留意 |
|---|
| IP-Address | Interface 嘅 IP;unassigned = 未設 | 同 IP 表對一對有冇打錯 |
| Method | manual = 人手設;DHCP;unset = 未設 | — |
| Status | L1 狀態 | administratively down = 有 shutdown |
| Protocol | L2 狀態 | 要 up / up 先用得 |
| G0/0 up / up | 正常 | — |
| G0/1 admin down / down | 未 no shutdown | interface g0/1 → no shutdown |
| S0/0/0 up / down | L1 OK、L2 唔 OK | DCE 冇 clock rate、encapsulation 唔夾 |
| S0/0/1 down / down | L1 問題 | 線冇駁、對面 shutdown |
解讀:show ip route
R1# show ip route
Codes: L - local, C - connected, S - static, R - RIP, O - OSPF, D - EIGRP ...
Gateway of last resort is 10.0.0.2 to network 0.0.0.0
S* 0.0.0.0/0 [1/0] via 10.0.0.2
10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C 10.0.0.0/30 is directly connected, Serial0/0/0
L 10.0.0.1/32 is directly connected, Serial0/0/0
O 10.0.0.4/30 [110/128] via 10.0.0.2, 00:12:05, Serial0/0/0
O 10.10.0.0/16 [110/65] via 10.0.0.2, 00:12:05, Serial0/0/0
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.1.0/24 is directly connected, GigabitEthernet0/0
L 192.168.1.1/32 is directly connected, GigabitEthernet0/0| 欄 / 行 | 意思 | 留意 |
|---|
| Gateway of last resort | Default route 去邊 | 「is not set」= 冇 default route |
| S* | Static default route | * = candidate default |
| is variably subnetted | Parent route,只係標題 | 唔係真正嘅 route |
| C / L | Connected network / interface 自己嘅 IP | Interface down 就消失 |
| [110/128] | [AD / metric] | 110 = OSPF;128 = cost |
| via 10.0.0.2 | Next-hop | 要喺 connected network 入面 |
| 00:12:05 | 學到咗幾耐 | 成日由 0 開始 = route 唔穩定(flapping) |
| Serial0/0/0 | Exit interface | — |
解讀:show vlan brief
S1# show vlan brief
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/9, Fa0/10, Fa0/11, Fa0/12
10 STAFF active Fa0/1, Fa0/2, Fa0/3, Fa0/4
20 STUDENT active Fa0/5, Fa0/6, Fa0/7, Fa0/8
99 MGMT active
999 BLACKHOLE active Fa0/13, Fa0/14, ..., Fa0/24
1002 fddi-default active
1003 token-ring-default active
| 欄 / 行 | 意思 | 留意 |
|---|
| VLAN / Name | VLAN 號碼同名 | 名打錯唔影響運作,但 Activity 評分會計 |
| Ports | 屬於呢個 VLAN 嘅 access port | Trunk port 唔會出現(例如 Gig0/1 唔見咗係正常) |
| VLAN 1 仲有 port | Fa0/9–12 未分配 | Best practice:分配或者 shutdown |
| VLAN 99 冇 port | Management VLAN 只用 SVI 同 trunk | 正常 |
| 1002–1005 | 預設舊式 VLAN | 刪唔到,唔使理 |
解讀:show interfaces trunk
S1# show interfaces trunk
Port Mode Encapsulation Status Native vlan
Gig0/1 on 802.1q trunking 99
Port Vlans allowed on trunk
Gig0/1 10,20,99
Port Vlans allowed and active in management domain
Gig0/1 10,20,99
Port Vlans in spanning tree forwarding state and not pruned
Gig0/1 10,20,99
| 欄 / 行 | 意思 | 留意 |
|---|
| Mode | on = 人手設 trunk;desirable / auto = DTP 協商 | Best practice 用 on + nonegotiate |
| Status | trunking | 冇出現 = 根本唔係 trunk |
| Native vlan | 冇 tag 嘅 VLAN | 兩邊要一樣 |
| Vlans allowed on trunk | 准行嘅 VLAN | 漏咗某個 VLAN = 嗰個 VLAN 跨 switch 唔通 |
| allowed and active | 准行而且呢部 switch 有開嘅 VLAN | 唔見咗 = 呢部 switch 未開嗰個 VLAN |
| forwarding state | STP 冇 block 嘅 VLAN | 唔見咗 = STP block 咗(可能係正常後備) |
解讀:show interfaces g0/0(重點行)
R1# show interfaces g0/0
GigabitEthernet0/0 is up, line protocol is up (connected)
Hardware is CN Gigabit Ethernet, address is 0001.4322.ab01 (bia 0001.4322.ab01)
Internet address is 192.168.1.1/24
MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec,
reliability 255/255, txload 1/255, rxload 1/255
Full-duplex, 1000Mb/s, media type is RJ45
5 minute input rate 2000 bits/sec, 3 packets/sec
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 output errors, 0 collisions, 1 interface resets
0 late collision, 0 deferred| 欄 / 行 | 意思 | 留意 |
|---|
| is up, line protocol is up | L1 / L2 狀態 | 同 show ip int brief 一樣 |
| address is 0001.4322.ab01 | Interface MAC | 對 ARP table 用 |
| BW 1000000 Kbit, DLY 10 usec | Bandwidth 同 delay | OSPF cost、EIGRP metric 用呢兩個數 |
| txload / rxload | 使用率(/255) | 接近 255 = 塞車 |
| Full-duplex, 1000Mb/s | Duplex 同速度 | 一邊 half 一邊 full = duplex mismatch |
| input errors / CRC | 收到壞 frame | CRC 不停升 = 線差、干擾 |
| collisions / late collision | 碰撞 | Full duplex 應該係 0;late collision = duplex mismatch |
解讀:show mac address-table
S1# show mac address-table
Mac Address Table
-------------------------------------------
Vlan Mac Address Type Ports
---- ----------- -------- -----
10 0001.4322.ab01 DYNAMIC Gig0/1
10 0060.2f11.9c3e DYNAMIC Fa0/2
10 0090.2b55.11a0 STATIC Fa0/5
20 00e0.a3b1.0042 DYNAMIC Gig0/1| 欄 / 行 | 意思 | 留意 |
|---|
| Vlan | MAC 屬邊個 VLAN | 每個 VLAN 各自一個 table |
| Type DYNAMIC | 自動學到 | 300 秒冇 traffic 就刪 |
| Type STATIC | 人手或 port security sticky | 唔會過期 |
| Gig0/1 有多個 MAC | Uplink / trunk | 正常,後面有其他 switch / router |
| 空白 | 未有 traffic | PC ping 一次再睇 |
Packet Tracer 用 Inspect 撳 switch → MAC Table 都睇到同一樣嘢。
解讀:show ip arp
R1# show ip arp
Protocol Address Age (min) Hardware Addr Type Interface
Internet 192.168.1.1 - 0001.4322.ab01 ARPA GigabitEthernet0/0
Internet 192.168.1.10 3 0060.2f11.9c3e ARPA GigabitEthernet0/0
Internet 10.0.0.2 0 Incomplete ARPA
| 欄 / 行 | 意思 | 留意 |
|---|
| Age「-」 | Router 自己 interface | 唔會過期 |
| Age 3 | 學到 3 分鐘 | Cisco 4 小時過期 |
| Incomplete | 發咗 ARP request 但冇回覆 | 對方唔存在、唔同 subnet、或者 L1 / L2 斷 |
解讀:show cdp neighbors
R1# show cdp neighbors
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone
Device ID Local Intrfce Holdtme Capability Platform Port ID
S1 Gig 0/0 152 S 2960 Gig 0/1
R2 Ser 0/0/0 135 R ISR4321 Ser 0/0/0| 欄 / 行 | 意思 | 留意 |
|---|
| Device ID | 對方 hostname | — |
| Local Intrfce | 自己用邊個 port 駁 | — |
| Port ID | 對方用邊個 port | 畫 topology 圖好有用 |
| Holdtme | 倒數(180 秒) | 每 60 秒收到更新會重設 |
| Capability | R router、S switch、P phone | — |
想睇對方 IP:show cdp neighbors detail。L3 唔通但 CDP 見到鄰居 = L1 / L2 正常,問題喺 IP 或以上。
解讀:show ip ospf neighbor
R1# show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 1 FULL/DR 00:00:35 192.168.12.2 GigabitEthernet0/1
3.3.3.3 1 FULL/BDR 00:00:38 192.168.12.3 GigabitEthernet0/1
4.4.4.4 1 2WAY/DROTHER 00:00:31 192.168.12.4 GigabitEthernet0/1
5.5.5.5 0 FULL/ - 00:00:33 10.0.0.6 Serial0/0/0
| 欄 / 行 | 意思 | 留意 |
|---|
| Neighbor ID | 對方 Router ID | 唔係 interface IP |
| Pri | 對方 DR priority | 0 = 唔參選 |
| FULL/DR、FULL/BDR | 同 DR / BDR 完全同步 | 正常 |
| 2WAY/DROTHER | 兩部 DROTHER 之間 | 正常,唔使 FULL |
| FULL/ - | Point-to-point,冇 DR | Serial 正常 |
| Dead Time | 由 40 秒倒數 | 每 10 秒收到 Hello 會重設 |
| Address | 對方 interface IP | — |
解讀:show ip protocols(OSPF)
R1# show ip protocols
Routing Protocol is "ospf 1"
Router ID 1.1.1.1
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
192.168.1.0 0.0.0.255 area 0
10.0.0.0 0.0.0.3 area 0
Passive Interface(s):
GigabitEthernet0/0
Routing Information Sources:
Gateway Distance Last Update
2.2.2.2 110 00:10:12
Distance: (default is 110)| 欄 / 行 | 意思 | 留意 |
|---|
| Router ID | 呢部 router 嘅 ID | 兩部一樣會出事 |
| Maximum path: 4 | ECMP 最多 4 條 | — |
| Routing for Networks | Network 指令 | 對一對有冇包齊所有 interface,wildcard 啱唔啱 |
| Passive Interface(s) | 唔發 Hello 嘅 interface | 對 router 嘅 interface 唔應該喺度 |
| Routing Information Sources | 由邊個學到 route | 冇 = 未有 neighbor |
| Distance | AD | — |
解讀:show spanning-tree
S2# show spanning-tree vlan 10
VLAN0010
Spanning tree enabled protocol ieee
Root ID Priority 24586
Address 0002.4a3b.1101
Cost 4
Port 25(GigabitEthernet0/1)
Bridge ID Priority 32778 (priority 32768 sys-id-ext 10)
Address 0060.70c4.8e02
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- ----
Gi0/1 Root FWD 4 128.25 P2p
Gi0/2 Altn BLK 4 128.26 P2p
Fa0/1 Desg FWD 19 128.1 P2p| 欄 / 行 | 意思 | 留意 |
|---|
| Root ID | 成個 VLAN 嘅 root bridge | 如果係自己會寫「This bridge is the root」 |
| Root ID Cost / Port | 自己去 root 嘅 cost 同 root port | — |
| Bridge ID | 自己嘅 ID | 32778 = 32768 + VLAN 10 |
| Role Root / Desg / Altn | Root port / designated / alternate | — |
| Sts FWD / BLK | Forwarding / blocking | Altn BLK 係正常後備 |
| Cost | Port cost | 19 = 100M,4 = 1G |
解讀:show ip nat translations + statistics
R1# show ip nat translations
Pro Inside global Inside local Outside local Outside global
tcp 203.0.113.5:1025 192.168.1.10:51000 142.250.1.1:443 142.250.1.1:443
--- 203.0.113.10 192.168.1.50 --- ---
R1# show ip nat statistics
Total translations: 2 (1 static, 1 dynamic, 1 extended)
Outside interfaces: GigabitEthernet0/1
Inside interfaces: GigabitEthernet0/0
Hits: 120 Misses: 4
| 欄 / 行 | 意思 | 留意 |
|---|
| Pro tcp + port | PAT 動態記錄 | 有 traffic 先出現 |
| Pro --- | Static NAT | 永遠喺度 |
| Inside / Outside interfaces | 邊個係 inside、outside | 調轉咗 = NAT 唔 work |
| Hits / Misses | 用到現有記錄 / 要新建 | 冇記錄又 Misses 唔升 = traffic 根本冇到 NAT |
解讀:show access-lists
R1# show access-lists
Standard IP access list 10
10 deny 192.168.20.0 0.0.0.255 (12 match(es))
20 permit any (85 match(es))
Extended IP access list BLOCK-WEB
10 deny tcp 192.168.20.0 0.0.0.255 host 192.168.1.50 eq www (15 match(es))
20 permit ip any any (230 match(es))| 欄 / 行 | 意思 | 留意 |
|---|
| 10、20 | Sequence number | 可以用嚟喺中間插 rule |
| (12 match(es)) | 幾多個 packet match 咗呢行 | 測試前後比較就知 rule 有冇用 |
| 冇 match 數 | 從未 match | Rule 寫錯、ACL 冇套用、方向錯 |
| 隱形 deny any | 唔會顯示 | 所有唔 match 嘅都被擋 |
配合 show ip interface g0/0 睇 ACL 套咗喺邊個方向。
解讀:show port-security interface
S1# show port-security interface fa0/5
Port Security : Enabled
Port Status : Secure-shutdown
Violation Mode : Shutdown
Maximum MAC Addresses : 2
Total MAC Addresses : 2
Sticky MAC Addresses : 2
Last Source Address:Vlan : 0090.2b55.11a0:10
Security Violation Count : 1
| 欄 / 行 | 意思 | 留意 |
|---|
| Port Status | Secure-up = 正常;Secure-shutdown = 違規熄咗 | Port 會變 err-disabled |
| Violation Mode | shutdown / restrict / protect | restrict 會記錄但唔熄 |
| Maximum / Total | 最多幾多個 MAC / 而家幾多個 | Total = Maximum 再有新 MAC 就違規 |
| Last Source Address | 最後一個嚟嘅 MAC | 通常就係觸發違規嗰部機 |
| Violation Count | 違規次數 | — |
修復:移除違規機 → shutdown → no shutdown。
解讀:show etherchannel summary
S1# show etherchannel summary
Flags: D - down P - in port-channel
I - stand-alone s - suspended
R - Layer3 S - Layer2
U - in use
Group Port-channel Protocol Ports
------+-------------+-----------+------------------------------
1 Po1(SU) LACP Gig0/1(P) Gig0/2(P)| 欄 / 行 | 意思 | 留意 |
|---|
| Po1(SU) | S = L2,U = in use | 正常 |
| Po1(SD) | D = down | Member 全部未成功 |
| Gig0/1(P) | 已加入 port-channel | 正常 |
| (I) / (s) | Stand-alone / suspended | 兩邊 mode、速度、duplex、VLAN 唔夾 |
解讀:show standby brief
R1# show standby brief
P indicates configured to preempt.
Interface Grp Pri P State Active Standby Virtual IP
Gig0/0 1 110 P Active local 192.168.1.3 192.168.1.1| 欄 / 行 | 意思 | 留意 |
|---|
| Pri 110 | HSRP priority | 大嘅做 Active |
| P | 有 preempt | 冇 P = 回復後唔會搶返 Active |
| State Active | 呢部而家做 gateway | 另一部應該係 Standby |
| Virtual IP | PC 嘅 default gateway | PC 要設呢個 IP |
解讀:show version(重點行)
R1# show version
Cisco IOS Software, ISR Software, Version 15.4(3)M2
R1 uptime is 2 hours, 15 minutes
System image file is "flash:isr4300-universalk9.bin"
2 Gigabit Ethernet interfaces
2 Low-speed serial(sync/async) network interface(s)
Configuration register is 0x2102
| 欄 / 行 | 意思 | 留意 |
|---|
| Version | IOS 版本 | 指令支唔支援睇呢度 |
| uptime | 開咗機幾耐 | 突然好短 = 曾經 reboot |
| System image file | 由 flash 載入嘅 IOS | — |
| interfaces | 有咩 port | 冇 serial = 要喺 Physical tab 加 module |
| Configuration register | 0x2102 正常;0x2142 唔讀 startup-config | Password recovery 用 0x2142 |
IOS 錯誤訊息點睇
| 訊息 | 意思 | 點做 |
|---|
| % Invalid input detected at '^' marker. | ^ 指住嘅位置打錯,或者喺錯嘅 mode 打 | 睇 prompt 係咪啱 mode;用 ? 睇可以打咩 |
| % Incomplete command. | 指令未打完 | 加 ? 睇需要嘅參數 |
| % Ambiguous command: "sh i" | 縮寫太短,有幾個指令符合 | 打多幾個字 |
| Translating "xxx"...domain server | 打錯字,IOS 當咗係 hostname 去查 DNS | 等或者 Ctrl+Shift+6;預防:no ip domain-lookup |
| % Unrecognized command | 冇呢個指令 | 檢查拼字或者 IOS 版本 |
| %LINK-5-CHANGED / %LINEPROTO-5-UPDOWN | Interface 狀態改變 | 提示,唔係錯誤 |
| %CDP-4-NATIVE_VLAN_MISMATCH | Trunk 兩邊 native VLAN 唔同 | 改成一致 |
| %PM-4-ERR_DISABLE | Port 被 err-disable(port security、BPDU Guard) | 修好原因再 shut / no shut |
| %DUAL-5-NBRCHANGE / %OSPF-5-ADJCHG | EIGRP / OSPF 鄰居 up 或 down | Down 就跟程序 4 查 |
| % Bad mask / % Inconsistent address and mask | IP 同 mask 唔夾(例如用咗 network / broadcast 地址) | 改用 host 地址 |
| % 192.168.1.0 overlaps with GigabitEthernet0/0 | 兩個 interface 喺同一個 subnet | Router 每個 interface 要唔同 subnet |
PC Desktop 工具
| 工具 | 用途 | 排錯用法 |
|---|
| IP Configuration | 設 static IP 或揀 DHCP | DHCP 攞唔到會顯示「DHCP request failed」 |
| Command Prompt | ipconfig、ping、tracert、arp、nslookup、ssh、telnet | 主要排錯工具 |
| Web Browser | 開 HTTP / HTTPS server | 測 DNS 同 web service、ACL 擋 port 80 |
| Terminal | 經 console 線入 router / switch | Router 冇 IP 時都入到 |
| Email / FTP | 測 SMTP、POP3、FTP service | 測 ACL 同 server service |
| Text Editor | 寫 config 再貼入 CLI | — |
Server Services tab
| Service | 用嚟做 |
|---|
| DHCP | 做 DHCP server(要設 pool、gateway、DNS、start IP) |
| DNS | 加 A record:Name = www.example.com、Address = server IP |
| HTTP / HTTPS | 網頁;可以改 index.html |
| TFTP | Backup / restore router config 同 IOS |
| Syslog / NTP / AAA | 集中 log、時間、RADIUS / TACACS+ 認證 |
Use Case:由零砌一個 Lab
| 步 | 做咩 | 重點指令 / 位置 | 驗證 |
|---|
| 1 | 畫 topology:2 router、2 switch、4 PC、1 server,用 Note 標 IP | Logical workspace | — |
| 2 | 揀啱線:PC–switch straight,switch–router straight,router–router serial | Connections | 燈號 |
| 3 | 寫 IP 表:每個 VLAN / link 一個 subnet | 用計算器分 subnet | 冇 overlap |
| 4 | Switch:VLAN、access port、trunk | vlan、switchport | show vlan brief、show interfaces trunk |
| 5 | Router:interface IP、subinterface、no shutdown | encapsulation dot1Q | show ip int brief |
| 6 | Router 之間 serial:IP + DCE clock rate | clock rate 64000 | ping 對面 |
| 7 | Routing:OSPF 或 static | router ospf 1 | show ip route、show ip ospf neighbor |
| 8 | DHCP:router pool 或 server service | ip dhcp pool | PC 揀 DHCP 攞到 IP |
| 9 | Server:DNS + HTTP | Services tab | PC Web Browser 開 www.lab.local |
| 10 | NAT 去 ISP router(模擬 Internet) | ip nat inside source list 1 interface s0/0/1 overload | show ip nat translations |
| 11 | ACL:學生唔准開 server 網頁 | Extended ACL | Complex PDU / Web Browser 測試 |
| 12 | 保安:SSH、port security、密碼 | Hardening checklist | SSH 登入 |
| 13 | Simulation 睇一次 ping 嘅完整流程 | Filter ARP + ICMP | Event list |
| 14 | Save:每部 copy run start,再 File → Save .pkt | — | Reload 之後設定仍然喺度 |
Packet Tracer 常見陷阱
| 陷阱 | 點解 | 解決 |
|---|
| Router interface 冇反應 | 預設 shutdown | no shutdown |
| Router–router 用 Ethernet 唔通 | 舊 device 冇 Auto-MDIX | 用 crossover |
| Serial 一直 up/down | DCE 冇 clock rate | show controllers 搵 DCE 再加 clock rate |
| 加 module 冇反應 | 要先熄機 | Physical tab 撳電源掣 |
| Reload 之後設定冇咗 | 冇 save | copy run start |
| Switch reset 後 VLAN 仲喺度 | VLAN 存喺 flash:vlan.dat | delete flash:vlan.dat + erase startup-config |
| PC 攞唔到 DHCP | STP 仲未 forward、或者 PC 未撳 DHCP | 等橙燈變綠 / Fast Forward Time |
| Activity 評分唔啱 | Hostname、VLAN 名大細楷唔同 | 跟足題目寫法 |
| 打錯字卡住幾秒 | DNS lookup | no ip domain-lookup |
| SSH 失敗 | 未設 domain-name / 冇 RSA key / VTY 冇 login local | 跟 SSH 設定步驟 |
| 指令唔支援 | Packet Tracer 只支援部份 IOS 指令 | 用 ? 確認,或者換 device 型號 |