\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{jask\_skull (jask\_skull)} \pdfinfo{ /Title (network-concepts.pdf) /Creator (Cheatography) /Author (jask\_skull (jask\_skull)) /Subject (Network Concepts 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}{A3A3A3} \definecolor{LightBackground}{HTML}{F3F3F3} \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{Network Concepts Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{jask\_skull (jask\_skull)} via \textcolor{DarkBackground}{\uline{cheatography.com/147635/cs/32110/}}} \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}jask\_skull (jask\_skull) \\ \uline{cheatography.com/jask-skull} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Not Yet Published.\\ Updated 16th May, 2022.\\ 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}{x{2.48 cm} x{5.52 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{OSI Layers}} \tn % Row 0 \SetRowColor{LightBackground} Application Layer & Includes all the services of a user application, including the interaction with the end user. \{\{nl\}\}{\bf{Protocols:}} FTP, HTTP, SMTP \{\{nl\}\}{\bf{Devices:}} Hosts, Servers \tn % Row Count 7 (+ 7) % Row 1 \SetRowColor{white} \seqsplit{Presentation} Layer & Provides services to the application layer to deal with specific syntax, which is how data is presented to the end user \tn % Row Count 12 (+ 5) % Row 2 \SetRowColor{LightBackground} Session Layer & Provides services to the presentation layer to establish a session and exchange presentation layer data \tn % Row Count 16 (+ 4) % Row 3 \SetRowColor{white} Transport Layer & Includes services for end-to-end connection establishment and information delivery. \{\{nl\}\}{\bf{Protocols:}} TCP, UDP \{\{nl\}\}{\bf{Devices:}} Stateful firewalls \tn % Row Count 22 (+ 6) % Row 4 \SetRowColor{LightBackground} Network Layer & Includes the function necessary to transmit information across a network and provides abstraction on the underlying means of connection. \{\{nl\}\}{\bf{Protocol:}} IP \{\{nl\}\}{\bf{Devices:}} Router \tn % Row Count 29 (+ 7) % Row 5 \SetRowColor{white} Data Link Layer & Includes protocols and functions to transmit information over a link between two connected devices. \{\{nl\}\}{\bf{Protocols:}} Ethernet, PPP, ATM \{\{nl\}\}{\bf{Devices:}} Switches \tn % Row Count 36 (+ 7) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{2.48 cm} x{5.52 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{OSI Layers (cont)}} \tn % Row 6 \SetRowColor{LightBackground} Physical Layer & Provides services for the transmission of bits over the data link. \{\{nl\}\}{\bf{Protocols:}} Ethernet, cable, optical \{\{nl\}\}{\bf{Devices:}} Repeater \tn % Row Count 6 (+ 6) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{Encapsulation}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{8.4cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/jask-skull_1652694140_Example.jpg}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{{\bf{Encapsulation:}} Each layer protocol adds its own protocol header and passes the information to the lower-layer protocol \newline {\bf{Protocol Control Information (PCI):}} Is the information added by the protocol \newline {\bf{Protocol Data Unit (PDU):}} Is composed by the data produced at that layer plus the PCI for that layer \newline {\bf{Service Data Unit (SDU):}} A unit of data that has been passed down from a layer or sublayer to a lower layer} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{1.76 cm} x{6.24 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Ethernet Physical Layer}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{10BASE-T} & {\bf{IEEE standard:}} 802.3 (Ethernet) \{\{nl\}\}{\bf{Speed:}} 10 Mbps \{\{nl\}\}{\bf{Media:}} Twisted pair (copper) \{\{nl\}\}{\bf{Maximum Distance:}} 100 m \tn % Row Count 5 (+ 5) % Row 1 \SetRowColor{white} \seqsplit{100BASE-T} & {\bf{IEEE standard:}} 802.3u (FastEthernet) \{\{nl\}\}{\bf{Speed:}} 100 Mbps \{\{nl\}\}{\bf{Media:}} Twisted pair (copper) \{\{nl\}\}{\bf{Maximum Distance:}} 100 m \tn % Row Count 10 (+ 5) % Row 2 \SetRowColor{LightBackground} \seqsplit{1000BASE-T} & {\bf{IEEE standard:}} 802.3ab (GigaEthernet) \{\{nl\}\}{\bf{Speed:}} 1000 Mbps \{\{nl\}\}{\bf{Media:}} Twisted pair (copper) \{\{nl\}\}{\bf{Maximum Distance:}} 100 m \tn % Row Count 15 (+ 5) % Row 3 \SetRowColor{white} \seqsplit{1000BASE-LX} & {\bf{IEEE standard:}} 802.3z (GigaEthernet) \{\{nl\}\}{\bf{Speed:}} 1000 Mbps \{\{nl\}\}{\bf{Media:}} Long wavelength (single-mode fiber) \{\{nl\}\}{\bf{Maximum Distance:}} 5 km \tn % Row Count 20 (+ 5) % Row 4 \SetRowColor{LightBackground} \seqsplit{10GBASE-T} & {\bf{IEEE standard:}} 802.3an (10 GigaEthernet) \{\{nl\}\}{\bf{Speed:}} 10 Gbps \{\{nl\}\}{\bf{Media:}} Twisted pair (copper) \{\{nl\}\}{\bf{Maximum Distance:}} 100 m \tn % Row Count 25 (+ 5) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{Each standard name follows the format sTYPE-M \newline {\bf{s:}} The speed. For example, 1000 \newline {\bf{TYPE:}} The modulation type. For example, baseband {[}BASE{]} \newline {\bf{M:}} The information about the medium. Examples include T for twisted pair, F for fiber, L for long wavelength, and X for external sourced coding} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{1.76 cm} x{6.24 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Ethernet Medium Access Control}} \tn % Row 0 \SetRowColor{LightBackground} Half duplex & Two Ethernet devices share a common transmission medium. The access is controlled by implementing Carrier Sense Multiple Access with Collision Detection (CSMA/CD) \tn % Row Count 6 (+ 6) % Row 1 \SetRowColor{white} Full duplex & Two devices can transmit simultaneously because there is a dedicated channel allocated for the transmission. Because of that, there is no need to detect collisions or to wait before transmitting \tn % Row Count 13 (+ 7) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{CSMA/CD}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{8.4cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/jask-skull_1652694580_Example.jpg}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{{\bf{Carrier Sense Multiple Access/Collision Detection:}} \newline When a collision occurs, it is detected by CSMA/CD-enabled devices, which will then stop transmitting and will delay the transmission for a certain amount of time, called the backoff time. The jam signal is used by the station to signal that a collision occurred. All stations that can sense a collision are said to be in the same collision domain} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2.96 cm} x{5.04 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Ethernet Frame}} \tn % Row 0 \SetRowColor{LightBackground} Preamble & {\bf{Length in Bytes:}} 7 \{\{nl\}\}{\bf{Function:}} Used for the two stations for synchronization purposes \tn % Row Count 4 (+ 4) % Row 1 \SetRowColor{white} Start Frame Delimeter & {\bf{Length in Bytes:}} 1 \{\{nl\}\}{\bf{Function:}} Indicates the start of the Ethernet frame. This is always set to 10101011 \tn % Row Count 9 (+ 5) % Row 2 \SetRowColor{LightBackground} Destination Address & {\bf{Length in Bytes:}} 6 \{\{nl\}\}{\bf{Function:}} Contains the recipient address of the frame \tn % Row Count 13 (+ 4) % Row 3 \SetRowColor{white} Source Address & {\bf{Length in Bytes:}} 6 \{\{nl\}\}{\bf{Function:}} Contains the source of the frame \tn % Row Count 16 (+ 3) % Row 4 \SetRowColor{LightBackground} Length/Type & {\bf{Length in Bytes:}} 2 \{\{nl\}\}{\bf{Function:}} This field can contain either the length of the MAC Client Data (length interpretation) or the type code of the Layer 3 protocol transported in the frame payload (type interpretation) \tn % Row Count 26 (+ 10) % Row 5 \SetRowColor{white} MAC Client Data and Pad & {\bf{Length in Bytes:}} 46-1500 \{\{nl\}\}{\bf{Function:}} This field contains information being encapsulated at the Ethernet layer. The minimum length is 46 bytes and the maximum length depends on the type of Ethernet frame: \{\{nl\}\} - 1500 bytes for basic frames \{\{nl\}\} - 1504 bytes for Q-tagged frames \{\{nl\}\} - 1982 bytes for envelope frames \tn % Row Count 40 (+ 14) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{2.96 cm} x{5.04 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Ethernet Frame (cont)}} \tn % Row 6 \SetRowColor{LightBackground} Frame Check Sequence & {\bf{Length in Bytes:}} 4 \{\{nl\}\}{\bf{Function:}} This field is used by the receiving device to detect errors in transmission \tn % Row Count 5 (+ 5) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{1.44 cm} x{6.56 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Ethernet Addresses}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{Broadcast} & A broadcast MAC address is obtained by setting all 1s in the MAC address field. This results in an address like FFFF.FFFF.FFFF. A frame with a broadcast destination address is transmitted to all devices within a LAN \tn % Row Count 7 (+ 7) % Row 1 \SetRowColor{white} \seqsplit{Multicast} & A frame with a multicast destination MAC address is transmitted to all frames belonging to the specific group \tn % Row Count 11 (+ 4) % Row 2 \SetRowColor{LightBackground} \seqsplit{Unicast} & A unicast address is associated with a particular device's NIC or port. It is composed of two sections. The first 24 bits contain the Organizational Unique Identifier (OUI) assigned to an organization. The other portion of the MAC address can be assigned by the vendor itself \tn % Row Count 20 (+ 9) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{To transmit a frame, Ethernet uses source and destination addresses. The Ethernet addresses are called MAC addresses, or Extended Unique Identifier (EUI), and they are either 48 bits or 64 bits. The MAC address is usually expressed in hexadecimal. The following two ways are the ones used the most: \newline 01-23-45-67-89-ab (IEEE 802 notation) \newline 0123.4567.89ab (Cisco notation)} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{LAN Switches}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{8.4cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/jask-skull_1652696369_Example.jpg}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{{\bf{Collision Domain:}} Two or more stations needing to share the same medium. \newline {\bf{LAN Switch:}} Device that allows multiple stations to connect in full-duplex mode. This creates a separate collision domain for each of the ports.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{3.28 cm} x{4.72 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Switch Frame Fowarding}} \tn % Row 0 \SetRowColor{LightBackground} MAC address table & This table holds the link between a MAC address and the physical port of the switch where frames for that MAC address should be forwarded \tn % Row Count 6 (+ 6) % Row 1 \SetRowColor{white} Dynamic MAC address learning & This mechanism helps populating the MAC address table. When a switch receives an Ethernet frame on a port, it notes the source MAC address and inserts an entry in the MAC address table, marking that MAC address as reachable from that port \tn % Row Count 17 (+ 11) % Row 2 \SetRowColor{LightBackground} Ethernet Broadcast domain & A broadcast domain is formed by all devices connected to the same LAN switches. Broadcast domains are separated by network layer devices such as routers. An Ethernet broadcast domain is sometimes also called a subnet \tn % Row Count 27 (+ 10) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}