1
0
Fork 0
mirror of https://gitlab.com/netravnen/NetworkLabNotes.git synced 2024-11-23 19:17:54 +00:00

Added base.cfg and reset.tcl

This commit is contained in:
chhan11 2017-05-22 12:29:00 +02:00
parent b88bceb860
commit 67715b8ec8
5 changed files with 66 additions and 78 deletions

16
code/router/base.cfg Normal file
View file

@ -0,0 +1,16 @@
tclsh
puts [ open "flash:base.cfg" w+ ] {
hostname __HOSTNAME__
ip domain-name cisco.tld
no ip domain lookup
interface range f0/1-24 , g0/1-2
shutdown
exit
vtp mode transparent
line con 0
no exec-timeout
logging synchronous
exit
end
}
tclquit

15
code/router/reset.tcl Normal file
View file

@ -0,0 +1,15 @@
tclsh
puts [ open "flash: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 dual-ipv4-and-ipv6 routing"
typeahead "\n"
puts "Reloading the switch in 1 minute, type reload cancel to halt"
typeahead "\n"
reload in 1 RESET.TCL SCRIPT RUN
}
tclquit

16
code/switch/base.cfg Normal file
View file

@ -0,0 +1,16 @@
tclsh
puts [ open "flash:base.cfg" w+ ] {
hostname __HOSTNAME__
ip domain-name cisco.tld
no ip domain lookup
interface range f0/1-24 , g0/1-2
shutdown
exit
vtp mode transparent
line con 0
no exec-timeout
logging synchronous
exit
end
}
tclquit

15
code/switch/reset.tcl Normal file
View file

@ -0,0 +1,15 @@
tclsh
puts [ open "flash: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 in 1 RESET.TCL SCRIPT RUN
}
tclquit

View file

@ -60,92 +60,18 @@
% <!-- ROUTER -->
\subsection{Router}
\subsubsection{File: base.cfg}
\begin{minted}[frame=lines,framesep=2mm,baselinestretch=1.2,bgcolor=lightgray,fontsize=\footnotesize,linenos,breaklines=true]{tcl}
tclsh
puts [ open "flash:base.cfg" w+ ] {
hostname __HOSTNAME__
ip domain-name cisco.tld
no ip domain lookup
interface range f0/1-24 , g0/1-2
shutdown
exit
vtp mode transparent
line con 0
no exec-timeout
logging synchronous
exit
end
}
tclquit
\end{minted}
\inputminted[frame=lines,framesep=2mm,baselinestretch=1.2,bgcolor=lightgray,fontsize=\footnotesize,linenos,breaklines=true]{powershell}{code/router/base.cfg}
\subsubsection{File: reset.tcl}
\begin{minted}[frame=lines,framesep=2mm,baselinestretch=1.2,bgcolor=lightgray,fontsize=\footnotesize,linenos,breaklines=true]{tcl}
tclsh
puts [ open "flash: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 dual-ipv4-and-ipv6 routing"
typeahead "\n"
puts "Reloading the switch in 1 minute, type reload cancel to halt"
typeahead "\n"
reload in 1 RESET.TCL SCRIPT RUN
}
tclquit
\end{minted}
\inputminted[frame=lines,framesep=2mm,baselinestretch=1.2,bgcolor=lightgray,fontsize=\footnotesize,linenos,breaklines=true]{powershell}{code/router/reset.tcl}
% <!-- SWITCH -->
\subsection{Switch}
\subsubsection{File: base.cfg}
\begin{minted}[frame=lines,framesep=2mm,baselinestretch=1.2,bgcolor=lightgray,fontsize=\footnotesize,linenos,breaklines=true]{tcl}
tclsh
puts [ open "flash:base.cfg" w+ ] {
hostname __HOSTNAME__
ip domain-name cisco.tld
no ip domain lookup
interface range f0/1-24 , g0/1-2
shutdown
exit
vtp mode transparent
line con 0
no exec-timeout
logging synchronous
exit
end
}
tclquit
\end{minted}
\inputminted[frame=lines,framesep=2mm,baselinestretch=1.2,bgcolor=lightgray,fontsize=\footnotesize,linenos,breaklines=true]{powershell}{code/switch/base.cfg}
\subsubsection{File: reset.tcl}
\begin{minted}[frame=lines,framesep=2mm,baselinestretch=1.2,bgcolor=lightgray,fontsize=\footnotesize,linenos,breaklines=true]{tcl}
tclsh
puts [ open "flash: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 in 1 RESET.TCL SCRIPT RUN
}
tclquit
\end{minted}
\inputminted[frame=lines,framesep=2mm,baselinestretch=1.2,bgcolor=lightgray,fontsize=\footnotesize,linenos,breaklines=true]{powershell}{code/switch/reset.tcl}
%
% END SWITCH CONFIG