NETWORKING / IP PLANNING

Subnet Overlap and Gap Checker: Find Conflicting, Duplicate and Unused IPv4 and IPv6 Address Space

Paste networks from a firewall export, route table, cloud console or spreadsheet. The checker finds every overlap and duplicate, shows the free space between them, and gives you the same addresses as a clean, merged list.

Check your networks

CIDR (10.0.0.0/24), single addresses, ranges (10.0.0.1-10.0.0.50) and Cisco-style masks or wildcards (10.0.0.0 255.255.255.0) all work, in IPv4 or IPv6. Add scope=production, vrf=guest or tenant=customer-a after an address to allow repeated space in isolated networks. For ambiguous all-zero or all-one masks, write mask or wildcard before the dotted value.

Add the allocation your networks should fit into, such as a VPC or site range, to see all of its free space and catch anything outside it. With several scopes, add a tag such as scope=production to select one scope for free-subnet allocation.

List the sizes you need as prefixes or host counts. The checker places them in unused, correctly aligned space.

Enter one or more addresses, separated by spaces or commas, to see every entry that contains each one and which match is the most specific.

Try:

Everything is checked in your browser. Your network list is never uploaded.

What you can paste

Paste one network per line, straight from wherever it lives. The checker understands:

  • CIDR blocks such as 10.20.0.0/24 or 2001:db8:abcd::/56.
  • Single addresses such as 203.0.113.200, which count as one address (a /32 or /128).
  • Ranges such as 10.0.0.10-10.0.0.20, the way DHCP scopes and some firewalls list them.
  • Lists on one line, separated by commas, semicolons or tabs, as in a spreadsheet column, a CSV file or a Terraform list such as ["10.1.0.0/16", "10.2.0.0/16"]. Each network is checked separately.
  • Address plus mask, such as 10.0.0.0 255.255.255.0 from a router config, or a wildcard like 10.0.0.0 0.0.0.255 from an access list. The checker works out which one you mean. Because all-zero and all-one dotted values are ambiguous, write forms such as 10.0.0.0 mask 0.0.0.0 or 10.0.0.0 wildcard 255.255.255.255.
  • Scoped networks, such as 10.0.0.0/24 scope=production Web and 10.0.0.0/24 vrf=guest Wi-Fi. Reused addresses in different scopes are kept in separate merged lists and do not count as conflicts while the scope option is selected.

Anything after the address, such as “Office” or “AWS production VPC”, is kept as a label so you can tell the rows apart. If an address has host bits set, like 10.20.2.10/24, it’s read as the network that contains it, 10.20.2.0/24, and flagged so you can fix the source.

Why overlapping subnets cause trouble

When two networks claim the same addresses, a device can’t tell which one a packet belongs to. Depending on where the clash is, that shows up in different ways:

Cloud peering and VPNs

AWS, Azure and Google Cloud won’t peer two networks whose ranges overlap, and site-to-site VPNs either refuse to come up or quietly send traffic to the wrong side. This is the most common clash after a company merger, or when every team picked 10.0.0.0/16 for its first VPC.

VLANs and DHCP

If two VLANs share a range, or two DHCP scopes hand out the same addresses, devices get duplicate IPs and drop off the network at random. These problems are notoriously hard to trace, because they come and go.

Firewall rules

When one rule’s range sits inside another’s, the narrower rule may never be reached, or may punch a hole you didn’t mean to make. Finding nested entries is the first step in cleaning up a long rule set.

When an overlap is fine

Not every overlap is a mistake. A route table often holds a broad route and a more specific one on purpose, and the router simply picks the longest match. An address plan may list a whole site block alongside the subnets carved from it. The checker reports these as “sits inside” so you can decide, while true duplicates are labelled separately.

How the checker works

Every entry is turned into a start and end address. The checker sorts them, then sweeps through the list once, comparing each entry only with earlier ones that haven’t ended yet. That keeps it quick, even with hundreds of lines.

Two CIDR blocks can only relate in three ways: they don’t touch, they’re identical, or one sits completely inside the other. They can never partly overlap, because every block starts on a boundary that matches its size. Only ranges, which can start and end anywhere, can partly overlap.

To find gaps, the checker joins all your entries together and looks at what’s left, either inside the parent block you give it or between your lowest and highest entry. Each gap is then split into the fewest possible CIDR blocks, ready to paste into a plan. The merged list uses the same idea: it covers exactly the addresses your entries cover, with every repeat removed.

For every conflict, the result also subtracts the shared range from each entry and expresses what remains as the fewest aligned CIDR blocks. This gives two alternatives: keep the shared addresses with the first entry, or keep them with the second. Review routing, security and host assignments before applying either suggestion.

Merging isn’t the same as summarising. A merged list never adds addresses you didn’t list. The route summary mode on the IPv4 calculator finds one bigger block that covers everything, which may also include unused space.

Comparing two lists before you connect networks

When two networks are about to be joined, by a VPN, cloud peering, a merger or a new data centre, overlaps inside each side usually don’t matter. What matters is whether anything on one side clashes with the other. Tick Compare two lists, paste one side into list A and the other into list B, and only the clashes between them are reported, labelled A1, B3 and so on. Overlaps within a single list are still mentioned in the notes, so nothing is hidden.

Which network is an IP address in?

Type one or more addresses into Which network is this IP in? to see every entry that contains each one. When several entries match, the most specific one, the one with the longest prefix, is marked first. That is the entry a router would use, because routers always prefer the longest matching prefix. In a route table holding 10.0.0.0/8, 10.20.0.0/16 and 10.20.1.0/24, traffic to 10.20.1.9 follows the /24. An address that matches nothing but sits inside the parent block is reported as free space.

Default and reserved ranges that cause clashes

