Jump to content


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.

Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.


IP Address and Subnet Address Validation

  • Please log in to reply
1 reply to this topic

#1 devprogrammer


  • Members
  • 4 posts
  • Local time:06:19 PM

Posted 06 July 2018 - 09:56 PM

I am developing a code to validate that an IP and Subnet IP combination is a valid one. Say the IP address is and its subnet mask is - so what are the validations we can make to check that IP and Subnet combinations is valid.

I am assuming that the we can only check that IP address should not be and - is it correct or is there any other validation we can make?


Is there a way an IP and subnet combination be configured / setup Invalid? What IP and Subnet / masks configuration should we treat as invalid?

Edited by devprogrammer, 06 July 2018 - 10:54 PM.

BC AdBot (Login to Remove)


#2 mightywiz


  • Members
  • 871 posts
  • Gender:Male
  • Local time:04:49 AM

Posted 18 July 2018 - 02:57 PM

we already have IP Subnet calculators.  Why re-invent the wheel when it's already been made?


and according to the calculator it would be -

Edited by mightywiz, 18 July 2018 - 02:58 PM.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users