Giter Site home page Giter Site logo

jkinglyf / ipcalc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nmav/ipcalc

0.0 0.0 0.0 141 KB

OBSOLETE REPO: Please use gitlab.com/ipcalc/ipcalc

Home Page: https://gitlab.com/ipcalc/ipcalc

License: GNU General Public License v2.0

Makefile 5.34% C 83.15% Shell 5.22% Roff 6.29%

ipcalc's Introduction

Information about ipcalc

This is a modern tool to assist in network address calculations for IPv4 and IPv6. It acts both as a tool to output human readable information about a network or address, as well as a tool suitable to be used by scripts or other programs.

It supports printing a summary about the provided network address, multiple command line options per information to be printed, transparent IPv6 support, and in addition it will use libGeoIP if available to provide geographic information.

The project started as a fork of the ipcalc tool in the Fedora distribution but it has since then replaced the original tool.

How to build

Simply type:

$ make

In order to access geo-information the application depends on the maxmind database (libmaxminddb). Alternatively it can be built using the older libgeoip (libgeoip) or with no geo-information whatsoever. The options can be provided on the makefile via the variables USE_GEOIP (yes/no), USE_MAXMIND (yes/no). For example the following command will compile with no support for geo-information.

$ make USE_GEOIP=no USE_MAXMIND=no

Examples

IPv4

$ ./ipcalc --all-info 193.92.150.2/24
Address:        193.92.150.2
Network:        193.92.150.0/24
Netmask:        255.255.255.0 = 24
Broadcast:      193.92.150.255
Reverse DNS:    150.92.193.in-addr.arpa.

Address space:  Internet
Address class:  Class C
HostMin:        193.92.150.1
HostMax:        193.92.150.254
Hosts/Net:      254

Country code:   GR
Country:        Greece
$ ./ipcalc -pnmb --minaddr --maxaddr --geoinfo --addrspace 193.92.150.2/255.255.255.224
NETMASK=255.255.255.224
PREFIX=27
BROADCAST=193.92.150.31
NETWORK=193.92.150.0
MINADDR=193.92.150.1
MAXADDR=193.92.150.30
ADDRSPACE="Internet"
COUNTRY="Greece"

IPv6

$ ./ipcalc --all-info 2a03:2880:20:4f06:face:b00c:0:14/64
Full Address:   2a03:2880:0020:4f06:face:b00c:0000:0014
Address:        2a03:2880:20:4f06:face:b00c:0:14
Full Network:   2a03:2880:0020:4f06:0000:0000:0000:0000/64
Network:        2a03:2880:20:4f06::/64
Netmask:        ffff:ffff:ffff:ffff:: = 64
Reverse DNS:    6.0.f.4.0.2.0.0.0.8.8.2.3.0.a.2.ip6.arpa.

Address space:  Global Unicast
HostMin:        2a03:2880:20:4f06::
HostMax:        2a03:2880:20:4f06:ffff:ffff:ffff:ffff
Hosts/Net:      2^(64) = 18446744073709551616

Country code:   IE
Country:        Ireland
$ ./ipcalc -pnmb --minaddr --maxaddr --addrspace --geoinfo 2a03:2880:20:4f06:face:b00c:0:14/64
NETMASK=ffff:ffff:ffff:ffff::
PREFIX=64
NETWORK=2a03:2880:20:4f06::
MINADDR=2a03:2880:20:4f06::
MAXADDR=2a03:2880:20:4f06:ffff:ffff:ffff:ffff
ADDRSPACE="Global Unicast"
COUNTRY="Ireland"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.