[go: up one dir, main page]

0% found this document useful (0 votes)
9 views17 pages

Uploading Configuration Files 4.1.2

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views17 pages

Uploading Configuration Files 4.1.2

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Uploading Configuration Files

Use the commands below to create the configuration files on the lab devices for each trouble ticket in
this lab.

The TCL script commands help create and copy the configurations. However, the configuration
commands could also be copied and pasted directly into global config mode on each device. Simply
remove the TCL script commands, enter the enable and configure t commands on the device, and
copy and paste the configuration commands.

ommand to verify. If the


Important: The device requires a folder in flash named enarsi. Use the dir command
folder is missing, then create it using the mkdir flash:/enarsi privileged EXEC command. For all
ete vlan.dat privileged EXEC
switches, make sure the vlan.dat file is set to the default. Use the delete
command, if necessary.

Reset scripts
These TCL scripts will completely clear and reload the device in preparation for the next ticket. Copy and
paste the appropriate script to the appropriate device.
Router Reset Script
tclsh
puts
uts [ open "flash:/enarsi/reset.tcl" w+ ] {
typeahead "\n"
copy running-config
config startup-config
startup
typeahead "\n"
erase startup-config
puts "Reloading the router"
typeahead "\n"
reload
}
tclquit
pports IPv6, so it is not set by this
D1/D2 (Cisco 3650) Reset Script - The default 3650 SDM template supports
script.
tclsh
puts [ open "flash:/enarsi/reset.tcl" w+ ] {
typeahead "\n"
copy running-config
config startup-config
startup
typeahead "\n"
erase startup-config
delete /force vlan.dat
puts "Reloading the switch"
typeahead "\n"
reload
}
tclquit

 - 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 1 of 17 www.netacad.com
[Title]

A1 (Cisco 2960 Script) - The default 2960 SDM template does not support IPv6, so this script includes
that setting.
tclsh
puts [ open "flash:/enarsi/reset.tcl" w+ ] {
typeahead "\n"
copy running-config startup-config
typeahead "\n"
erase startup-config
delete /force vlan.dat
delete /force multiple-fs
ios_config "sdm prefer lanbase-routing"
typeahead "\n"
puts "Reloading the switch in 1 minute, type reload cancel to halt"
typeahead "\n"
reload
}
tclquit

R1 Configuration File Scripts


!R1 - Trouble Ticket # 1

tclsh
puts [ open "flash:/enarsi/4.1.2.1-r1-config.txt" w+ ] {

hostname R1
banner motd # This is R1, Trouble Ticket 4.1.2.1 #
enable secret cisco12345
username admin privilege 15 algorithm-type scrypt secret cisco12345
interface g0/0/0
ip address 10.0.12.1 255.255.255.0
no shutdown
exit
interface g0/0/1
no ip address
no shutdown
exit
interface g0/0/1.1
encapsulation dot1q 1 native
ip address 172.16.1.1 255.255.255.0
no shutdown
exit
interface g0/0/1.2
encapsulation dot1q 2
ip address 192.168.1.1 255.255.255.0
no shutdown

 - 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 2 of 17 www.netacad.com
[Title]

exit
router eigrp 412
eigrp router-id 1.1.1.1
network 10.0.12.0 0.0.0.255
network 172.16.1.0 0.0.0.255
network 192.168.1.0 0.0.0.255
passive-interface g0/0/1.2
exit
ip dhcp excluded-address 192.168.1.1 192.168.1.5
ip dhcp pool HOSTS
network 192.168.1.0 255.255.255.0
default-router 192.168.1.1
exit
line con 0
exec-timeout 0 0
logging synchronous
exit
line vty 0 4
login local
transport input telnet
exit
alias exec reset.now tclsh flash:/enarsi/reset.tcl
end
}
Tclquit

!R1 - Trouble Ticket # 2


