NetworkLabNotes/main.tex

358 lines
11 KiB
TeX
Raw Normal View History

2017-05-22 10:12:53 +00:00
% Declare Document Class
2017-05-22 15:38:51 +00:00
\documentclass[a4paper,12pt,twoside,twocolumn]{book}
\setlength{\columnsep}{2em}
2017-05-22 10:12:53 +00:00
% Latex Packages
\usepackage[T1]{fontenc}
2017-05-22 09:53:21 +00:00
\usepackage[utf8]{inputenc}
2017-05-22 10:12:53 +00:00
\usepackage{lmodern}
\usepackage{geometry}
2017-05-22 10:52:13 +00:00
\usepackage{listings}
\usepackage{color}
2017-05-22 10:12:53 +00:00
\usepackage{graphicx}
\usepackage{float}
2017-05-22 13:08:28 +00:00
\usepackage[english]{babel}
\usepackage{fancyhdr}
2017-05-22 14:02:02 +00:00
\usepackage{wrapfig}
2017-05-22 15:38:51 +00:00
\usepackage{array}
2017-05-22 16:21:13 +00:00
\usepackage{lipsum}
\usepackage{fancybox}
\usepackage{varwidth}
2017-05-22 10:12:53 +00:00
2017-05-22 10:52:13 +00:00
% 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}
2017-05-22 10:12:53 +00:00
% Path where images are located relative
% to the file main.tex
2017-05-22 14:02:02 +00:00
\graphicspath{{img/}{figures/}}
2017-05-22 10:12:53 +00:00
2017-05-22 10:22:33 +00:00
% Custom commands
2017-05-22 15:38:51 +00:00
% Usage: \pic[<pct-of-columnwidth>]{<path-to-file>}
\newcommand{\pic}[2][50]{
2017-05-22 14:02:02 +00:00
\begin{center}
\transparent{0.4}
2017-05-22 15:38:51 +00:00
\includegraphics[width=0.#1\columnwidth]{#2}
2017-05-22 14:02:02 +00:00
\end{center}
}
2017-05-22 15:38:51 +00:00
% Usage: \fig{<path-to-file>}{<label>}{<caption>}
\newcommand{\fig}[3]{
\begin{figure}[h]
\centering
\includegraphics[width=0.95\columnwidth]{#1}
\caption{#3}
\label{fig:#2}
\end{figure}
2017-05-22 13:08:28 +00:00
}
2017-05-22 10:12:53 +00:00
2017-05-22 16:21:13 +00:00
\newcommand{\notice}[2]{%
\shadowbox{%
\begin{varwidth}{\linewidth}
\texttt{\textbf{#1}}\\
#2
\end{varwidth}
}
}
2017-05-22 10:12:53 +00:00
% 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
2017-05-22 15:38:51 +00:00
\geometry{a4paper,margin=4em}
%\setlength{\parindent}{4em}
%\setlength{\parskip}{1em}
%\renewcommand{\baselinestretch}{2.0}
2017-05-22 13:08:28 +00:00
% Define fancy header and footer
\pagestyle{fancy}
\fancyhf{}
\fancyhead[LE,RO]{ZBC}
\fancyhead[RE,LO]{\rightmark}
\fancyfoot[CE,CO]{\leftmark}
\fancyfoot[LE,RO]{\thepage}
2017-05-22 15:38:51 +00:00
% width of header and footer rule is by default 0px.
2017-05-22 13:08:28 +00:00
\renewcommand{\headrulewidth}{2pt}
\renewcommand{\footrulewidth}{1pt}
2017-05-22 10:52:52 +00:00
2017-05-22 15:38:51 +00:00
% Use the roman numeric system for pagenumbers
\pagenumbering{roman}
2017-05-22 13:14:02 +00:00
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% BEGIN DOCUMENT %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2017-05-22 10:12:53 +00:00
2017-05-22 09:53:21 +00:00
\begin{document}
2017-05-22 10:12:53 +00:00
% Which info to insert on the title page
2017-05-22 13:08:28 +00:00
\title{r17dinh409}
2017-05-22 10:12:53 +00:00
\author{Christoffer Hansen <zbcchhan11 at zbc.dk>}
\date{May 22 - June 30, 2017}
% Make title page contents
\maketitle
\tableofcontents
2017-05-22 15:38:51 +00:00
% Define length between paragrahps
\setlength{\parskip}{1em}
% Define lineheight
\renewcommand{\baselinestretch}{1.15}
2017-05-22 13:08:28 +00:00
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% BEGIN CHAPTER: Base Configuration %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2017-05-22 10:12:53 +00:00
2017-05-22 13:08:28 +00:00
\chapter{Base Configuration}
\section{Cisco Lab}
2017-05-22 10:12:53 +00:00
2017-05-22 10:19:53 +00:00
% <!-- ROUTER -->
2017-05-22 10:12:53 +00:00
\subsection{Router}
2017-05-22 10:19:53 +00:00
\subsubsection{File: base.cfg}
2017-05-22 10:52:13 +00:00
%\lstinputlisting[language=tcl]{code/router/base.cfg}
2017-05-22 10:19:53 +00:00
\subsubsection{File: reset.tcl}
2017-05-22 10:52:13 +00:00
%\lstinputlisting[language=tcl]{code/router/reset.tcl}
2017-05-22 10:44:49 +00:00
2017-05-22 13:08:28 +00:00
\newpage
2017-05-22 10:44:49 +00:00
% <!-- LAYER 3 SWITCH -->
2017-05-22 10:12:53 +00:00
2017-05-22 10:44:49 +00:00
\subsection{Layer 3 Switch}
2017-05-22 13:08:28 +00:00
\subsubsection{FILE: base.cfg}
2017-05-22 10:52:13 +00:00
\lstinputlisting[language=tcl]{code/l3switch/base.cfg}
2017-05-22 13:08:28 +00:00
\subsubsection{FILE: reset.tcl}
2017-05-22 10:52:13 +00:00
\lstinputlisting[language=tcl]{code/l3switch/reset-tcl.txt}
2017-05-22 13:08:28 +00:00
\subsubsection{FILE: resetvlans.tcl}
\lstinputlisting[language=tcl]{code/l3switch/resetvlans-tcl.txt}
\newpage
2017-05-22 10:12:53 +00:00
2017-05-22 10:44:49 +00:00
% <!-- LAYER 2 SWITCH -->
2017-05-22 10:12:53 +00:00
2017-05-22 10:44:49 +00:00
\subsection{Layer 2 Switch}
2017-05-22 13:08:28 +00:00
\subsubsection{FILE: base.cfg}
2017-05-22 10:52:13 +00:00
\lstinputlisting[language=tcl]{code/l2switch/base.cfg}
2017-05-22 13:08:28 +00:00
\subsubsection{FILE: reset.tcl}
2017-05-22 10:52:13 +00:00
\lstinputlisting[language=tcl]{code/l2switch/reset-tcl.txt}
2017-05-22 13:08:28 +00:00
\subsubsection{FILE: resetvlans.tcl}
\lstinputlisting[language=tcl]{code/l2switch/resetvlans-tcl.txt}
2017-05-22 10:12:53 +00:00
2017-05-22 13:08:28 +00:00
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% BEGIN CHAPTER: Protocols %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{Protocols}
\section{Routed Network}
2017-05-22 13:08:28 +00:00
\subsection{OSPF}
\subsection{IS-IS}
\subsection{EIGRP}
\subsection{RIP}
\subsection{Static}
\subsection{BGP}
2017-05-22 15:38:51 +00:00
\newpage
\section{Switch Network}
2017-05-22 13:14:02 +00:00
2017-05-22 14:02:02 +00:00
\subsection{VTP}
2017-05-22 15:38:51 +00:00
\fig{vtp/implementing-vtp}{imp-vtp1}{VTP}
\subsubsection{VTP Modes}
The tree modes a VTP \textit{enabled} device can operate are
\begin{itemize}
\item Transparent
\item Server
\item Client
\end{itemize}
Of course you can \textit{disable} VTP altogether.
Key things to be aware of \textit{before} enabling VTP in your environment is to make double sure of only having 1 VTP domain. \textbf{If} 2 or more VTP domains exists. Be triple sure to separate them! As to avoid having an VTP server DB overridden with data from another VTP domain.
The three VTP modes \textit{operates} as follow
\begin{itemize}
\item Transparent
\begin{itemize}
\item Creates, modifies and deletes \textit{local} vlans only
\item Forwards advertisements
\item Does \textit{not} synchronizes vlan configurations.
\end{itemize}
\item Server
\begin{itemize}
\item Creates, modifies and deletes vlans
\item Sends and forwards advertisements
\item Synchronizes vlan configurations
\end{itemize}
\begin{itemize}
\item Cannot create, modify or delete vlans
\item Send and forwards advertisements
\item Synchronizes vlan configurations
\end{itemize}
\end{itemize}
\subsubsection{VTP Announcement}
VTP operates with announcements sent out in intervals. Summarized it amounts to
\begin{itemize}
\item 1 \textit{summary} announcement per 5th minute from the server
\item The summary announcement informs clients of the current revision
\item An announcement is sent out \textit{on the spot} when a change has been made on the VTP server
\end{itemize}
Do remember it is \textbf{only} the VTP server which has the vlan configuration stored \textbf{on disk}. All device clients and transparent nodes do only store the vlans delegated by VTP in memory.
\subsubsection{Common Issues}
\begin{itemize}
\item Different/Incompatible VTP versions
\item Wrong password
\item Incorrect mode name
\item No server set (all devices configured in transparent/client/vtp disabled mode)
\end{itemize}
\subsubsection{VTP Versions}
\begin{itemize}
\item Version 1
\item Version 2
\begin{itemize}
\item Version-dependent transparent mode
\item Consistencycheck
\item Token ring support
\item Unrecognized type-length-value support
\end{itemize}
\item Version 3 (not "yet" common)
\begin{itemize}
\item Extended VLAN support: Allow ranges are 1-1005,1018-2095. Not mentioned vlans ranges up to 4095 is still reserved.
\item Domain name is not automatically learned.
\item Better security.
\item Better database propagation.
\item MST now supported.
\end{itemize}
\end{itemize}
\subsubsection{VTP Pruning}
The art of only allowing the vlan traffic to flow on \textit{necessary} links.
This means if there are no clients in a vlan on a device. Then no traffic for the inactive vlans is send down-/upstream on the link in question.
\fig{vtp/vtp-pruning}{vtpruning1}{VTP Pruning}
\subsubsection{Security}
It is \textbf{strongly} recommended to enable the security features supported in VTP.
\textbf{Password:} MD5 hashing, Case-sensitive, Length between 8 and 64 chars.
2017-05-22 16:21:13 +00:00
\notice{VTP Scaling}{
2017-05-22 16:27:48 +00:00
As the network grows and grows and grows and grows some more over long/short timespans.
You will \textbf{for certain} come to cross-rode, where you \textbf{must} consider to
go away from using VTP in the network. The problems of managing an elderly network and
wiping and re-introducing nodes in the network. You \textbf{will} face the issue of a
wiped vlan database from the VTP domain.
2017-05-22 16:21:13 +00:00
}
2017-05-22 15:38:51 +00:00
\subsubsection{Example configuration}
\lstinputlisting{code/vtp/example.cfg}
\subsection{Channel Bundling (aka. EtherChannel, PortChannel)}
Channel bundling is the "art" of using multiple physical links as one single logical link in when viewed from the perspective of the forwarding plane.
Technologies:
\begin{itemize}
\item \textbf{PAgP:} The Cisco-only thingy
\item \textbf{LACP:} The IETF standard
\end{itemize}
\subsubsection{Example configuration}
\lstinputlisting{code/channelbundling/example.cfg}
2017-05-22 15:38:51 +00:00
\newpage
2017-05-22 13:14:02 +00:00
\section{Spanning Tree}
2017-05-22 13:08:28 +00:00
2017-05-22 13:14:02 +00:00
\subsection{STP}
\subsection{PVST}
\subsection{RPVST+}
\subsection{MTP}
2017-05-22 13:08:28 +00:00
2017-05-22 10:12:53 +00:00
2017-05-22 13:08:28 +00:00
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% BEGIN CHAPTER: Internet %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2017-05-22 10:12:53 +00:00
2017-05-22 13:08:28 +00:00
\chapter{Internet}
2017-05-22 10:12:53 +00:00
2017-05-22 13:08:28 +00:00
\section{BGP}
2017-05-22 10:12:53 +00:00
2017-05-22 15:38:51 +00:00
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% BEGIN LIST OF FIGURES %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewcommand{\listfigurename}{List of plots}
\listoffigures
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% BEGIN LIST OF TABLES %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewcommand{\listtablename}{Tables}
\listoftables
2017-05-22 14:02:02 +00:00
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% BEGIN REFERENCES %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bibliographystyle{unsrt}
\bibliography{unsrt}
2017-05-22 13:14:02 +00:00
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% END DOCUMENT %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2017-05-22 09:53:21 +00:00
\end{document}