1. 程式人生 > >不同VLAN與通一個VLAN互通

不同VLAN與通一個VLAN互通

tag ret -o proc png 一個 目的 roc view

實驗名稱:VLAN通信測試

實驗拓撲:技術分享圖片

實驗所需設備:
1、兩臺二層交換機 lsw1 lsw2

                             2、兩臺PC機   PC1   PC2

                             3、一臺服務器server

地址規劃:

 1 pc1     IP  192.168.1.1/24  VLAN  10

 2 pc2     IP  192.168.1.2/24  VLAN  20

     3 server IP  192.168.1.5/24  VLAN  50

實驗目的:VLAN10 VLAN20 與VLAN50 通但VLAN10 與VLAN20不通

實驗步驟:

            配置  LSW 1

<Huawei>sys

Enter system view, return user view with Ctrl+Z.

[Huawei]int e0/0/1

[Huawei-Ethernet0/0/1]p

[Huawei-Ethernet0/0/1]port h

[Huawei-Ethernet0/0/1]port hybrid pvid vlan 10

[Huawei-Ethernet0/0/1]q

[Huawei]vlan 10

[Huawei-vlan10]vlan 20

[Huawei-vlan20]

[Huawei-event]q

[Huawei]int e0/0/1

[Huawei-Ethernet0/0/1]

[Huawei-Ethernet0/0/1]p

[Huawei-Ethernet0/0/1]port h

[Huawei-Ethernet0/0/1]port hybrid un

[Huawei-Ethernet0/0/1]port hybrid untagged vlan 10 50

[Huawei-Ethernet0/0/1]q

[Huawei]int

[Huawei]interface e0/0/2

[Huawei-Ethernet0/0/2]p

[Huawei-Ethernet0/0/2]port h

[Huawei-Ethernet0/0/2]port hybrid pvid vlan 20

[Huawei-Ethernet0/0/2]q

[Huawei]int

[Huawei]interface e0/0/3

[Huawei-Ethernet0/0/3]p

[Huawei-Ethernet0/0/3]port h

[Huawei-Ethernet0/0/3]port hybrid u

[Huawei-Ethernet0/0/3]port hybrid untagged vlan 10 20 50

[Huawei-Ethernet0/0/3]

[Huawei-Ethernet0/0/3]port hybrid tagged vlan 10 20 50

[Huawei-Ethernet0/0/3]

   配置LSW2

<Huawei>sys

Enter system view, return user view with Ctrl+Z.

[Huawei]vlan 50

[Huawei-vlan50]vlan 10

[Huawei-vlan10]vlan 20

[Huawei-vlan20]

[Huawei-event]q

[Huawei]int e0/0/1

[Huawei-Ethernet0/0/1]p

[Huawei-Ethernet0/0/1]port h

[Huawei-Ethernet0/0/1]port hybrid t

[Huawei-Ethernet0/0/1]port hybrid tagged vlan 10 20 50

[Huawei-Ethernet0/0/1]q

[Huawei]int e0/

[Huawei-Ethernet0/0/2]p

[Huawei-Ethernet0/0/2]port h

[Huawei-Ethernet0/0/2]port hybrid u

[Huawei-Ethernet0/0/2]port hybrid untagged vlan 20 50 10

驗證測試:

PC1 ping server

技術分享圖片

PC1 ping PC2

技術分享圖片

不同VLAN與通一個VLAN互通