SW2:
en
conf t
hostname SW2
vlan 10
vlan 20
int e0/1
switchport mode access
switchport access vlan 10
int e0/2
switchport mode access
switchport access vlan 20
int e0/0
switchport trunk en dot1q
switchport mode trunk
switch trunk allow vlan 10,20
SW3:
en
conf t
hostname SW3
vlan 10
vlan 20
int e0/1
switchport mode access
switchport access vlan 10
int e0/2
switchport mode access
switchport access vlan 20
int e0/0
switchport trunk en dot1q
switchport mode trunk
switch trunk allow vlan 10,20
SW1:
en
conf t
hostname SW1
vlan 10
vlan 20
int e0/0
switchport trunk en dot1q
switchport mode trunk
switch trunk allow vlan 10,20
int e0/1
switchport trunk en dot1q
switchport mode trunk
switch trunk allow vlan 10,20
int vlan 10
ip add 192.168.1.254 255.255.255.0
no shut
int vlan 20
ip add 192.168.2.254 255.255.255.0
no shut