In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-10-14 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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.