diff --git a/chapter/layer3protocols.tex b/chapter/layer3protocols.tex index 71a2db9..a000aec 100644 --- a/chapter/layer3protocols.tex +++ b/chapter/layer3protocols.tex @@ -2,6 +2,10 @@ \input{chapter/section/intervlanrouting} +\chapter{DHCP} + +\input{chapter/section/dhcp} + \chapter{Protocols Layer 3} \input{chapter/section/routednetwork} diff --git a/chapter/section/dhcp.tex b/chapter/section/dhcp.tex new file mode 100644 index 0000000..3ed1fba --- /dev/null +++ b/chapter/section/dhcp.tex @@ -0,0 +1,42 @@ +\section{DHCP Process} + +\fig{dhcp/dhcpdiscoverprocess}{dhcpdiscoverprocess}{DHCP Discover Process} + +\subsection{DHCP Messages} + +\begin{itemize} + \item \textbf{DHCPDECLINE:} Message sent from the client to the server that the address is already in use. + \item \textbf{DHCPNAK:} The server sends a refusal to the client for request for configuration. + \item \textbf{DHCPRELEASE:} Client tells a server that it is giving up a lease. + \item \textbf{DHCPINFORM:} A client already has an IP address but is requesting other configuration parameters that the DHCP server is configured to deliver such as DNS address. +\end{itemize} + +\section{DHCP Options} + +\begin{itemize} + \item \textbf{43} Vendor-encapsulated option that enables vendors to have their own list of options on the server. + \item \textbf{69} SMTP server, if you want to specify available SMTP servers to the client. + \item \textbf{70} POP3 server, if you want to specify available POP3 servers to the client. + \item \textbf{150} TFTP server that enables your phones to access a list of TFTP servers. +\end{itemize} + +\section{DHCP Example Configuration} + +\subsection{Cisco} + +\begin{txt} +ip dhcp excluded-address 192.168.0.254 +! +ip dhcp pool LAN-1-POOL-DHCP + network 192.168.0.0 255.255.255.0 + default-router 192.168.0.254 + lease 2 ! set in days +\end{txt} + +When configuring a Layer 3 interface as a relay port for DHCP request for a subnet. Set the ip helper command on the interface with one \textit{or} more ip addresses. + +\begin{txt} +interface GigabitEthernet 0/3 + ip helper-address 192.168.220.220 + ip helper-address 192.168.222.222 +\end{txt} diff --git a/chapter/section/intervlanrouting.tex b/chapter/section/intervlanrouting.tex index 7eed6ba..d91ff3a 100644 --- a/chapter/section/intervlanrouting.tex +++ b/chapter/section/intervlanrouting.tex @@ -1 +1,93 @@ -\section{Vlan-to-vlan routing} \ No newline at end of file +\section{Vlan-to-vlan routing} + +\myquote{}{Guidance and Understanding of the art of Layer 3 networks. Routing between different slash 24\tsq{s}.\\ \textit{Aka. Inter-vlan routing.}} + +There are different ways to go \tsq{bout} Inter-vlan routing and doing it. + +\begin{itemize} + \item \textbf{Some are using:} + \begin{enumerate} + \item external router, + \item switch virtual interfaces\footnote{\texttt{Switches interface -> Vlan interfaces}}, + \item routed ports\footnote{\texttt{Routed interface -> Subinterfaces}}, + \item bridge virtual interface\footnote{\texttt{L3 bridging interface}} + \end{enumerate} + \item \textbf{Ways to do it:} + \begin{enumerate} + \item router-on-a-stick if the network is running collapsed core or not have a distribution switch in the middle. + \item (...) + \end{enumerate} +\end{itemize} + +\pagebreak + +\subsection{Interface configs} + +\subsubsection{Routed interfaces} + +\begin{txt} +interface GigabitEthernet 0/1.10 + encapsulation dot1q 10 + ip address 192.168.0.1 255.255.255.128 +! +interface GigabitEthernet 0/1.20 + encapsulation dot1q 20 + ip address 192.168.0.129 255.255.255.128 +\end{txt} + +\subsubsection{Switches interfaces} + +\begin{txt} +Vlan10 + name VLAN10 +Vlan20 + name VLAN20 +! +interface Vlan10 + ip address 192.168.1.1 255.255.255.128 +interface Vlan20 + ip address 192.168.1.129 255.255.255.128 +! +interface GigabitEthernet 0/2 + switchport mode trunk + switchport trunk encapsulation dot1q + switchport trunk allowed vlan 10,20 +\end{txt} + +\pagebreak + +\fig{network/routeronastick}{routeronastick}{\bsq{Router on a Stick} concept.} + +\pagebreak + +\subsection{? Troubleshooting ?} + +\begin{enumerate} + \item \textbf{Missing VLAN:} + \begin{itemize} + \item VLAN might not be defined across all the switches. + \item VLAN might not be enabled on the trunk ports. + \item Ports might not be in the right VLANs. + \end{itemize} + \item \textbf{Layer 3 interface misconfiguration:} + \begin{itemize} + \item Virtual interface might have the wrong IP address or subnet mask. + \item Virtual interface might not be up. + \item Virtual interface number might not match with the VLAN number. + \item Routing has to be enabled to route frames between VLAN. + \item Routing might not be enabled. + \end{itemize} + \item \textbf{Routing protocol misconfiguration:} + \begin{itemize} + \item Eyery interface or network needs to be added in the routing protocol. + \item The new interface might not be added to the routing protocol. + \item Routing protocol configuration is needed only if VLAN subnets need to communicate to the other routers, as previously + mentioned in this chapter. + \end{itemize} + \item \textbf{Host misconfiguration:} + \begin{itemize} + \item Host might not have the right IP address or subnet mask. + \item Each host has to have the default gateway that is the SVI or Layer 3 interface to communicate with other networks and VLAN. + \item Host might not be configured with the default gateway. + \end{itemize} +\end{enumerate} \ No newline at end of file diff --git a/commands.tex b/commands.tex index b97f2fb..f7685d0 100644 --- a/commands.tex +++ b/commands.tex @@ -50,6 +50,16 @@ {\footnotesize #2}} +\newcommand{\myquote}[2]{% + \sbox0{#1}% + \ifdim\wd0=0pt + {\epigraph{#2}{\textit{{\tiny \theauthor}}}} %if #1 is empty + \else + {\epigraph{#2}{\textit{#1}}} %if quote is cited + \fi +} + + % Enviroment @var txt % changes code styling to: in frame, white bg. \lstnewenvironment{txt}{\lstset{style=plaintxt}}{} diff --git a/img/dhcp/dhcpdiscoverprocess.png b/img/dhcp/dhcpdiscoverprocess.png new file mode 100644 index 0000000..504ef8d Binary files /dev/null and b/img/dhcp/dhcpdiscoverprocess.png differ diff --git a/img/network/routeronastick.png b/img/network/routeronastick.png new file mode 100644 index 0000000..88c742a Binary files /dev/null and b/img/network/routeronastick.png differ diff --git a/structure.tex b/structure.tex index 8239d6c..d7d50b8 100644 --- a/structure.tex +++ b/structure.tex @@ -37,6 +37,8 @@ \usepackage{inconsolata} \usepackage{blindtext} \usepackage{expdlist} +\usepackage{epigraph} % used to style quotes +\usepackage{titling} % makes available \thetitle \theauthor \thedate \bibliographystyle{unsrtnat} %styles list https://www.sharelatex.com/learn/Natbib_bibliography_styles @@ -101,8 +103,8 @@ showstringspaces=false, showtabs=false, tabsize=4, - abovecaptionskip=5em, - aboveskip=3em, + abovecaptionskip=3em, + aboveskip=1em, belowcaptionskip=5em, belowskip=3em, upquote=true, @@ -206,4 +208,8 @@ \renewcommand\theadalign{cb} \renewcommand\theadfont{\bfseries} \renewcommand\theadgape{\Gape[4pt]} -\renewcommand\cellgape{\Gape[4pt]} \ No newline at end of file +\renewcommand\cellgape{\Gape[4pt]} + +\def\tsq#1{\textquotesingle{#1}} +\def\bsq#1{%both single quotes + \lq{#1}\rq}