ipcalc
networkingLinux/Unix
The ipcalc command is one of the most frequently used commands in Linux/Unix-like operating systems. ipcalc Calculate IP address information
Quick Reference
Command Name:
ipcalc
Category:
networking
Platform:
Linux/Unix
Basic Usage:
ipcalc [options] [arguments]
Common Use Cases
Syntax
ipcalc [options] [ip_address[/prefix]]
Options
Option | Description |
---|---|
-b, --broadcast |
Display the broadcast address |
-h, --hostname |
Display the hostname |
-m, --netmask |
Display the netmask |
-n, --network |
Display the network address |
-p, --prefix |
Display the prefix |
-r, --range |
Display the network address range |
-s, --silent |
Don't display any information, just return the exitcode |
-c, --class |
Display the address class (A, B, C, etc.) |
--all-info |
Display all available information |
-d, --deaggregate |
Display the deaggregated IP addresses |
-i, --info |
Display information about the given network |
-6, --ipv6 |
IPv6 calculation (some implementations only) |
-S, --split |
Split the network into smaller subnets (some implementations only) |
--help |
Display help information |
--version |
Display version information |
Examples
How to Use These Examples
The examples below show common ways to use the ipcalc
command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.
# Basic Examples Basic
ipcalc 192.168.1.5/24