Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Vlan expansion test

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

Hello, everyone. Today I will give you a brief introduction to the principle of vlan:

First of all, prepare the test environment in the picture, 2 layer 3 switches and 2 PC machines.

Configure the host server ip address

The switch enters the pvid of the port to label the ingress data frame to distinguish different vlan data.

The egress port between the switch and the host is configured with untagged to remove the label and ensure that the data frame sent by the host remains the same.

Between the switch and the switch, the outbound port is configured with tagged, while the inbound port does not need to be configured.

There is no communication between Vlan 5 and vlan10.

The steps of the experiment:

Configure the host server ip address

Pc1:192.168.1.15 255.255.255.0

Pc2:192.168.1.10 255.255.255.0

Server1:192.168.1.50 255.255.255.0

Configure the switch:

Sw1:

Establish vlan5 vlan10

[Huawei] interface gigabitethernet 0/0/1

[Huawei-GigabitEthernet0/0/1] undo shutdown

[Huawei-GigabitEthernet0/0/1] port link-type hybrid

[Huawei-GigabitEthernet0/0/1] port hybrid pvid vlan 5 (input port tagged, that is, pc data tagged)

[Huawei-GigabitEthernet0/0/1] port hybrid untagged vlan 5 10 (de-tagging at the outgoing port, de-tagging from the switch to pc data)

[Huawei] interface gigabitethernet 0/0/2

[Huawei-GigabitEthernet0/0/2] undo shutdown

[Huawei-GigabitEthernet0/0/2] port link-type hybrid

[Huawei-GigabitEthernet0/0/2] port hybrid pvid vlan 10

[Huawei-GigabitEthernet0/0/2] port hybrid untagged vlan 5 10

Sw3:

Establish vlan50

[Huawei] interface gigabitethernet 0/0/3

[Huawei-GigabitEthernet0/0/3] undo shutdown

[Huawei-GigabitEthernet0/0/3] port link-type hybrid

[Huawei-GigabitEthernet0/0/3] port hybrid pvid vlan 50

[Huawei-GigabitEthernet0/0/2] port hybrid untagged vlan all

Port between switch and switch:

Sw1: [Huawei] interface gigabitethernet 0/0/22

[Huawei-GigabitEthernet0/0/22] undo shutdown

[Huawei-GigabitEthernet0/0/22] port link-type hybrid

[Huawei-GigabitEthernet0/0/22] port hybrid tagged vlan all

Sw2: [Huawei-GigabitEthernet0/0/22] port link-type hybrid

[Huawei-GigabitEthernet0/0/22] port hybrid tagged vlan all

Experimental problems and summary

The inbound data of the switch needs to be tagged, and the data coming out to the host needs to be de-tagged. If there is a tag, the data frame received by the switch is not processed and forwarded directly (so the 24-port inbound port does not need to be configured) Pvid restricts inbound data frames and untagged restricts outbound data frames.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report