tclsh
puts [ open "flash:/enarsi/4.1.2.2-r1-config.txt" w+ ] {
hostname R1
banner motd # This is R1, Trouble Ticket 4.1.2.2 #
enable secret cisco12345
username admin privilege 15 algorithm-type scrypt secret cisco12345
interface g0/0/0
ip address 10.0.12.1 255.255.255.0
no shutdown
exit
interface g0/0/1
no ip address
no shutdown
exit
interface g0/0/1.1
encapsulation dot1q 1 native
ip address 172.16.1.1 255.255.255.0
no shutdown

 - 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 3 of 17 www.netacad.com
[Title]

exit
interface g0/0/1.2
encapsulation dot1q 2
ip address 192.168.1.1 255.255.255.0
no shutdown
exit
router eigrp 412
eigrp router-id 1.1.1.1
network 10.0.12.0 0.0.0.255
network 172.16.1.0 0.0.0.255
network 192.168.1.0 0.0.0.255
passive-interface g0/0/1.2
exit
key chain security
key 1
key-string cisco12345
exit
exit
interface g0/0/0
ip authentication mode eigrp 412 md5
ip authentication key-chain eigrp 412 security
exit
interface g0/0/1.1
ip authentication mode eigrp 412 md5
ip authentication key-chain eigrp 412 security
exit
ip dhcp excluded-address 192.168.1.1 192.168.1.5
ip dhcp pool HOSTS
network 192.168.1.0 255.255.255.0
default-router 192.168.1.1
exit
line con 0
exec-timeout 0 0
logging synchronous
exit
line vty 0 4
login local
transport input telnet
exit
alias exec reset.now tclsh flash:/enarsi/reset.tcl
end
}
tclquit
!R1 - Trouble Ticket # 3
tclsh

 - 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 4 of 17 www.netacad.com
[Title]

puts [ open "flash:/enarsi/4.1.2.3-r1-config.txt" w+ ] {


hostname R1
banner motd # This is R1, Trouble Ticket 4.1.2.3 #
enable secret cisco12345
username admin privilege 15 algorithm-type scrypt secret cisco12345
interface g0/0/0
ip address 10.0.12.1 255.255.255.0
no shutdown
exit
interface g0/0/1
no ip address
no shutdown
exit
interface g0/0/1.1
encapsulation dot1q 1 native
ip address 172.16.1.1 255.255.255.0
no shutdown
exit
interface g0/0/1.2
encapsulation dot1q 2
ip address 192.168.1.1 255.255.255.0
no shutdown
exit
router eigrp 412
eigrp router-id 1.1.1.1
network 10.0.12.0 0.0.0.255
network 172.16.1.0 0.0.0.255
network 192.168.1.0 0.0.0.255
passive-interface g0/0/1.2
exit
key chain security
key 1
key-string cisco12345
exit
exit
interface g0/0/0
ip authentication mode eigrp 412 md5
ip authentication key-chain eigrp 412 security
exit
interface g0/0/1.1
ip authentication mode eigrp 412 md5
ip authentication key-chain eigrp 412 security
exit
ip dhcp excluded-address 192.168.1.1 192.168.1.5
ip dhcp pool HOSTS
network 192.168.1.0 255.255.255.0

 - 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 5 of 17 www.netacad.com
[Title]

default-router 192.168.1.1
exit
line con 0
exec-timeout 0 0
logging synchronous
exit
line vty 0 4
login local
transport input telnet
exit
alias exec reset.now tclsh flash:/enarsi/reset.tcl
end
}
tclquit

R2 Configuration File Scripts


