admin_hub

sysop@hub:~/tools/subnet-vlan-poster$

subnet-vlan-poster

The table every network person looks up weekly, as two pages to print: prefixes with masks, wildcard masks and host counts, the special ranges, the ports worth knowing by heart, and a table for your own VLANs that you fill in before printing.

Two pages, A4 or Letter, portrait. Switch off headers and footers in the print dialog.

IPv4 prefixes

PrefixSubnet maskWildcardAddressesUsable hostsThink of it as
/8255.0.0.00.255.255.25516,777,21616,777,214class A size
/12255.240.0.00.15.255.2551,048,5761,048,574
/16255.255.0.00.0.255.25565,53665,534class B size, 256 times a /24
/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,09416 times a /24
/21255.255.248.00.0.7.2552,0482,0468 times a /24
/22255.255.252.00.0.3.2551,0241,0224 times a /24
/23255.255.254.00.0.1.2555125102 times a /24
/24255.255.255.00.0.0.255256254the everyday network
/25255.255.255.1280.0.0.127128126half a /24: .0 and .128
/26255.255.255.1920.0.0.636462a quarter: .0 .64 .128 .192
/27255.255.255.2240.0.0.313230blocks of 32
/28255.255.255.2400.0.0.151614blocks of 16
/29255.255.255.2480.0.0.786blocks of 8
/30255.255.255.2520.0.0.342blocks of 4: router links
/31255.255.255.2540.0.0.122 (point to point)router links, no waste
/32255.255.255.2550.0.0.011 (a single host)one address: host routes

In your head: block size = 256 minus the interesting mask byte. /26 has mask .192, so blocks of 64: networks start at .0, .64, .128, .192. The first address of a block is the network, the last is the broadcast, everything between is for hosts.

ranges with a meaning

10.0.0.0/8private
172.16.0.0/12private: 172.16 to 172.31
192.168.0.0/16private
100.64.0.0/10carrier NAT: your provider's, not yours
169.254.0.0/16self-assigned: DHCP did not answer
127.0.0.0/8this machine itself
224.0.0.0/4multicast
192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24for documentation only
fe80::/10IPv6 link-local
fc00::/7IPv6 private (ULA)
2001:db8::/32IPv6 for documentation

ports worth knowing

22SSH, SFTP
25, 587, 465SMTP: server to server, submission, submission over TLS
53DNS (UDP and TCP)
67, 68DHCP (UDP)
80, 443HTTP, HTTPS
88Kerberos
123NTP (UDP)
135, 445RPC, SMB file sharing
143, 993IMAP, IMAP over TLS
161, 162SNMP, SNMP traps (UDP)
389, 636LDAP, LDAP over TLS
514syslog (UDP)
1433, 3306, 5432SQL Server, MySQL, PostgreSQL
3389Remote Desktop
5060, 5061SIP, SIP over TLS
5985, 5986WinRM, PowerShell remoting
9100printing (raw)

VLANs in five lines

  • A VLAN is a separate switch inside the switch. Devices in different VLANs reach each other only through a router or firewall.
  • An access port belongs to one VLAN and sends plain frames: for PCs, printers, servers.
  • A trunk port carries several VLANs, each frame tagged with its VLAN number (802.1Q): between switches, to access points, to hypervisors.
  • The native VLAN of a trunk travels untagged. It must be the same on both ends, and should not be VLAN 1.
  • One VLAN, one subnet, one gateway. Write all three in the table below.

our VLANs

VLANNameSubnetGatewayDHCP rangeFor

Type into the cells. Nothing is stored: print it when it is right.

Usable hosts are the addresses minus network and broadcast. Cloud providers reserve more: Azure and AWS take five addresses per subnet. Work a single network out with the subnet calculator, plan a whole site with the IP plan builder, draw it with the network diagram builder. More to print: security posters. Reference: switching and VLAN cheat sheet, networking cheat sheet.