Get the App
SLTechnology News&Howtos  ›  Servers  › 

Realize that the same VALN can communicate with each other, but not between different VLAN.

Shulou Source: shulou.com Published: 2022-06-02 17:27:50 09月21日 Update

one。 Divide the advantages of VLAN

1. Control broadcast

two。 Enhance network security

3. Simplify network management

II. Basic configuration of VLAN

1. Commands to create vlan in global configuration mode

Step command purpose first step configure terminal enter configuration state second step vlan vlan-id enter a VLAN number, enter VLAN configuration state third step (optional) name vlan-name enter a VLAN name fourth exit or end exit

two。 Commands for assigning ports to vlan

Step command purpose first step configure enters configuration mode second step interface interface-id enters the port to be configured third step switchport mode access defines layer 2 port mode fourth step switchport access vlan vlan-id assigns the port to a vlan step 5 eixt or end exit

Three. The experimental environment is as follows

1. Configure the PC1 ip address of 192.168.10.10 to 24

two。 Configure the PC2 ip address as 192.168.10.20 Candle 24

3. Configure the PC ip address as 192.168.10.30DB 24

4. The previous three pc are interoperable without VLAN configuration.

.

5 configure switch port f1amp0 to be VLAN10

Check to see if f1swap 0 is set to vlan10

6. Configure switch ports f1amp 1 and f1max 2 to be vlan20

Check to see if f1Acer 1 and f1Accord 2 are set to vlan20

four。 Set up and test with the ping command

It can be seen that there is no communication between PC1 and PC2,PC3. The communication between PC2 and PC3 is normal.

Tags: Configuration port command address mode between communication switch step status purpose network allocation input security three layer 2 advantage global basic configuration Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn Shulou Tech Info Linux Shulou Information Xiaomi