!R2 - Trouble Ticket # 1
tclsh
puts [ open "flash:/enarsi/4.1.2.1-r2-config.txt" w+ ] {
hostname R2
banner motd # This is R2, Trouble Ticket 4.1.2.1 #
enable secret cisco12345
username admin privilege 15 algorithm-type scrypt secret cisco12345
interface g0/0/0
ip address 10.0.12.2 255.255.255.0
no shutdown
exit
interface g0/0/1
ip address 10.0.23.1 255.255.255.0
no shutdown
exit
router eigrp 412
eigrp router-id 1.1.1.1
network 10.0.12.0 0.0.0.255
network 10.0.23.0 0.0.0.255
exit
line con 0
exec-timeout 0 0
logging synchronous
exit
line vty 0 4
login local
transport input telnet
exit
alias exec reset.now tclsh flash:/enarsi/reset.tcl

 - 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 6 of 17 www.netacad.com
[Title]

end
}
tclquit
!R2 - Trouble Ticket # 2
tclsh
puts [ open "flash:/enarsi/4.1.2.2-r2-config.txt" w+ ] {
hostname R2
banner motd # This is R2, Trouble Ticket 4.1.2.2 #
enable secret cisco12345
username admin privilege 15 algorithm-type scrypt secret cisco12345
interface g0/0/0
ip address 10.0.12.2 255.255.255.0
no shutdown
exit
interface g0/0/1
ip address 10.0.23.1 255.255.255.0
no shutdown
exit
ip prefix-list 88QRX-T13 seq 5 deny 172.16.0.0/16 le 24
ip prefix-list 88QRX-T13 seq 10 deny 192.168.0.0/16 le 24
ip prefix-list 88QRX-T13 seq 15 deny 10.0.0.0/8 le 24
ip prefix-list 88QRX-T13 seq 20 permit 0.0.0.0/0 le 32
router eigrp 412
eigrp router-id 2.2.2.2
network 10.0.12.0 0.0.0.255
network 10.0.23.0 0.0.0.255
distribute-list prefix 88QRX-T13 out g0/0/1
exit
key chain security
key 1
key-string cisco12345
exit
exit
interface g0/0/0
ip authentication mode eigrp 412 md5
ip authentication key-chain eigrp 412 security
exit
interface g0/0/1
ip authentication mode eigrp 412 md5
ip authentication key-chain eigrp 412 security
exit
line con 0
exec-timeout 0 0
logging synchronous
exit

 - 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 7 of 17 www.netacad.com
[Title]

line vty 0 4
login local
transport input telnet
exit
alias exec reset.now tclsh flash:/enarsi/reset.tcl
end
}
tclquit
!R2 - Trouble Ticket # 3
tclsh
puts [ open "flash:/enarsi/4.1.2.3-r2-config.txt" w+ ] {
hostname R2
banner motd # This is R2, Trouble Ticket 4.1.2.3 #
enable secret cisco12345
username admin privilege 15 algorithm-type scrypt secret cisco12345
interface g0/0/0
ip address 10.0.12.2 255.255.255.0
no shutdown
exit
interface g0/0/1
ip address 10.0.23.1 255.255.255.0
no shutdown
exit
router eigrp 412
eigrp router-id 2.2.2.2
network 10.0.12.0 0.0.0.255
network 10.0.23.0 0.0.0.255
exit
key chain security
key 1
key-string cisco12345
exit
exit
interface g0/0/0
ip authentication mode eigrp 412 md5
ip authentication key-chain eigrp 412 security
exit
interface g0/0/1
ip authentication mode eigrp 412 md5
ip authentication key-chain eigrp 412 security
exit
line con 0
exec-timeout 0 0
logging synchronous
exit

 - 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 8 of 17 www.netacad.com
[Title]

line vty 0 4
login local
transport input telnet
exit
alias exec reset.now tclsh flash:/enarsi/reset.tcl
end
}
tclquit

R3 Configuration File Scripts


