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

How to add and remove vlan information after mac frame enters the switch

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

Share

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

How to add and remove vlan information after mac frame enters the switch

This article is only my own understanding of how to add and delete vlan after mac frames enter the switch. Please correct any errors.

The port of a switch has two roles: access port and trunk port. The access port can only belong to one vlan, but what is the complete process that the trunk port can transmit the information of multiple vlan?

As shown in the figure, when PC0 sends data to PC1,PC0 and sends mac frames into the access port, the switch will label it with an 802.1q tag to mark that the data belongs to vlan10. When the data is to be sent out from f0Switch0 2, the switch looks at the vlan information of the data and finds that the data belongs to vlan10, while the native vlan on the trunk link is vlan1, so the switch will not do any processing and send the data directly. After Switch2 receives the modified data, it also compares it with the native vlan of trunk. It is different and does not deal with it. The data enters the switch, looks at the vlan table, and finds that f0A1belongs to vlan10. After removing the label on the data, the switch sends it to f0Uniport 1.

What if the native vlan on the trunk link is vlan 10? what is the processing of the data?

PC0 sends the data to Switch0's f0swap 1, and the switch marks it with a label belonging to vlan10. When entering f0Switch2 2, it is found that the data belongs to vlan10, which is the same as trunk's native vlan10. At this time, the switch first removes the label belonging to vlan10 on the modified data and then sends it out. When the data arrives at Switch2's f0swap 2 port, the switch checks the data and finds that there is no vlan information on the data, that is, the data does not say that he belongs to that vlan! At this time, the switch thinks that the data belongs to the native vlan of trunk, that is, vlan10. The switch labels the data as vlan10, and the data enters the switch, and then enters f0Lex1.

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