VLAN and switch interface mode operation

Tip: After the article is written, the table of contents can be automatically generated. For how to generate it, please refer to the help document on the right


Preface

In traditional switched Ethernet, all users are in the same broadcast domain. When the network is large,
the number of broadcast packets will increase sharply. When the number of broadcast packets accounts for 30% of the total, the network The transmission efficiency will be
significantly reduced. Especially when a certain network device fails, it will continuously send broadcasts to the network,
causing a broadcast storm and paralyzing network communications. So, how should this problem be solved?
We can solve this by separating the broadcast domain. There are two ways to separate the broadcast domain.
1. Physical separation. Physically divide the network into several small networks, and then use routing
devices that can isolate broadcasts to connect different networks to achieve communication.
2. Logical separation. The network is logically divided into several small virtual networks, namely VLAN (Virtua
Local Area Network, virtual local area network). VLAN works at the data link
layer of the OSI reference model . A VLAN is a switching network, where all users are in the same broadcast domain, and
each VLAN realizes communication through the connection of routing devices.
Physical separation has many shortcomings, it will make the design of the LAN lack flexibility. For example,
users connected to the same switch can only be divided into the same network, but cannot be divided into multiple different networks.
The emergence of VLAN adds flexibility to the design of local area networks, so that network administrators are
no longer limited by the physical location of users when dividing work groups . VLAN can be implemented on one switch or across switches
. It can be divided according to the location, role or department of network users.

1. What are the benefits of vlan?

1. Control broadcast
2. Enhance network security
3. Simplify network management
The number of VLANs supported by Huawei is 1-4094

Two, the interface mode of the switch

According to the connection object

1.access (access mode)

Insert picture description hereWhen the connection object is a PC or a router, the access
configuration operation is available as follows. Insert picture description here
First create a vlan, and then enter the port to set the link mode access. Here, the default is wrong. Please remember to use tab completion. If you are familiar with it, you can type abbreviation.

2.trunk (trunk link mode)

Insert picture description here

When the connection object is a switch, you can
configure the trunk as follows: Insert picture description here
Create a vlan first, and then set the link mode, but the trunk only allows vlan 1 to pass by default, and other vlans need to be released manually.
bat creates multiple discontinuous vlans
bat...to... creates multiple continuous vlans

3. Hybrid (mixed mode)

The hybrid mode is applicable to all link types and is unique to Huawei. But it is more troublesome and requires everyone to distinguish the label information.
The configuration information is as follows
port hybrid pvid vlan 2 ###### Tag vlan 2
port hybrid untagged vlan 2 99 ######Remove the tags of vlan2 and 99
untagged: untag list
tagged: whitelist list
port hybrid untagged vlan 2 99 ######Set vlan2 and 99 to the whitelist.
There is a mental formula about hybrid:
data frame export check, check untag table, when there is a standard, off-standard, when there is no standard, check the tag table, yes Let it go, if not, throw it away.
Data frame import inspection, first check whether there is a label, if there is a label, check the tag table, if there is one, let it go, if it is not, then discard it: when there is no label, mark pvid and let it go.

Guess you like

Origin blog.csdn.net/xiwagogogo/article/details/112291802