How to Calculate IP Subnet Address with ipcalc Tool

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Marin Todorov

I am a bachelor in computer science and a Linux Foundation Certified System Administrator. Currently working as a Senior Technical support in the hosting industry. In my free time I like testing new software and inline skating.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

4 Responses

  1. spezialist says:

    I agree, a good tutorial, but there is one sad nuance: under RHEL/CentOS, the functionality of the ipcalc utility is very limited :-(. Because of this, all the above mentioned practical examples of using the ipcalc utility are not applicable under RHEL/CentOS.

    # rpm -q initscripts
    
    initscripts-9.49.46-1.el7.x86_64
    
    # ipcalc 192.168.20.0/24
    
    Usage: ipcalc [OPTION...]
      -c, --check         Validate IP address for specified address family
      -4, --ipv4          IPv4 address family (default)
      -6, --ipv6          IPv6 address family
      -b, --broadcast     Display calculated broadcast address
      -h, --hostname      Show hostname determined via DNS
      -m, --netmask       Display default netmask for IP (class A, B, or C)
      -n, --network       Display network address
      -p, --prefix        Display network prefix
      -s, --silent        Don't ever display error messages
    
    Help options:
      -?, --help          Show this help message
      --usage             Display brief usage message
    
  2. Stefan Lasiewski says:

    Great tutorial, thanks. From the comments that I read on Facebook, many people would have benefited from an example that showed a couple of uncommon networks, such as 192.168.20.0/23, instead of a /24.

    Thanks for working on this.

  3. Allwin says:

    Do you have similar tool for windows based machines.

    • Stefan Lasiewski says:

      Download Windows Subsystem for Linux, install Ubuntu, and not only will you get ipcalc but you’ll get Ubuntu’s powerful Bash environment.

Leave a Reply to Allwin Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.