1
0
Fork 0
mirror of https://gitlab.com/netravnen/NetworkLabNotes.git synced 2024-11-26 19:27:57 +00:00

Starting writing chapter about LLDP and CDP

This commit is contained in:
chhan11 2017-06-04 19:16:36 +02:00
parent d362c3f440
commit 5489c73952
7 changed files with 195 additions and 19 deletions

View file

@ -31,25 +31,28 @@
\newacronym{igrp}{IGRP}{Interior Gateway Routing Protocol} \newacronym{igrp}{IGRP}{Interior Gateway Routing Protocol}
\newacronym{imap}{IMAP}{Internet Message Access Protocol} \newacronym{imap}{IMAP}{Internet Message Access Protocol}
\newacronym{ip}{IP}{Internet Protocol} \newacronym{ip}{IP}{Internet Protocol}
\newacronym{ipv4}{IPV4}{Internet Protocol v4} \newacronym{ipv4}{IPv4}{Internet Protocol v4}
\newacronym{ipv6}{IPV6}{Internet Protocol v6} \newacronym{ipv6}{IPv6}{Internet Protocol v6}
\newacronym{irc}{IRC}{Internet Relay Chat} \newacronym{irc}{IRC}{Internet Relay Chat}
\newacronym{isis}{ISIS}{Intermediate System to Intermediate System} \newacronym{isis}{IS-IS}{Intermediate System to Intermediate System}
\newacronym{isp}{ISP}{Internet Service Provider} \newacronym{isp}{ISP}{Internet Service Provider}
\newacronym{l2}{L2}{Layer 2} \newacronym{l2}{L2}{Layer 2}
\newacronym{l2vpn}{L2VPN}{Layer 2 Virtual Private Network} \newacronym{l2vpn}{L2VPN}{Layer 2 Virtual Private Network}
\newacronym{l3}{L3}{Layer 3} \newacronym{l3}{L3}{Layer 3}
\newacronym{lacp}{LACP}{Link Aggregation Protocol} \newacronym{lacp}{LACP}{Link Aggregation Protocol}
\newacronym{lan}{LAN}{Local Area Network} \newacronym{lan}{LAN}{Local Area Network}
\newacronym{lldp}{LLDP}{Link Layer Discovery Protocol}
\newacronym{mac}{MAC}{Media Access Control address} \newacronym{mac}{MAC}{Media Access Control address}
\newacronym{mkc}{MKC}{Mikkel Krøll} \newacronym{mkc}{MKC}{Mikkel Kr\char"00F8ll}
\newacronym{mpls}{MPLS}{Multiprotocol Label Switching} \newacronym{mpls}{MPLS}{Multiprotocol Label Switching}
\newacronym{mst}{MST}{Multiple Spanning Tree} \newacronym{mst}{MST}{Multiple Spanning Tree}
\newacronym{nms}{NMS}{Network Management Software}
\newacronym{ntp}{NTP}{Network Time Protocol} \newacronym{ntp}{NTP}{Network Time Protocol}
\newacronym{osi}{OSI}{Open Systems Interconnection} \newacronym{osi}{OSI}{Open Systems Interconnection}
\newacronym{ospf}{OSPF}{Open Shortest Path First} \newacronym{ospf}{OSPF}{Open Shortest Path First}
\newacronym{ospfv3}{OSPFV3}{Open Shortest Path First v3} \newacronym{ospfv3}{OSPFv3}{Open Shortest Path First v3}
\newacronym{pagp}{PAGP}{Port Aggregation Protocol} \newacronym{pagp}{PAGP}{Port Aggregation Protocol}
\newacronym{poe}{PoE}{Power over Ethernet}
\newacronym{pop3}{POP3}{Post Office Protocol} \newacronym{pop3}{POP3}{Post Office Protocol}
\newacronym{pvrst}{PVRST}{Per Vlan Rapid Spanning Tree} \newacronym{pvrst}{PVRST}{Per Vlan Rapid Spanning Tree}
\newacronym{pvrst+}{PVRST+}{Per Vlan Rapid Spanning Tree Plus} \newacronym{pvrst+}{PVRST+}{Per Vlan Rapid Spanning Tree Plus}
@ -72,7 +75,8 @@
\newacronym{tcn}{TCN}{Topology Change Notification} \newacronym{tcn}{TCN}{Topology Change Notification}
\newacronym{tcp}{TCP}{Transmission Control Protocol} \newacronym{tcp}{TCP}{Transmission Control Protocol}
\newacronym{tftp}{TFTP}{Trivial File Transfer Protocol} \newacronym{tftp}{TFTP}{Trivial File Transfer Protocol}
\newacronym{toc}{TOC}{Table Of Contents} \newacronym{tlv}{TLV}{Type, Length, Value}
\newacronym{toc}{ToC}{Table of Contents}
\newacronym{udld}{UDLD}{Unidirectional Link Detection} \newacronym{udld}{UDLD}{Unidirectional Link Detection}
\newacronym{udp}{UDP}{User Datagram Protocol} \newacronym{udp}{UDP}{User Datagram Protocol}
\newacronym{utc}{UTC}{Coordinated Universal Time} \newacronym{utc}{UTC}{Coordinated Universal Time}

View file

@ -1,3 +1,126 @@
\chapter{Campus Network}
\section{Discover Nodes}
Protocols to do link discovery on the network between nodes is commonly used
\begin{itemize}
\item incorporated in many \gls{nms} tools to support it's underling functionally like alerts triggering and monitoring,
\item when the ops people do debugging on the \gls{cli},
\item doing network discovery to find "what am I connected to ?"
\end{itemize}
Information by the protocols is only sent and processed locally. Information transmitted is not send beyond the local \gls{l2} link.
\newpage
\subsection{LLDP}
\myquote{\citealt{wiki:Link_Layer_Discovery_Protocol}}{The Link Layer Discovery Protocol (LLDP) is a vendor-neutral link layer protocol in the Internet Protocol Suite used by network devices for advertising their identity, capabilities, and neighbours on an IEEE 802 local area network, principally wired Ethernet.[1] The protocol is formally referred to by the IEEE as Station and Media Access Control Connectivity Discovery specified in IEEE 802.1AB[2] and IEEE 802.3-2012 section 6 clause 79.}
\gls{lldp} carries information about
\begin{enumerate}
\item System name,
\item System description,
\item Port name,
\item Port description,
\item \gls{vlan} name,
\item \gls{ip} mgmt addr,
\item System capabilities\footnote{Support for fx. switching, routing etc.},
\item \gls{mac}/PHY info,
\item MDI\footnote{MDI refers to modes in PoE} power,
\item Link aggregation.
\end{enumerate}
\gls{lldp} has the advantage over \gls{cdp} of being more customizable in regards to the use of \gls{tlv}s. \textbf{However} it has the drawback of not being as lightweight as \gls{cdp}.
\begin{itemize}
\item \itemtitle{Worth to remember}{about \gls{lldp} is the following}
\begin{itemize}
\item is unidirectional,
\item operates in advertising mode only,
\item does not try to obtain information from other nodes,
\item does not monitor link state changes between nodes,
\item uses \gls{l2} multicast to notify others of neighbouring nodes of its presence and properties,
\item will record \textit{all} obtained information from received \gls{lldp} frames.
\end{itemize}
\item \itemtitle{Frames}{Multicast addresses --- One of the following is used.\\Note the \textit{01} signifies a \gls{l2} multicast \gls{dst} address.}
\begin{enumerate}
\item 01:80:c2:00:00:0e,
\item 01:80:c2:00:00:03,
\item 01:80:c2:00:00:00.
\end{enumerate}
\item \itemtitle{Commonly exchanged information}{List includes both mandatory and optional fields.}
\begin{enumerate}
\item System name,
\item System description,
\item Port name,
\item Port description,
\item \gls{vlan} name,
\item \gls{ip} mgmt addr,
\item System capabilities\footnote{Support for fx. switching, routing etc.},
\item MDI\footnote{MDI refers to modes in PoE} power,
\item Link aggregation.
\end{enumerate}
\item \itemtitle{Timers}{Default timers for \gls{lldp} on Cisco equipment}
\begin{enumerate}
\item hello packet sent once per ½ minute.
\item hold timer is 2 minutes.
\end{enumerate}
\end{itemize}
\subsubsection{Configuration Example}
\begin{cisco}
! Enable lldp
! Beware lldp is enabled by default on select cisco platforms.
lldp run
!
! Ensure lldp is enables on select ports
interface range gi0/1-2
lldp transmit
lldp recieve
!
! Disable sending lldp packets on ports facing downstream
! to clients/workstations. But keep recieving lldp packets enabled
! so we can allways use the information for troubleshooting purpose.
interface range fa0/1-24
no lldp transmit
lldp recieve
\end{cisco}
\newpage
\subsection{CDP}
\myquote{\citealt{wiki:Cisco_Discovery_Protocol}}{Cisco Discovery Protocol (CDP) is a proprietary Data Link Layer protocol developed by Cisco Systems. It is used to share information about other directly connected Cisco equipment, such as the operating system version and IP address. CDP can also be used for On-Demand Routing, which is a method of including routing information in CDP announcements so that dynamic routing protocols do not need to be used in simple networks.}
\gls{cdp} functions my sending frame out the wire of all connected interfaces by default
\begin{itemize}
\item Sends frames to multicast addr 01-00-0c-cc-cc-cc\footnote{This multicast address is also used by cisco for \gls{vtp} messages},
\item by default a frame is shot out every 1 minute\footnote{The timer is adjusted in per x second},
\item no security is built-in by default so spoofing \gls{cdp} packets is not hard if the net ops people have forgotten to basic hardening
\begin{enumerate}
\item Taking up resources by filling up tables with invalid \gls{cdp} entries\cite{wiki:CDP_Spoofing} is possible,
\item can be prevented by fx. disabling \gls{cdp} on ports where is it unnecessary to have it enabled. Say client access ports,
\item precaution can be taken by only allowing \gls{cdp} packets on trusted network ports.
\end{enumerate}
\end{itemize}
\subsubsection{Configuration Example}
\begin{cisco}
! Enable CDP globally
cdp run
!
! Ensure cdp is enables on select ports
interface range gi0/1-2
cdp enable
!
! Disable CDP on ports facing downstream to clients/workstations
interface range fa0/1-24
no cdp enable
\end{cisco}
\chapter{Management} \chapter{Management}
\section{Network Mgmt} \section{Network Mgmt}

View file

@ -49,8 +49,14 @@
\DTMfetchTZminute{now} \DTMfetchTZminute{now}
} }
\newcommand{\itemtitle}[2]{\textbf{#1:}\\% \newcommand{\itemtitle}[2]{%
{\footnotesize #2}} \sbox0{#1}%
\ifdim\wd0=0pt
{\textbf{#1:}} %if #1 is empty
\else
{\textbf{#1:}\\{\footnotesize #2}}
\fi
}
\newcommand{\myquote}[2]{% \newcommand{\myquote}[2]{%
@ -69,4 +75,4 @@
% Enviroment @var cisco % Enviroment @var cisco
\lstnewenvironment{cisco}{\lstset{style=cisco}}{} \lstnewenvironment{cisco}{\lstset{language=cisco}}{}

View file

@ -81,7 +81,7 @@
% % % %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bibliography{references} \bibliography{references,references-wikipedia}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % % %

27
references-wikipedia.bib Normal file
View file

@ -0,0 +1,27 @@
@comment Please use:
@comment https://irl.github.io/bibwiki/
@comment when generating Wikipedia entriees for this DB file!
@misc{ wiki:Link_Layer_Discovery_Protocol,
author = "Wikipedia",
title = "{Link Layer Discovery Protocol} --- {W}ikipedia{,} The Free Encyclopedia",
year = "2017",
howpublished = {\url{http://en.wikipedia.org/w/index.php?title=Link\%20Layer\%20Discovery\%20Protocol&oldid=755990989}},
note = "[Online; accessed 04-June-2017]"
}
@misc{ wiki:Cisco_Discovery_Protocol,
author = "Wikipedia",
title = "{Cisco Discovery Protocol} --- {W}ikipedia{,} The Free Encyclopedia",
year = "2017",
howpublished = {\url{http://en.wikipedia.org/w/index.php?title=Cisco\%20Discovery\%20Protocol&oldid=779112658}},
note = "[Online; accessed 04-June-2017]"
}
@misc{ wiki:CDP_Spoofing,
author = "Wikipedia",
title = "{CDP Spoofing} --- {W}ikipedia{,} The Free Encyclopedia",
year = "2017",
howpublished = {\url{http://en.wikipedia.org/w/index.php?title=CDP\%20Spoofing&oldid=740946635}},
note = "[Online; accessed 04-June-2017]"
}

View file

@ -21,4 +21,4 @@
year = {2015}, year = {2015},
address = {Indianapolis, IN}, address = {Indianapolis, IN},
isbn = {978-1-58720-664-1} isbn = {978-1-58720-664-1}
} }

View file

@ -21,8 +21,6 @@
\usepackage[nottoc]{tocbibind} \usepackage[nottoc]{tocbibind}
\usepackage{url} \usepackage{url}
\usepackage[showisoZ]{datetime2} \usepackage[showisoZ]{datetime2}
%\usepackage{lipsum}
%\usepackage{titling}
\usepackage{transparent} \usepackage{transparent}
\usepackage{soul} \usepackage{soul}
\usepackage{caption} \usepackage{caption}
@ -40,6 +38,7 @@
\usepackage{epigraph} % used to style quotes \usepackage{epigraph} % used to style quotes
\usepackage{titling} % makes available \thetitle \theauthor \thedate \usepackage{titling} % makes available \thetitle \theauthor \thedate
\usepackage[toc,acronym,footnote,nomain]{glossaries} % Load the package with the acronym option \usepackage[toc,acronym,footnote,nomain]{glossaries} % Load the package with the acronym option
\usepackage{chngcntr}
\bibliographystyle{unsrtnat} %styles list https://www.sharelatex.com/learn/Natbib_bibliography_styles \bibliographystyle{unsrtnat} %styles list https://www.sharelatex.com/learn/Natbib_bibliography_styles
@ -126,18 +125,19 @@
\lstdefinelanguage{cisco}{ \lstdefinelanguage{cisco}{
keywords={ keywords={
cdp,
dhcp,
end, end,
hostname, hostname,
Interface int, interface,
ip, ip,
line, line,
lldp,
login, login,
network, network,
no, no,
router, router,
sh,
show, show,
shut,
shutdown, shutdown,
version, version,
vlan, vlan,
@ -145,21 +145,23 @@
}, },
keywordstyle=\color{blue}\bfseries, keywordstyle=\color{blue}\bfseries,
ndkeywords={ ndkeywords={
addr,
address, address,
aux, aux,
bgp, bgp,
con,
console, console,
dhcp, dhcp,
eigrp, eigrp,
g, enable,
fa,
FastEthernet,
gi,
GigabitEthernet, GigabitEthernet,
isis, isis,
ospf, ospf,
ospfv3, ospfv3,
pool, pool,
rip, rip,
run,
vty, vty,
}, },
ndkeywordstyle=\color{darkgray}\bfseries, ndkeywordstyle=\color{darkgray}\bfseries,
@ -220,3 +222,17 @@
\renewcommand*{\acronymname}{Abbreviations} \renewcommand*{\acronymname}{Abbreviations}
% Do not reset counter for footnotes at all
% through the document from start to finish.
% https://tex.stackexchange.com/questions/10448/continuous-footnote-numbering
\counterwithout{footnote}{chapter}
% Set footnote numeration
% https://www.sharelatex.com/learn/Footnotes
% This command need to be run AFTER
% "\counterwithout{footnote}{chapter}" for the
% changes to be able to take effect.
\renewcommand{\thefootnote}{\arabic{footnote}}