【新華三】網絡工程師 H3C如何配置VLAN-trunk 二層隔離技術

新華三VLAN-TRUNK組網實驗

作者:最鐵頭的網工
來源:CSDN
文章屬性:自創,如有抄襲必究
模擬器來自於新華三 HCL 實驗室
點擊瞭解更多技術資料和免費學習視頻請加入討論羣:662736393
感謝關注鐵頭娃技術,聯繫QQ:3473067134
針對本知識點有問題,歡迎加Q一起討論學習
配置過程:DOU音搜索>>>最鐵頭的網工

實驗 1 二層業務隔離(VLAN 與 Trunk)

1.1.1組網拓撲

在這裏插入圖片描述

1.1.2. 實驗任務

(1) 實現同一 Vlan 內的主機互通,不同一 Vlan 間的主機隔離。
VLAN 10:PC1、PC3;
VLAN 20:PC2、PC4;

(2) 廣播域與連通性分析
分析 PC1、PC2、PC3、PC4、PC5 發出廣播幀的到達範圍。

1.1.3. 基本信息配置

system-view
[H3C]hostname SW1

1.1.4. VLAN配置

SW1配置
[SW1]vlan 10 // 創建 vlan 10
[SW1-vlan10]port GigabitEthernet 1/0/2 // 將接口加入 vlan 10
[SW1]interface GigabitEthernet 1/0/2 // 進入接口 1/0/2
[SW1-GigabitEthernet1/0/2]port link-type access // 配置爲 access 模式

[SW1]interface GigabitEthernet 1/0/3 // 創建 vlan 20
[SW1]interface GigabitEthernet 1/0/3 // 進入接口 1/0/3
[SW1-GigabitEthernet1/0/2]port link-type access // 配置爲 access 模式

SW2配置
[SW2]vlan 10 // 創建 vlan 10
[SW2-vlan10]port GigabitEthernet 1/0/2 // 將接口加入 vlan 10
[SW2]interface GigabitEthernet 1/0/2 // 進入接口 1/0/2
[SW2-GigabitEthernet1/0/2]port link-type access // 配置爲 access 模式
[SW2]vlan 20 // 創建 vlan 20
[SW2]interface GigabitEthernet 1/0/3 // 進入接口 1/0/3
[SW2-GigabitEthernet1/0/3]port link-type access // 配置爲 access 模式

查看接口信息操作
[SW1]display interface g1/0/2 // 查看接口信息

GigabitEthernet1/0/2
Current state: DOWN
Line protocol state: DOWN
IP packet frame type: Ethernet II, hardware address: aa05-b369-0100
Description: GigabitEthernet1/0/2 Interface
Bandwidth: 1000000 kbps
Loopback is not set
Unknown-speed mode, unknown-duplex mode
Link speed type is autonegotiation, link duplex type is autonegotiation
Flow-control is not enabled
Maximum frame length: 9216
Allow jumbo frames to pass
Broadcast max-ratio: 100%
Multicast max-ratio: 100%
Unicast max-ratio: 100%
PVID: 10
MDI type: Automdix
Port link-type: Access
Tagged VLANs: None
Untagged VLANs: 10
Port priority: 2
Last link flaPCing: Never
Last clearing of counters: Never

查看交換機 Vlan 信息
[SW1]display vlan brief
Brief information about all VLANs:
SuPCorted Minimum VLAN ID: 1
SuPCorted Maximum VLAN ID: 4094
Default VLAN ID: 1
VLAN ID Name Port
1 VLAN 0001 FGE1/0/53 FGE1/0/54 GE1/0/1
GE1/0/4 GE1/0/5 GE1/0/6 GE1/0/7
GE1/0/8 GE1/0/9 GE1/0/10
GE1/0/11 GE1/0/12 GE1/0/13
GE1/0/14 GE1/0/15 GE1/0/16
GE1/0/17 GE1/0/18 GE1/0/19
GE1/0/20 GE1/0/21 GE1/0/22
GE1/0/23 GE1/0/24 GE1/0/25
GE1/0/26 GE1/0/27 GE1/0/28
GE1/0/29 GE1/0/30 GE1/0/31
GE1/0/32 GE1/0/33 GE1/0/34
GE1/0/35 GE1/0/36 GE1/0/37
GE1/0/38 GE1/0/39 GE1/0/40
GE1/0/41 GE1/0/42 GE1/0/43
GE1/0/44 GE1/0/45 GE1/0/46
GE1/0/47 GE1/0/48 XGE1/0/49
XGE1/0/50 XGE1/0/51 XGE1/0/52
10 VLAN 0010 GE1/0/2
20 VLAN 0020 GE1/0/3

1.1.5. Trunk 配置

(1) SW3——SW4 的 Trunk 鏈路調測

SW1配置
[SW1]interface GigabitEthernet 1/0/1
[SW1-GigabitEthernet1/0/1]port link-type trunk
[SW1-GigabitEthernet1/0/1]port trunk permit vlan all

SW2配置
[SW2]interface GigabitEthernet 1/0/1
[SW2-GigabitEthernet1/0/1]port link-type trunk
[SW2-GigabitEthernet1/0/1]port trunk permit vlan all

查看 Trunk 信息
[SW1]display interface GigabitEthernet 1/0/1
GigabitEthernet1/0/1
Current state: UP
Line protocol state: UP
IP packet frame type: Ethernet II, hardware address: aa05-b369-0100
Description: GigabitEthernet1/0/1 Interface
Bandwidth: 1000000 kbps
Loopback is not set
1000Mbps-speed mode, full-duplex mode
Link speed type is autonegotiation, link duplex type is autonegotiation
Flow-control is not enabled
Maximum frame length: 9216
Allow jumbo frames to pass
Broadcast max-ratio: 100%
Multicast max-ratio: 100%
Unicast max-ratio: 100%
PVID: 1
MDI type: Automdix
Port link-type: Trunk
VLAN Passing: 1(default vlan), 10, 20
VLAN permitted: 1(default vlan), 2-4094
Trunk port encapsulation: IEEE 802.1q
Port priority: 2
Last link flaPCing: 0 hours 28 minutes 18 seconds
Last clearing of counters: Never

1.1.6. 主機 IP 地址配置

(1) PC1 網卡 IP 地址配置:192.168.10.10/24
(2) PC2 網卡 IP 地址配置:192.168.11.20/24
(3) PC3 網卡 IP 地址配置:192.168.10.30/24
(4) PC4 網卡 IP 地址配置:192.168.11.40/24
步驟1
鼠標右鍵點擊PC1,點擊配置
在這裏插入圖片描述
步驟2
在這裏插入圖片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章