# Network diagram

> A single 1920 × 1080 diagram of a 28 person office network: internet, router, firewall, switch, two floors of 14 desks, a server, a plotter and a guest wifi on its own board. Desks, devices and plugs are components, so renaming a device or an address is one override.

- The design, as a .vd file: https://getv.design/library/network-diagram.vd
- Its page: https://getv.design/library/network-diagram

## How it was made

Drafted from this prompt:

> A network diagram for Pettigrew Architects' office. Show the router, firewall, switch, 28 desks across two floors, a printer, a server and a separate guest wifi.

Then refined:

- Moved the guest wifi label and access point apart so the cable no longer runs through the heading.
- Moved the large 28 clear of the guest cable.
- Redrew the first floor cable as a clean right-angled line so its plug sits flat on the group.
- Enlarged the IP addresses and desk numbers for reading on a slide.

## Make it yours

- "Make this network diagram for a 12 person office with one floor."
- "Add a backup line from the server to a second drive."
- "Change the IP ranges and name the printer and the wifi after our office."

## The source

```vd
version 12
kind design
title "Office network diagram"
$green = #0F5132
$leaf = #1B6B46
$board = #F3F7F4
$copper = #C77D3A
$copperdark = #8A4F1F
$wire = #6B7280
$ink = #14201A
$white = #FFFFFF
$m = 60

font head = "Nova Square"
  fallback "system-ui, sans-serif"
  face asset=nova-square-400 weight=400

font body = K2D
  fallback "system-ui, sans-serif"
  face asset=k2d-400 weight=400
  face asset=k2d-600 weight=600
  face asset=k2d-700 weight=700

asset nova-square-400 = font/woff2 hash=sha256-3e9f9e979097ba64a89b010514cae4d8a984790f7beef6cdd91484822f76f85c bytes=14660 license=OFL
asset k2d-400 = font/woff2 hash=sha256-e3bec2e3f25096a30cd87e380262e53e0e6e1d67034d233b22af9b8168106358 bytes=13840 license=OFL
asset k2d-600 = font/woff2 hash=sha256-f81102783116231c6ec7bdc088ae50fa3c86cffabe64f8e1af44ae19a1fa28c0 bytes=14308 license=OFL
asset k2d-700 = font/woff2 hash=sha256-6105bf258183986d9631bb429b4249de1ee08a2b1b49809e397f54247736a98e bytes=14512 license=OFL

frame page x=0 y=0 w=1920 h=1080 background=board
  text page.title x=$m y=30 w=1700 h=64 font=head size=50 letterSpacing=-0.5 fill=green
    "28 desks, one way in, and a guest wifi kept apart"
  text page.sub x=$m y=(@page.title.bottom + 8) w=1500 h=36 font=body size=24 fill=wire
    "Pettigrew Architects, Belfast. The guest wifi has its own cable and never touches the office switch."

  rect board.main x=270 y=170 w=1590 h=610 radius=20 fill=green
  text board.main.name x=310 y=192 w=500 h=40 font=head size=30 fill=board
    "Office network"
  rect board.guest x=270 y=870 w=1590 h=170 radius=20 fill=green

  instance net component=dev x=40 y=275 w=190
    override dev.name
      "Internet"
    override dev.note
      "500 Mbps fibre"
  instance rtr component=dev x=330 y=275 w=190
    override dev.name
      "Router"
    override dev.note
      "192.168.1.1"
  instance fw component=dev x=(@rtr.right + 90) y=275 w=190
    override dev.name
      "Firewall"
    override dev.note
      "192.168.1.2"
  instance sw component=dev x=(@fw.right + 90) y=265 w=300 h=150
    override dev.name
      "Switch"
    override dev.note
      "48 ports, 1 Gbps"
  instance srv component=dev x=(@sw.x + 40 - 95) y=560 w=190
    override dev.name
      "Server"
    override dev.note
      "192.168.30.10"
  instance prt component=dev x=(@sw.right - 40 - 95) y=560 w=190
    override dev.name
      "Plotter"
    override dev.note
      "192.168.30.20"
  rect g1 x=1330 y=200 w=500 h=220 radius=12 fill=leaf
  text g1.name x=1352 y=(200+14) w=460 h=34 font=head size=28 fill=board
    "Ground floor"
  text g1.ip x=1352 y=(@g1.name.bottom + 0) w=460 h=30 font=body size=22 fill=board
    "14 desks, 192.168.10.0/24"
  instance g1.d1 component=desk x=(1352) y=(200+86+0)
    override desk.n
      "1"
  instance g1.d2 component=desk x=(1420) y=(200+86+0)
    override desk.n
      "2"
  instance g1.d3 component=desk x=(1488) y=(200+86+0)
    override desk.n
      "3"
  instance g1.d4 component=desk x=(1556) y=(200+86+0)
    override desk.n
      "4"
  instance g1.d5 component=desk x=(1624) y=(200+86+0)
    override desk.n
      "5"
  instance g1.d6 component=desk x=(1692) y=(200+86+0)
    override desk.n
      "6"
  instance g1.d7 component=desk x=(1760) y=(200+86+0)
    override desk.n
      "7"
  instance g1.d8 component=desk x=(1352) y=(200+86+58)
    override desk.n
      "8"
  instance g1.d9 component=desk x=(1420) y=(200+86+58)
    override desk.n
      "9"
  instance g1.d10 component=desk x=(1488) y=(200+86+58)
    override desk.n
      "10"
  instance g1.d11 component=desk x=(1556) y=(200+86+58)
    override desk.n
      "11"
  instance g1.d12 component=desk x=(1624) y=(200+86+58)
    override desk.n
      "12"
  instance g1.d13 component=desk x=(1692) y=(200+86+58)
    override desk.n
      "13"
  instance g1.d14 component=desk x=(1760) y=(200+86+58)
    override desk.n
      "14"
  rect g2 x=1330 y=450 w=500 h=220 radius=12 fill=leaf
  text g2.name x=1352 y=(450+14) w=460 h=34 font=head size=28 fill=board
    "First floor"
  text g2.ip x=1352 y=(@g2.name.bottom + 0) w=460 h=30 font=body size=22 fill=board
    "14 desks, 192.168.20.0/24"
  instance g2.d15 component=desk x=(1352) y=(450+86+0)
    override desk.n
      "15"
  instance g2.d16 component=desk x=(1420) y=(450+86+0)
    override desk.n
      "16"
  instance g2.d17 component=desk x=(1488) y=(450+86+0)
    override desk.n
      "17"
  instance g2.d18 component=desk x=(1556) y=(450+86+0)
    override desk.n
      "18"
  instance g2.d19 component=desk x=(1624) y=(450+86+0)
    override desk.n
      "19"
  instance g2.d20 component=desk x=(1692) y=(450+86+0)
    override desk.n
      "20"
  instance g2.d21 component=desk x=(1760) y=(450+86+0)
    override desk.n
      "21"
  instance g2.d22 component=desk x=(1352) y=(450+86+58)
    override desk.n
      "22"
  instance g2.d23 component=desk x=(1420) y=(450+86+58)
    override desk.n
      "23"
  instance g2.d24 component=desk x=(1488) y=(450+86+58)
    override desk.n
      "24"
  instance g2.d25 component=desk x=(1556) y=(450+86+58)
    override desk.n
      "25"
  instance g2.d26 component=desk x=(1624) y=(450+86+58)
    override desk.n
      "26"
  instance g2.d27 component=desk x=(1692) y=(450+86+58)
    override desk.n
      "27"
  instance g2.d28 component=desk x=(1760) y=(450+86+58)
    override desk.n
      "28"
  connector c.net x1=(@net.right) y1=(@net.cy) x2=(@rtr.left) y2=(@rtr.cy) stroke=copper strokeWidth=8 cap=round 
  connector c.rf x1=(@rtr.right) y1=(@rtr.cy) x2=(@fw.left) y2=(@fw.cy) stroke=copper strokeWidth=8 cap=round 
  connector c.fs x1=(@fw.right) y1=(@fw.cy) x2=(@sw.left) y2=(@sw.y + 75) stroke=copper strokeWidth=8 cap=round 
  connector c.g1 x1=(@sw.right) y1=(@g1.cy) x2=(@g1.x) y2=(@g1.cy) stroke=copper strokeWidth=8 cap=round 
  vector c.g2 x=@sw.right y=(@sw.y + 120) w=(@g2.x - @sw.right) h=(@g2.cy - @sw.y - 120) view="0 0 140 175" d="M0 0 H70 V175 H140" fill=none stroke=copper strokeWidth=8 join=round
  connector c.srv x1=(@srv.cx) y1=(@sw.bottom) x2=(@srv.cx) y2=(@srv.y) stroke=copper strokeWidth=8 cap=round 
  connector c.prt x1=(@prt.cx) y1=(@sw.bottom) x2=(@prt.cx) y2=(@prt.y) stroke=copper strokeWidth=8 cap=round 
  instance ap component=dev x=(@rtr.cx - 125) y=915 w=250 h=100
    override dev.name
      "Access point"
    override dev.note
      "Guest only"
  connector c.guest x1=(@rtr.cx) y1=(@rtr.bottom) x2=(@rtr.cx) y2=(@ap.y) stroke=copper strokeWidth=8 cap=round 
  instance pl.net.a component=plugh x=(@net.right) y=(@net.cy - 16)
  instance pl.net.b component=plugh x=(@rtr.left - 26) y=(@rtr.cy - 16)
  instance pl.rf.a component=plugh x=(@rtr.right) y=(@rtr.cy - 16)
  instance pl.rf.b component=plugh x=(@fw.left - 26) y=(@fw.cy - 16)
  instance pl.fs.a component=plugh x=(@fw.right) y=(@fw.cy - 16)
  instance pl.fs.b component=plugh x=(@sw.left - 26) y=((@sw.y + 75) - 16)
  instance pl.g1.a component=plugh x=(@sw.right) y=(@g1.cy - 16)
  instance pl.g1.b component=plugh x=(@g1.x - 26) y=(@g1.cy - 16)
  instance pl.g2.a component=plugh x=(@sw.right) y=((@sw.y + 120) - 16)
  instance pl.g2.b component=plugh x=(@g2.x - 26) y=(@g2.cy - 16)
  instance pl.srv.a component=plugv x=(@srv.cx - 16) y=@sw.bottom
  instance pl.srv.b component=plugv x=(@srv.cx - 16) y=(@srv.y - 26)
  instance pl.prt.a component=plugv x=(@prt.cx - 16) y=@sw.bottom
  instance pl.prt.b component=plugv x=(@prt.cx - 16) y=(@prt.y - 26)
  instance pl.gst.a component=plugv x=(@rtr.cx - 16) y=@rtr.bottom
  instance pl.gst.b component=plugv x=(@rtr.cx - 16) y=(@ap.y - 26)

  text gap.note x=480 y=800 w=1100 h=36 font=body size=22 weight=600 fill=wire
    "The gap is the point: the only link to the guest board is one cable from the router."
  text board.guest.name x=(@ap.right + 60) y=905 w=500 h=40 font=head size=30 fill=board
    "Guest wifi"
  text gst.info x=(@ap.right + 60) y=948 w=1000 h=80 font=body size=24 lineHeight=1.3 fill=board
    "192.168.50.0/24, internet only, capped at 50 Mbps. Guests cannot reach the switch, the server or the plotter."
  text stat.n x=500 y=470 w=300 h=160 font=head size=130 letterSpacing=-2 fill=copper
    "28"
  text stat.t x=500 y=(@stat.n.bottom + 4) w=290 h=100 font=body size=26 lineHeight=1.25 fill=board
    "desks on two floors, all behind one firewall"

frame dev x=0 y=1200 w=200 h=130 component
  rect dev.body x=0 y=0 w=100% h=100% radius=10 fill=board stroke=copper strokeWidth=4
  text dev.name x=18 y=14 w=(100% - 36) h=36 font=head size=28 fill=green
    "Device"
  text dev.note x=18 y=(@dev.name.bottom + 4) w=(100% - 36) h=30 font=body size=22 weight=600 fill=wire
    "Note"

frame desk x=0 y=1400 w=52 h=46 component
  rect desk.screen x=0 y=0 w=100% h=34 radius=4 fill=board
  text desk.n x=0 y=0 w=100% h=34 font=body size=20 weight=700 align=center valign=middle fill=green
    "1"
  rect desk.stand x=21 y=34 w=10 h=6 fill=board
  rect desk.base x=12 y=40 w=28 h=5 radius=2 fill=board

frame plugh x=0 y=1500 w=26 h=32 component
  rect plugh.body x=0 y=0 w=26 h=32 radius=5 fill=copperdark
  rect plugh.s1 x=8 y=7 w=3 h=18 radius=1 fill=board
  rect plugh.s2 x=15 y=7 w=3 h=18 radius=1 fill=board

frame plugv x=100 y=1500 w=32 h=26 component
  rect plugv.body x=0 y=0 w=32 h=26 radius=5 fill=copperdark
  rect plugv.s1 x=7 y=8 w=18 h=3 radius=1 fill=board
  rect plugv.s2 x=7 y=15 w=18 h=3 radius=1 fill=board
```
