nexonforge
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).

CIDRNetmaskWildcardTotalUsableNotes
/00.0.0.0255.255.255.2554,294,967,296default 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.

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
/96232IPv4-embedded / NAT64 (64:ff9b::/96)
/112216Point-to-point convention
/1264Point-to-point (IPv6 equivalent of /30)
/1272Point-to-point (RFC 6164)
/1281Single host

Reserved IP ranges

The ones that'll bite you if you forget them.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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