Hi,
I encountered a method isNetworkAWithinNetworkB(cidrA, cidrB) in NetUtils.java
which should return true if cidrA is a subset of cidrB.
The method returns flawed output in many scenarios. After unittesting it I
found :
isNetworkAWithinNetworkB("10.1.1.0/24", "10.1.1.0/25") returns true
isNet
Hi Saksham,
Always the higher suffix cidr will be in lower suffix cidr.
10.1.1.0/24 will have 256 addresses and 10.1.1.0/25 will have 128 addresses[1].
/25 will be completely in /24 but not wise versa.
The below are incorrect.
> isNetworkAWithinNetworkB("10.1.1.0/24", "10.1.1.0/25") returns tru
, December 23, 2013 6:03 PM
To:
Subject: Re: Faulty method isNetworkAWithinNetworkB ?
Hi Saksham,
Always the higher suffix cidr will be in lower suffix cidr.
10.1.1.0/24 will have 256 addresses and 10.1.1.0/25 will have 128 addresses[1].
/25 will be completely in /24 but not wise versa.
The