README

Path: README
Last Update: Wed Mar 14 04:05:18 +0530 2007

Simple IP Calculator sub/sup networking

The ‘icalc’ is versatile tool for network/system administators as well as general users (implemented in a single file pure Ruby code). Give it one of the <ip_address> <netmask> | <ip_address/prifix> | <ip_range>, e.g. <start_ipaddr-end_ipaddr> pairs, it will compute rest of the things like network, broadcast addreses, network prefix, netmask, class and, or subnet charts divided by a valid divider.

rdoc

See icalc.rubyforge.org/mdoc for module documentation.

Usage

    $ icalc <address/prefix> [divisor]
    $ icalc <address-range> [divisor]
    $ icalc <address netmask> [divisor]

Examples

    [bsd@cto icalc]$ icalc 192.168.1.1 255.255.255.0
    Netmask         Wildcard        Subnets Prefix
    --------------- --------------- ------- ------
    255.255.255.0   0.0.0.255             1     24

      Subnet          First           Last            Broadcast            Hosts
      --------------- --------------- --------------- --------------- ----------
      192.168.1.0     192.168.1.1     192.168.1.254   192.168.1.255          254
                                                                      ----------
    Class C                                                                  254

    [bsd@cto icalc]$ icalc 192.168.1.1/24 4
    Netmask         Wildcard        Subnets Prefix
    --------------- --------------- ------- ------
    255.255.255.192 0.0.0.63              4     26

      Subnet          First           Last            Broadcast            Hosts
      --------------- --------------- --------------- --------------- ----------
      192.168.1.0     192.168.1.1     192.168.1.62    192.168.1.63            62
      192.168.1.64    192.168.1.65    192.168.1.126   192.168.1.127           62
      192.168.1.128   192.168.1.129   192.168.1.190   192.168.1.191           62
      192.168.1.192   192.168.1.193   192.168.1.254   192.168.1.255           62
                                                                      ----------
    Class C                                                                  248

    [bsd@cto bsd]$ icalc 203.152.135.64-203.152.135.78
    WARNING: Invalid range, corrected.
    Netmask         Wildcard        Subnets Prefix
    --------------- --------------- ------- ------
    255.255.255.240 0.0.0.15              1     28

      Subnet          First           Last            Broadcast            Hosts
      --------------- --------------- --------------- --------------- ----------
      203.152.135.64  203.152.135.65  203.152.135.78  203.152.135.79          14
                                                                      ----------
    Class C                                                                   14

    [bsd@cto bsd]$ icalc 203.152.135.64-203.152.135.78 2
    WARNING: Invalid range, corrected.
    Netmask         Wildcard        Subnets Prefix
    --------------- --------------- ------- ------
    255.255.255.248 0.0.0.7               2     29

      Subnet          First           Last            Broadcast            Hosts
      --------------- --------------- --------------- --------------- ----------
      203.152.135.64  203.152.135.65  203.152.135.70  203.152.135.71           6
      203.152.135.72  203.152.135.73  203.152.135.78  203.152.135.79           6
                                                                      ----------
    Class C                                                                   12

Download

(rubyforge.org/projects/icalc)

Contribute

Any contribution of yours, although howsoever small it may be, shall highly be appreciated; for further development of this and, or many other F/LOSS (Free/Libre Open Source Software) Projects.

Copyright

Copyright (C) 2001-2007 by Dr Balwinder Singh Dheeman. Distributed under the GNU GPL (www.gnu.org/licenses/gpl.html). See the files "COPYING" and, or "Copyright" , supplied with all distributions for additional information.

Authors

Balwinder Singh Dheeman <bsd.SANSPAM@rubyforge.org>
(cto.homelinux.net/~bsd)

 $Id: README,v 1.2 2007/01/24 07:39:43 bsd Exp $

[Validate]