cisco
ena
conf t
hostname SW1
vlan 10
vlan 20
int vlan 10
int vlan 20
int f0/1
sw mo ac
sw ac vlan 10
int f0/2
sw mo ac
sw ac vlan 20
int g0/1
sw mo tr
ex
SW2
ena
conf t
homename SW2
vlan 30
vlan 40
int vlan 30
int vlan 40
int g0/2
sw mo tr
int f0/1
sw mo ac
sw ac vlan 30
int f0/2
sw mo ac
sw ac vlan 40
MSW1
ena
conf t
hostname MSW1
int r g0/1-2
sw tr en dot
sw mo tr
ex
vlan 10
vlan 20
vlan 30
vlan 40
int vlan 10
ip add 192.168.10.254 255.255.255.0
int vlan 20
ip add 192.168.20.254 255.255.255.0
int vlan 30
ip add 192.168.30.254 255.255.255.0
int vlan 40
ip add 192.168.40.254 255.255.255.0
ip routing
int g0/0
no sw
ip add 172.16.10.10 255.255.255.0
int l 0
ip add 10.10.10.10 255.255.255.255