I want to create an all-inclusive IP range in Commons-Net, but when I try
< Pre> subnotthals subnet2 = new subnet ("0.0.0.0", "0.0.0.0");
Or similar:
Subnetthults subnet youths = new subnet utilities ("0.0.0.0.0");
I get an exception:
java.lang.IllegalArgumentException: value [0] no range (0,32) at org.apache.commons In .net.util.SubnetUtils.rangeCheck org.apache.commons.net.util.SubnetUtils.calculate (SubnetUtils.java:3029) at org.apache.commons.net.util.SubnetUtils. & Lt; Init & gt; (SubnetUtils.java:63)
I have noticed that there is already a ticket for it: They say that the problem is in the next (3.4) release Has been resolved.
By the time the Commons Pure 3.4 has been released, there is any workaround (like a list of SubnetUtils objects) that Why does each IPv4 address allow?
Yes there is not a solution with the list of SubnetUtils objects , As mentioned to you:
CID signature: [0.255.255.255/1] Netmask [128.0.0.0] First address: [0.0.0.0] Final address: [127.255.255.255] ] CID signature: [255.255.255.255/1] Netmask: [128.0.0.0] First address: [128.0.0.0] Final address: [255.255.255.255]
or Java code With:
SubnetUtils subnetUtils1 = new SubnetUtils ("0.255.255.255/1"); SubnetUthles subnetUtils2 = new subnetuits ("255.255.255.255/1");
Comments
Post a Comment