!R3 - Trouble Ticket # 1
tclsh
puts [ open "flash:/enarsi/4.1.2.1-r3-config.txt" w+ ] {
hostname R3
banner motd # This is R3, Trouble Ticket 4.1.2.1 #
enable secret cisco12345
username admin privilege 15 algorithm-type scrypt secret cisco12345
interface g0/0/0
ip address 10.0.23.2 255.255.255.0
no shutdown
exit
interface g0/0/1
ip address 172.16.1.2 255.255.255.0
no shutdown
exit
interface loopback 0
ip address 192.168.3.1 255.255.255.0
router eigrp 412
eigrp router-id 3.3.3.3
network 10.0.23.0 0.0.0.255
network 172.16.1.0 0.0.0.255
network 192.168.3.0 0.0.0.255
passive-interface default
no passive-interface g0/0/1
exit
line con 0
exec-timeout 0 0
logging synchronous
exit
line vty 0 4
login local
transport input telnet
exit
alias exec reset.now tclsh flash:/enarsi/reset.tcl
end

 - 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 9 of 17 www.netacad.com
[Title]

}
tclquit
!R3 - Trouble Ticket # 2
tclsh
puts [ open "flash:/enarsi/4.1.2.2-r3-config.txt" w+ ] {
hostname R3
banner motd # This is R3, Trouble Ticket 4.1.2.2 #
enable secret cisco12345
username admin privilege 15 algorithm-type scrypt secret cisco12345
interface g0/0/0
ip address 10.0.23.2 255.255.255.0
no shutdown
exit
interface g0/0/1
ip address 172.16.1.2 255.255.255.0
no shutdown
exit
interface loopback 0
ip address 192.168.3.1 255.255.255.0
router eigrp 412
eigrp router-id 3.3.3.3
network 10.0.23.0 0.0.0.255
network 172.16.1.0 0.0.0.255
network 192.168.3.0 0.0.0.255
exit
key chain security
key 1
key-string cisco12345
exit
exit
interface g0/0/0
ip authentication mode eigrp 412 md5
ip authentication key-chain eigrp 412 security
exit
interface g0/0/1
ip authentication mode eigrp 412 md5
ip authentication key-chain eigrp 412 security
exit
line con 0
exec-timeout 0 0
logging synchronous
exit
line vty 0 4
login local
transport input telnet

 - 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 10 of 17 www.netacad.com
[Title]

exit
alias exec reset.now tclsh flash:/enarsi/reset.tcl
end
}
tclquit
!R3 - Trouble Ticket # 3
tclsh
puts [ open "flash:/enarsi/4.1.2.3-r3-config.txt" w+ ] {
hostname R3
banner motd # This is R3, Trouble Ticket 4.1.2.3 #
enable secret cisco12345
username admin privilege 15 algorithm-type scrypt secret cisco12345
interface g0/0/0
ip address 10.0.23.2 255.255.255.0
no shutdown
exit
interface g0/0/1
ip address 172.16.13.1 255.255.255.0
no shutdown
exit
interface loopback 0
ip address 192.168.3.1 255.255.255.0
router eigrp 412
eigrp router-id 3.3.3.3
network 10.0.23.0 0.0.0.255
network 172.16.13.0 0.0.0.255
network 192.168.3.0 0.0.0.255
exit
key chain security
key 1
key-string cisco12345
exit
exit
interface g0/0/0
ip authentication mode eigrp 412 md5
ip authentication key-chain eigrp 412 security
exit
interface g0/0/1
ip authentication mode eigrp 412 md5
ip authentication key-chain eigrp 412 security
exit
line con 0
exec-timeout 0 0
logging synchronous
exit

 - 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 11 of 17 www.netacad.com
[Title]

line vty 0 4
login local
transport input telnet
exit
alias exec reset.now tclsh flash:/enarsi/reset.tcl
end
}
tclquit

D1 Configuration File Scripts


!D1 - Trouble Ticket # 1
tclsh
puts [ open "flash:/enarsi/4.1.2.1-d1-config.txt" w+ ] {
hostname D1
banner motd # This is D1, Trouble Ticket 4.1.2.1 #
enable secret cisco12345
username admin privilege 15 algorithm-type scrypt secret cisco12345
spanning-tree mode rapid-pvst
spanning-tree vlan 1-2 root primary
interface range g1/0/1 - 24
switchport mode access
shutdown
exit
interface g1/0/11
switchport mode trunk
no shutdown
exit
interface g1/0/1
switchport mode access
switchport access vlan 1
no shutdown
exit
interface g1/0/23
switchport mode access
switchport access vlan 2
no shutdown
exit
line con 0
exec-timeout 0 0
logging synchronous
exit
alias exec reset.now tclsh flash:/enarsi/reset.tcl
end
}
tclquit

 - 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 12 of 17 www.netacad.com
[Title]

!D1 - Trouble Ticket # 2


tclsh
puts [ open "flash:/enarsi/4.1.2.2-d1-config.txt" w+ ] {
hostname D1
banner motd # This is D1, Trouble Ticket 4.1.2.2 #
enable secret cisco12345
username admin privilege 15 algorithm-type scrypt secret cisco12345
spanning-tree mode rapid-pvst
spanning-tree vlan 1-2 root primary
interface range g1/0/1 - 24
switchport mode access
shutdown
exit
interface g1/0/11
switchport mode trunk
no shutdown
exit
interface g1/0/1
switchport mode access
switchport access vlan 1
no shutdown
exit
interface g1/0/23
switchport mode access
switchport access vlan 2
no shutdown
exit
line con 0
exec-timeout 0 0
logging synchronous
exit
alias exec reset.now tclsh flash:/enarsi/reset.tcl
end
}
tclquit
!D1 - Trouble Ticket # 3
tclsh
puts [ open "flash:/enarsi/4.1.2.3-d1-config.txt" w+ ] {
hostname D1
banner motd # This is D1, Trouble Ticket 4.1.2.3 #
enable secret cisco12345
username admin privilege 15 algorithm-type scrypt secret cisco12345
spanning-tree mode rapid-pvst
spanning-tree vlan 1-2 root primary
interface range g1/0/1 - 24

 - 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 13 of 17 www.netacad.com
[Title]

switchport mode access


shutdown
exit
interface g1/0/11
switchport mode trunk
no shutdown
exit
interface g1/0/1
switchport mode access
switchport access vlan 1
no shutdown
exit
interface g1/0/23
switchport mode access
switchport access vlan 2
no shutdown
exit
line con 0
exec-timeout 0 0
logging synchronous
exit
alias exec reset.now tclsh flash:/enarsi/reset.tcl
end
}
tclquit

