Layer-3 switches of Cisco devices practice communication between different VLANs.
Layer-3 switches of Cisco devices practice communication between different VLANs.
Cisco device layer-3 Switch implements communication between different VLANs
Prepare four PCs, four L2 switches, one L3 switch, one vro, and one server.
PC1 PC2 PC3 PC4 computer
SWI SW2 SW3 SW4 Switch
MSW1 multi-layer switch
Step 1: first configure four PC iP addresses to divide VLAN for the PC
IP Address: PC1: 192.168.10.1
Subnet Mask: 255.255.255.0
Gateway address: 192.168.10.254
Pc2: 192.168.20.1
255.255.255.0
192.168.255.254
Pc3: 192.168.30.1
255.255.255.0
192.168.30.254
Pc4: 192.168.40.1
255.255.255.0
192.168.40.254
Step 2: Divide VLAN,
Create 4 VLANs for each PC
Switch> enable
Switch # configure terminal
Switch (config) # vlan 10
Change (config-vlan10) # exit
Switch (config) # vlan 20
Change (config-vlan20) # exit
Switch (config) # vlan 30
Change (config-vlan30) # exit
Switch (config) # vlan 40
Change (config-vlan40) # exit
Switch (config)
========================================================== ======================================
Add vlan10 and vlan 20 to the Fa0/1 Fa0/2 Port
Switch> enable
Switch # configure terminal
Switch (config) # interface fastEthernet0/1
SWitch (congig-if) # switchport mode access
SWitch (congig-if) # switchpott addess vlan 10
SWitch (congig-if) # exit
Switch (config) # interface fastEthernet0/2
SWitch (congig-if) # switchport mode access
SWitch (congig-if) # switchpott addess vlan 20
SWitch (congig-if) # exit
Switch (config) # interface fastEthernet0/1
SWitch (congig-if) # switchport mode access
SWitch (congig-if) # switchpott addess vlan 30
SWitch (congig-if) # exit
Switch (config) # interface fastEthernet0/2
SWitch (congig-if) # switchport mode access
SWitch (congig-if) # switchpott addess vlan 40
SWitch (congig-if) # exit
========================================================== ====================
Step 3: Configure VLAN, TRUNK, virtual VLAN, and punch-in gateway for layer-3 switches
Configure trunk for four L2 switches and one L3 Switch
SW1
Switch> enable
Switch # configure terminal
Switch (config) interface fastEthernet0/3
Switch (config-if) switchport mode trunk
Switch (config-if) exit
Switch (config) interface fastEthernet0/5
Switch (config-if) switchport mode trunk
Switch (config-if) exit
Switch (config) interface fastEthernet0/4
Switch (config-if) switchport mode trunk
Switch (config-if) exit
SW2
Switch (config) interface fastEthernet0/3
Switch (config-if) switchport mode trunk
Switch (config-if) exit
Switch (config) interface fastEthernet0/5
Switch (config-if) switchport mode trunk
Switch (config-if) exit
Switch (config) interface fastEthernet0/4
Switch (config-if) switchport mode trunk
Switch (config-if) exit
SW3
Switch (config) interface fastEthernet0/1
Switch (config-if) switchport mode trunk
Switch (config-if) exit
Switch (config) interface fastEthernet0/2
Switch (config-if) switchport mode trunk
Switch (config-if) exit
Switch (config) interface fastEthernet0/3
Switch (config-if) switchport mode trunk
Switch (config-if) exit
SW4
Switch (config) interface fastEthernet0/1
Switch (config-if) switchport mode trunk
Switch (config-if) exit
Switch (config) interface fastEthernet0/2
Switch (config-if) switchport mode trunk
Switch (config-if) exit
Switch (config) interface fastEthernet0/3
Switch (config-if) switchport mode trunk
Switch (config-if) exit
Switch> enable
Switch # configure terminal
Switch (config) # vlan 10
Switch (config-vlan) # exit
Switch (config) # vlan 20
Switch (config-vlan) # exit
Switch # configure terminal
Switch (config) # vlan 30
Switch (config-vlan) # exit
Switch (config) # vlan 40
Switch (config-vlan) # exit
Switch (config) # interface fastEthernet0/1
Switch (config-if) # switchport trunk encapsnlation dotlq
Switch (config-if) # switchport mode trunk
Switch (config-if) # exit
Switch (config) # interface fastEthernet0/2
Switch (config-if) # switchport trunk encapsnlation dotlq
Switch (config-if) # switchport mode trunk
Switch (config-if) # exit
========================================================== ======================================
Open Gateway
Switch> enable
Switch # configure terminal
Switch (config) # interface gigabitEthernet0/1
Switch (config-if) # no shutdown
Switch (config-if) # exit
Switch (config) # vlan 10
Switch (config-vlan) # exit
Switch (config) # interface vlan 10
Switch (config-if) # ip address 192.168.10.254 255.255.255.0
Switch (config-if) # exit
Switch (config) # vlan 20
Switch (config-vlan) # exit
Switch (config) # interface vlan 20
Switch (config-if) # ip address 192.168.255.254 255.255.255.0
Switch (config-if) # exit
========================================================== ==================
Step 5: pingPC ip address after all experiments are completed
Enable the pingip address of the PC so that the ip addresses of the four PCs can communicate with each other.