VLANIt is a protocol proposed to solve Ethernet broadcast problems and security. It adds VLAN headers Based on Ethernet frames and divides users into smaller working groups using VLAN IDs, restrict mutual access between users in different working groups. Each working group is a virtual LAN. The following describes how to implement static VLAN interfaces of a switch.IPAddress Configuration.
One Networking requirement:
1. SwitchA is a layer-3 switch, and PC1 and PC2 can communicate with each other through SwitchA;
2. PC1 connects to the Ethernet port E1/0/1 of SwitchA, which belongs to VLAN10;
3. PC2 connects to the Ethernet port E1/0/2 of SwitchA, which belongs to VLAN20;
4. the IP address of VLAN Interface 10 of A vswitch is 192.168.0.1/24, and the IP address of VLAN Interface 20 is 192.168.1.1/24, which serves as the gateway of PC1 (192.168.0.2/24) and PC2 (192.168.1.2/24) respectively.
2. Networking diagram:
Step 3:
- 1. Create and enter) VLAN10
- [SwitchA] vlan 10
-
- 2. Add E1/0/1 to VLAN10 and exit the VLAN view.
- A [SwitchA-vlan10] port Ethernet 1/0/1
-
- [SwitchA-vlan10] quit
-
- 3. Create and enter) VLAN Interface 10
- [SwitchA] interface Vlan-interface 10
-
- 4. Configure IP addresses for VLAN 10
- [SwitchA-Vlan-interface10] ip address 192.168.1.1 255.255.255.0
-
- 5. Create and enter) VLAN20
- [SwitchA] vlan 20
-
- [SwitchA-vlan20] quit
-
- 6. Add E1/0/2 To VLAN20
- [SwitchA-vlan20] port Ethernet 1/0/2
-
- 7. Create and enter) VLAN Interface 20
- [SwitchA] interface Vlan-interface 20
-
- 8. Configure IP addresses for VLAN Interface 20
- [SwitchA-Vlan-interface20] ip address 255.1.1.1 255.255.255.0
Four key points of Configuration:
1. the VLAN Virtual Interface of A vswitch carries over the physical port, that is, after the physical port of a VLAN is UP, the VLAN virtual connection will be UP;
2. For a layer-3 switch, you can configure IP addresses for multiple VLAN interfaces, and each VLAN interface can be accessed by default. For L2 switches, IP addresses configured for VLAN interfaces can only be used for management.