172.18.0.0/16

Private (RFC 1918) RFC 1918

Docker Compose typically assigns 172.18.0.0/16 to the first user-defined bridge network it creates. When running `docker-compose up`, each project gets its own subnet in the 172.x.0.0/16 range, starting from 172.17 and incrementing.

Network Address
172.18.0.0
Broadcast Address
172.18.255.255
Subnet Mask
255.255.0.0
Usable Hosts
65,534
First Usable IP
172.18.0.1
Last Usable IP
172.18.255.254
Total IPs
65,536
Prefix Length
/16

Network address — the base address of the block (172.18.0.0). All devices in this subnet share this prefix. Cannot be assigned to a host.

Broadcast address — packets sent to 172.18.255.255 are delivered to every device in the subnet. Also reserved — not assignable.

Usable hosts — the 65,534 addresses between those two that you can assign to servers, VMs, or interfaces.

Subnet mask255.255.0.0 is the dotted-decimal equivalent of /16. Older tools and Cisco configs use this format instead of CIDR slash notation.

Full Details

CIDR Notation 172.18.0.0/16
Network Address 172.18.0.0
Broadcast Address 172.18.255.255
Subnet Mask 255.255.0.0
Wildcard Mask 0.0.255.255
Prefix Length /16
IP Address Class Class B
Total IP Addresses 65,536
Usable Host Addresses 65,534
First Usable IP 172.18.0.1
Last Usable IP 172.18.255.254
Network (Hex) 0xAC120000
Broadcast (Hex) 0xAC12FFFF
Governing RFC RFC 1918
Address Type Private (RFC 1918)

Binary Representation

Network Address
10101100.00010010 10101100.00010010.00000000.00000000
Subnet Mask
11111111.11111111.00000000.00000000

The first 16 bits (1s in the mask) identify the network. The remaining 16 bits identify hosts within the network.

Split into Equal Subnets

Split 172.18.0.0/16 into 2 equal /17 subnets (32,766 usable hosts each).

# CIDR Network First Usable Last Usable Broadcast Hosts
1 172.18.0.0/17 172.18.0.0 172.18.0.1 172.18.127.254 172.18.127.255 32,766
2 172.18.128.0/17 172.18.128.0 172.18.128.1 172.18.255.254 172.18.255.255 32,766

Common Use Cases

  • Docker Compose project network (first project)
  • User-defined Docker bridge networks
  • Local multi-container development stacks

/16 Subnet Reference

Total IPs 65,536
Usable Hosts 65,534
Subnet Mask 255.255.0.0
Wildcard 0.0.255.255

Calculate Another