Smarter by Design.Simpler for Business
sys-cmd ipcalc
sys-cmd ipcalc calculates the network address, the broadcast address, the two spellings of the mask and the usable address range from the IP address and the mask given in WEB-CLI. It does not send any packets to the network; it is used to understand which subnet a VIP or a backend address falls into and whether two addresses are in the same subnet.
Command Summary
# type ipcalc and press Tab: a free parameter
admin@TR7LBWAF01> sys-cmd ipcalc
<ipcalc-parameter-1>
admin@TR7LBWAF01> sys-cmd ipcalc <address>/<prefix>
admin@TR7LBWAF01> sys-cmd ipcalc <address> <mask>
admin@TR7LBWAF01>
Everything written after the word ipcalc is passed to the tool as it is. There is no mandatory field; the address and the mask are written in one of the formats below.
How It Works
| Subject | Behavior |
|---|---|
| Context | It only calculates; the selected v-device and route table do not change the result. |
| Duration | It writes the result and closes immediately. |
| Pipe | The output can be filtered with | or written to a file with to-file. |
| Recording | Every run is written to the user logs. |
Writing Formats
| Format | What is calculated | Example |
|---|---|---|
<address>/<prefix> | The information of the network given with a prefix length | 10.20.0.0/22 |
<address> <mask> | The information of the network given with a dotted mask | 198.51.100.137 255.255.255.0 |
The names of the lines in the output and the additional options depend on the version of the tool on the device.
Examples
admin@TR7LBWAF01> sys-cmd ipcalc 10.0.7.20/24
admin@TR7LBWAF01>
admin@TR7LBWAF01> sys-cmd ipcalc 198.51.100.137 255.255.255.0
admin@TR7LBWAF01>
admin@TR7LBWAF01> sys-cmd ipcalc 10.10.0.0/22
admin@TR7LBWAF01>
Things to Know
- Are two addresses in the same subnet? Both addresses are calculated separately with the same mask; if the network addresses are equal, the addresses are in the same subnet and routing is not needed between them.
- Address planning. Before a new IP address is added to a route table, the usable range is verified with this command; adding an address is done with the
network ipcommand.
