[Routing and switching technology] VLAN configuration

VLAN (Virtual Local Area Network)

What is VLAN

VLAN is a group of logical devices and users. These devices and users are not restricted by physical location. They can be organized according to functions, departments, applications and other factors. The communication between them is as if they are in the same network segment. The same as in the Internet, hence the name virtual local area network.
In layman's terms, it is to divide a network segment into multiple network segments

Three working modes of the switch

access

User mode, often used for access links, that is, interfaces connecting PCs, terminal devices and routers that can recognize VLAN tags, and now used for links that are connected to terminals and assigned VLANs

trunk

Link trunk mode, often used for trunk links, that is, links connected between two switches, and now used to allocate links between switches and routers after vlan

hybird

Used in any scenario, but Hybrid is highly flexible and not easy to configure

configuration steps

1. Create a VLAN

In the virtual machine global configuration mode,
the VLAN VLAN number
is determined by oneself. The author is used to using numbers such as 10, 20, 30... as the VLAN number, which is also convenient for future operations. Note
: After the VLAN is created, it will enter the VLAN In the configuration mode, if you want to create a VLAN again, you need to enter exit (e) to return to the global configuration mode

2. Assign VLANs

This step needs to be configured in the switch port
1.interface port number (int port number) (enter)
2.switchport mode access (swi ma) (set to user mode)
3.switchport access vlan vlan number (swi av vlan number ) (assign vlans to ports)
after all assignments, it is also necessary to configure the ports connected to the switch and the router as trunk mode, and then communication can be carried out

For example: If you want to assign vlan10 to the fa0/1 interface of the switch, then it is:
int f0/1
swi ma
swi av 10

The configuration of int 0/4
swi mt
is completed. Now fa0/1 interface is a separate network segment. It cannot communicate with other network segments without routing.

configuration process

Put the mouse cursor on the switch and check the port information of the switch. 0/1, 0/2, and 0/3 are now enabled, but all VLANs are 1 by default. Now start to configure the switch
insert image description here
insert image description here

Now let’s check the port information of the switch again.
The created vlan has been assigned to the port, and the vlan of port 0/4 is –, which proves that it is now in the trunk mode. The
insert image description here
configuration is over .

Articles in the same series

Basic Getting Started Tutorial

[Routing and switching technology] Cisco Packet Tracer basic tutorial (1)
[Routing and switching technology] Cisco Packet Tracer basic tutorial (2)
[Routing and switching technology] Cisco Packet Tracer basic tutorial (3)

Specific function articles

Three Command Modes of Cisco Packet Tracer Configuration Operation
Cisco Packet Tracer How to Build a Topology and Connectivity (Basic)
Cisco Packet Tracer Configuration Static Routing
Cisco Packet Tracer Configuration Dynamic Routing (RIP, OSPF, EIGRP)
Cisco Packet Tracer Router Subinterface


My ability is limited, insufficient, please point out the mistakes, if you
have any questions, please leave a comment

Guess you like

Origin blog.csdn.net/m0_68681879/article/details/129298125