├── network_diagram.pdf ├── img ├── services │ ├── docker.png │ ├── pihole.png │ ├── wireguard.png │ ├── wordpress.png │ └── homeassistant.png └── devices │ ├── my-laptop-image.png │ ├── my-printer-image.png │ ├── my-router-image.png │ ├── my-ebook-reader-image.png │ ├── my-raspberry-pi-image.png │ └── my-video-game-console-image.png ├── network_diagram_with_images.pdf ├── doc └── network_diagram_with_images.png ├── .gitignore ├── README.md ├── network_diagram_with_images.tex ├── network_diagram.tex └── LICENSE.txt /network_diagram.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbugert/latex-network-diagram-template/HEAD/network_diagram.pdf -------------------------------------------------------------------------------- /img/services/docker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbugert/latex-network-diagram-template/HEAD/img/services/docker.png -------------------------------------------------------------------------------- /img/services/pihole.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbugert/latex-network-diagram-template/HEAD/img/services/pihole.png -------------------------------------------------------------------------------- /img/services/wireguard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbugert/latex-network-diagram-template/HEAD/img/services/wireguard.png -------------------------------------------------------------------------------- /img/services/wordpress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbugert/latex-network-diagram-template/HEAD/img/services/wordpress.png -------------------------------------------------------------------------------- /img/devices/my-laptop-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbugert/latex-network-diagram-template/HEAD/img/devices/my-laptop-image.png -------------------------------------------------------------------------------- /img/devices/my-printer-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbugert/latex-network-diagram-template/HEAD/img/devices/my-printer-image.png -------------------------------------------------------------------------------- /img/devices/my-router-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbugert/latex-network-diagram-template/HEAD/img/devices/my-router-image.png -------------------------------------------------------------------------------- /img/services/homeassistant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbugert/latex-network-diagram-template/HEAD/img/services/homeassistant.png -------------------------------------------------------------------------------- /network_diagram_with_images.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbugert/latex-network-diagram-template/HEAD/network_diagram_with_images.pdf -------------------------------------------------------------------------------- /doc/network_diagram_with_images.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbugert/latex-network-diagram-template/HEAD/doc/network_diagram_with_images.png -------------------------------------------------------------------------------- /img/devices/my-ebook-reader-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbugert/latex-network-diagram-template/HEAD/img/devices/my-ebook-reader-image.png -------------------------------------------------------------------------------- /img/devices/my-raspberry-pi-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbugert/latex-network-diagram-template/HEAD/img/devices/my-raspberry-pi-image.png -------------------------------------------------------------------------------- /img/devices/my-video-game-console-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbugert/latex-network-diagram-template/HEAD/img/devices/my-video-game-console-image.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Core latex/pdflatex auxiliary files: 2 | *.aux 3 | *.lof 4 | *.log 5 | *.lot 6 | *.fls 7 | *.out 8 | *.toc 9 | 10 | ## Intermediate documents: 11 | *.dvi 12 | *-converted-to.* 13 | # these rules might exclude image files for figures etc. 14 | # *.ps 15 | # *.eps 16 | *.pdf 17 | *.len 18 | 19 | ## Bibliography auxiliary files (bibtex/biblatex/biber): 20 | *.bbl 21 | *.bcf 22 | *.blg 23 | *-blx.aux 24 | *-blx.bib 25 | *.brf 26 | *.run.xml 27 | 28 | ## Build tool auxiliary files: 29 | *.fdb_latexmk 30 | *.synctex 31 | *.synctex.gz 32 | *.synctex.gz(busy) 33 | *.pdfsync 34 | 35 | ## Auxiliary and intermediate files from other packages: 36 | 37 | # TeXStudio 38 | .directory 39 | 40 | # algorithms 41 | *.alg 42 | *.loa 43 | 44 | # achemso 45 | acs-*.bib 46 | 47 | # amsthm 48 | *.thm 49 | 50 | # beamer 51 | *.nav 52 | *.snm 53 | *.vrb 54 | 55 | #(e)ledmac/(e)ledpar 56 | *.end 57 | *.[1-9] 58 | *.[1-9][0-9] 59 | *.[1-9][0-9][0-9] 60 | *.[1-9]R 61 | *.[1-9][0-9]R 62 | *.[1-9][0-9][0-9]R 63 | *.eledsec[1-9] 64 | *.eledsec[1-9]R 65 | *.eledsec[1-9][0-9] 66 | *.eledsec[1-9][0-9]R 67 | *.eledsec[1-9][0-9][0-9] 68 | *.eledsec[1-9][0-9][0-9]R 69 | 70 | # glossaries 71 | *.acn 72 | *.acr 73 | *.glg 74 | *.glo 75 | *.gls 76 | 77 | # gnuplottex 78 | *-gnuplottex-* 79 | 80 | # hyperref 81 | *.brf 82 | 83 | # knitr 84 | *-concordance.tex 85 | *.tikz 86 | *-tikzDictionary 87 | 88 | # listings 89 | *.lol 90 | 91 | # makeidx 92 | *.idx 93 | *.ilg 94 | *.ind 95 | *.ist 96 | 97 | # minitoc 98 | *.maf 99 | *.mtc 100 | *.mtc0 101 | 102 | # minted 103 | _minted* 104 | *.pyg 105 | 106 | # morewrites 107 | *.mw 108 | 109 | # nomencl 110 | *.nlo 111 | 112 | # sagetex 113 | *.sagetex.sage 114 | *.sagetex.py 115 | *.sagetex.scmd 116 | 117 | # sympy 118 | *.sout 119 | *.sympy 120 | sympy-plots-for-*.tex/ 121 | 122 | # todonotes 123 | *.tdo 124 | 125 | # xindy 126 | *.xdy 127 | 128 | # WinEdt 129 | *.bak 130 | *.sav 131 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Template for LaTeX-based Network Diagrams 2 | 3 | [![network diagram](doc/network_diagram_with_images.png)](network_diagram_with_images.pdf) 4 | 5 | * [Blogpost](https://mbugert.de/posts/2022-03-27-latex-home-network-diagram/) 6 | 7 | ## Getting started 8 | - One-liner for building the diagram: 9 | ```bash 10 | docker run --rm -it -v "$(pwd):/workdir" danteev/texlive latexmk -pdf network_diagram_with_images.tex 11 | ``` 12 | - The diagram relies on [tcolorboxes](https://www.ctan.org/pkg/tcolorbox) inside a [tikzpicture](https://www.ctan.org/pkg/pgf). Icons are from [fontawesome](https://fontawesome.com/v5/search?m=free), using the [fontawesome5](https://www.ctan.org/pkg/fontawesome5) package. 13 | - New hosts can be added quickly (just copy-paste what's there, and use find-replace to ensure node identifiers are unique). Positioning hosts and drawing edges between them needs to be done manually, which typically eats up the most time. :) 14 | 15 | ## License 16 | [CC BY 4.0](LICENSE.txt) 17 | 18 | ## Image credit 19 | - [e-Book Reader](img/devices/my-ebook-reader-image.png): Webysther, CC BY-SA 4.0 , via Wikimedia Commons, https://commons.wikimedia.org/wiki/File:Webysther_20170725034326_-_Kindle_Paperwhite_2%C2%B0_gera%C3%A7%C3%A3o_com_4GB.png 20 | - [Laptop](img/devices/my-laptop-image.png): Intel Free Press, CC BY-SA 2.0 , via Wikimedia Commons, https://commons.wikimedia.org/wiki/File:Lenovo_ThinkPad_X1_Ultrabook_(Nov_16,_2012).png 21 | - [Modem](img/devices/my-router-image.png): Evan-Amos, Public domain, via Wikimedia Commons, https://commons.wikimedia.org/wiki/File:Linksys-Wireless-G-Router.jpg 22 | - [Printer](img/devices/my-printer-image.png): David Vignoni / ICON KING (LGPL or LGPL ), via Wikimedia Commons, https://commons.wikimedia.org/wiki/File:Nuvola_devices_print_printer.png 23 | - [Raspberry Pi](img/devices/my-raspberry-pi-image.png): Gareth Halfacree from Bradford, UK, CC BY-SA 2.0 , via Wikimedia Commons, https://commons.wikimedia.org/wiki/File:Raspberry_Pi_3_B%2B_(26931245278).png 24 | - [Video Game Console](img/devices/my-video-game-console-image.png): Evan-Amos, modified by Gunnar.offel, Public domain, via Wikimedia Commons, https://commons.wikimedia.org/wiki/File:Nintendo-Switch-wJoyCons-BlRd-Standing-FL.png 25 | 26 | - [Docker](img/services/docker.png): dotCloud, Inc., Apache License 2.0 , via Wikimedia Commons, https://commons.wikimedia.org/wiki/File:Docker_(container_engine)_logo.svg 27 | - [Home Assistant](img/services/homeassistant.png): Jeremy Geltman, CC BY-SA 4.0 , via Wikimedia Commons, https://commons.wikimedia.org/wiki/File:Home_Assistant_Logo.svg 28 | - [pi-hole](img/services/pihole.png): fair use according to https://pi-hole.net/trademark-rules-and-brand-guidelines/ 29 | - [WireGuard](img/services/wireguard.png): CoreUI, CC BY 4.0 , via Wikimedia Commons, https://commons.wikimedia.org/wiki/File:Cib-wireguard_(CoreUI_Icons_v1.0.0).svg 30 | - [WordPress](img/services/wordpress.png): ™/®WordPress, GPL , via Wikimedia Commons, https://commons.wikimedia.org/wiki/File:Wordpress-Logo.svg -------------------------------------------------------------------------------- /network_diagram_with_images.tex: -------------------------------------------------------------------------------- 1 | % Home Network Diagram (with images) 2 | % Author: Michael Bugert 3 | % License: CC BY 4.0 4 | \documentclass{standalone} 5 | 6 | \usepackage[utf8]{inputenc} 7 | \usepackage[sfdefault]{noto} 8 | \usepackage[T1]{fontenc} 9 | \usepackage{enumitem} 10 | \usepackage[fixed]{fontawesome5} 11 | \usepackage{etoolbox} 12 | \usepackage{tcolorbox} 13 | \usepackage{tikz} 14 | \usepackage[hidelinks]{hyperref} 15 | 16 | \tcbuselibrary{skins,raster} 17 | \usetikzlibrary{positioning,matrix,fit,decorations.pathreplacing} 18 | 19 | \graphicspath{{img/}} 20 | 21 | % colors for subnetworks 22 | \definecolor{subnet-none}{HTML}{000000} 23 | \definecolor{subnet-home}{HTML}{E57400} 24 | \definecolor{subnet-guest}{HTML}{14C300} 25 | \definecolor{subnet-vpn}{HTML}{AD0022} 26 | \definecolor{docker-bright}{HTML}{0A97C4} 27 | \definecolor{docker-dark}{HTML}{088AB4} 28 | 29 | \tcbset{ 30 | skin=enhanced, 31 | boxrule=0.1em, 32 | left=0.25em, 33 | right=0.25em, 34 | % box with hostname and device specs 35 | host description box/.style={ 36 | width=19em, 37 | sidebyside, 38 | righthand ratio=0.4, 39 | fonttitle=\bfseries\large, 40 | fontupper=\small, 41 | fontlower=\small 42 | }, 43 | % tcbraster for network interfaces 44 | interfaces raster/.style={ 45 | raster columns=1, 46 | raster width=6.75em, 47 | % fix raster height to accomodate for fontawesome icon height differences 48 | raster height=4.25em, 49 | raster row skip=0.4em, 50 | raster every box/.style={ 51 | fontupper=\ttfamily, 52 | left=0em, 53 | right=0em, 54 | top=.15em, 55 | bottom=.15em, 56 | valign=center 57 | } 58 | }, 59 | % tcbraster for host services 60 | services raster/.style={ 61 | raster columns=1, 62 | boxrule=0.1em, 63 | raster width=14em, 64 | raster row skip=0.4em, 65 | raster every box/.style={ 66 | left=0em, 67 | right=0em, 68 | top=.15em, 69 | bottom=.15em, 70 | fontupper=\small, 71 | boxrule=0.1em 72 | } 73 | }, 74 | % box around host services: 75 | % Never drawn, only used as a container. Width is set to the same width as "services". If width is not specified, the box would extend much further towards the right because the default width is \linewidth (uncomment 'blankest' to see it). 76 | services box/.style={ 77 | blankest, 78 | width=14em 79 | }, 80 | % box around dockerized host services 81 | dockerized box/.style={ 82 | title={Dockerized\hfill\includegraphics[height=12pt]{services/docker}}, 83 | fonttitle=\bfseries, 84 | colframe=docker-dark, 85 | colback=docker-bright, 86 | left=0.25em, 87 | right=0.25em 88 | }, 89 | % box around devices with less details 90 | devices box/.style={ 91 | width=20em, 92 | fonttitle=\bfseries\large, 93 | fontupper=\small, 94 | attach boxed title to top left, 95 | boxed title style={frame hidden, opacityback=0.0, left=0em}, 96 | colback=white, 97 | coltitle=black!75!white 98 | }, 99 | % tcbraster for devices with less details 100 | devices raster/.style={ 101 | raster columns=1, 102 | boxrule=0.1em, 103 | raster width=20em, 104 | raster row skip=0.4em, 105 | raster every box/.style={ 106 | left=0em, 107 | right=0em, 108 | top=.15em, 109 | bottom=.15em, 110 | fontupper=\small, 111 | boxrule=0.1em, 112 | height=3em, 113 | valign=center 114 | } 115 | } 116 | } 117 | 118 | \tikzset{ 119 | single icon/.style={ 120 | font={\fontsize{34}{38}\selectfont} 121 | }, 122 | host description/.style={ 123 | }, 124 | % box drawn around all bits defining a host using tikz fit 125 | host box/.style={ 126 | inner sep=0.5em, 127 | draw=black!75!white, 128 | fill=white, 129 | rounded corners, 130 | line width=0.1em 131 | }, 132 | % box drawn around all hosts defining a region using tikz fit 133 | region box/.style={ 134 | inner sep=2em, 135 | rounded corners=2em, 136 | line width=0.1em, 137 | fill=#1!5!white 138 | }, 139 | region descriptor/.style={ 140 | outer sep=0, 141 | execute at begin node={\fontsize{7em}{7em}\selectfont\scshape}, 142 | color=#1!15!white 143 | }, 144 | % tag for marking devices or services as DNS, DHCP, etc. with a customized color 145 | tag/.style={ 146 | draw=none, 147 | fill=#1, 148 | rectangle, 149 | rounded corners=2pt, 150 | outer sep=3pt, 151 | font=\bfseries\scriptsize, 152 | text=white 153 | }, 154 | % connection types 155 | generic/.style={ 156 | solid, 157 | line width=0.2em, 158 | rounded corners 159 | }, 160 | ethernet/.style={ 161 | generic 162 | }, 163 | wifi/.style={ 164 | generic, 165 | dashed, 166 | }, 167 | vpn/.style={ 168 | generic, 169 | decoration={ 170 | waves, 171 | radius=0.8em, 172 | segment length=.55em, 173 | angle=30 174 | } 175 | } 176 | } 177 | 178 | % commands to show device and service icons at fixed size, etc. 179 | \newcommand{\interfaceImage}[1]{% 180 | \raisebox{-.1\height}{\includegraphics[height=12pt]{#1}}% 181 | } 182 | \newcommand{\deviceImage}[1]{% 183 | \includegraphics[width=5em, height=3em, keepaspectratio]{devices/#1}% 184 | } 185 | \newcommand{\deviceImageInline}[1]{% 186 | \raisebox{-.25\height}{% 187 | \parbox[t]{2em}{% 188 | \centering% 189 | \includegraphics[width=2em, height=2em, keepaspectratio]{devices/#1}% 190 | }% 191 | }% 192 | } 193 | \newcommand{\ip}[2]{% 194 | \textbf{\textcolor{#2}{#1}} 195 | } 196 | 197 | % clickable URLs shown without protocol 198 | \newcommand{\https}[1]{% 199 | \href{https://#1}{\nolinkurl{#1}}% 200 | } 201 | \newcommand{\http}[1]{% 202 | \href{http://#1}{\nolinkurl{#1}}% 203 | } 204 | 205 | % usage: \service{image}{textual description}{url} 206 | \newcommand{\service}[3]{% 207 | \ifblank{#1}{% 208 | \hspace{2em}% 209 | }{% 210 | \raisebox{-.3\height}{% 211 | \includegraphics[height=2em]{services/#1}% 212 | }\hspace{.5em}% 213 | }% 214 | \parbox[m]{10em}{% 215 | #2% 216 | \ifblank{#3}{}{% 217 | \newline% 218 | \tiny\textcolor{gray}{#3}% 219 | }% 220 | } 221 | } 222 | 223 | \newcommand{\planned}{\hfill\scriptsize\textcolor{black!60}{\textit{(planned)}}} 224 | \newcommand{\temporary}{\hfill\scriptsize\textcolor{black!60}{\textit{(temporary)}}} 225 | 226 | \begin{document} 227 | 228 | % remember picture is needed to retain positions of tcolorboxes (otherwise all edges will be misplaced) 229 | \begin{tikzpicture}[remember picture] 230 | \pgfdeclarelayer{regions} 231 | \pgfdeclarelayer{hostboxes} 232 | \pgfsetlayers{regions,hostboxes,main} 233 | 234 | % --------------- start internet --------------- 235 | \node[single icon, label=above:Internet] (internet) {\faIcon{globe}}; 236 | \path (internet) -- (0,-2) coordinate[name=below-internet]; 237 | % --------------- end internet --------------- 238 | 239 | % --------------- start ISP --------------- 240 | \node[single icon, left=16em of below-internet, label=below:ISP] (isp-home) {\faIcon{building}}; 241 | % --------------- end ISP --------------- 242 | 243 | % --------------- start router --------------- 244 | % host description 245 | \node[host description, below left=12em of isp-home] (router-description) {% 246 | \begin{tcolorbox}[ 247 | adjusted title=router, 248 | host description box 249 | ] 250 | \ip{192.168.0.1}{subnet-home} 251 | 252 | \tcblower 253 | \deviceImage{my-router-image} 254 | 255 | HomeBox CM 3000 256 | \end{tcolorbox} 257 | }; 258 | 259 | % services 260 | \node[ 261 | below=0em of router-description.south west, 262 | anchor=north west 263 | ] (router-services) { 264 | }; 265 | 266 | % network interfaces 267 | \node[anchor=north] at (router-services.north east -| router-description.east) (router-interfaces) { 268 | \begin{tcbitemize}[interfaces raster] 269 | \tcbitem[remember as=router-modem] modem\hfill\faIcon{grip-lines} 270 | \tcbitem[remember as=router-eth0] eth0..3\hfill\faIcon{ethernet} 271 | \tcbitem[remember as=router-wlan0] wlan0\hfill\faIcon{broadcast-tower} 272 | \tcbitem[remember as=router-wlan1] wlan1\hfill\faIcon{broadcast-tower} 273 | \end{tcbitemize} 274 | }; 275 | 276 | % draw box around all parts defining a host 277 | \begin{pgfonlayer}{hostboxes} 278 | \node[ 279 | host box, 280 | fit=(router-description.center) (router-services.south) (router-services.west) (router-interfaces.south) 281 | ] (router-host-box) {}; 282 | \end{pgfonlayer} 283 | % --------------- end router --------------- 284 | 285 | 286 | % --------------- start printer --------------- 287 | \node[host description, right=18em of router-description] (printer-description) {% 288 | \begin{tcolorbox}[ 289 | host description box, 290 | remember as=printer 291 | ] 292 | \ip{192.168.0.3}{subnet-home} 293 | 294 | \tcblower 295 | \deviceImage{my-printer-image} 296 | 297 | InkPrint\\ 298 | E-7800 299 | \end{tcolorbox} 300 | }; 301 | % --------------- end printer --------------- 302 | 303 | 304 | % --------------- start raspberrypi --------------- 305 | % host description 306 | \node[host description, below=of printer-description] (raspberrypi-description) {% 307 | \begin{tcolorbox}[ 308 | adjusted title=raspberrypi, 309 | host description box 310 | ] 311 | \ip{192.168.0.2}{subnet-home} 312 | \vspace{\baselineskip} 313 | 314 | \begin{tabular}{@{}ll@{}} 315 | \faIcon{compact-disc} & Pi OS buster \\ 316 | \faIcon{memory} & 1GB \\ 317 | \faIcon{hdd} & 32GB \\ 318 | \end{tabular} 319 | 320 | \tcblower 321 | \deviceImage{my-raspberry-pi-image} 322 | 323 | RPi 3B+ 324 | \end{tcolorbox} 325 | }; 326 | 327 | % services 328 | \node[ 329 | below=0em of raspberrypi-description.south east, 330 | anchor=north east 331 | ] (raspberrypi-services) { 332 | \begin{tcboxedraster}[services raster]{services box} 333 | \tcbox[enhanced, remember as=raspberrypi-pihole]{\service{pihole}{pi-hole}{\http{pi-hole.internal.lan}}} 334 | \begin{tcboxedraster}[services raster]{dockerized box} 335 | \tcbox{\service{homeassistant}{Home Assistant}{\http{hass.internal.lan}}} 336 | \end{tcboxedraster} 337 | \end{tcboxedraster} 338 | }; 339 | 340 | % service tags 341 | \node[anchor=east, tag=subnet-home] at (raspberrypi-pihole.east) {DNS}; 342 | 343 | % network interfaces 344 | \node[anchor=north] at (raspberrypi-services.north west -| raspberrypi-description.west) (raspberrypi-interfaces) { 345 | \begin{tcbitemize}[interfaces raster] 346 | \tcbitem[remember as=raspberrypi-eth0] \faIcon{ethernet}\hfill eth0 347 | \end{tcbitemize} 348 | }; 349 | 350 | % draw box around all parts defining a host 351 | \begin{pgfonlayer}{hostboxes} 352 | \node[ 353 | host box, 354 | fit=(raspberrypi-description.center) (raspberrypi-services.south) (raspberrypi-services.east) (raspberrypi-interfaces.south) 355 | ] (raspberrypi-host-box) {}; 356 | \end{pgfonlayer} 357 | % --------------- end raspberrypi --------------- 358 | 359 | % --------------- start guest devices --------------- 360 | \node[host description, below=4em of router-host-box.south, anchor=north, inner sep=0em] (guest-devices) { 361 | \begin{tcboxedraster}[devices raster]{% 362 | devices box, 363 | title={Guest Devices\hspace{1em}\ip{192.168.1.0/24}{subnet-guest}}, 364 | remember as=guest-devices-raster} 365 | \tcbox{\deviceImageInline{my-video-game-console-image} Video Game Console} 366 | \tcbox{\deviceImageInline{my-ebook-reader-image} E-Book Reader} 367 | \tcbox{\textit{... more ...}} 368 | \end{tcboxedraster} 369 | }; 370 | % --------------- end guest devices --------------- 371 | 372 | 373 | % --------------- start laptop --------------- 374 | % host description 375 | \node[host description, below=of raspberrypi-host-box.south] (laptop-description) {% 376 | \begin{tcolorbox}[ 377 | adjusted title=laptop, 378 | host description box 379 | ] 380 | \ip{192.168.0.4}{subnet-home} 381 | \vspace{\baselineskip} 382 | 383 | \begin{tabular}{@{}ll@{}} 384 | \faIcon{compact-disc} & Mint 20.3 \\ 385 | \faIcon{memory} & 32GB \\ 386 | \faIcon{hdd} & 1TB \\ 387 | \end{tabular} 388 | 389 | \tcblower 390 | \deviceImage{my-laptop-image} 391 | 392 | Laptop Z680 393 | \end{tcolorbox} 394 | }; 395 | 396 | % services 397 | \node[ 398 | below=0em of laptop-description.south east, 399 | anchor=north east 400 | ] (laptop-services) { 401 | \begin{tcboxedraster}[services raster]{services box} 402 | \tcbox{\service{wireguard}{wireguard}{}} 403 | \end{tcboxedraster} 404 | }; 405 | 406 | % network interfaces 407 | \node[anchor=north] at (laptop-services.north west -| laptop-description.west) (laptop-interfaces) { 408 | \begin{tcbitemize}[interfaces raster] 409 | \tcbitem[remember as=laptop-enp0s25] \faIcon{ethernet}\hfill enp0s25 410 | \tcbitem[remember as=laptop-wlp3s0] \faIcon{broadcast-tower}\hfill wlp3s0 411 | \tcbitem[remember as=laptop-wg0] \faIcon{dragon}\hfill wg0 412 | \end{tcbitemize} 413 | }; 414 | 415 | % draw box around all parts defining a host 416 | \begin{pgfonlayer}{hostboxes} 417 | \node[ 418 | host box, 419 | fit=(laptop-description.center) (laptop-services.south) (laptop-services.east) (laptop-interfaces.south) 420 | ] (laptop-host-box) {}; 421 | \end{pgfonlayer} 422 | % --------------- end laptop --------------- 423 | 424 | 425 | % --------------- start vps --------------- 426 | % host description 427 | \node[host description, right=65em of router-description.north east, anchor=north] (vps-description) {% 428 | \begin{tcolorbox}[ 429 | adjusted title=vps, 430 | host description box 431 | ] 432 | \ip{11.22.33.44}{subnet-none} 433 | \vspace{\baselineskip} 434 | 435 | \begin{tabular}{@{}ll@{}} 436 | \faIcon{compact-disc} & Debian 11 \\ 437 | \faIcon{memory} & 4GB \\ 438 | \faIcon{hdd} & 64GB \\ 439 | \end{tabular} 440 | 441 | \tcblower 442 | %\deviceImage{my-hoster-image} 443 | 444 | HyperSpeed Flex Z25 445 | \end{tcolorbox} 446 | }; 447 | 448 | % services 449 | \node[ 450 | below=0em of vps-description.south east, 451 | anchor=north east 452 | ] (vps-services) { 453 | \begin{tcboxedraster}[services raster]{services box} 454 | \begin{tcboxedraster}[services raster]{dockerized box} 455 | \tcbox{\service{wireguard}{wireguard}{}} 456 | \tcbox{\service{wordpress}{WordPress \planned{}}{}} 457 | \end{tcboxedraster} 458 | \end{tcboxedraster} 459 | }; 460 | 461 | % network interfaces 462 | \node[anchor=north] at (vps-services.north west -| vps-description.west) (vps-interfaces) { 463 | \begin{tcbitemize}[interfaces raster] 464 | \tcbitem[remember as=vps-eth0] \faIcon{ethernet}\hfill{}eth0 465 | \tcbitem[remember as=vps-wg0] \faIcon{dragon}\hfill{}wg0 466 | \end{tcbitemize} 467 | }; 468 | 469 | % draw box around all parts defining a host 470 | \begin{pgfonlayer}{hostboxes} 471 | \node[ 472 | host box, 473 | fit=(vps-description.center) (vps-services.south) (vps-services.east) (vps-interfaces.south) 474 | ] (vps-host-box) {}; 475 | \end{pgfonlayer} 476 | % --------------- end vps --------------- 477 | 478 | 479 | % --------------- start legend --------------- 480 | \matrix[ 481 | anchor=north west, 482 | yshift=2em, 483 | matrix of nodes, 484 | row sep=-0.1em, 485 | every node/.style={anchor=west}, 486 | host box, 487 | font=\small 488 | ] at (router-description.west |- internet) (legend) { 489 | & {\Large\sffamily\bfseries Legend} \\ 490 | \draw[ethernet] (0,0) -- (0.75,0); & Ethernet \\ 491 | \draw[wifi] (0,0) -- (0.75,0); & Wifi \\ 492 | \draw[vpn, decorate] (0,0) -- (0.75,0); & VPN \\ 493 | \draw[generic] (0,0) --(0.75,0); & Other \\ 494 | }; 495 | \node[below=1em of legend.south west, anchor=north west, text width=8em, font=\small] {last updated:\\\today}; 496 | % --------------- end legend --------------- 497 | 498 | 499 | % --------------- start network regions --------------- 500 | \begin{pgfonlayer}{regions} 501 | % Home 502 | \node[ 503 | region box=blue, 504 | fit=(router-host-box.west) (router-description.north) (raspberrypi-host-box.east) (laptop-host-box.south) 505 | ] (home-box) {}; 506 | \node[region descriptor=blue, above, anchor=south west, outer sep=1.5em] at (home-box.south west) {Home}; 507 | 508 | % Remote 509 | \node[ 510 | region box=red, 511 | fit=(vps-eth0.west) (vps-description.north west) (vps-host-box.south east) 512 | ] (remote-box) {}; 513 | \node[region descriptor=red, left, anchor=north east] at (remote-box.south east) {Remote}; 514 | \end{pgfonlayer} 515 | % --------------- end network regions --------------- 516 | 517 | 518 | % --------------- start network connections --------------- 519 | \begin{scope}[generic] 520 | \draw (internet) -- (below-internet); 521 | \draw (isp-home) -| (below-internet); 522 | \draw (vps-eth0.west) -- ++(-2,0) |- (below-internet) -- ++(0,1); 523 | \draw (router-modem.east) -- ++(1,0) |- (isp-home); 524 | 525 | % connections inside the router 526 | \draw (router-modem.west) ++(0,0.15) -- ++(-0.5,0) |- (router-wlan1.west); 527 | \draw foreach \intf in {router-eth0, router-wlan0} 528 | {(router-modem.west) ++(0,-0.15) -- +(-0.25,0) |- (\intf)}; 529 | \end{scope} 530 | 531 | \begin{scope}[ethernet] 532 | \draw[subnet-home] (raspberrypi-eth0.west) -- ++(-1,0) |- (router-eth0.east); 533 | \draw[subnet-home] (printer.west) -- ++(-1.5,0) |- (router-eth0.east); 534 | \end{scope} 535 | 536 | \begin{scope}[wifi] 537 | % wifi-guest 538 | \draw[subnet-guest] (router-wlan1.east) -- ++(1,0) |- (guest-devices-raster.east) node[pos=0.25, above, rotate=90] {\faIcon{wifi} \parbox{7em}{\textbf{wifi-guest, 2.4GHz}}}; 539 | 540 | % wifi-home 541 | \draw[subnet-home] (laptop-wlp3s0.west) -- ++(-2,0) |- (router-wlan0.east) node[pos=0.25, below, rotate=90] {\faIcon{wifi} \parbox{7em}{\textbf{wifi-home, 5GHz}}}; 542 | \end{scope} 543 | 544 | \begin{scope}[vpn, subnet-vpn] 545 | % using large radii on the waves decoration introduces ugly whitespace, so we apply some offset to compensate 546 | \draw[decorate] (laptop-wg0.west) ++(.3,0) -- ++(-.8,0); 547 | \draw[decorate] (vps-wg0.west) ++(.3,0) -- ++(-.8,0); 548 | \end{scope} 549 | % --------------- end network connections --------------- 550 | \end{tikzpicture} 551 | 552 | \end{document} -------------------------------------------------------------------------------- /network_diagram.tex: -------------------------------------------------------------------------------- 1 | % Home Network Diagram 2 | % Author: Michael Bugert 3 | % License: CC BY 4.0 4 | \documentclass{standalone} 5 | 6 | \usepackage[utf8]{inputenc} 7 | \usepackage[sfdefault]{noto} 8 | \usepackage[T1]{fontenc} 9 | \usepackage{enumitem} 10 | \usepackage[fixed]{fontawesome5} 11 | \usepackage{etoolbox} 12 | \usepackage{tcolorbox} 13 | \usepackage{tikz} 14 | \usepackage[hidelinks]{hyperref} 15 | 16 | \tcbuselibrary{skins,raster} 17 | \usetikzlibrary{positioning,matrix,fit,decorations.pathreplacing} 18 | 19 | \graphicspath{{img/}} 20 | 21 | % colors for subnetworks 22 | \definecolor{subnet-none}{HTML}{000000} 23 | \definecolor{subnet-home}{HTML}{E57400} 24 | \definecolor{subnet-guest}{HTML}{14C300} 25 | \definecolor{subnet-vpn}{HTML}{AD0022} 26 | \definecolor{docker-bright}{HTML}{0A97C4} 27 | \definecolor{docker-dark}{HTML}{088AB4} 28 | 29 | \tcbset{ 30 | skin=enhanced, 31 | boxrule=0.1em, 32 | left=0.25em, 33 | right=0.25em, 34 | % box with hostname and device specs 35 | host description box/.style={ 36 | width=19em, 37 | sidebyside, 38 | righthand ratio=0.4, 39 | fonttitle=\bfseries\large, 40 | fontupper=\small, 41 | fontlower=\small 42 | }, 43 | % tcbraster for network interfaces 44 | interfaces raster/.style={ 45 | raster columns=1, 46 | raster width=6.75em, 47 | % fix raster height to accomodate for fontawesome icon height differences 48 | raster height=4.25em, 49 | raster row skip=0.4em, 50 | raster every box/.style={ 51 | fontupper=\ttfamily, 52 | left=0em, 53 | right=0em, 54 | top=.15em, 55 | bottom=.15em, 56 | valign=center 57 | } 58 | }, 59 | % tcbraster for host services 60 | services raster/.style={ 61 | raster columns=1, 62 | boxrule=0.1em, 63 | raster width=14em, 64 | raster row skip=0.4em, 65 | raster every box/.style={ 66 | left=0em, 67 | right=0em, 68 | top=.15em, 69 | bottom=.15em, 70 | fontupper=\small, 71 | boxrule=0.1em 72 | } 73 | }, 74 | % box around host services: 75 | % Never drawn, only used as a container. Width is set to the same width as "services". If width is not specified, the box would extend much further towards the right because the default width is \linewidth (uncomment 'blankest' to see it). 76 | services box/.style={ 77 | blankest, 78 | width=14em 79 | }, 80 | % box around dockerized host services 81 | dockerized box/.style={ 82 | %title={Dockerized\hfill\includegraphics[height=12pt]{services/docker}}, 83 | title={Dockerized}, 84 | fonttitle=\bfseries, 85 | colframe=docker-dark, 86 | colback=docker-bright, 87 | left=0.25em, 88 | right=0.25em 89 | }, 90 | % box around devices with less details 91 | devices box/.style={ 92 | width=20em, 93 | fonttitle=\bfseries\large, 94 | fontupper=\small, 95 | attach boxed title to top left, 96 | boxed title style={frame hidden, opacityback=0.0, left=0em}, 97 | colback=white, 98 | coltitle=black!75!white 99 | }, 100 | % tcbraster for devices with less details 101 | devices raster/.style={ 102 | raster columns=1, 103 | boxrule=0.1em, 104 | raster width=20em, 105 | raster row skip=0.4em, 106 | raster every box/.style={ 107 | left=0em, 108 | right=0em, 109 | top=.15em, 110 | bottom=.15em, 111 | fontupper=\small, 112 | boxrule=0.1em, 113 | height=3em, 114 | valign=center 115 | } 116 | } 117 | } 118 | 119 | \tikzset{ 120 | single icon/.style={ 121 | font={\fontsize{34}{38}\selectfont} 122 | }, 123 | host description/.style={ 124 | }, 125 | % box drawn around all bits defining a host using tikz fit 126 | host box/.style={ 127 | inner sep=0.5em, 128 | draw=black!75!white, 129 | fill=white, 130 | rounded corners, 131 | line width=0.1em 132 | }, 133 | % box drawn around all bits defining a region using tikz fit 134 | region box/.style={ 135 | inner sep=2em, 136 | rounded corners=2em, 137 | line width=0.1em, 138 | fill=#1!5!white 139 | }, 140 | region descriptor/.style={ 141 | outer sep=0, 142 | execute at begin node={\fontsize{7em}{7em}\selectfont\scshape}, 143 | color=#1!15!white 144 | }, 145 | % tag for marking devices or services as DNS, DHCP, etc. with a customized color 146 | tag/.style={ 147 | draw=none, 148 | fill=#1, 149 | rectangle, 150 | rounded corners=2pt, 151 | outer sep=3pt, 152 | font=\bfseries\scriptsize, 153 | text=white 154 | }, 155 | % connection types 156 | generic/.style={ 157 | solid, 158 | line width=0.2em, 159 | rounded corners 160 | }, 161 | ethernet/.style={ 162 | generic 163 | }, 164 | wifi/.style={ 165 | generic, 166 | dashed, 167 | }, 168 | vpn/.style={ 169 | generic, 170 | decoration={ 171 | waves, 172 | radius=0.8em, 173 | segment length=.55em, 174 | angle=30 175 | } 176 | } 177 | } 178 | 179 | % commands to show device and service icons at fixed size, etc. 180 | \newcommand{\interfaceImage}[1]{% 181 | \raisebox{-.1\height}{\includegraphics[height=12pt]{#1}}% 182 | } 183 | \newcommand{\deviceImage}[1]{% 184 | \includegraphics[width=5em, height=3em, keepaspectratio]{devices/#1}% 185 | } 186 | \newcommand{\deviceImageInline}[1]{% 187 | \raisebox{-.25\height}{% 188 | \parbox[t]{2em}{% 189 | \centering% 190 | \includegraphics[width=2em, height=2em, keepaspectratio]{devices/#1}% 191 | }% 192 | }% 193 | } 194 | \newcommand{\ip}[2]{% 195 | \textbf{\textcolor{#2}{#1}} 196 | } 197 | 198 | % clickable URLs shown without protocol 199 | \newcommand{\https}[1]{% 200 | \href{https://#1}{\nolinkurl{#1}}% 201 | } 202 | \newcommand{\http}[1]{% 203 | \href{http://#1}{\nolinkurl{#1}}% 204 | } 205 | 206 | % usage: \service{image}{textual description}{url} 207 | \newcommand{\service}[3]{% 208 | \ifblank{#1}{% 209 | \hspace{2em}% 210 | }{% 211 | \raisebox{-.3\height}{% 212 | \includegraphics[height=2em]{services/#1}% 213 | }\hspace{.5em}% 214 | }% 215 | \parbox[m]{10em}{% 216 | #2% 217 | \ifblank{#3}{}{% 218 | \newline% 219 | \tiny\textcolor{gray}{#3}% 220 | }% 221 | } 222 | } 223 | 224 | \newcommand{\planned}{\hfill\scriptsize\textcolor{black!60}{\textit{(planned)}}} 225 | \newcommand{\temporary}{\hfill\scriptsize\textcolor{black!60}{\textit{(temporary)}}} 226 | 227 | \begin{document} 228 | 229 | % remember picture is needed to retain positions of tcolorboxes (otherwise all edges will be misplaced) 230 | \begin{tikzpicture}[remember picture] 231 | \pgfdeclarelayer{regions} 232 | \pgfdeclarelayer{hostboxes} 233 | \pgfsetlayers{regions,hostboxes,main} 234 | 235 | % --------------- start internet --------------- 236 | \node[single icon, label=above:Internet] (internet) {\faIcon{globe}}; 237 | \path (internet) -- (0,-2) coordinate[name=below-internet]; 238 | % --------------- end internet --------------- 239 | 240 | % --------------- start ISP --------------- 241 | \node[single icon, left=16em of below-internet, label=below:ISP] (isp-home) {\faIcon{building}}; 242 | % --------------- end ISP --------------- 243 | 244 | % --------------- start router --------------- 245 | % host description 246 | \node[host description, below left=12em of isp-home] (router-description) {% 247 | \begin{tcolorbox}[ 248 | adjusted title=router, 249 | host description box 250 | ] 251 | \ip{192.168.0.1}{subnet-home} 252 | 253 | \tcblower 254 | %\deviceImage{my-router-image} 255 | 256 | HomeBox CM 3000 257 | \end{tcolorbox} 258 | }; 259 | 260 | % services 261 | \node[ 262 | below=0em of router-description.south west, 263 | anchor=north west 264 | ] (router-services) { 265 | }; 266 | 267 | % network interfaces 268 | \node[anchor=north] at (router-services.north east -| router-description.east) (router-interfaces) { 269 | \begin{tcbitemize}[interfaces raster] 270 | \tcbitem[remember as=router-modem] modem\hfill\faIcon{grip-lines} 271 | \tcbitem[remember as=router-eth0] eth0..3\hfill\faIcon{ethernet} 272 | \tcbitem[remember as=router-wlan0] wlan0\hfill\faIcon{broadcast-tower} 273 | \tcbitem[remember as=router-wlan1] wlan1\hfill\faIcon{broadcast-tower} 274 | \end{tcbitemize} 275 | }; 276 | 277 | % draw box around all parts defining a host 278 | \begin{pgfonlayer}{hostboxes} 279 | \node[ 280 | host box, 281 | fit=(router-description.center) (router-services.south) (router-services.west) (router-interfaces.south) 282 | ] (router-host-box) {}; 283 | \end{pgfonlayer} 284 | % --------------- end router --------------- 285 | 286 | 287 | % --------------- start printer --------------- 288 | \node[host description, right=18em of router-description] (printer-description) {% 289 | \begin{tcolorbox}[ 290 | host description box, 291 | remember as=printer 292 | ] 293 | \ip{192.168.0.3}{subnet-home} 294 | 295 | \tcblower 296 | %\deviceImage{my-printer-image} 297 | 298 | InkPrint\\ 299 | E-7800 300 | \end{tcolorbox} 301 | }; 302 | % --------------- end printer --------------- 303 | 304 | 305 | % --------------- start raspberrypi --------------- 306 | % host description 307 | \node[host description, below=of printer-description] (raspberrypi-description) {% 308 | \begin{tcolorbox}[ 309 | adjusted title=raspberrypi, 310 | host description box 311 | ] 312 | \ip{192.168.0.2}{subnet-home} 313 | \vspace{\baselineskip} 314 | 315 | \begin{tabular}{@{}ll@{}} 316 | \faIcon{compact-disc} & Pi OS buster \\ 317 | \faIcon{memory} & 1GB \\ 318 | \faIcon{hdd} & 32GB \\ 319 | \end{tabular} 320 | 321 | \tcblower 322 | %\deviceImage{my-raspberry-pi-image} 323 | 324 | RPi 3B+ 325 | \end{tcolorbox} 326 | }; 327 | 328 | % services 329 | \node[ 330 | below=0em of raspberrypi-description.south east, 331 | anchor=north east 332 | ] (raspberrypi-services) { 333 | \begin{tcboxedraster}[services raster]{services box} 334 | %\tcbox[enhanced, remember as=raspberrypi-pihole]{\service{pihole}{pi-hole}{\http{pi-hole.internal.lan}}} 335 | \tcbox[enhanced, remember as=raspberrypi-pihole]{\service{}{pi-hole}{\http{pi-hole.internal.lan}}} 336 | \begin{tcboxedraster}[services raster]{dockerized box} 337 | %\tcbox{\service{homeasisstant}{Home Assistant}{\http{hass.internal.lan}}} 338 | \tcbox{\service{}{Home Assistant}{\http{hass.internal.lan}}} 339 | \end{tcboxedraster} 340 | \end{tcboxedraster} 341 | }; 342 | 343 | % service tags 344 | \node[anchor=east, tag=subnet-home] at (raspberrypi-pihole.east) {DNS}; 345 | 346 | % network interfaces 347 | \node[anchor=north] at (raspberrypi-services.north west -| raspberrypi-description.west) (raspberrypi-interfaces) { 348 | \begin{tcbitemize}[interfaces raster] 349 | \tcbitem[remember as=raspberrypi-eth0] \faIcon{ethernet}\hfill eth0 350 | \end{tcbitemize} 351 | }; 352 | 353 | % draw box around all parts defining a host 354 | \begin{pgfonlayer}{hostboxes} 355 | \node[ 356 | host box, 357 | fit=(raspberrypi-description.center) (raspberrypi-services.south) (raspberrypi-services.east) (raspberrypi-interfaces.south) 358 | ] (raspberrypi-host-box) {}; 359 | \end{pgfonlayer} 360 | % --------------- end raspberrypi --------------- 361 | 362 | % --------------- start guest devices --------------- 363 | \node[host description, below=4em of router-host-box.south, anchor=north, inner sep=0em] (guest-devices) { 364 | \begin{tcboxedraster}[devices raster]{% 365 | devices box, 366 | title={Guest Devices\hspace{1em}\ip{192.168.1.0/24}{subnet-guest}}, 367 | remember as=guest-devices-raster} 368 | %\tcbox{\deviceImageInline{my-guest-device-image} My Guest Device} 369 | \tcbox{Video Game Console} 370 | \tcbox{E-Book Reader} 371 | \tcbox{\textit{... more ...}} 372 | \end{tcboxedraster} 373 | }; 374 | % --------------- end guest devices --------------- 375 | 376 | 377 | % --------------- start laptop --------------- 378 | % host description 379 | \node[host description, below=of raspberrypi-host-box.south] (laptop-description) {% 380 | \begin{tcolorbox}[ 381 | adjusted title=laptop, 382 | host description box 383 | ] 384 | \ip{192.168.0.4}{subnet-home} 385 | \vspace{\baselineskip} 386 | 387 | \begin{tabular}{@{}ll@{}} 388 | \faIcon{compact-disc} & Mint 20.3 \\ 389 | \faIcon{memory} & 32GB \\ 390 | \faIcon{hdd} & 1TB \\ 391 | \end{tabular} 392 | 393 | \tcblower 394 | %\deviceImage{my-laptop-image} 395 | 396 | Laptop Z680 397 | \end{tcolorbox} 398 | }; 399 | 400 | % services 401 | \node[ 402 | below=0em of laptop-description.south east, 403 | anchor=north east 404 | ] (laptop-services) { 405 | \begin{tcboxedraster}[services raster]{services box} 406 | %\tcbox{\service{wireguard}{wireguard}{}} 407 | \tcbox{\service{}{wireguard}{}} 408 | \end{tcboxedraster} 409 | }; 410 | 411 | % network interfaces 412 | \node[anchor=north] at (laptop-services.north west -| laptop-description.west) (laptop-interfaces) { 413 | \begin{tcbitemize}[interfaces raster] 414 | \tcbitem[remember as=laptop-enp0s25] \faIcon{ethernet}\hfill enp0s25 415 | \tcbitem[remember as=laptop-wlp3s0] \faIcon{broadcast-tower}\hfill wlp3s0 416 | \tcbitem[remember as=laptop-wg0] \faIcon{dragon}\hfill wg0 417 | \end{tcbitemize} 418 | }; 419 | 420 | % draw box around all parts defining a host 421 | \begin{pgfonlayer}{hostboxes} 422 | \node[ 423 | host box, 424 | fit=(laptop-description.center) (laptop-services.south) (laptop-services.east) (laptop-interfaces.south) 425 | ] (laptop-host-box) {}; 426 | \end{pgfonlayer} 427 | % --------------- end laptop --------------- 428 | 429 | 430 | % --------------- start vps --------------- 431 | % host description 432 | \node[host description, right=65em of router-description.north east, anchor=north] (vps-description) {% 433 | \begin{tcolorbox}[ 434 | adjusted title=vps, 435 | host description box 436 | ] 437 | \ip{11.22.33.44}{subnet-none} 438 | \vspace{\baselineskip} 439 | 440 | \begin{tabular}{@{}ll@{}} 441 | \faIcon{compact-disc} & Debian 11 \\ 442 | \faIcon{memory} & 4GB \\ 443 | \faIcon{hdd} & 64GB \\ 444 | \end{tabular} 445 | 446 | \tcblower 447 | %\deviceImage{my-hoster-image} 448 | 449 | HyperSpeed Flex Z25 450 | \end{tcolorbox} 451 | }; 452 | 453 | % services 454 | \node[ 455 | below=0em of vps-description.south east, 456 | anchor=north east 457 | ] (vps-services) { 458 | \begin{tcboxedraster}[services raster]{services box} 459 | \begin{tcboxedraster}[services raster]{dockerized box} 460 | %\tcbox{\service{wireguard}{wireguard}{}} 461 | \tcbox{\service{}{wireguard}{}} 462 | %\tcbox{\service{wordpress}{WordPress \planned{}}{}} 463 | \tcbox{\service{}{WordPress \planned{}}{}} 464 | \end{tcboxedraster} 465 | \end{tcboxedraster} 466 | }; 467 | 468 | % network interfaces 469 | \node[anchor=north] at (vps-services.north west -| vps-description.west) (vps-interfaces) { 470 | \begin{tcbitemize}[interfaces raster] 471 | \tcbitem[remember as=vps-eth0] \faIcon{ethernet}\hfill{}eth0 472 | \tcbitem[remember as=vps-wg0] \faIcon{dragon}\hfill{}wg0 473 | \end{tcbitemize} 474 | }; 475 | 476 | % draw box around all parts defining a host 477 | \begin{pgfonlayer}{hostboxes} 478 | \node[ 479 | host box, 480 | fit=(vps-description.center) (vps-services.south) (vps-services.east) (vps-interfaces.south) 481 | ] (vps-host-box) {}; 482 | \end{pgfonlayer} 483 | % --------------- end vps --------------- 484 | 485 | 486 | % --------------- start legend --------------- 487 | \matrix[ 488 | anchor=north west, 489 | yshift=2em, 490 | matrix of nodes, 491 | row sep=-0.1em, 492 | every node/.style={anchor=west}, 493 | host box, 494 | font=\small 495 | ] at (router-description.west |- internet) (legend) { 496 | & {\Large\sffamily\bfseries Legend} \\ 497 | \draw[ethernet] (0,0) -- (0.75,0); & Ethernet \\ 498 | \draw[wifi] (0,0) -- (0.75,0); & Wifi \\ 499 | \draw[vpn, decorate] (0,0) -- (0.75,0); & VPN \\ 500 | \draw[generic] (0,0) --(0.75,0); & Other \\ 501 | }; 502 | \node[below=1em of legend.south west, anchor=north west, text width=8em, font=\small] {last updated:\\\today}; 503 | % --------------- end legend --------------- 504 | 505 | 506 | % --------------- start network regions --------------- 507 | \begin{pgfonlayer}{regions} 508 | % Home 509 | \node[ 510 | region box=blue, 511 | fit=(router-host-box.west) (router-description.north) (raspberrypi-host-box.east) (laptop-host-box.south) 512 | ] (home-box) {}; 513 | \node[region descriptor=blue, above, anchor=south west, outer sep=1.5em] at (home-box.south west) {Home}; 514 | 515 | % Remote 516 | \node[ 517 | region box=red, 518 | fit=(vps-eth0.west) (vps-description.north west) (vps-host-box.south east) 519 | ] (remote-box) {}; 520 | \node[region descriptor=red, left, anchor=north east] at (remote-box.south east) {Remote}; 521 | \end{pgfonlayer} 522 | % --------------- end network regions --------------- 523 | 524 | 525 | % --------------- start network connections --------------- 526 | \begin{scope}[generic] 527 | \draw (internet) -- (below-internet); 528 | \draw (isp-home) -| (below-internet); 529 | \draw (vps-eth0.west) -- ++(-2,0) |- (below-internet) -- ++(0,1); 530 | \draw (router-modem.east) -- ++(1,0) |- (isp-home); 531 | 532 | % connections inside the router 533 | \draw (router-modem.west) ++(0,0.15) -- ++(-0.5,0) |- (router-wlan1.west); 534 | \draw foreach \intf in {router-eth0, router-wlan0} 535 | {(router-modem.west) ++(0,-0.15) -- +(-0.25,0) |- (\intf)}; 536 | \end{scope} 537 | 538 | \begin{scope}[ethernet] 539 | \draw[subnet-home] (raspberrypi-eth0.west) -- ++(-1,0) |- (router-eth0.east); 540 | \draw[subnet-home] (printer.west) -- ++(-1.5,0) |- (router-eth0.east); 541 | \end{scope} 542 | 543 | \begin{scope}[wifi] 544 | % wifi-guest 545 | \draw[subnet-guest] (router-wlan1.east) -- ++(1,0) |- (guest-devices-raster.east) node[pos=0.25, above, rotate=90] {\faIcon{wifi} \parbox{7em}{\textbf{wifi-guest, 2.4GHz}}}; 546 | 547 | % wifi-home 548 | \draw[subnet-home] (laptop-wlp3s0.west) -- ++(-2,0) |- (router-wlan0.east) node[pos=0.25, below, rotate=90] {\faIcon{wifi} \parbox{7em}{\textbf{wifi-home, 5GHz}}}; 549 | \end{scope} 550 | 551 | \begin{scope}[vpn, subnet-vpn] 552 | % using large radii on the waves decoration introduces ugly whitespace, so we apply some offset to compensate 553 | \draw[decorate] (laptop-wg0.west) ++(.3,0) -- ++(-.8,0); 554 | \draw[decorate] (vps-wg0.west) ++(.3,0) -- ++(-.8,0); 555 | \end{scope} 556 | % --------------- end network connections --------------- 557 | \end{tikzpicture} 558 | 559 | \end{document} -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Attribution 4.0 International 2 | 3 | ======================================================================= 4 | 5 | Creative Commons Corporation ("Creative Commons") is not a law firm and 6 | does not provide legal services or legal advice. Distribution of 7 | Creative Commons public licenses does not create a lawyer-client or 8 | other relationship. Creative Commons makes its licenses and related 9 | information available on an "as-is" basis. Creative Commons gives no 10 | warranties regarding its licenses, any material licensed under their 11 | terms and conditions, or any related information. Creative Commons 12 | disclaims all liability for damages resulting from their use to the 13 | fullest extent possible. 14 | 15 | Using Creative Commons Public Licenses 16 | 17 | Creative Commons public licenses provide a standard set of terms and 18 | conditions that creators and other rights holders may use to share 19 | original works of authorship and other material subject to copyright 20 | and certain other rights specified in the public license below. The 21 | following considerations are for informational purposes only, are not 22 | exhaustive, and do not form part of our licenses. 23 | 24 | Considerations for licensors: Our public licenses are 25 | intended for use by those authorized to give the public 26 | permission to use material in ways otherwise restricted by 27 | copyright and certain other rights. Our licenses are 28 | irrevocable. Licensors should read and understand the terms 29 | and conditions of the license they choose before applying it. 30 | Licensors should also secure all rights necessary before 31 | applying our licenses so that the public can reuse the 32 | material as expected. Licensors should clearly mark any 33 | material not subject to the license. This includes other CC- 34 | licensed material, or material used under an exception or 35 | limitation to copyright. More considerations for licensors: 36 | wiki.creativecommons.org/Considerations_for_licensors 37 | 38 | Considerations for the public: By using one of our public 39 | licenses, a licensor grants the public permission to use the 40 | licensed material under specified terms and conditions. If 41 | the licensor's permission is not necessary for any reason--for 42 | example, because of any applicable exception or limitation to 43 | copyright--then that use is not regulated by the license. Our 44 | licenses grant only permissions under copyright and certain 45 | other rights that a licensor has authority to grant. Use of 46 | the licensed material may still be restricted for other 47 | reasons, including because others have copyright or other 48 | rights in the material. A licensor may make special requests, 49 | such as asking that all changes be marked or described. 50 | Although not required by our licenses, you are encouraged to 51 | respect those requests where reasonable. More considerations 52 | for the public: 53 | wiki.creativecommons.org/Considerations_for_licensees 54 | 55 | ======================================================================= 56 | 57 | Creative Commons Attribution 4.0 International Public License 58 | 59 | By exercising the Licensed Rights (defined below), You accept and agree 60 | to be bound by the terms and conditions of this Creative Commons 61 | Attribution 4.0 International Public License ("Public License"). To the 62 | extent this Public License may be interpreted as a contract, You are 63 | granted the Licensed Rights in consideration of Your acceptance of 64 | these terms and conditions, and the Licensor grants You such rights in 65 | consideration of benefits the Licensor receives from making the 66 | Licensed Material available under these terms and conditions. 67 | 68 | 69 | Section 1 -- Definitions. 70 | 71 | a. Adapted Material means material subject to Copyright and Similar 72 | Rights that is derived from or based upon the Licensed Material 73 | and in which the Licensed Material is translated, altered, 74 | arranged, transformed, or otherwise modified in a manner requiring 75 | permission under the Copyright and Similar Rights held by the 76 | Licensor. For purposes of this Public License, where the Licensed 77 | Material is a musical work, performance, or sound recording, 78 | Adapted Material is always produced where the Licensed Material is 79 | synched in timed relation with a moving image. 80 | 81 | b. Adapter's License means the license You apply to Your Copyright 82 | and Similar Rights in Your contributions to Adapted Material in 83 | accordance with the terms and conditions of this Public License. 84 | 85 | c. Copyright and Similar Rights means copyright and/or similar rights 86 | closely related to copyright including, without limitation, 87 | performance, broadcast, sound recording, and Sui Generis Database 88 | Rights, without regard to how the rights are labeled or 89 | categorized. For purposes of this Public License, the rights 90 | specified in Section 2(b)(1)-(2) are not Copyright and Similar 91 | Rights. 92 | 93 | d. Effective Technological Measures means those measures that, in the 94 | absence of proper authority, may not be circumvented under laws 95 | fulfilling obligations under Article 11 of the WIPO Copyright 96 | Treaty adopted on December 20, 1996, and/or similar international 97 | agreements. 98 | 99 | e. Exceptions and Limitations means fair use, fair dealing, and/or 100 | any other exception or limitation to Copyright and Similar Rights 101 | that applies to Your use of the Licensed Material. 102 | 103 | f. Licensed Material means the artistic or literary work, database, 104 | or other material to which the Licensor applied this Public 105 | License. 106 | 107 | g. Licensed Rights means the rights granted to You subject to the 108 | terms and conditions of this Public License, which are limited to 109 | all Copyright and Similar Rights that apply to Your use of the 110 | Licensed Material and that the Licensor has authority to license. 111 | 112 | h. Licensor means the individual(s) or entity(ies) granting rights 113 | under this Public License. 114 | 115 | i. Share means to provide material to the public by any means or 116 | process that requires permission under the Licensed Rights, such 117 | as reproduction, public display, public performance, distribution, 118 | dissemination, communication, or importation, and to make material 119 | available to the public including in ways that members of the 120 | public may access the material from a place and at a time 121 | individually chosen by them. 122 | 123 | j. Sui Generis Database Rights means rights other than copyright 124 | resulting from Directive 96/9/EC of the European Parliament and of 125 | the Council of 11 March 1996 on the legal protection of databases, 126 | as amended and/or succeeded, as well as other essentially 127 | equivalent rights anywhere in the world. 128 | 129 | k. You means the individual or entity exercising the Licensed Rights 130 | under this Public License. Your has a corresponding meaning. 131 | 132 | 133 | Section 2 -- Scope. 134 | 135 | a. License grant. 136 | 137 | 1. Subject to the terms and conditions of this Public License, 138 | the Licensor hereby grants You a worldwide, royalty-free, 139 | non-sublicensable, non-exclusive, irrevocable license to 140 | exercise the Licensed Rights in the Licensed Material to: 141 | 142 | a. reproduce and Share the Licensed Material, in whole or 143 | in part; and 144 | 145 | b. produce, reproduce, and Share Adapted Material. 146 | 147 | 2. Exceptions and Limitations. For the avoidance of doubt, where 148 | Exceptions and Limitations apply to Your use, this Public 149 | License does not apply, and You do not need to comply with 150 | its terms and conditions. 151 | 152 | 3. Term. The term of this Public License is specified in Section 153 | 6(a). 154 | 155 | 4. Media and formats; technical modifications allowed. The 156 | Licensor authorizes You to exercise the Licensed Rights in 157 | all media and formats whether now known or hereafter created, 158 | and to make technical modifications necessary to do so. The 159 | Licensor waives and/or agrees not to assert any right or 160 | authority to forbid You from making technical modifications 161 | necessary to exercise the Licensed Rights, including 162 | technical modifications necessary to circumvent Effective 163 | Technological Measures. For purposes of this Public License, 164 | simply making modifications authorized by this Section 2(a) 165 | (4) never produces Adapted Material. 166 | 167 | 5. Downstream recipients. 168 | 169 | a. Offer from the Licensor -- Licensed Material. Every 170 | recipient of the Licensed Material automatically 171 | receives an offer from the Licensor to exercise the 172 | Licensed Rights under the terms and conditions of this 173 | Public License. 174 | 175 | b. No downstream restrictions. You may not offer or impose 176 | any additional or different terms or conditions on, or 177 | apply any Effective Technological Measures to, the 178 | Licensed Material if doing so restricts exercise of the 179 | Licensed Rights by any recipient of the Licensed 180 | Material. 181 | 182 | 6. No endorsement. Nothing in this Public License constitutes or 183 | may be construed as permission to assert or imply that You 184 | are, or that Your use of the Licensed Material is, connected 185 | with, or sponsored, endorsed, or granted official status by, 186 | the Licensor or others designated to receive attribution as 187 | provided in Section 3(a)(1)(A)(i). 188 | 189 | b. Other rights. 190 | 191 | 1. Moral rights, such as the right of integrity, are not 192 | licensed under this Public License, nor are publicity, 193 | privacy, and/or other similar personality rights; however, to 194 | the extent possible, the Licensor waives and/or agrees not to 195 | assert any such rights held by the Licensor to the limited 196 | extent necessary to allow You to exercise the Licensed 197 | Rights, but not otherwise. 198 | 199 | 2. Patent and trademark rights are not licensed under this 200 | Public License. 201 | 202 | 3. To the extent possible, the Licensor waives any right to 203 | collect royalties from You for the exercise of the Licensed 204 | Rights, whether directly or through a collecting society 205 | under any voluntary or waivable statutory or compulsory 206 | licensing scheme. In all other cases the Licensor expressly 207 | reserves any right to collect such royalties. 208 | 209 | 210 | Section 3 -- License Conditions. 211 | 212 | Your exercise of the Licensed Rights is expressly made subject to the 213 | following conditions. 214 | 215 | a. Attribution. 216 | 217 | 1. If You Share the Licensed Material (including in modified 218 | form), You must: 219 | 220 | a. retain the following if it is supplied by the Licensor 221 | with the Licensed Material: 222 | 223 | i. identification of the creator(s) of the Licensed 224 | Material and any others designated to receive 225 | attribution, in any reasonable manner requested by 226 | the Licensor (including by pseudonym if 227 | designated); 228 | 229 | ii. a copyright notice; 230 | 231 | iii. a notice that refers to this Public License; 232 | 233 | iv. a notice that refers to the disclaimer of 234 | warranties; 235 | 236 | v. a URI or hyperlink to the Licensed Material to the 237 | extent reasonably practicable; 238 | 239 | b. indicate if You modified the Licensed Material and 240 | retain an indication of any previous modifications; and 241 | 242 | c. indicate the Licensed Material is licensed under this 243 | Public License, and include the text of, or the URI or 244 | hyperlink to, this Public License. 245 | 246 | 2. You may satisfy the conditions in Section 3(a)(1) in any 247 | reasonable manner based on the medium, means, and context in 248 | which You Share the Licensed Material. For example, it may be 249 | reasonable to satisfy the conditions by providing a URI or 250 | hyperlink to a resource that includes the required 251 | information. 252 | 253 | 3. If requested by the Licensor, You must remove any of the 254 | information required by Section 3(a)(1)(A) to the extent 255 | reasonably practicable. 256 | 257 | 4. If You Share Adapted Material You produce, the Adapter's 258 | License You apply must not prevent recipients of the Adapted 259 | Material from complying with this Public License. 260 | 261 | 262 | Section 4 -- Sui Generis Database Rights. 263 | 264 | Where the Licensed Rights include Sui Generis Database Rights that 265 | apply to Your use of the Licensed Material: 266 | 267 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right 268 | to extract, reuse, reproduce, and Share all or a substantial 269 | portion of the contents of the database; 270 | 271 | b. if You include all or a substantial portion of the database 272 | contents in a database in which You have Sui Generis Database 273 | Rights, then the database in which You have Sui Generis Database 274 | Rights (but not its individual contents) is Adapted Material; and 275 | 276 | c. You must comply with the conditions in Section 3(a) if You Share 277 | all or a substantial portion of the contents of the database. 278 | 279 | For the avoidance of doubt, this Section 4 supplements and does not 280 | replace Your obligations under this Public License where the Licensed 281 | Rights include other Copyright and Similar Rights. 282 | 283 | 284 | Section 5 -- Disclaimer of Warranties and Limitation of Liability. 285 | 286 | a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE 287 | EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS 288 | AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF 289 | ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, 290 | IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, 291 | WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR 292 | PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, 293 | ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT 294 | KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT 295 | ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. 296 | 297 | b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE 298 | TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, 299 | NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, 300 | INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, 301 | COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR 302 | USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN 303 | ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR 304 | DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR 305 | IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. 306 | 307 | c. The disclaimer of warranties and limitation of liability provided 308 | above shall be interpreted in a manner that, to the extent 309 | possible, most closely approximates an absolute disclaimer and 310 | waiver of all liability. 311 | 312 | 313 | Section 6 -- Term and Termination. 314 | 315 | a. This Public License applies for the term of the Copyright and 316 | Similar Rights licensed here. However, if You fail to comply with 317 | this Public License, then Your rights under this Public License 318 | terminate automatically. 319 | 320 | b. Where Your right to use the Licensed Material has terminated under 321 | Section 6(a), it reinstates: 322 | 323 | 1. automatically as of the date the violation is cured, provided 324 | it is cured within 30 days of Your discovery of the 325 | violation; or 326 | 327 | 2. upon express reinstatement by the Licensor. 328 | 329 | For the avoidance of doubt, this Section 6(b) does not affect any 330 | right the Licensor may have to seek remedies for Your violations 331 | of this Public License. 332 | 333 | c. For the avoidance of doubt, the Licensor may also offer the 334 | Licensed Material under separate terms or conditions or stop 335 | distributing the Licensed Material at any time; however, doing so 336 | will not terminate this Public License. 337 | 338 | d. Sections 1, 5, 6, 7, and 8 survive termination of this Public 339 | License. 340 | 341 | 342 | Section 7 -- Other Terms and Conditions. 343 | 344 | a. The Licensor shall not be bound by any additional or different 345 | terms or conditions communicated by You unless expressly agreed. 346 | 347 | b. Any arrangements, understandings, or agreements regarding the 348 | Licensed Material not stated herein are separate from and 349 | independent of the terms and conditions of this Public License. 350 | 351 | 352 | Section 8 -- Interpretation. 353 | 354 | a. For the avoidance of doubt, this Public License does not, and 355 | shall not be interpreted to, reduce, limit, restrict, or impose 356 | conditions on any use of the Licensed Material that could lawfully 357 | be made without permission under this Public License. 358 | 359 | b. To the extent possible, if any provision of this Public License is 360 | deemed unenforceable, it shall be automatically reformed to the 361 | minimum extent necessary to make it enforceable. If the provision 362 | cannot be reformed, it shall be severed from this Public License 363 | without affecting the enforceability of the remaining terms and 364 | conditions. 365 | 366 | c. No term or condition of this Public License will be waived and no 367 | failure to comply consented to unless expressly agreed to by the 368 | Licensor. 369 | 370 | d. Nothing in this Public License constitutes or may be interpreted 371 | as a limitation upon, or waiver of, any privileges and immunities 372 | that apply to the Licensor or You, including from the legal 373 | processes of any jurisdiction or authority. 374 | 375 | 376 | ======================================================================= 377 | 378 | Creative Commons is not a party to its public 379 | licenses. Notwithstanding, Creative Commons may elect to apply one of 380 | its public licenses to material it publishes and in those instances 381 | will be considered the “Licensor.” The text of the Creative Commons 382 | public licenses is dedicated to the public domain under the CC0 Public 383 | Domain Dedication. Except for the limited purpose of indicating that 384 | material is shared under a Creative Commons public license or as 385 | otherwise permitted by the Creative Commons policies published at 386 | creativecommons.org/policies, Creative Commons does not authorize the 387 | use of the trademark "Creative Commons" or any other trademark or logo 388 | of Creative Commons without its prior written consent including, 389 | without limitation, in connection with any unauthorized modifications 390 | to any of its public licenses or any other arrangements, 391 | understandings, or agreements concerning use of licensed material. For 392 | the avoidance of doubt, this paragraph does not form part of the 393 | public licenses. 394 | 395 | Creative Commons may be contacted at creativecommons.org. 396 | 397 | --------------------------------------------------------------------------------