\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{ValentinoJ4} \pdfinfo{ /Title (cisco-ios-cli.pdf) /Creator (Cheatography) /Author (ValentinoJ4) /Subject (Cisco IOS CLI Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{36A394} \definecolor{LightBackground}{HTML}{F2F9F8} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{Cisco IOS CLI Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{ValentinoJ4} via \textcolor{DarkBackground}{\uline{cheatography.com/198096/cs/41870/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}ValentinoJ4 \\ \uline{cheatography.com/valentinoj4} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Published 28th December, 2023.\\ Updated 28th December, 2023.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{2} \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Basic Device Configuration}} \tn % Row 0 \SetRowColor{LightBackground} Enter Privieleged Exec mode & Switch\textgreater{} {\bf{enable}} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} Leave Privieleged Exec mode & Switch\# {\bf{disable}} \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} Enter Global Configuration mode & Switch\# {\bf{configure terminal}} \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} Configuring a Device Name (Hostname) & Switch(config)\# {\bf{hostname}} NAME \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} Configuring a Console Port (Console) & Switch(config)\# {\bf{line console}} 0 \tn % Row Count 10 (+ 2) % Row 5 \SetRowColor{white} Configuring a Console Password (Console) & \seqsplit{Switch(config-line)\#} {\bf{password}} PASSWORD \tn % Row Count 13 (+ 3) % Row 6 \SetRowColor{LightBackground} Activating password checking on the Console Port & \seqsplit{Switch(config-line)\#} {\bf{login}} \tn % Row Count 16 (+ 3) % Row 7 \SetRowColor{white} Activating Username/Password checking on the Console Port & \seqsplit{Switch(config-line)\#} {\bf{login local}} \tn % Row Count 19 (+ 3) % Row 8 \SetRowColor{LightBackground} Creating a timeout on the Console Port & \seqsplit{Switch(config-line)\#} {\bf{exec-timeout}} MINUTES SECONDS \tn % Row Count 22 (+ 3) % Row 9 \SetRowColor{white} Backup one level & \seqsplit{Switch(config-line)\#} {\bf{exit}} \tn % Row Count 24 (+ 2) % Row 10 \SetRowColor{LightBackground} Backup one level & Switch(config)\# {\bf{exit}} \tn % Row Count 26 (+ 2) % Row 11 \SetRowColor{white} Backup all levels & Switch\# {\bf{CTRL + Z}} or {\bf{CTRL + C}} \tn % Row Count 28 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{The Show Commands to Know!}} \tn % Row 0 \SetRowColor{LightBackground} Shows information about the switch and its interfaces, RAM, NVRAM, flash, IOS, etc & Switch\# {\bf{show version}} \tn % Row Count 5 (+ 5) % Row 1 \SetRowColor{white} Shows the current configuration file stored in DRAM. & Switch\# {\bf{show running-config}} \tn % Row Count 8 (+ 3) % Row 2 \SetRowColor{LightBackground} Shows the configuration file stored in NVRAM which is used when the device boots. & Switch\# {\bf{show startup-config}} \tn % Row Count 13 (+ 5) % Row 3 \SetRowColor{white} Shows an overview of all interfaces, their physical status, protocol status and ip address if assigned. & Switch\# {\bf{show ip interface brief}} \tn % Row Count 19 (+ 6) % Row 4 \SetRowColor{LightBackground} Shows any Descriptions you've configured on your individual interfaces. & Switch\# {\bf{show interfaces description}} \tn % Row Count 23 (+ 4) % Row 5 \SetRowColor{white} Shows the status of all interfaces like connected or not, speed, duplex, trunk or access VLAN. & Switch\# {\bf{show interfaces status}} \tn % Row Count 28 (+ 5) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Awesome Shortcuts}} \tn % Row 0 \SetRowColor{LightBackground} Create shortcuts for long commands & Router(config)\# {\bf{alias exec}} SHIP {\bf{show ip interface brief}} \tn % Row Count 4 (+ 4) % Row 1 \SetRowColor{white} Configure a Banner Message that shows "everywhere" & Router(config)\#{\bf{ banner motd }}\$ THIS IS MY MESSAGE \$ \tn % Row Count 7 (+ 3) % Row 2 \SetRowColor{LightBackground} Encrypt all plain-text passwords stored on the devic & Router(config)\# {\bf{service password-encryption}} \tn % Row Count 10 (+ 3) % Row 3 \SetRowColor{white} Stop those "pop-up" messages from cutting through your CLI & Router(config)\#{\bf{ logging synchronous}} \tn % Row Count 13 (+ 3) % Row 4 \SetRowColor{LightBackground} Save your configuration & Router\# {\bf{wr }}or {\bf{write }}or {\bf{copy run star}} \tn % Row Count 16 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Some Fun "Studies"}} \tn % Row 0 \SetRowColor{LightBackground} LearnCisco (Configuring a Cisco Router) & \{\{link="https://www.learncisco.net/courses/icnd-1/lan-connections/configuring-a-router.html"\}\}A Very Thorough Deep Dive\{\{/link\}\} \tn % Row Count 7 (+ 7) % Row 1 \SetRowColor{white} Lock down your Cisco Router (from the NSA?) & \{\{link="https://www.cisco.com/E-Learning/bulk/public/celc/CRS/media/targets/resources\_mod07/7\_3\_4\_2RSCG.pdf"\}\}Hardening a Cisco Router\{\{/link\}\} \tn % Row Count 15 (+ 8) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Configuring a Switch Management Interface}} \tn % Row 0 \SetRowColor{LightBackground} Access a specific switch VLAN interface SVI (common VLAN 1) & Switch(config)\#{\bf{ interface VLAN}} \# \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} Configure a reachable IP address and Subnet Mask & Switch(config-if )\# {\bf{ip address }}ADDRESS MASK \tn % Row Count 6 (+ 3) % Row 2 \SetRowColor{LightBackground} Activate the Switch management interface & Switch(config-if )\#{\bf{ no shut}} \tn % Row Count 8 (+ 2) % Row 3 \SetRowColor{white} Exit the switch VLAN interface (SVI) & Switch(config-if )\#{\bf{ exit}} \tn % Row Count 10 (+ 2) % Row 4 \SetRowColor{LightBackground} Configure a default gateway for the switch to send upstream traffic out of the local LAN & Switch(config)\# {\bf{ip default-gateway }}IP-ADDRESS-OF-UPSTREAM-ROUTER \tn % Row Count 15 (+ 5) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Configuring a Router Network Interface}} \tn % Row 0 \SetRowColor{LightBackground} Locate your Router interfaces (learn their designations) & Router\# {\bf{show ip interface brief}} \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} Access Global Configuration mode & Router\# {\bf{configure terminal}} \tn % Row Count 5 (+ 2) % Row 2 \SetRowColor{LightBackground} Access a specific Router interface & Router(config)\#{\bf{ interface }}gi0/0/0 \tn % Row Count 7 (+ 2) % Row 3 \SetRowColor{white} Configure a reachable IP address and Subnet Mask & Router(config-if)\# {\bf{ip address }}ADDRESS MASK \tn % Row Count 10 (+ 3) % Row 4 \SetRowColor{LightBackground} Activate the Router interface & Router(config-if )\#{\bf{ no shut}} \tn % Row Count 12 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Configuring SSH for Remote Management}} \tn % Row 0 \SetRowColor{LightBackground} Configure the device hostname & Switch(config)\# {\bf{hostname }}NAME \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} Configure the Doman Name the device will operate on & Switch(config)\# {\bf{ip domain-name}} EXAMPLE.COM \tn % Row Count 5 (+ 3) % Row 2 \SetRowColor{LightBackground} Configure a username and password for remote management & Switch(config)\# {\bf{username}} admin {\bf{password}} cisco \tn % Row Count 8 (+ 3) % Row 3 \SetRowColor{white} Generate encryption keys to "obfuscate" the management traffic & Switch(config)\# {\bf{crypto key generate rsa}} \tn % Row Count 12 (+ 4) % Row 4 \SetRowColor{LightBackground} Configure a minimum of 1024 bits for encryption security & How many bits in the modulus {[}512{]}: 1024 \tn % Row Count 15 (+ 3) % Row 5 \SetRowColor{white} Define the SSH version to use (older versions have \seqsplit{exploits/vulnerabilities)} & Switch(config)\#{\bf{ ip ssh version}} 2 \tn % Row Count 19 (+ 4) % Row 6 \SetRowColor{LightBackground} Access the VTY lines (used for Telnet and SSH) & Switch(config)\#{\bf{ line vty }}0 4 \tn % Row Count 22 (+ 3) % Row 7 \SetRowColor{white} Activate SSH on the VTY lines & \seqsplit{Switch(config-line)\#} {\bf{transport input}} ssh \tn % Row Count 25 (+ 3) % Row 8 \SetRowColor{LightBackground} Require a username and password combo & \seqsplit{Switch(config-line)\#} {\bf{login local}} \tn % Row Count 28 (+ 3) % Row 9 \SetRowColor{white} Save your configuration & Switch\# {\bf{wr}} \tn % Row Count 30 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}