Network_Automation
Netops Lab Device Configs
# ACC-SW1
 
```bash
en 
conf t
host ACC-SW1
no ip domain lookup
service sequence-numbers
username admin priv 15 secret cisco123
crypto key gen rsa mod 1024
!
line con 0
 exec-timeout 0 0
 logging sync
!
line vty 0 4
 login local
 transport input ssh
!
vlan 10,20,30,40,200
exit
!
ip default-gateway 192.168.200.254
!
int vlan 200
 description MGMT
 ip add 192.168.200.1 255.255.255.0
 no shut
!
Interface r g0/0-1
 description link to vlan 10 PC
 switchport mode access
 switchport access vlan 10
 spanning-tree portfast
 spanning-tree bpduguard enable
!
Interface r g0/2
 description Link to DC-SW1
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk allowed vlan 10,20,30,40,200
 
!
Interface r g0/3
 description Link to DC-SW2
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk allowed vlan 10,20,30,40,200
!
end
!
wr

ACC-SW2

en 
conf t
host ACC-SW2
no ip domain lookup
service sequence-numbers
username admin priv 15 secret cisco123
crypto key gen rsa mod 1024
!
line con 0
 exec-timeout 0 0
 logging sync
!
line vty 0 4
 login local
 transport input ssh
!
vlan 10,20,30,40,200
exit
!
ip default-gateway 192.168.200.254
!
int vlan 200
 description MGMT
 ip add 192.168.200.2 255.255.255.0
 no shut
!
Interface r g0/0-1
 description link to vlan 20 PC
 switchport mode access
 switchport access vlan 20
 spanning-tree portfast
 spanning-tree bpduguard enable
!
Interface r g0/2
 description Link to DC-SW1
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk allowed vlan 10,20,30,40,200
 
!
Interface r g0/3
 description Link to DC-SW2
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk allowed vlan 10,20,30,40,200
 
!
end
!
wr

ACC-SW3

en 
conf t
host ACC-SW3
no ip domain lookup
service sequence-numbers
username admin priv 15 secret cisco123
crypto key gen rsa mod 1024
!
line con 0
 exec-timeout 0 0
 logging sync
!
ip default-gateway 192.168.200.254
!
line vty 0 4
 login local
 transport input ssh
!
vlan 10,20,30,40,200
exit
!
int vlan 200
 description MGMT
 ip add 192.168.200.3 255.255.255.0
 no shut
!
Interface r g0/0-1
 description link to vlan 30 PC
 switchport mode access
 switchport access vlan 30
 spanning-tree portfast
 spanning-tree bpduguard enable
!
Interface r g0/2
 description Link to DC-SW1
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk allowed vlan 10,20,30,40,200
 
!
Interface r g0/3
 description Link to DC-SW2
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk allowed vlan 10,20,30,40,200
!
end
!
wr

ACC-SW4

en 
conf t
host ACC-SW4
no ip domain lookup
service sequence-numbers
username admin priv 15 secret cisco123
crypto key gen rsa mod 1024
!
ip default-gateway 192.168.200.254
!
line con 0
 exec-timeout 0 0
 logging sync
!
line vty 0 4
 login local
 transport input ssh
!
vlan 10,20,30,40,200
exit
!
int vlan 200
 description MGMT
 ip add 192.168.200.4 255.255.255.0
 no shut
!
Interface r g0/0-1
 description link to vlan 40 PC
 switchport mode acc
 ess
 switchport access vlan 40
 spanning-tree portfast
 spanning-tree bpduguard enable
!
Interface r g0/2
 description Link to DC-SW1
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk allowed vlan 10,20,30,40,200
 
!
Interface r g0/3
 description Link to DC-SW2
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk allowed vlan 10,20,30,40,200
 
!
end
!
wr

no int l0200

DC-SW1

en 
conf t
host DC-SW1
no ip domain lookup
service sequence-numbers
username admin priv 15 secret cisco123
crypto key gen rsa mod 1024
!
line con 0
 exec-timeout 0 0
 logging sync
!
line vty 0 4
 login local
 transport input ssh
!
vlan 10,20,30,40,200
exit
!
int vlan 200
 description MGMT
 ip add 192.168.200.5 255.255.255.0
 no shut
!
Interface r g0/0
 description Link to ACC-SW1
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk allowed vlan 10,20,30,40,200
 
!
Interface r g0/1
 description Link to ACC-SW2
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk allowed vlan 10,20,30,40,200
 
!
Interface r g0/2
 description Link to ACC-SW3
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk allowed vlan 10,20,30,40,200
 
!
Interface r g0/3
 description Link to ACC-SW4
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk allowed vlan 10,20,30,40,200
 
!
Interface r g1/0-2,g2/0
 channel-group 12 mode active
 description Portchannel to DC-SW2
 no switchport
 shut
!
interface po12
 no switchport 
 ip add 11.1.1.1 255.255.255.252
 no shut
!
int r g1/3
 description Link to CORP-R1
 no switchport
 ip add 10.1.1.2 255.255.255.252
 no shut
!
Interface r g1/0-2,g2/0
 no shut
end
!
int vlan 10
 ip add 192.168.10.254 255.255.255.0
 ip helper-address 50.1.1.200
 no shut
!
int vlan 20
 ip add 192.168.20.254 255.255.255.0
 ip helper-address 50.1.1.200
 no shut
!
int vlan 30
 ip add 192.168.30.254 255.255.255.0
 ip helper-address 50.1.1.200
 no shut
!
int vlan 40
 ip add 192.168.40.254 255.255.255.0
 ip helper-address 50.1.1.200
 no shut
!
router ospf 1
 router-id 0.0.0.1
 network 10.1.1.2 0.0.0.0 area 0
 network 11.1.1.1 0.0.0.0 area 0
 network 192.168.0.0 0.0.255.255 area 0
!
end
!
wr

DC-SW2

en 
conf t
host DC-SW2
no ip domain lookup
service sequence-numbers
username admin priv 15 secret cisco123
crypto key gen rsa mod 1024
!
line con 0
 exec-timeout 0 0
 logging sync
!
line vty 0 4
 login local
 transport input ssh
!
vlan 10,20,30,40,200
exit
!
int vlan 200
 description MGMT
 ip add 192.168.200.6 255.255.255.0
 no shut
!
Interface r g0/0
 description Link to ACC-SW2
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk allowed vlan 10,20,30,40,200
!
Interface r g0/1
 description Link to ACC-SW2
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk allowed vlan 10,20,30,40,200
 
!
Interface r g0/2
 description Link to ACC-SW3
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk allowed vlan 10,20,30,40,200
 
!
Interface r g0/3
 description Link to ACC-SW4
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk allowed vlan 10,20,30,40,200
 
!
Interface r g1/0-2,g2/0
 description Portchannel to DC-SW1
 channel-group 12 mode active
 no switchport
 shut
!
interface po12
 no switchport 
 ip add 11.1.1.2 255.255.255.252
 no shut
!
Interface r g1/0-2,g2/0
 no shut
end
!
int r g1/3
 description Link to CORP-R1
 no switchport
 ip add 12.1.1.2 255.255.255.252
 no shut
!
int vlan 10
 ip add 192.168.10.253 255.255.255.0
 ip helper-address 50.1.1.200
 no shut
!
int vlan 20
 ip add 192.168.20.253 255.255.255.0
 ip helper-address 50.1.1.200
 no shut
!
int vlan 30
 ip add 192.168.30.253 255.255.255.0
 ip helper-address 50.1.1.200
 no shut
!
int vlan 40
 ip add 192.168.40.253 255.255.255.0
 ip helper-address 50.1.1.200
 no shut
!
int vlan 200
 ip add 192.168.200.5 255.255.255.0
 no shut
!
router ospf 1
 router-id 0.0.0.2
 network 12.1.1.2 0.0.0.0 area 0
 network 11.1.1.2 0.0.0.0 area 0
 network 192.168.0.0 0.0.255.255 area 0
 network 192.168.200.6 0.0.0.0 area 0
!
end
!
wr

Campus-R1

en 
conf t
host Campus-R1
no ip domain lookup
service sequence-numbers
username admin priv 15 secret cisco123
crypto key gen rsa mod 1024
!
line con 0
 exec-timeout 0 0
 logging sync
!
line vty 0 4
 login local
 transport input ssh
!
Int g0/0
 description Link to DC-SW1
 ip add 10.1.1.1 255.255.255.252
 ip nat inside
 no shut
!
Int g0/1
 description Link to DC-SW2
 ip add 12.1.1.1 255.255.255.252
 ip nat inside
 no shut
!
Int g0/2
 description Link to Service-provider router
 ip add 199.1.1.1 255.255.255.252
 ip nat outside 
 no shut
!
Int g0/3
 description Link to DHCP-Server
 ip add 50.1.1.1 255.255.255.0
 no shut
!
ip route 0.0.0.0 0.0.0.0 199.1.1.2
!
ip access-list standard NAT1
 permit 192.168.0.0 0.0.255.255
 permit 10.1.1.0 0.0.0.3
 permit 11.1.1.0 0.0.0.3
 permit 12.1.1.0 0.0.0.3
!
ip nat inside source list NAT1 interface g0/2 overload
!
int g0/1.200
 encapsulation dot1q
 description MGMT
 ip add 192.168.200.7 255.255.255.0
 no shut
!
exit
!
router ospf 1
 router-id 0.0.0.3
 network 10.1.1.1 0.0.0.0 area 0
 network 12.1.1.1 0.0.0.0 area 0
 network 199.1.1.1 0.0.0.0 area 0
 network 50.1.1.1 0.0.0.0 area 0
 network 192.168.200.7 0.0.0.0 area 0
 passive-interface default
 no passive-int g0/0
 no passive-int g0/1
 no passive-int g0/2
 no passive-int g0/3
!
!
end
!
wr

SP-1

en 
conf t
host SP-1
no ip domain lookup
service sequence-numbers
username admin priv 15 secret cisco123
crypto key gen rsa mod 1024
!
line con 0
 exec-timeout 0 0
 logging sync
!
line vty 0 4
 login local
 transport input ssh
!
Int g0/0
 description Link to Campus-R1
 ip add 199.1.1.2 255.255.255.252
 no shut
!
Int g0/1
 description Link to CORP-FGT-FW
 ip add 200.1.1.2 255.255.255.252
 no shut
!
int g0/0.200
 description MGMT
 encapsulation dot1q 200
 ip add 192.168.200.8 255.255.255.0
 no shut
!
router ospf 1
 router-id 0.0.0.254
 network 0.0.0.0 0.0.0.0 area 0
 network 192.168.200.8 0.0.0.0 area 0
!
exit
end
!
wr

DHCP-SERVER

en 
conf t
host DHCP-Server
no ip domain lookup
service sequence-numbers
username admin priv 15 secret cisco123
crypto key gen rsa mod 1024
!
line con 0
 exec-timeout 0 0
 logging sync
!
line vty 0 4
 login local
 transport input ssh
!
Int e0/0
 description Link to Campus-R1
 ip add 50.1.1.200 255.255.255.0
 no shut
!
router ospf 1
 router-id 0.0.0.4
 network 50.1.1.200 0.0.0.0 area 0
 network 192.168.200.0 0.0.0.255 area 0
!
!
int e0/0.200
 encapsulation dot1q 200
 description MGMT
 ip add 192.168.200.9 255.255.255.0
!
end
!
wr