reference tables I keep bookmarked

Small collection of lookup tables I need often enough to put on one page. All static HTML — no JavaScript, no tracking, no analytics, no accounts.

IPv4 subnet mask chart #

All 33 prefix lengths, from /0 to /32. Usable hosts excludes network and broadcast addresses, except /31 (RFC 3021 point-to-point) and /32 (single host). Notation per RFC 4632.

CIDRNetmaskWildcardTotalUsableNotes
/00.0.0.0255.255.255.2554,294,967,296—default route
/1128.0.0.0127.255.255.2552,147,483,6482,147,483,646
/2192.0.0.063.255.255.2551,073,741,8241,073,741,822
/3224.0.0.031.255.255.255536,870,912536,870,910
/4240.0.0.015.255.255.255268,435,456268,435,454multicast range starts /4
/5248.0.0.07.255.255.255134,217,728134,217,726
/6252.0.0.03.255.255.25567,108,86467,108,862
/7254.0.0.01.255.255.25533,554,43233,554,430
/8255.0.0.00.255.255.25516,777,21616,777,214class A / 10.0.0.0/8
/9255.128.0.00.127.255.2558,388,6088,388,606
/10255.192.0.00.63.255.2554,194,3044,194,302CGNAT 100.64.0.0/10
/11255.224.0.00.31.255.2552,097,1522,097,150
/12255.240.0.00.15.255.2551,048,5761,048,574172.16.0.0/12 private
/13255.248.0.00.7.255.255524,288524,286
/14255.252.0.00.3.255.255262,144262,142
/15255.254.0.00.1.255.255131,072131,070
/16255.255.0.00.0.255.25565,53665,534class B / 192.168.0.0/16
/17255.255.128.00.0.127.25532,76832,766
/18255.255.192.00.0.63.25516,38416,382
/19255.255.224.00.0.31.2558,1928,190
/20255.255.240.00.0.15.2554,0964,094
/21255.255.248.00.0.7.2552,0482,046
/22255.255.252.00.0.3.2551,0241,022
/23255.255.254.00.0.1.255512510
/24255.255.255.00.0.0.255256254class C
/25255.255.255.1280.0.0.127128126
/26255.255.255.1920.0.0.636462
/27255.255.255.2240.0.0.313230
/28255.255.255.2400.0.0.151614
/29255.255.255.2480.0.0.786
/30255.255.255.2520.0.0.342point-to-point
/31255.255.255.2540.0.0.122RFC 3021 PtP
/32255.255.255.2550.0.0.011single host

IPv6 common prefixes #

The allocation boundaries worth memorising. See RFC 4291 and the IANA IPv6 address space.

PrefixAddresses/64 subnetsTypical use
/322964,294,967,296Regional ISP allocation
/4028816,777,216Large enterprise
/4828065,536Site / end-user assignment (RIPE recommendation)
/522764,096Small site
/56272256Residential customer (common ISP default)
/6026816Minimum home assignment
/642641Standard subnet — SLAAC requires this
/96232—IPv4-embedded / NAT64 (64:ff9b::/96)
/112216—Point-to-point convention
/1264—Point-to-point (IPv6 equivalent of /30)
/1272—Point-to-point (RFC 6164)
/1281—Single host

Reserved IP ranges #

The ones that'll bite you if you forget them. Full list: IANA special-purpose registry, RFC 6890.

IPv4 rangePurpose
0.0.0.0/8"this network" (RFC 1122)
10.0.0.0/8private (RFC 1918)
100.64.0.0/10CGNAT (RFC 6598)
127.0.0.0/8loopback
169.254.0.0/16link-local / APIPA
172.16.0.0/12private (RFC 1918)
192.0.0.0/24IETF protocol assignments
192.0.2.0/24TEST-NET-1 (docs)
192.168.0.0/16private (RFC 1918)
198.18.0.0/15benchmark testing
198.51.100.0/24TEST-NET-2 (docs)
203.0.113.0/24TEST-NET-3 (docs)
224.0.0.0/4multicast
240.0.0.0/4reserved ("class E")
255.255.255.255/32limited broadcast
IPv6 rangePurpose
::/128unspecified
::1/128loopback
::ffff:0:0/96IPv4-mapped
64:ff9b::/96NAT64 well-known
100::/64discard-only (RFC 6666)
2001:db8::/32documentation
2001::/23IETF protocol assignments
2002::/166to4
fc00::/7ULA — unique local
fe80::/10link-local
ff00::/8multicast
ff02::1all-nodes (link)
ff02::2all-routers (link)
ff02::1:ff00:0/104solicited-node multicast
2000::/3global unicast (currently allocated)

