使用H3C模擬器配置VLAN

任務

組網需求:
如下圖所示,辦公區的主機屬於不同的網段 192.168.5.0/24 和192.168.50.0/24,Device C 在收到
來自辦公區主機的報文時,根據報文的源IP 地址,使來自不同網段主機的報文分別在指定的VLAN
中傳輸。試驗拓撲圖如下:
使用H3C模擬器配置VLAN相關項目
2.配置步驟:
(1) 配置 Device C
配置子網192.168.5.0/24 與VLAN 100 關聯。
<DeviceC> system-view
[DeviceC] vlan 100
[DeviceC-vlan100] ip-subnet-vlan ip 192.168.5.0 255.255.255.0
[DeviceC-vlan100] quit

配置子網192.168.50.0/24 與VLAN 200 關聯。
[DeviceC] vlan 200
[DeviceC-vlan200] ip-subnet-vlan ip 192.168.50.0 255.255.255.0
[DeviceC-vlan200] quit

配置端口GigabitEthernet1/0/11 允許通過VLAN 100 的報文。
[DeviceC] interface ten-gigabitethernet 1/0/11
[DeviceC-Ten-GigabitEthernet1/0/11] port link-type hybrid
[DeviceC-Ten-GigabitEthernet1/0/11] port hybrid vlan 100 tagged
[DeviceC-Ten-GigabitEthernet1/0/11] quit

配置端口GigabitEthernet1/0/12 允許通過VLAN 200 的報文。
[DeviceC] interface ten-gigabitethernet 1/0/12
[DeviceC-Ten-GigabitEthernet1/0/12] port link-type hybrid
[DeviceC-Ten-GigabitEthernet1/0/12] port hybrid vlan 200 tagged
[DeviceC-Ten-GigabitEthernet1/0/12] quit

配置端口GigabitEthernet1/0/1 和基於IP 子網的VLAN 100、VLAN 200 關聯。
[DeviceC] interface ten-gigabitethernet 1/0/1
[DeviceC-Ten-GigabitEthernet1/0/1] port link-type hybrid
[DeviceC-Ten-GigabitEthernet1/0/1] port hybrid vlan 100 200 untagged
[DeviceC-Ten-GigabitEthernet1/0/1] port hybrid ip-subnet-vlan vlan 100
[DeviceC-Ten-GigabitEthernet1/0/1] port hybrid ip-subnet-vlan vlan 200
[DeviceC-Ten-GigabitEthernet1/0/1] quit

(2) 配置Device A 和Device B
配置Device A 和Device B 允許對應VLAN 通過。
3.驗證配置如圖所示:
使用H3C模擬器配置VLAN

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