D2 Configuration File Scripts


!D2 - Trouble Ticket # 1
tclsh
puts [ open "flash:/enarsi/4.1.2.1-d2-config.txt" w+ ] {
hostname D2
banner motd # This is D2, Trouble Ticket 4.1.2.1 #
enable secret cisco12345
username admin privilege 15 algorithm-type scrypt secret cisco12345
spanning-tree mode rapid-pvst
interface range g1/0/1 - 24
switchport mode access
shutdown
exit
interface g1/0/11
switchport mode access
switchport access vlan 1
no shutdown
exit
interface g1/0/1

 - 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 14 of 17 www.netacad.com
[Title]

switchport mode access


switchport access vlan 1
no shutdown
exit
line con 0
exec-timeout 0 0
logging synchronous
exit
alias exec reset.now tclsh flash:/enarsi/reset.tcl
end
}
tclquit
!D2 - Trouble Ticket # 2
tclsh
puts [ open "flash:/enarsi/4.1.2.2-d2-config.txt" w+ ] {
hostname D2
banner motd # This is D2, Trouble Ticket 4.1.2.2 #
enable secret cisco12345
username admin privilege 15 algorithm-type scrypt secret cisco12345
spanning-tree mode rapid-pvst
interface range g1/0/1 - 24
switchport mode access
shutdown
exit
interface g1/0/11
switchport mode access
switchport access vlan 1
no shutdown
exit
interface g1/0/1
switchport mode access
switchport access vlan 1
no shutdown
exit
line con 0
exec-timeout 0 0
logging synchronous
exit
alias exec reset.now tclsh flash:/enarsi/reset.tcl
end
}
tclquit
!D2 - Trouble Ticket # 3
tclsh
puts [ open "flash:/enarsi/4.1.2.3-d2-config.txt" w+ ] {

 - 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 15 of 17 www.netacad.com
[Title]

hostname D2
ip routing
banner motd # This is D2, Trouble Ticket 4.1.2.3 #
enable secret cisco12345
username admin privilege 15 algorithm-type scrypt secret cisco12345
spanning-tree mode rapid-pvst
interface range g1/0/1 - 24
switchport mode access
shutdown
exit
interface g1/0/11
no switchport
ip address 172.16.13.2 255.255.255.0
no shutdown
exit
interface g1/0/1
no switchport
ip address 172.16.1.2 255.255.255.0
no shutdown
exit
interface loopback 0
ip address 192.168.20.1 255.255.255.0
no shutdown
exit
interface loopback 1
ip address 192.168.21.1 255.255.255.0
no shutdown
exit
router eigrp 421
eigrp router-id 132.132.132.132
network 172.16.1.0 0.0.0.255
network 172.16.13.0 0.0.0.255
network 192.168.20.0 0.0.0.255
network 192.168.21.0 0.0.0.255
exit
key chain security
key 1
key-string cisco12345
exit
exit
interface g1/0/1
ip authentication mode eigrp 421 md5
ip authentication key-chain eigrp 421 security
exit
interface g1/0/11
ip authentication mode eigrp 421 md5

 - 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 16 of 17 www.netacad.com
[Title]

ip authentication key-chain eigrp 421 security


exit
line con 0
exec-timeout 0 0
logging synchronous
exit
line vty 0 4
login local
transport input telnet
exit
alias exec reset.now tclsh flash:/enarsi/reset.tcl
end
}
tclquit

A1 Configuration File Scripts - Not Used In This Lab

 - 2022 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 17 of 17 www.netacad.com

You might also like