enable
configure terminal
hostname SW1
enable secret test
username admin secret test
ip domain-name test.local
crypto key generate rsa 
1024
line vty 0 4
login local
loggin synchronous 
exec-timeout 5 0
history size 20
transport input ssh
transport output ssh
exit 
line console 0
login local
loggin synchronous 
exec-timeout 5 0
history size 20 
exit 
vlan 10 
name IT
exit 
vlan 99
name Management
exit 
interface vlan 10 
ip address 192.168.10.1 255.255.255.0
no shutdown
exit 
interface vlan 99
ip address 192.168.99.2 255.255.255.0
no shutdown
exit 
ip default-gateway 192.168.99.254
interface range fastEthernet 0/1-3 
switchport mode access 
switchport access vlan 10
exit 
interface fastEthernet 0/1
switchport mode trunk
exit
...................................................................................
enable
configure terminal
hostname SW2
enable secret test
username admin secret test
ip domain-name test.local
crypto key generate rsa 
1024
line vty 0 4
login local
loggin synchronous
exec-timeout 5 0
history size 20
transport input ssh
transport output ssh
exit 
line console 0
login local
loggin synchronous 
exec-timeout 5 0
history size 20 
exit 
vlan 20 
name HR
exit 
vlan 99
name Management
exit 
interface vlan 20 
ip address 192.168.20.1 255.255.255.0
no shutdown
exit 
interface vlan 99
ip address 192.168.99.3 255.255.255.0
no shutdown
exit 
ip default-gateway 192.168.99.254
interface range fastEthernet 0/1-3 
switchport mode access 
switchport access vlan 20
exit 
interface fastEthernet 0/1
switchport mode trunk
exit
...................................................................................
enable
configure terminal
hostname SW3
enable secret test
username admin secret test
ip domain-name test.local
crypto key generate rsa 
1024
line vty 0 4
login local
loggin synchronous 
exec-timeout 5 0
history size 20
transport input ssh
transport output ssh
exit 
line console 0
login local
loggin synchronous 
exec-timeout 5 0
history size 20 
exit 
vlan 30 
name ACC
exit 
vlan 99
name Management
exit 
interface vlan 30 
ip address 192.168.30.1 255.255.255.0
no shutdown
exit 
interface vlan 99
ip address 192.168.99.4 255.255.255.0
no shutdown
exit 
ip default-gateway 192.168.99.254
interface range fastEthernet 0/1-3 
switchport mode access 
switchport access vlan 30
exit 
interface fastEthernet 0/1
switchport mode trunk
exit
...................................................................................
enable
configure terminal
hostname SW4
enable secret test
username admin secret test
ip domain-name test.local
crypto key generate rsa 
1024
line vty 0 4
login local
loggin synchronous 
exec-timeout 5 0
history size 20
transport input ssh
transport output ssh
exit 
line console 0
login local
loggin synchronous 
exec-timeout 5 0
history size 20 
exit 
vlan 40 
name Sales
exit 
vlan 99
name Management
exit 
interface vlan 40 
ip add 192.168.40.1 255.255.255.0
no sh
exit 
interface vlan 99
ip address 192.168.99.5 255.255.255.0
no shutdown
exit 
ip default-gateway 192.168.99.254
interface range fastEthernet 0/1-3 
switchport mode access 
switchport access vlan 40
exit 
interface fastEthernet 0/1
switchport mode trunk
exit
...................................................................................
enable
configure terminal
hostname SW_Core
enable secret test
username admin secret test
ip domain-name test.local
crypto key generate rsa 
1024
line vty 0 4
login local
loggin synchronous 
exec-timeout 5 0
history size 20
transport input ssh
transport output ssh
exit 
line console 0
login local
loggin synchronous 
exec-timeout 5 0
history size 20 
exit 
vlan 10
name IT
exit
vlan 20
name HR
exit 
vlan 30
name ACC
exit
vlan 40 
name Sales
exit 
vlan 99
name Management
exit 
interface range fastEthernet 0/1-4 
switchport trunk encapsulation dot1q 
switchport mode trunk
exit 
interface vlan 99
ip address 192.168.99.254 255.255.255.0
no shutdown
exit
ip routing
interface vlan 10
ip address 192.168.10.254 255.255.255.0
no shutdown
exit
interface vlan 20
ip address 192.168.20.254 255.255.255.0
no shutdown
exit
interface vlan 30
ip address 192.168.30.254 255.255.255.0
no shutdown
exit
interface vlan 40
ip address 192.168.40.254 255.255.255.0
no shutdown
exit
