When it comes to network security and performance optimization, VLAN (Virtual Local Area Network) segmentation is a key strategy. It not only provides better network management, but also enhances data isolation and access control.
The careful editor has specially compiled it for you to play with. VLAN division method
Among the various ways to divide VLANs, dividing VLANs based on interfaces is the most commonly used and simplest way. So how to configure and use it? Before configuring and using, let's review the commonly used link types of ports:
Okay, now let's take the actual networking as an example to explain the configuration of VLAN division based on interfaces. Case DemonstrationScenario 1: There are two users on one switch. How can we implement isolation by dividing VLANs through interfaces? Let's first see if two PCs in the same network segment are directly connected to the switch without dividing VLANs. Can they ping each other? As can be seen from the above figure, it can be pinged. Why is this? By default, the interfaces of Huawei switches are added to VLAN 1. If two PCs are directly connected to the switch, they can communicate with each other as long as they belong to the same network segment. So how do you achieve isolation through VLAN? Just add the interfaces to different VLANs. For example, add the GE0/0/1 and GE0/0/2 ports of the switch to VLAN 10 and VLAN 20 as access types, respectively. At this point, the two PCs are divided into different VLANs based on the interfaces, and the interconnection cannot be pinged through, achieving isolation. Friends, have you ever thought about why it can be isolated? By capturing packets on G0/0/1 and G0/0/2 of switch SW1, we found that the ARP broadcast packet of G0/0/1 was not sent to G0/0/2. According to the working principle of sending and receiving data packets on the access interface, after the data packet arrives at G0/0/2, it is unpacked and it is found that the VLAN ID is inconsistent with the VLAN ID of G0/0/2, so the data packet is lost. Scenario 2: Four users across switches. How to achieve isolation and intercommunication by dividing VLANs through interfaces?As shown in the figure below: By default, the four PCs belong to the same network segment and can ping each other. Assume that PC1 and PC3 belong to the same department, and PC2 and PC4 belong to the same department. How can we configure interface-based VLAN to allow the same department to visit each other, but prevent different departments from visiting each other? Two users PC1 and PC3 in the same department are assigned to the same VLAN 10. GE0/0/1 of switch 1 and GE0/0/1 of switch 2 are added to VLAN 10 as access ports. Two users of another department, PC2 and PC4, are assigned to another VLAN 20. The GE0/0/23 ports of the two connected switches are added to VLAN 10 and VLAN 20 as trunk ports to achieve cross-switch communication. In this way, it can be achieved that users PC1 and PC3 of the same department can communicate with each other, but users PC2 and PC4 of different departments cannot communicate with each other. Configuration tipsHave you noticed that in the above two scenarios, the number of VLANs and ports is relatively small? In real networking, multiple VLANs and multiple ports often need to be configured. Is there any way to quickly complete the configuration? The following editor will introduce the method of batch configuration and quick restoration of port VLAN default configuration. 1. Create VLANs in batches 2. Add ports in batches to VLAN 3. Quickly restore the port VLAN default configurationIf you want to quickly restore the default configuration of the port VLAN, you must know what the default configuration is. Huawei switches, by default, all ports are added to VLAN1 only. So let's take a look at how to quickly restore the default configuration under the three link types.
|
<<: How should the system's facade API gateway be designed?
>>: TCP: Three-way handshake and four-way wave, no blind spot answer in the interview
Kubernetes defines a simple and consistent networ...
Tencent Cloud's Double Eleven event has offic...
When we need to set up a wireless router, we need...
Mobile networks have entered the 5G era, and thei...
Transforming digital experiences, products, servi...
Recently, the three major operators announced the...
[Beijing, China, October 13, 2020] Today, the 6th...
In the past decade, networks have undergone a var...
The pace of life of modern people is getting fast...
HTTP and HTTPS are two common network protocols, ...
On May 28, the Metrology and Testing Center of th...
Wi-Fi is the abbreviation of Wireless Fidelity. I...
HostKvm is a foreign VPS service provider founded...
If the upper left corner of your phone desktop sh...
But in any case, from 1G to 5G, it has developed ...