· Foreword
Ethernet is a communication technology that features a shared communication
medium. When the number of hosts is too large, problems such as can occur,
which can lead to degraded network communication performance.
The VLAN technology can solve the above problems. This section will introduce the concepts
related to VLANs as well as the data forwarding principles and related configurations of VLANs.
· Broadcast Storm
In the following scenarios, the company's internal network is
as the number of hosts increases.
•Layer 2 switches form a
•Switch packets from all interfaces
•Broadcast data floods in the broadcast domain, consuming network bandwidth, degrading equipment
performance and leading to security risks
Layer 2 SwitchesLayer 2 Switches
Layer 2 Switches
Technology FinanceTechnology
Broadcast Frame
Technology Finance Finance
· Router Isolation Broadcast Domain
The can isolate the broadcast domain and reduce the range of the broadcast domain.
Layer 2 SwitchesLayer 2 Switches
Router
Technology FinanceTechnology Technology Finance Finance
Broadcast Frame
· VLAN Scenario
There are offices for the technical and financial departments on the fifth and sixth floors of the company
building.
The customer requires that departments can communicate with each other, but different departments
are isolated from each other.
By using the way of dividing VLAN to achieve and can be
with effective
Technology
Department
Finance
Department
· VLAN Standard
Switches use to distinguish between Ethernet frames of different VLANs
· 802.1Q Standard Encapsulation
•Fixed value , indicating that the frame contains 802.1Q tag information.
• , indicating VID, available range 1-4094, used to uniquely identify a VLAN.
• , indicating the priority level, used for QoS.
•Canonical format indicator: 1 bit, indicating bus-type Ethernet, FDDI, token ring network.
TPID
0x8100
Priority
0-7
CFI
0/1
VID
0-4095
· Single-Switch VLAN Tag Operation
Adding default VLAN tag when entering switch port.
Untagging VLANs when leaving a switch port.
· Access Port
Allow to pass and receive and send data frames for only one VLAN.
Generally used to connect
· Cross-switch VLAN Tag Operations
Support for Ethernet frames carrying VLAN tags to be passed between switches.
?
Vlan 10
Vlan 20Vlan 20
Vlan 10
Gi0/1
G0/2
Gi0/1
G0/2
G0/24 G0/24
· Trunk Port
Allows to pass through, and can receive and send data frames for multiple VLANs.
Ethernet frames without tags for the default VLAN.
Generally used to connect between
Vlan 10
Vlan 20Vlan 20
Vlan 10
Gi0/1
G0/2
Gi0/1
G0/2
G0/24 G0/24
· Configuration Steps for VLAN
•Creating the corresponding VLAN on each switch.
•Dividing the corresponding hosts into VLANs based on their interfaces.
•Interconnected interfaces of the switch configure Trunk interfaces.
Vlan10 Vlan 20
Technology
Finance
· Basic Configuration of VLAN
•Step 1: Create VLAN
Switch(config)#vlanvlan-id
•Step 2: Name VLAN
Switch(config-vlan)#name vlan-name
switch(config)#vlan 10 // Create VLAN
switch(config-vlan)# name IT //Naming of VLANs for easy O&M
switch(config)#vlan 20
switch(config-vlan)# name finance
· Basic Configuration of VLAN
•Step 1: Enter the port configuration mode
Swtich(config)#interface interface
•Step 2: Set the port mode to access port
Switch(config-if)#switchport mode access
switch(config)#interface range f0/1-2
switch(config-if-range)#switchport access vlan 10 //Interface is partitioned to VLAN 10
switch(config)#interface f0/3
switch(config-if)#switchport access vlan 20
•Step 3: Add the port to a specific VLAN
Switch(config-if)#switchport access vlan vlan-id
· Basic Configuration of VLAN
•Step 1: Enter the port to be configured
swtich(config)#interface interface
•Step 2: Set the mode of the port to Trunk
Switch(config-if)#switchport mode trunk
switch(config)#interface range GigabitEthernet 0/2-4
switch(config-if-range)#switchport mode trunk
switch(config-if-range)#exit
switch(config)#interface GigabitEthernet 0/2
switch(config-if-GigabitEthernet 0/2)#switchport trunk allowed vlan remove 1-4094
switch(config-if-GigabitEthernet 0/2)#switchport trunk allowed vlan add 10,20
•Step 3: Modify the port default VLAN, the default is VLAN 1
Switch(config-if)#switchport trunk native vlan vlan-id
•Step 4: Define a list of VLAN control behaviors for Trunk links (VLAN pruning, etc.) (optional, and use with caution)
Switch(config-if)#switchport trunk allowed vlan { all | [ add | remove | except | only ] } vlan-list
Logical-based grouping, which can be grouped according to services or functions
More flexible networking regardless of physical location
Reduces the management costs associated with node movement in the network
Users in different VLANs need to use Layer 3 devices to communicate