$ run IPv4 Calculator
NetCalc by Alexmysterio — Mobile app coming soon · Telegram bot available

Enter runs the calculation · Shift+Enter inserts a new line

user@netcalc ~/calc $

ipv4_calculator

Calculate network, broadcast, mask, hosts, class and binary for any IPv4 address

ip:
mask:
user@netcalc ~/calc $

ipv6_calculator

Calculate network info for IPv6 addresses in CIDR notation

ipv6:
pfx:
user@netcalc ~/calc $

vlsm_calculator

Variable Length Subnet Mask — assigns optimal blocks for each network segment

net:
pfx:
// Subnets required
name:
hosts:
name:
hosts:
name:
hosts:
user@netcalc ~/calc $

usable_ip_range

Shows the exact usable host range for a given network

ip:
mask:
user@netcalc ~/calc $

binary_ip_calc

Convert IP addresses to binary and vice versa, with per-octet visualization

dec:
bin:
user@netcalc ~/network $

cidr_converter

Convert between CIDR, decimal mask and wildcard. Includes full /1–/32 reference table.

in:
📋 CIDR Reference Table
CIDRSubnet MaskWildcardHosts/24 subnetsBlock
user@netcalc ~/network $

wildcard_mask_calc

Calculate the wildcard (inverse) mask for Cisco ACLs, OSPF and firewall rules

mask:
user@netcalc ~/network $

supernet_calculator

Find the minimum supernet containing all specified networks (route summarization)

nets:
user@netcalc ~/network $

subnet_splitter

Split a network into equal subnets by specifying a new prefix

net:
mask:
new:
user@netcalc ~/network $

range_to_cidr

Convert an IP range (start–end) to the minimum set of CIDR blocks

start:
end:
user@netcalc ~/network $

ip_to_integer

Convert IPv4/IPv6 addresses to integer and vice versa

ip:
int:
user@netcalc ~/network $

ipv6_normalize

Expand and compress IPv6 addresses — normalize any valid format

ipv6:
user@netcalc ~/network $

hex_ip_converter

Convert between hexadecimal and IP address — useful for Windows route tables and Cisco logs

ip:
0x:
user@netcalc ~/network $

vlan_calculator

802.1Q VLAN info: tag encoding, PCP, DEI, VID, range and compatibility

vlan:
pcp:
dei:
user@netcalc ~/dns $

reverse_dns_generator

Generate the PTR in-addr.arpa zone for an IPv4 network

net:
pfx:
dom:
user@netcalc ~/dns $

ipv6_ptr_generator

Generate the PTR ip6.arpa record for an IPv6 address

ipv6:
host:
user@netcalc ~/dns $

ip_geolocation

Locate a public IP or resolve a domain and geolocate its public address

Domains are resolved through DNS first; geolocation is based on the resulting public IP.
geo:
user@netcalc ~/dns $

ip_address_planner

Interactive IP address space planner — click cells to edit, export to CSV

📋 IP Address Plan
#NameNetworkMask/CIDRGatewayVLANLocationNotes
user@netcalc ~/legal $

Privacy

Data stored in your browser

Theme, language, promotion dismissal and calculation history are stored in localStorage on this device.

Calculations

Calculations are sent through this site's same-origin Worker proxy to the private calculation service.

Performance metrics

LCP, CLS and INP may be stored as aggregate performance measurements by tool and language. Calculation inputs and persistent user identifiers are not included.

GeoIP

Only GeoIP lookups are processed by an external provider. The requested IP address is sent for that lookup.

Issue reports via Telegram

A report link opens the public Telegram bot and includes only the current page slug in the bot start parameter. Calculator inputs and report text are not sent by this website. Text you choose to send inside Telegram is handled by Telegram and the bot.

Cookies and advertising

Advertising is controlled by the production configuration. When Google AdSense is enabled, consent is handled through a certified CMP before personalized advertising is used where required.

Delete local data

Use the button below to clear calculation history. To remove every local preference, clear this site's data in your browser settings.

This page provides operational information; it is not a legal-compliance certification.

Asymmetric routing and stateful firewalls: why valid traffic becomes INVALID

Understand how different forward and return paths break state tracking and how to prove the asymmetry before weakening firewall rules.

By 2026-09-21≈ 6 min7 sections
Site A192.168.1.0/24Host .50 Site B192.168.1.0/24Host .50 VPN! Route ambiguity / local ARPRenumber or translate one address domain
Two sites using the same prefix create ambiguity across a VPN
01

Stateful firewalls expect a coherent conversation path

Connection tracking learns a flow from packets it sees. If the forward path crosses one router but the return path bypasses it, the first firewall may see only half the conversation and classify later packets as INVALID or out of state.

02

Prove asymmetry before weakening INVALID drops

Temporarily logging state, interfaces and five-tuples is safer than simply accepting INVALID traffic. Compare traceroutes, routing tables and packet captures on both directions until you can name the device that sees only one side of the flow.

03

ECMP and backup paths can make the symptom intermittent

Equal-cost routing, policy routing and failover links can move only some flows to a different return path. That creates failures that appear random even though the routing decision is deterministic for each hash or policy condition.

04

Fix routing symmetry or state placement first

The cleanest solution is usually to make both directions cross the same stateful boundary, or place stateful filtering where both directions are guaranteed to pass. Broad exceptions for INVALID traffic should be the last resort and narrowly scoped.

05

Use packet capture timestamps to pair both directions

Capturing on the suspected firewall and on an adjacent router can show that SYN leaves through one device while SYN/ACK returns somewhere else. Matching five-tuples and timestamps is stronger evidence than a single traceroute.

06

Policy routing can hide the asymmetry in only one direction

Source-based rules, VRFs and marking can override the main routing table. Inspect the policy decision that applies to the exact source and connection mark rather than relying only on a generic route lookup.

07

Keep security controls narrow during diagnosis

If an exception is unavoidable for testing, restrict it by interface, source and destination and remove it after proving the path. Turning a global INVALID drop into accept can hide unrelated spoofing or stale-state problems.

EX

Worked example

  1. Capture a new TCP connection at the stateful firewall.
  2. Record ingress/egress interface for SYN and look for the returning SYN/ACK.
  3. Run route lookups for both source→destination and destination→source with the real policy context.
  4. Correct routing so both directions cross the same state boundary, then retest with the normal INVALID drop enabled.
✓

Operational checklist

  • Prove where each direction travels.
  • Check policy routing and ECMP, not only the main table.
  • Keep diagnostic firewall exceptions narrowly scoped.
  • Restore normal INVALID handling after the route is fixed.

Standards and references