diff --git a/code/l2switch/base.cfg b/code/l2switch/base.cfg new file mode 100644 index 0000000..a74dec4 --- /dev/null +++ b/code/l2switch/base.cfg @@ -0,0 +1,89 @@ +tclsh +puts [ open "flash:base.cfg" w+ ] { +service timestamps debug datetime msec localtime show-timezone +service timestamps log datetime msec localtime show-timezone +service password-encryption +service counters max age 10 +! +hostname __HOSTNAME__ +! +logging buffered notifications +no logging console +! +no aaa new-model +clock timezone MET 1 0 +clock summer-time MET-DST recurring last Sun Mar 2:00 last Sun Oct 3:00 +system mtu routing 1500 +! +! +no ip domain-lookup +ip domain-name cisco.tld +! +password encryption aes +! +! +! +! +! +! +! +spanning-tree mode pvst +spanning-tree extend system-id +! +vlan internal allocation policy ascending +! +ip tcp synwait-time 5 +ip ssh logging events +ip ssh version 2 +ip ssh dh min size 2048 +ip ssh dscp 56 +! +! +! +! +! +no ip http server +no ip http secure-server +! +! +! +line con 0 + exec-timeout 60 0 + privilege level 15 + logging synchronous + stopbits 1 +line vty 0 4 + exec-timeout 60 0 + privilege level 15 + logging synchronous + login + length 0 + stopbits 1 +line vty 5 15 + exec-timeout 60 0 + logging synchronous + login + stopbits 1 +! +interface range f0/1-24 , g0/1-2 + shutdown +exit +! +interface range f0/1-18 + no cdp enable +exit +! +interface range f0/19-24 + switchport mode trunk + switchport trunk allowed vlan 1 + switchport trunk native vlan 1 + no shutdown +exit +! +vtp mode transparent +! +exit +! +end +} +tclquit diff --git a/code/switch/reset.tcl b/code/l2switch/reset.tcl similarity index 100% rename from code/switch/reset.tcl rename to code/l2switch/reset.tcl diff --git a/code/l3switch/base.cfg b/code/l3switch/base.cfg new file mode 100644 index 0000000..ae9bd0b --- /dev/null +++ b/code/l3switch/base.cfg @@ -0,0 +1,87 @@ +tclsh +puts [ open "flash:base.cfg" w+ ] { +service timestamps debug datetime msec localtime show-timezone +service timestamps log datetime msec localtime show-timezone +service password-encryption +service counters max age 10 +! +hostname __HOSTNAME__ +! +logging buffered notifications +no logging console +! +no aaa new-model +clock timezone MET 1 0 +clock summer-time MET-DST recurring last Sun Mar 2:00 last Sun Oct 3:00 +system mtu routing 1500 +! +! +no ip domain-lookup +ip domain-name cisco.tld +! +password encryption aes +! +! +! +! +! +! +! +spanning-tree mode pvst +spanning-tree extend system-id +! +vlan internal allocation policy ascending +! +ip tcp synwait-time 5 +ip ssh logging events +ip ssh version 2 +ip ssh dh min size 2048 +ip ssh dscp 56 +! +! +! +! +! +ip classless +no ip http server +no ip http secure-server +! +! +! +line con 0 + exec-timeout 60 0 + privilege level 15 + logging synchronous + stopbits 1 +line vty 0 4 + exec-timeout 60 0 + privilege level 15 + logging synchronous + login + length 0 + stopbits 1 +line vty 5 15 + exec-timeout 60 0 + logging synchronous + login + stopbits 1 +! +interface range f0/1-24 , g0/1-2 + shutdown +exit +! +interface range f0/1-18 + no cdp enable +exit +! +interface range f0/19-24 + no shutdown +exit +! +vtp mode transparent +! +exit +! +end +} +tclquit diff --git a/code/router/reset.tcl b/code/l3switch/reset.tcl similarity index 100% rename from code/router/reset.tcl rename to code/l3switch/reset.tcl diff --git a/code/router/base.cfg b/code/router/base.cfg deleted file mode 100644 index f0c4a05..0000000 --- a/code/router/base.cfg +++ /dev/null @@ -1,16 +0,0 @@ -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 diff --git a/code/switch/base.cfg b/code/switch/base.cfg deleted file mode 100644 index f0c4a05..0000000 --- a/code/switch/base.cfg +++ /dev/null @@ -1,16 +0,0 @@ -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 diff --git a/main.tex b/main.tex index 26fd193..4adef06 100644 --- a/main.tex +++ b/main.tex @@ -68,20 +68,26 @@ % \subsection{Router} - \subsubsection{File: base.cfg} -\inputminted[frame=lines,framesep=2mm,baselinestretch=1.2,bgcolor=lightgray,fontsize=\footnotesize,linenos,breaklines=true]{powershell}{code/router/base.cfg} +\inputminted[frame=lines,framesep=2mm,baselinestretch=1.2,bgcolor=lightgray,fontsize=\footnotesize,linenos,breaklines=true]{tcl}{code/router/base.cfg} \subsubsection{File: reset.tcl} -\inputminted[frame=lines,framesep=2mm,baselinestretch=1.2,bgcolor=lightgray,fontsize=\footnotesize,linenos,breaklines=true]{powershell}{code/router/reset.tcl} +\inputminted[frame=lines,framesep=2mm,baselinestretch=1.2,bgcolor=lightgray,fontsize=\footnotesize,linenos,breaklines=true]{tcl}{code/router/reset.tcl} -% - -\subsection{Switch} +% +\subsection{Layer 3 Switch} \subsubsection{File: base.cfg} -\inputminted[frame=lines,framesep=2mm,baselinestretch=1.2,bgcolor=lightgray,fontsize=\footnotesize,linenos,breaklines=true]{powershell}{code/switch/base.cfg} +\inputminted[frame=lines,framesep=2mm,baselinestretch=1.2,bgcolor=lightgray,fontsize=\footnotesize,linenos,breaklines=true]{tcl}{code/l3switch/base.cfg} \subsubsection{File: reset.tcl} -\inputminted[frame=lines,framesep=2mm,baselinestretch=1.2,bgcolor=lightgray,fontsize=\footnotesize,linenos,breaklines=true]{powershell}{code/switch/reset.tcl} +\inputminted[frame=lines,framesep=2mm,baselinestretch=1.2,bgcolor=lightgray,fontsize=\footnotesize,linenos,breaklines=true]{tcl}{code/l3switch/reset.tcl} + +% + +\subsection{Layer 2 Switch} +\subsubsection{File: base.cfg} +\inputminted[frame=lines,framesep=2mm,baselinestretch=1.2,bgcolor=lightgray,fontsize=\footnotesize,linenos,breaklines=true]{tcl}{code/l2switch/base.cfg} +\subsubsection{File: reset.tcl} +\inputminted[frame=lines,framesep=2mm,baselinestretch=1.2,bgcolor=lightgray,fontsize=\footnotesize,linenos,breaklines=true]{tcl}{code/l2switch/reset.tcl} % % END SWITCH CONFIG