Fieldeng
Networking & Communications

IPv4 Membership

Check whether two IPv4 addresses belong to the same subnet.

Networking & Communications

Check whether two IPv4 addresses belong to the same subnet.

App id: NET-04. Reference version 1.0.

How to fill it

Fill the inputs. The tool shows the outputs.

On the tool screen, Calc is the working sheet. Presets stores values you reuse. Reference is the formula, assumptions, and provenance below.

Formula

same subnet if (IP_A AND mask) = (IP_B AND mask)

Inputs

NameUnit
IP Aipv4
IP Bipv4
Prefix length (optional)1
Subnet mask (optional)ipv4

Outputs

NameUnit
Same subnet (1 = yes) (hero result)1
Network Aipv4
Network Bipv4

Diagnose

Observations are context. They do not pass or fail a structure. See Diagnose.

WhenObservationSeverity
Same subnet (1 = yes) = 1Same subnetinfo
OtherwiseDifferent subnetcaution

Assumptions

  • Provide a prefix length or a dotted-decimal mask. If both are given they must agree.

Provenance

  • IPv4 network membership is the AND of each address with the subnet mask.

On this page