DNS record types #

The ones that show up in zones I actually edit. Types are registered at IANA.

AIPv4 address
AAAAIPv6 address
CNAMEcanonical name alias
MXmail exchanger (priority + host)
NSname server delegation
SOAzone start-of-authority
PTRreverse DNS pointer
TXTfree-form text (SPF, DMARC, ACME)
SRVservice locator (port + weight)
CAAcert-issuance authorisation
DNSKEYDNSSEC signing key
DSdelegation signer
RRSIGsigned record set
NSEC / NSEC3authenticated denial
TLSADANE (cert-binding)
SSHFPSSH key fingerprint
HTTPSHTTPS service binding (RFC 9460)
SVCBgeneric service binding

HTTP status codes #

The ones I actually see. RFC 9110; the IANA status code registry has the rest.

2xx / 3xxMeaning
200OK
201Created
202Accepted
204No Content
206Partial Content (Range)
301Moved Permanently
302Found (see 307/308)
304Not Modified
307Temporary Redirect (preserves method)
308Permanent Redirect (preserves method)
4xx / 5xxMeaning
400Bad Request
401Unauthorized (auth required)
403Forbidden (auth won't help)
404Not Found
409Conflict
422Unprocessable Entity
429Too Many Requests
500Internal Server Error
502Bad Gateway
503Service Unavailable
504Gateway Timeout

Common TCP/UDP ports #

The well-known assignments I reach for without looking up. Authoritative list: IANA service names and port numbers.

20 / 21FTP data / control
22SSH
23Telnet
25SMTP
53DNS
67 / 68DHCP server / client
80HTTP
110POP3
123NTP
143IMAP
161 / 162SNMP / traps
389 / 636LDAP / LDAPS
443HTTPS / QUIC
465 / 587SMTPS / submission
514syslog
993 / 995IMAPS / POP3S
3306MySQL / MariaDB
5432PostgreSQL
6379Redis
8080HTTP alt
8443HTTPS alt
9000Portainer / PHP-FPM

Unix signals #

Linux x86-64 numbering. Defaults in parentheses. From signal(7).

1SIGHUPreload config (term)
2SIGINTCtrl+C (term)
3SIGQUITcore (core)
6SIGABRTabort (core)
8SIGFPEarith error (core)
9SIGKILLuncatchable (term)
11SIGSEGVsegfault (core)
13SIGPIPEbroken pipe (term)
14SIGALRMtimer (term)
15SIGTERMpolite kill (term)
17SIGCHLDchild state (ign)
18SIGCONTresume
19SIGSTOPuncatchable stop
20SIGTSTPCtrl+Z (stop)
28SIGWINCHwindow resize (ign)
30SIGUSR1user-defined

chmod octal reference #

Each digit = owner / group / other. Combine: read 4, write 2, execute 1. See chmod(1).

DigitBinaryrwxMeaning
0000---none
1001--xexecute
2010-w-write
3011-wxwrite + execute
4100r--read
5101r-xread + execute
6110rw-read + write
7111rwxall
CommonModeMeaning
644rw-r--r--regular file (default)
664rw-rw-r--group-writable file
600rw-------private (SSH keys, tokens)
640rw-r-----config readable by group
755rwxr-xr-xscript / directory
775rwxrwxr-xgroup-writable dir
700rwx------private dir (.ssh)
777rwxrwxrwxdo not do this
1777rwxrwxrwtsticky bit (/tmp)
2755rwxr-sr-xsetgid directory
4755rwsr-xr-xsetuid binary

Regex escapes and quantifiers #

PCRE / POSIX ERE — the overlap that works almost everywhere. Reference: pcre2pattern, POSIX regex.

ClassMatches
.any char (not newline by default)
\ddigit [0-9]
\Dnon-digit
\wword char [A-Za-z0-9_]
\Wnon-word
\swhitespace
\Snon-whitespace
\bword boundary
\Bnon-word-boundary
^start of line / string
$end of line / string
\Astart of string (absolute)
\zend of string (absolute)
QuantifierMeaning
?0 or 1
*0 or more (greedy)
+1 or more (greedy)
*?0 or more (lazy)
+?1 or more (lazy)
{n}exactly n
{n,}n or more
{n,m}n to m
(?:...)non-capturing group
(?=...)lookahead
(?!...)negative lookahead
(?<=...)lookbehind
(?<!...)negative lookbehind

SI prefixes #

Base-10, per the BIPM SI brochure.

SymbolNameFactor
kkilo103
Mmega106
Ggiga109
Ttera1012
Ppeta1015
Eexa1018
SymbolNameFactor
mmilli10−3
µmicro10−6
nnano10−9
ppico10−12
ffemto10−15
aatto10−18

Byte size units #

Decimal vs. binary. Use the right one. Binary prefixes are IEC 80000-13.

SI (decimal)Bytes
kB1,000
MB1,000,000
GB1,000,000,000
TB1012
PB1015
IEC (binary)Bytes
KiB1,024
MiB1,048,576
GiB1,073,741,824
TiB240
PiB250

ANSI color escape codes #

Prefix with \e[ and suffix with m. Reset is 0. ECMA-48 / console_codes(4).

CodeForeground
30black
31red
32green
33yellow
34blue
35magenta
36cyan
37white
90-97bright variants
CodeAttribute
0reset all
1bold
2dim
3italic
4underline
7reverse
9strikethrough
40-47background (same colors)

Common timezone offsets #

Standard time. DST shifts by +1h where applicable. Canonical data: IANA tz database.

UTC+0UTC / GMT / WET / Reykjavik
UTC+1CET — Berlin, Paris, Madrid
UTC+2EET — Athens, Helsinki, Kyiv
UTC+3Moscow, Istanbul, Riyadh
UTC+4Dubai, Baku
UTC+5:30IST — India
UTC+7Bangkok, Jakarta
UTC+8Beijing, Singapore, Perth
UTC+9JST — Tokyo, Seoul
UTC+10AEST — Sydney
UTC+12NZST — Auckland
UTC−3São Paulo, Buenos Aires
UTC−5EST — New York, Toronto
UTC−6CST — Chicago, Mexico City
UTC−7MST — Denver
UTC−8PST — LA, Vancouver

ASCII table #

0–127. Control characters greyed. Everything above 127 is not ASCII, whatever the codepage says. RFC 20.

DecHexChar
00x00NUL
10x01SOH
20x02STX
30x03ETX
40x04EOT
50x05ENQ
60x06ACK
70x07BEL
80x08BS
90x09HT
100x0ALF
110x0BVT
120x0CFF
130x0DCR
140x0ESO
150x0FSI
160x10DLE
170x11DC1
180x12DC2
190x13DC3
200x14DC4
210x15NAK
220x16SYN
230x17ETB
240x18CAN
250x19EM
260x1ASUB
270x1BESC
280x1CFS
290x1DGS
300x1ERS
310x1FUS
DecHexChar
320x20SP
330x21!
340x22"
350x23#
360x24$
370x25%
380x26&
390x27'
400x28(
410x29)
420x2A*
430x2B+
440x2C,
450x2D-
460x2E.
470x2F/
480x300
490x311
500x322
510x333
520x344
530x355
540x366
550x377
560x388
570x399
580x3A:
590x3B;
600x3C<
610x3D=
620x3E>
630x3F?
DecHexChar
640x40@
650x41A
660x42B
670x43C
680x44D
690x45E
700x46F
710x47G
720x48H
730x49I
740x4AJ
750x4BK
760x4CL
770x4DM
780x4EN
790x4FO
800x50P
810x51Q
820x52R
830x53S
840x54T
850x55U
860x56V
870x57W
880x58X
890x59Y
900x5AZ
910x5B[
920x5C\
930x5D]
940x5E^
950x5F_
DecHexChar
960x60`
970x61a
980x62b
990x63c
1000x64d
1010x65e
1020x66f
1030x67g
1040x68h
1050x69i
1060x6Aj
1070x6Bk
1080x6Cl
1090x6Dm
1100x6En
1110x6Fo
1120x70p
1130x71q
1140x72r
1150x73s
1160x74t
1170x75u
1180x76v
1190x77w
1200x78x
1210x79y
1220x7Az
1230x7B{
1240x7C|
1250x7D}
1260x7E~
1270x7FDEL

Common MIME types #

What goes in Content-Type. Full registry at IANA.

TypeExtension / use
text/html.html
text/css.css
text/plain.txt
text/csv.csv
text/javascript.js, .mjs
application/json.json
application/xml.xml
application/pdf.pdf
application/zip.zip
application/gzip.gz
application/octet-streamanything binary
application/x-www-form-urlencodedform posts
multipart/form-datafile uploads
application/wasm.wasm
TypeExtension / use
application/manifest+json.webmanifest
image/png.png
image/jpeg.jpg, .jpeg
image/gif.gif
image/webp.webp
image/avif.avif
image/svg+xml.svg
image/x-icon.ico
font/woff2.woff2
font/ttf.ttf
audio/mpeg.mp3
audio/ogg.ogg, .oga
video/mp4.mp4
video/webm.webm