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

Write to the understanding of Vlan, trunk and hybrid related to entry-level engineers entering the network threshold.

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

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

Anyone who succeeds can only succeed by standing on the shoulders of giants, not to mention that I haven't succeeded yet. Next, I'll take it from an article and add my own experience to write about the differences between vlan, trunk and hybrid:

There are three link types for Ethernet ports: access, trunk, hybird

Access type ports can only belong to 1 VLAN-like connection to a computer port

Trunk type port can allow multiple VLAN to pass through, and can receive and send multiple VLAN messages. It is generally used for the connection between switches.

The Hybrid type port can allow multiple VLAN to pass through, can receive and send multiple VLAN messages, can be used for the connection between switches and can also be used to connect user computers.

Hybrid port and Trunk port handle data in the same way, the only difference is when sending data: Hybrid port allows multiple VLAN messages to be sent without tagging, while Trunk port only allows VLAN messages to be sent without tagging by default.

Default VLAN:

The Access port only belongs to 1 VLAN, so the default VLAN is the VLAN where it is located. No setting is required.

The Hybrid port and the Trunk port belong to multiple VLAN, so you need to set the default VLAN ID. By default, Hybrid port and Trunk port default VLAN is VLAN 1

If the port default VLAN ID is set, when the port receives the message without VLAN Tag, it forwards the message to the port that belongs to the default VLAN; when the port sends the message with VLAN Tag, if the message VLAN ID is the same as the port default VLAN ID, the system will remove the message VLAN Tag and then send the message.

Note: the default VLAN for Huawei switches is called "Pvid Vlan" and for Cisco switches the default VLAN is called "Native Vlan"

Switch interface entry and exit data processing process:

Acess port receiving message: receive a message to determine whether there is a VLAN message: if not, hit the port PVID and exchange and forward it. If so, directly discard (default) the Acess port to send the message: peel the message VLAN message and send it directly.

Trunk port receiving message: receive a message to determine whether there is a VLAN message: if not, type the port PVID and exchange and forward it. If there is a judgment as to whether the VLAND ID is within the allowable range of the trunk, forward it if it is within the range, otherwise discard it.

Trunk port message: compare the port PVID and the VLAN message to be sent. If the two are equal, split the VLAN message and send it again. If it is not equal, send it directly.

Hybrid port message: receive a message to determine whether there is a VLAN message: if not, hit the port PVID and exchange and forward. If so, determine whether the hybrid port allows the VLAN data to enter: if possible, forward it, otherwise discard it (in this case, the untag configuration on the port is not considered, and the untag configuration only works when sending messages)

Hybrid port message:

1. Judge the VLAN in the local port attribute (disp erface, you can see which VLAN is untag and which VL is the port.

AN is tag)

2. If it is untag, split the VLAN message and send it again. If it is tag, send it directly.

In fact, we are not clear about the direction of sending and receiving data in a switch: because an interface receives data, and at the same time it sends data to the outside, it is easy to confuse an interface.

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

Network Security

Wechat

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

12
Report