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).
CIDR
Netmask
Wildcard
Total
Usable
Notes
/0
0.0.0.0
255.255.255.255
4,294,967,296
—
default route
/1
128.0.0.0
127.255.255.255
2,147,483,648
2,147,483,646
/2
192.0.0.0
63.255.255.255
1,073,741,824
1,073,741,822
/3
224.0.0.0
31.255.255.255
536,870,912
536,870,910
/4
240.0.0.0
15.255.255.255
268,435,456
268,435,454
multicast range starts /4
/5
248.0.0.0
7.255.255.255
134,217,728
134,217,726
/6
252.0.0.0
3.255.255.255
67,108,864
67,108,862
/7
254.0.0.0
1.255.255.255
33,554,432
33,554,430
/8
255.0.0.0
0.255.255.255
16,777,216
16,777,214
class A / 10.0.0.0/8
/9
255.128.0.0
0.127.255.255
8,388,608
8,388,606
/10
255.192.0.0
0.63.255.255
4,194,304
4,194,302
CGNAT 100.64.0.0/10
/11
255.224.0.0
0.31.255.255
2,097,152
2,097,150
/12
255.240.0.0
0.15.255.255
1,048,576
1,048,574
172.16.0.0/12 private
/13
255.248.0.0
0.7.255.255
524,288
524,286
/14
255.252.0.0
0.3.255.255
262,144
262,142
/15
255.254.0.0
0.1.255.255
131,072
131,070
/16
255.255.0.0
0.0.255.255
65,536
65,534
class B / 192.168.0.0/16
/17
255.255.128.0
0.0.127.255
32,768
32,766
/18
255.255.192.0
0.0.63.255
16,384
16,382
/19
255.255.224.0
0.0.31.255
8,192
8,190
/20
255.255.240.0
0.0.15.255
4,096
4,094
/21
255.255.248.0
0.0.7.255
2,048
2,046
/22
255.255.252.0
0.0.3.255
1,024
1,022
/23
255.255.254.0
0.0.1.255
512
510
/24
255.255.255.0
0.0.0.255
256
254
class C
/25
255.255.255.128
0.0.0.127
128
126
/26
255.255.255.192
0.0.0.63
64
62
/27
255.255.255.224
0.0.0.31
32
30
/28
255.255.255.240
0.0.0.15
16
14
/29
255.255.255.248
0.0.0.7
8
6
/30
255.255.255.252
0.0.0.3
4
2
point-to-point
/31
255.255.255.254
0.0.0.1
2
2
RFC 3021 PtP
/32
255.255.255.255
0.0.0.0
1
1
single host
IPv6 common prefixes
The allocation boundaries worth memorising.
Prefix
Addresses
/64 subnets
Typical use
/32
296
4,294,967,296
Regional ISP allocation
/40
288
16,777,216
Large enterprise
/48
280
65,536
Site / end-user assignment (RIPE recommendation)
/52
276
4,096
Small site
/56
272
256
Residential customer (common ISP default)
/60
268
16
Minimum home assignment
/64
264
1
Standard subnet — SLAAC requires this
/96
232
—
IPv4-embedded / NAT64 (64:ff9b::/96)
/112
216
—
Point-to-point convention
/126
4
—
Point-to-point (IPv6 equivalent of /30)
/127
2
—
Point-to-point (RFC 6164)
/128
1
—
Single host
Reserved IP ranges
The ones that'll bite you if you forget them.
IPv4 range
Purpose
0.0.0.0/8
"this network" (RFC 1122)
10.0.0.0/8
private (RFC 1918)
100.64.0.0/10
CGNAT (RFC 6598)
127.0.0.0/8
loopback
169.254.0.0/16
link-local / APIPA
172.16.0.0/12
private (RFC 1918)
192.0.0.0/24
IETF protocol assignments
192.0.2.0/24
TEST-NET-1 (docs)
192.168.0.0/16
private (RFC 1918)
198.18.0.0/15
benchmark testing
198.51.100.0/24
TEST-NET-2 (docs)
203.0.113.0/24
TEST-NET-3 (docs)
224.0.0.0/4
multicast
240.0.0.0/4
reserved ("class E")
255.255.255.255/32
limited broadcast
IPv6 range
Purpose
::/128
unspecified
::1/128
loopback
::ffff:0:0/96
IPv4-mapped
64:ff9b::/96
NAT64 well-known
100::/64
discard-only (RFC 6666)
2001:db8::/32
documentation
2001::/23
IETF protocol assignments
2002::/16
6to4
fc00::/7
ULA — unique local
fe80::/10
link-local
ff00::/8
multicast
ff02::1
all-nodes (link)
ff02::2
all-routers (link)
ff02::1:ff00:0/104
solicited-node multicast
2000::/3
global unicast (currently allocated)
DNS record types
The ones that show up in zones I actually edit.
A
IPv4 address
AAAA
IPv6 address
CNAME
canonical name alias
MX
mail exchanger (priority + host)
NS
name server delegation
SOA
zone start-of-authority
PTR
reverse DNS pointer
TXT
free-form text (SPF, DMARC, ACME)
SRV
service locator (port + weight)
CAA
cert-issuance authorisation
DNSKEY
DNSSEC signing key
DS
delegation signer
RRSIG
signed record set
NSEC / NSEC3
authenticated denial
TLSA
DANE (cert-binding)
SSHFP
SSH key fingerprint
HTTPS
HTTPS service binding (RFC 9460)
SVCB
generic service binding
HTTP status codes
The ones I actually see. RFC 9110.
2xx / 3xx
Meaning
200
OK
201
Created
202
Accepted
204
No Content
206
Partial Content (Range)
301
Moved Permanently
302
Found (see 307/308)
304
Not Modified
307
Temporary Redirect (preserves method)
308
Permanent Redirect (preserves method)
4xx / 5xx
Meaning
400
Bad Request
401
Unauthorized (auth required)
403
Forbidden (auth won't help)
404
Not Found
409
Conflict
422
Unprocessable Entity
429
Too Many Requests
500
Internal Server Error
502
Bad Gateway
503
Service Unavailable
504
Gateway Timeout
Common TCP/UDP ports
The well-known assignments I reach for without looking up.
20 / 21
FTP data / control
22
SSH
23
Telnet
25
SMTP
53
DNS
67 / 68
DHCP server / client
80
HTTP
110
POP3
123
NTP
143
IMAP
161 / 162
SNMP / traps
389 / 636
LDAP / LDAPS
443
HTTPS / QUIC
465 / 587
SMTPS / submission
514
syslog
993 / 995
IMAPS / POP3S
3306
MySQL / MariaDB
5432
PostgreSQL
6379
Redis
8080
HTTP alt
8443
HTTPS alt
9000
Portainer / PHP-FPM
Unix signals
Linux x86-64 numbering. Defaults in parentheses.
1
SIGHUP
reload config (term)
2
SIGINT
Ctrl+C (term)
3
SIGQUIT
core (core)
6
SIGABRT
abort (core)
8
SIGFPE
arith error (core)
9
SIGKILL
uncatchable (term)
11
SIGSEGV
segfault (core)
13
SIGPIPE
broken pipe (term)
14
SIGALRM
timer (term)
15
SIGTERM
polite kill (term)
17
SIGCHLD
child state (ign)
18
SIGCONT
resume
19
SIGSTOP
uncatchable stop
20
SIGTSTP
Ctrl+Z (stop)
28
SIGWINCH
window resize (ign)
30
SIGUSR1
user-defined
chmod octal reference
Each digit = owner / group / other. Combine: read 4, write 2, execute 1.
Digit
Binary
rwx
Meaning
0
000
---
none
1
001
--x
execute
2
010
-w-
write
3
011
-wx
write + execute
4
100
r--
read
5
101
r-x
read + execute
6
110
rw-
read + write
7
111
rwx
all
Common
Mode
Meaning
644
rw-r--r--
regular file (default)
664
rw-rw-r--
group-writable file
600
rw-------
private (SSH keys, tokens)
640
rw-r-----
config readable by group
755
rwxr-xr-x
script / directory
775
rwxrwxr-x
group-writable dir
700
rwx------
private dir (.ssh)
777
rwxrwxrwx
do not do this
1777
rwxrwxrwt
sticky bit (/tmp)
2755
rwxr-sr-x
setgid directory
4755
rwsr-xr-x
setuid binary
Regex escapes and quantifiers
PCRE / POSIX ERE — the overlap that works almost everywhere.
Class
Matches
.
any char (not newline by default)
\d
digit [0-9]
\D
non-digit
\w
word char [A-Za-z0-9_]
\W
non-word
\s
whitespace
\S
non-whitespace
\b
word boundary
\B
non-word-boundary
^
start of line / string
$
end of line / string
\A
start of string (absolute)
\z
end of string (absolute)
Quantifier
Meaning
?
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.
Symbol
Name
Factor
k
kilo
103
M
mega
106
G
giga
109
T
tera
1012
P
peta
1015
E
exa
1018
Symbol
Name
Factor
m
milli
10−3
µ
micro
10−6
n
nano
10−9
p
pico
10−12
f
femto
10−15
a
atto
10−18
Byte size units
Decimal vs. binary. Use the right one.
SI (decimal)
Bytes
kB
1,000
MB
1,000,000
GB
1,000,000,000
TB
1012
PB
1015
IEC (binary)
Bytes
KiB
1,024
MiB
1,048,576
GiB
1,073,741,824
TiB
240
PiB
250
ANSI color escape codes
Prefix with \e[ and suffix with m. Reset is 0.
Code
Foreground
30
black
31
red
32
green
33
yellow
34
blue
35
magenta
36
cyan
37
white
90-97
bright variants
Code
Attribute
0
reset all
1
bold
2
dim
3
italic
4
underline
7
reverse
9
strikethrough
40-47
background (same colors)
Common timezone offsets
Standard time. DST shifts by +1h where applicable.