Many overlaps aren’t between your own networks but with ranges that software picks by default. The checker warns when an entry shares addresses with any of these:

RangeUsed by default for
172.17.0.0/16Docker’s default bridge network on every Docker host
10.244.0.0/16 and 10.96.0.0/12Kubernetes pod (Flannel) and service (kubeadm) networks
192.168.0.0/16Calico’s default pod network, and most home and small-office routers
172.31.0.0/16The AWS default VPC in every region
10.128.0.0/9Google Cloud auto-mode VPC subnets
100.64.0.0/10Carrier-grade NAT at internet providers, and Tailscale
169.254.0.0/16Link-local addresses and the cloud metadata service
192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24 and 2001:db8::/32Documentation and examples only, never for real networks

A clash with Docker or Kubernetes is a classic cause of “the VPN works but I can’t reach that one server”. The container network on the host claims the same addresses, so replies never leave the machine. Loopback, multicast and other reserved ranges are flagged too. Untick the box to turn these warnings off.

Finding free subnets to allocate

Knowing the gaps is half the job. You still need blocks that start on the right boundary. Enter the sizes you need under Find free subnets, either as prefixes (/24, 2 x /26) or as host counts (60 hosts). Each host count is rounded up to the smallest block that holds it, leaving room for the network and broadcast addresses in IPv4. The checker places the largest requests first, each on a correctly aligned boundary inside the parent block and clear of everything already in use. That keeps the remaining free space in as few large pieces as possible.

Worked examples

An office plan with mistakes

The default example has six VLANs in 10.20.0.0/22. The checker finds three problems. Cameras (10.20.1.160/27) sits inside Voice (10.20.1.128/26). Guest is an exact copy of Wi-Fi (10.20.1.0/25). And Servers was typed as 10.20.2.10/24, with host bits set. It also shows that 10.20.1.192/26 and the whole of 10.20.3.0/24 are still free.

Joining cloud and office networks

In the “Cloud and VPN” example, the head office LAN (10.0.128.0/20) sits inside the AWS production VPC (10.0.0.0/16), so a VPN between them won’t work without renumbering or NAT. The Azure spoke (172.31.0.0/16) also falls inside the Azure hub (172.16.0.0/12), which would block peering between them.

Checking a cloud plan against existing networks

The “Compare two lists” example puts three existing networks in list A and a proposed cloud and lab design in list B. The checker reports two clashes: the AWS production VPC (10.10.32.0/20) sits inside the data centre’s 10.10.0.0/16, and Azure test (192.168.50.128/25) sits inside the lab network. It also warns that list B’s Docker hosts use 172.17.0.0/16, the range Docker takes for itself on every host.

Placing new subnets and tracing an address

In the “Free subnets and IP lookup” example, a /22 already holds four networks and three more are needed: two /25s, a /26 and room for 60 hosts. The checker places them at 10.40.1.128/25, 10.40.2.128/25, 10.40.3.0/26 and 10.40.3.64/26. 10.40.1.77 turns out to belong to the Cameras network, 10.40.1.64/27.

Tidying a firewall export

The “Firewall export” example mixes masks, wildcards, a range and a single address. Three of its five entries sit inside the other two, so the five rules cover exactly the same addresses as two blocks: 203.0.113.0/25 and 203.0.113.192/27.

Frequently asked questions

Do 172.16.4.0/22 and 172.16.6.0/23 overlap?

Yes. 172.16.4.0/22 runs from 172.16.4.0 to 172.16.7.255, and 172.16.6.0/23 runs from 172.16.6.0 to 172.16.7.255, so the /23 sits entirely inside the /22.

What is left of 192.168.0.0/24 after using 192.168.0.0/26 and 192.168.0.128/25?

192.168.0.64/26, which is the 64 addresses from 192.168.0.64 to 192.168.0.127. Put 192.168.0.0/24 in the parent box and the two subnets in the list to see it.

Is a subnet inside a bigger one always a mistake?

No. Route tables and address plans often nest networks on purpose. It’s a problem when both networks are meant to be in use separately, such as two VLANs, two DHCP scopes or two VPCs you want to connect.

Can two CIDR blocks partly overlap?

No. Each CIDR block starts on a boundary that matches its size, so two blocks are either separate, identical, or one is inside the other. Partial overlaps only happen with ranges, such as 10.0.0.10–10.0.0.40 and 10.0.0.30–10.0.0.60.

Can I check IPv4 and IPv6 together?

Yes. Paste both in the same list. Each family is checked separately, since an IPv4 network can never overlap an IPv6 one.

How do I check if an IP address is in a subnet?

Enter the subnet in the list and the address under “Which network is this IP in?”. An address is in a subnet when it lies between the subnet’s first and last address. 10.40.1.77 is in 10.40.1.64/27, which runs from 10.40.1.64 to 10.40.1.95. With several matching subnets, the longest prefix wins.

Why does my VPN clash with Docker or Kubernetes?

Docker uses 172.17.0.0/16 and Kubernetes clusters often use 10.244.0.0/16 and 10.96.0.0/12 by default. If a remote network uses the same addresses, traffic to it is sent to the local container network instead. The checker flags these ranges so you can change one side.

How do I find a free /24 in my address space?

Put the address space, such as your VPC range, in the parent box, paste the subnets already in use, and enter /24 under “Find free subnets”. The checker returns the first free, correctly aligned /24, or says that none is left.

Is my network list sent anywhere?

No. The checker runs entirely in your browser, and nothing you paste leaves your computer. It’s safe to use with internal address plans.

How many networks can I check at once?

Up to 1,000 lines. Tables show the first 500 rows, but the copy buttons always include the complete merged list and every gap.

← Networking calculators