\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{Thatdudeoverthere} \pdfinfo{ /Title (networking-fundamentals.pdf) /Creator (Cheatography) /Author (Thatdudeoverthere) /Subject (Networking Fundamentals 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}{2E68A3} \definecolor{LightBackground}{HTML}{F1F5F9} \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{Networking Fundamentals Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{Thatdudeoverthere} via \textcolor{DarkBackground}{\uline{cheatography.com/118792/cs/28141/}}} \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}Thatdudeoverthere \\ \uline{cheatography.com/thatdudeoverthere} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Published 27th May, 2021.\\ Updated 27th May, 2021.\\ 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}{p{0.76 cm} x{2.66 cm} x{4.18 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Network Types}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{LAN}} & Local Area Network & A single home or office network \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} {\bf{WAN}} & Wide Area Network & Linking multiple resources or LANs - Multiple office networks \tn % Row Count 5 (+ 3) % Row 2 \SetRowColor{LightBackground} {\bf{MAN}} & Metropolitan Area Network & Linking multiple LANs - SOC, school networks, city networks \tn % Row Count 8 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{1.368 cm} x{3.116 cm} x{3.116 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Network Topologies}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Bus Topology}} & All computers are connected to a single cable & Antiquated process - still used in broadcast media \tn % Row Count 4 (+ 4) % Row 1 \SetRowColor{white} {\bf{Star Topology}} & Each node is connected to a switch & Most common network setup you will see \tn % Row Count 7 (+ 3) % Row 2 \SetRowColor{LightBackground} {\bf{Ring Topology}} & Each node is connected to one other. Reduces chances of packet collision & Rarely seen outside of a MAN or ISP \seqsplit{datacenter-to-datacenter} connection \tn % Row Count 12 (+ 5) % Row 3 \SetRowColor{white} {\bf{Mesh Topology}} & Each node has an independent connection to every other node on the network & Used by MSPs and ISPs for \seqsplit{highly-available} and fault tolerant networks. \tn % Row Count 17 (+ 5) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{1.672 cm} x{3.116 cm} x{2.812 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Network Cables - Copper}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Cable Type}} & {\bf{Max data transfer speed}} & {\bf{Max Operating Length}} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} {\bf{CAT5}} & 100 Mbps & 100 Meters \tn % Row Count 3 (+ 1) % Row 2 \SetRowColor{LightBackground} {\bf{CAT5e}} & 1 Gbps & 100 Meters \tn % Row Count 5 (+ 2) % Row 3 \SetRowColor{white} {\bf{CAT6}} & 10 Gbps & 55 Meters \tn % Row Count 6 (+ 1) % Row 4 \SetRowColor{LightBackground} {\bf{CAT6a}} & 10 Gbps & 100 Meters \tn % Row Count 8 (+ 2) % Row 5 \SetRowColor{white} {\bf{CAT7}} & 10 Gbps & 100 Meters \tn % Row Count 9 (+ 1) % Row 6 \SetRowColor{LightBackground} {\bf{CAT8}} & 40 Gbps & 30 Meters \tn % Row Count 10 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2.052 cm} x{1.976 cm} x{3.572 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Network Cables - Fiber}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Cable Type}} & {\bf{Max Speed/Distance}} & {\bf{Typical Use}} \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} {\bf{OM1}} - Orange Jacket & 10 Gbps/33 Meters & 100 Mbps Ethernet \tn % Row Count 6 (+ 3) % Row 2 \SetRowColor{LightBackground} {\bf{OM2}} - Orange Jacket & 10 Gbps/82 Meters & 1 Gbps Ethernet \tn % Row Count 9 (+ 3) % Row 3 \SetRowColor{white} {\bf{OM3}} - Aqua Jacket & 10 Gbps/300 Meters & 10 Gbps Ethernet \tn % Row Count 12 (+ 3) % Row 4 \SetRowColor{LightBackground} {\bf{OM4}} - Aqua Jacket & 10 Gbps/400 Meters & 100 Gbps Ethernet @ 150 meters \tn % Row Count 15 (+ 3) % Row 5 \SetRowColor{white} {\bf{OM5}} - Green Jacket & 10 Gbps/400 Meters & Improvements on OM4. It breaks down light wavelengths more efficiently. \tn % Row Count 19 (+ 4) % Row 6 \SetRowColor{LightBackground} {\bf{OS1}} - Yellow Jacket & up to 100 Gbps/10 km & Single mode fiber for connecting indoor nodes. Used in fiber internet connections and datacenters. \tn % Row Count 25 (+ 6) % Row 7 \SetRowColor{white} {\bf{OS2}} - Yellow Jacket & up to 100 Gbps/200 km & Single mode fiber for connecting infrastructure outdoors. Used for MANs, ISPs, or MSPs. \tn % Row Count 30 (+ 5) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{1.672 cm} x{2.28 cm} x{3.648 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{7 Layer OSI Model}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Layer}} & {\bf{Typical Use}} & {\bf{Protocols}} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} {\bf{Application}} & End User Layer & HTTP, FTP, SSH, DNS \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} {\bf{Presentation}} & Syntax Layer & SSL, SSH, IMAP, MPEG, JPEG \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} {\bf{Session}} & Sync \& Send Layer & APIs, Sockets \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} {\bf{Transport}} & End-to-end Connections & TCP, UDP \tn % Row Count 10 (+ 2) % Row 5 \SetRowColor{white} {\bf{Network}} & Packets & IP, ICMP, IPSec, IGMP \tn % Row Count 12 (+ 2) % Row 6 \SetRowColor{LightBackground} {\bf{Data Link}} & Frames & Ethernet, PPP, Switch \tn % Row Count 14 (+ 2) % Row 7 \SetRowColor{white} {\bf{Physical}} & Physical Structure & Fiber, Access Points, Copper Cabling \tn % Row Count 16 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{1.824 cm} x{2.888 cm} x{2.888 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{OSI Troubleshooting}} \tn % Row 0 \SetRowColor{LightBackground} \{\{noshy\}\}{\bf{Layer}} & {\bf{Command}} & {\bf{Purpose}} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \{\{noshy\}\}{\bf{Physical}} & `ip -br -c link` & Is your physical interface up? Gives you detailed information on your NICs and virtual NICs. \tn % Row Count 9 (+ 7) % Row 2 \SetRowColor{LightBackground} \{\{noshy\}\}{\bf{Data Link}} & `ip neighbor show` & Displays the Address Resolution Protocol (ARP) table. Shows the IP and MAC addresses of computers you can reach on the network. \tn % Row Count 18 (+ 9) % Row 3 \SetRowColor{white} \{\{noshy\}\}{\bf{Network}} & `ip -br -c address show` or `ip -br -c a'` & Displays your network cards, their connection status, the IP address and CIDR. Make sure you have a valid IP address on your LAN NIC. \tn % Row Count 27 (+ 9) % Row 4 \SetRowColor{LightBackground} & `ping \textless{}website or IP address\textgreater{}` & Ping the device you're trying to connect to, or ping a commonly used server like Google's DNS (8.8.8.8) . \tn % Row Count 34 (+ 7) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{1.824 cm} x{2.888 cm} x{2.888 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{OSI Troubleshooting (cont)}} \tn % Row 5 \SetRowColor{LightBackground} & `traceroute \textless{}website or IP address\textgreater{}` & Sends a packet out to a destination using Time to Live (TTL). The end result is a list of routers that the packet interacted with on the way to the destination \tn % Row Count 11 (+ 11) % Row 6 \SetRowColor{white} & `ns lookup \textless{}website name\textgreater{}` & Checks recognized DNS entries on your server. Make sure the IPs match up with results from ping \tn % Row Count 18 (+ 7) % Row 7 \SetRowColor{LightBackground} \{\{noshy\}\}{\bf{Transport}} & `ss -tunlp4` & {\emph{Socket Statistics}} gives you a list of connections and ports on your server. Use it to make sure you are able to connect to certain devices \{\{nl\}\} {\bf{-t}} ~~~~Show TCP ports \{\{nl\}\} {\bf{-u}} ~~~~Show UDP ports \{\{nl\}\} {\bf{-n}} ~~~~Do not try to resolve hostnames\{\{nl\}\} {\bf{-l}} ~~~~Show only listening ports\{\{nl\}\} {\bf{-p}} ~~~~Show processes that are using a particular socket\{\{nl\}\} {\bf{-4}} ~~~~Only show IPv4 sockets \tn % Row Count 54 (+ 36) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{1.824 cm} x{2.888 cm} x{2.888 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{OSI Troubleshooting (cont)}} \tn % Row 8 \SetRowColor{LightBackground} \{\{noshy\}\}{\bf{Session}} & SSH or RTP & Get a device to accept your SSH session or initialize an RTP session from a camera. Keep in mind, RTP is different from RTSP. \tn % Row Count 9 (+ 9) % Row 9 \SetRowColor{white} \{\{noshy\}\}{\bf{Presentation}} & HTML, RTSP & Connect to a camera's webpage, or query a camera stream through VLC. \tn % Row Count 14 (+ 5) % Row 10 \SetRowColor{LightBackground} \{\{noshy\}\}{\bf{Application}} & Using the program & Can you interact with a webpage? Can you view DS logs once it's running? Good! Then you've confirmed the {\emph{Application}} is up and running. \tn % Row Count 24 (+ 10) \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}{Network Hardware}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{\{\{bb\}\}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{2}{x{8.4cm}}{\{\{ac\}\} {\bf{Network Border}} \{\{bb\}\}} \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} {\bf{Firewall}} & Prevents unauthorized access into a LAN. \tn % Row Count 4 (+ 2) % Row 3 \SetRowColor{white} {\bf{Residential Gateway}} & "The wifi" - That little black box that people have near their TVs that they call: the internet. This will be the handoff from an ISP to your LAN or firewall. \tn % Row Count 12 (+ 8) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{\{\{nl\}\}\{\{bb\}\}} \tn % Row Count 13 (+ 1) % Row 5 \SetRowColor{white} \mymulticolumn{2}{x{8.4cm}}{\{\{ac\}\} {\bf{Network Core}}\{\{bb\}\}} \tn % Row Count 14 (+ 1) % Row 6 \SetRowColor{LightBackground} {\bf{Gateway}} & Provides compatibility between different networks. \tn % Row Count 17 (+ 3) % Row 7 \SetRowColor{white} {\bf{Router}} & Forwards data packets between different networks. They "direct traffic" typically received from outside networks. \tn % Row Count 23 (+ 6) % Row 8 \SetRowColor{LightBackground} {\bf{Switch}} & Connects devices together by using packet switching. Used for internal traffic. \tn % Row Count 27 (+ 4) % Row 9 \SetRowColor{white} {\bf{Wireless Access Point}} & The Wifi! This allows wireless devices to connect to a network rather than plugging into a switch directly. \tn % Row Count 33 (+ 6) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Network Hardware (cont)}} \tn % Row 10 \SetRowColor{LightBackground} {\bf{Patch Panel}} & You plug your computer into a wall port. The wall port is connected to a patch panel. The patch panel connects to the switch. This prevents a tech from running new cables through a wall every time a computer joins the network. \tn % Row Count 12 (+ 12) % Row 11 \SetRowColor{white} \mymulticolumn{2}{x{8.4cm}}{\{\{nl\}\}\{\{bb\}\}} \tn % Row Count 13 (+ 1) % Row 12 \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{\{\{ac\}\} {\bf{Network End Stations}}\{\{bb\}\}} \tn % Row Count 14 (+ 1) % Row 13 \SetRowColor{white} {\bf{Network Interface Controller (NIC)}} & The ethernet jack on a computer. \tn % Row Count 16 (+ 2) % Row 14 \SetRowColor{LightBackground} {\bf{Wireless Network Interface Controller}} & Same thing as a NIC, but it uses radio waves to connect to an access point instead of a cable. \tn % Row Count 21 (+ 5) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}