eNSP experiment diary 2 division Vlan


foreword


The full name of VLAN is Virtual Local Area Network, that is, "Virtual Local Area Network", which is to divide a large local area network into multiple isolated and small local area networks.

1. What is the function of dividing VLAN?

The management overhead of moving, adding and modifying network equipment is reduced; broadcasting activities can be controlled; and network security can be improved.

2. Topology diagram and equipment list

PCx6 Dumb Switch x2 Layer 3 Enterprise and Core Switch x1
insert image description here

2. Configuration steps

1. Commands and explanations required for configuration

The command is as follows:

1.system-view  
进入的系统配置
2.vlan10  
创建vlan10
3.interface GigabitEthernet  
进入接口
3.port link-type access         
设置接口类型
quit 退出当前
、、

What can be used are these commands, which are very simple. After the division, there will be some gateway configurations, and the gateway configuration commands are also mentioned in my previous article.


The interface types are divided into access and trunk.
If this interface is connected to a computer and a fool switch, use access.
If this interface is connected to an enterprise-level switch, use trunk

2.Vlan division

<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]vlan 10
[Huawei-vlan10]vlan 20
[Huawei]interface GigabitEthernet 0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type access 
[Huawei-GigabitEthernet0/0/1]port default vlan 10
Aug 29 2022 23:14:48-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5
.25.191.3.1 configurations have been changed. The current change number is 7, th
e change loop count is 0, and the maximum number of records is 4095.
划分完成

[Huawei-GigabitEthernet0/0/1]q
[Huawei]interface  GigabitEthernet 0/0/2
[Huawei-GigabitEthernet0/0/2]port link-type access 
[Huawei-GigabitEthernet0/0/2]port default vlan 20
Aug 29 2022 23:18:59-08:00 Huawei %%01IFNET/4/IF_STATE(l)[0]:Interface Vlanif1 h
as turned into DOWN state.
Aug 29 2022 23:19:08-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5
.25.191.3.1 configurations have been changed. The current change number is 9, th
e change loop count is 0, and the maximum number of records is 4095.


3. Gateway configuration

[Huawei]int vlan 10
[Huawei-Vlanif10]
Aug 29 2022 23:21:50-08:00 Huawei %%01IFNET/4/IF_STATE(l)[1]:Interface Vlanif10 
has turned into UP state.
[Huawei-Vlanif10]ip address 192.168.10.1 255.255.255.0
[Huawei-Vlanif10]
Aug 29 2022 23:22:20-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[2]:The line protocol
 IP on the interface Vlanif10 has entered the UP state.
 
[Huawei-Vlanif10]int vlan 20
[Huawei-Vlanif20]ip address 192.168.20.1 255.255.255.0
Aug 29 2022 23:22:46-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[4]:The line protocol
 IP on the interface Vlanif20 has entered the UP state.

Here, the gateways of Vlan10 and Vlan20 are configured. The following is to configure the IP address and gateway of the PC.

3. PC-side gateway configuration

After the Vlan is divided, PC1 and PC4 are equivalent to being in two different WeChat groups. No matter what bad things PC1 does in it, it will not involve PC4. If there is a network failure, it will be more convenient to troubleshoot. If PC1 wants to ask PC4 for advice , PC4 cannot be found in the network segment where PC1 is located. At this time, you need to find the group owner (that is, the gateway) that manages the two groups. After you find it, you can exchange information and share resources with PC4 through the gateway.

insert image description here
insert image description here

The IPs of the PCs under two different Vlans have been configured, so let’s test whether they can be pinged.

insert image description here
Use PC4 of Vlan20 to ping PC1 of Vlan10. Here, it shows that two different PCs (persons) in different network segments (WeChat groups) have realized information exchange. In this way, our Vlan has been configured and communicates with each other through the configured gateway. If the network of a network segment is artificially broken, the PCs under other Vlans will not be affected in any way.

Summarize

The above is what I want to talk about today. This article only briefly introduces the role of Vlan and explains how to configure Vlan basically. Of course, this is just the basics. The next experiment will be carried out on the basis of this experiment, related equipment and commands Configuration will also vary.

In the next issue, we will share the network construction of small enterprises and the application of NAT technology in practical work

Guess you like

Origin blog.csdn.net/G6_12/article/details/126593553