% Declare Document Class
\documentclass[a4paper,12pt,twoside]{book}

% Latex Packages
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{geometry}
\usepackage{listings}
\usepackage{color}
\usepackage{graphicx}
\usepackage{float}
\usepackage[english]{babel}
\usepackage{fancyhdr}

% Define color
\definecolor{codegreen}{rgb}{0,0.6,0}
\definecolor{codegray}{rgb}{0.5,0.5,0.5}
\definecolor{codepurple}{rgb}{0.58,0,0.82}
\definecolor{backcolour}{rgb}{0.95,0.95,0.92}

\lstdefinestyle{mystyle}{
    backgroundcolor=\color{backcolour},   
    commentstyle=\color{codegreen},
    keywordstyle=\color{magenta},
    numberstyle=\tiny\color{codegray},
    stringstyle=\color{codepurple},
    basicstyle=\footnotesize,
    breakatwhitespace=false,         
    breaklines=true,                 
    captionpos=b,                    
    keepspaces=true,                 
    numbers=left,                    
    numbersep=5pt,                  
    showspaces=false,                
    showstringspaces=false,
    showtabs=false,                  
    tabsize=4
}

\lstset{style=mystyle}

% Path where images are located relative
% to the file main.tex
\graphicspath{{img/}}

% Custom commands
% Usage: \pic{ [<pct-of-testwidt>] }{ <path-to-file> }
\newcommand{\pic}[2][25]{
    \begin{center}
        \transparent{0.4}
        \includegraphics[width=0.#1\textwidth]{#2}
    \end{center}
}
% Usage: \fig{ [<caption>] }{ <label> }{ <path-to-file> }
\newcommand{\fig}[3][]{
    \begin{figure}[h]
        \centering
        \includegraphics[width=0.25\textwidth]{#3}
        \caption{#1}
        \label{fig:#2}
    \end{figure}
}

% In which order to look after images in
% declared graphicspath{}'s
% 1. Low-quality JPG
% 2. Med-quality PNG
% 3. High-quality PDF
\DeclareGraphicsExtensions{.jpg,.png,.pdf}

% Package Params
\geometry{a4paper,margin=1in}

% Define fancy header and footer
\pagestyle{fancy}
\fancyhf{}
\fancyhead[LE,RO]{ZBC}
\fancyhead[RE,LO]{\rightmark}
\fancyfoot[CE,CO]{\leftmark}
\fancyfoot[LE,RO]{\thepage}

\renewcommand{\headrulewidth}{2pt}
\renewcommand{\footrulewidth}{1pt}


%
% BEGIN DOCUMENT
%
\begin{document}

% Which info to insert on the title page
\title{r17dinh409}
\author{Christoffer Hansen <zbcchhan11 at zbc.dk>}
\date{May 22 - June 30, 2017}
% Make title page contents
\maketitle

\tableofcontents

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                    %
% BEGIN CHAPTER: Base Configuration                  %
%                                                    %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\chapter{Base Configuration}

\section{Cisco Lab}

% <!-- ROUTER -->

\subsection{Router}
\subsubsection{File: base.cfg}
%\lstinputlisting[language=tcl]{code/router/base.cfg}
\subsubsection{File: reset.tcl}
%\lstinputlisting[language=tcl]{code/router/reset.tcl}

\newpage

% <!-- LAYER 3 SWITCH -->

\subsection{Layer 3 Switch}
\subsubsection{FILE: base.cfg}
\lstinputlisting[language=tcl]{code/l3switch/base.cfg}
\subsubsection{FILE: reset.tcl}
\lstinputlisting[language=tcl]{code/l3switch/reset-tcl.txt}
\subsubsection{FILE: resetvlans.tcl}
\lstinputlisting[language=tcl]{code/l3switch/resetvlans-tcl.txt}

\newpage

% <!-- LAYER 2 SWITCH -->

\subsection{Layer 2 Switch}
\subsubsection{FILE: base.cfg}
\lstinputlisting[language=tcl]{code/l2switch/base.cfg}
\subsubsection{FILE: reset.tcl}
\lstinputlisting[language=tcl]{code/l2switch/reset-tcl.txt}
\subsubsection{FILE: resetvlans.tcl}
\lstinputlisting[language=tcl]{code/l2switch/resetvlans-tcl.txt}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                    %
% BEGIN CHAPTER: Protocols                           %
%                                                    %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\chapter{Protocols}

\section{Routing}

\subsection{OSPF}
\subsection{IS-IS}
\subsection{EIGRP}
\subsection{RIP}
\subsection{Static}
\subsection{BGP}

\section{Switching}

\subsection{Spanning Tree}

\subsubsection{STP}
\subsubsection{PVST}
\subsubsection{RPVST+}
\subsubsection{MTP}
\subsubsection{VTP}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                    %
% BEGIN CHAPTER: Internet                            %
%                                                    %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\chapter{Internet}

\section{BGP}

%
% END DOCUMENT
%
\end{document}
