Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am not much of a network person, but I understand that (IPv4) addresses can be written in a format like 127.0.0.1/16. I tried reading through Wikipedia's IPv4 subnetting reference, Subnetwork and CIDR_notation - but it's way too much detail than I need.

I, essentially, don't need to understand CIDR notation for now - all I want is a command line tool, where I can type something like 127.0.0.1/16, and see what addresses it matches.

Is there a command line tool I can use for the purpose?

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

Try out ipcal available on, and from this webpage: http://www.jodies.de/ipcalc

share|improve this answer
    
Many thanks for that, @Squeezy - ipcalc looks like a fine Perl script, latest version currently seems to be ipcalc-0.41; cheers! –  sdaau Jan 30 at 10:07
1  
Mate, where have you been the last 10 months? :D –  Squeezy Feb 3 at 20:13
add comment

Well, searching through the Net, I accidentally found this:

It is a Python script, so I simply renamed it when I downloaded it, and used it like so:

$ wget http://brandon.sternefamily.net/files/cidr.txt -O cidr.py
$ python cidr.py 127.0.0.1/30
127.0.0.0
127.0.0.1
127.0.0.2
127.0.0.3

Would love to hear if there's anything else in existence that works like this...

Well, hope this helps someone,
Cheers!


EDIT: original link seems to be gone, here is archive: http://web.archive.org/web/20100307140430/http://brandon.sternefamily.net/files/cidr.txt

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.