Skip to content

IPTool Inspect

mikael edited this page Dec 26, 2023 · 1 revision

Introduction

The inspect command of iptool allows you to analyze an IP address or a network.

You can provide the IP address in either decimal or hexadecimal format.

If a netmask is not provided, it will default to a /24 (255.255.255.0 in decimal format).

Usage

Here are the different ways you can use the inspect command:

Single IP address

These commands will inspect the provided IP address and print the details.

Dotted decimal

iptool inspect 10.0.0.1

Hexadecimal

iptool inspect c0800d25

It will also recognize addresses with 0x prepended.

iptool inspect 0xc0800d25

IP address in CIDR notation

This will inspect the address or network defined by the IP address and the CIDR prefix. The CIDR prefix indicates the number of leading bits of the network mask.

Dotted decimal

iptool inspect 10.0.0.1/24

Hexadecimal

iptool inspect c0800d25/24

IP address with subnet mask

This will inspect the network defined by the IP address and the subnet mask.

Both the IP and the mask can be in decimal or hexadecimal format.

Dotted decimal and hexadecimal combinations

iptool inspect 10.0.0.1 255.255.255.0
iptool inspect 10.0.0.1 ffffff00
iptool inspect 0a000001 255.255.255.0
iptool inspect 0a000001 ffffff00

Output

Default

By default the output of the command is pretty basic.

Command

iptool inspect 10.0.0.1 255.255.255.0

Output

Address Details:
 IPv4 address       : 10.0.0.1
 Network mask       : 255.255.255.0

Netmask Details:
 Network mask       : 255.255.255.0
 Network bits       : 24
 Wildcard mask      : 0.0.0.255

Network Details:
 CIDR notation      : 10.0.0.0/24 (256 addresses)
 Network address    : 10.0.0.0
 Broadcast address  : 10.0.0.255
 Usable hosts       : 10.0.0.1 - 10.0.0.254 (254 hosts)

Verbose

Run the command with the --verbose (or -v) flag to show detailed information.

Command

iptool inspect 10.0.0.1 255.255.255.0 --verbose

Output

Address Details:
 IPv4 address       : 10.0.0.1
 Network mask       : 255.255.255.0

Netmask Details:
 Network mask       : 255.255.255.0
 Network bits       : 24
 Wildcard mask      : 0.0.0.255

Network Details:
 CIDR notation      : 10.0.0.0/24 (256 addresses)
 Network address    : 10.0.0.0
 Broadcast address  : 10.0.0.255
 Usable hosts       : 10.0.0.1 - 10.0.0.254 (254 hosts)

Binary Notation:
 IPv4 address       : 00001010.00000000.00000000.00000001 (10.0.0.1)
 Network mask       : 11111111.11111111.11111111.00000000 (255.255.255.0)
 Network address    : 00001010.00000000.00000000.00000000 (10.0.0.0)
 Broadcast address  : 00001010.00000000.00000000.11111111 (10.0.0.255)
 Wildcard mask      : 00000000.00000000.00000000.11111111 (0.0.0.255)

Hexadecimal Notation:
 IPv4 address       : 0a000001 (10.0.0.1)
 Network mask       : ffffff00 (255.255.255.0)
 Network address    : 0a000000 (10.0.0.0)
 Broadcast address  : 0a0000ff (10.0.0.255)
 Wildcard mask      : 000000ff (0.0.0.255)

Decimal Notation:
 IPv4 address       :  167772161 (10.0.0.1)
 Network mask       : 4294967040 (255.255.255.0)
 Network address    :  167772160 (10.0.0.0)
 Broadcast address  :  167772415 (10.0.0.255)
 Wildcard mask      :        255 (0.0.0.255)

FAQs

  1. FAQs

Command Groups

Inspect Commands

Subnet Commands

TCP Commands

Clone this wiki locally