tldr/pages/linux/ipcalc.md

24 lines
563 B
Markdown
Raw Normal View History

2018-08-31 19:41:11 +01:00
# ipcalc
2018-09-02 00:29:13 +01:00
> Perform simple operations and calculations on IP addresses and networks.
2018-08-31 19:41:11 +01:00
2018-09-04 17:39:31 +01:00
- Show information about an address or network with a given subnet mask:
2018-08-31 19:41:11 +01:00
2018-09-03 23:20:14 +01:00
`ipcalc {{1.2.3.4}} {{255.255.255.0}}`
2018-08-31 19:41:11 +01:00
2018-09-02 00:29:13 +01:00
- Show information about an address or network in CIDR notation:
2018-08-31 19:41:11 +01:00
2018-09-03 23:20:14 +01:00
`ipcalc {{1.2.3.4}}/{{24}}`
2018-08-31 19:41:11 +01:00
2018-09-02 00:29:13 +01:00
- Show the broadcast address of an address or network:
2018-08-31 19:41:11 +01:00
2018-09-03 23:20:14 +01:00
`ipcalc -b {{1.2.3.4}}/{{30}}`
2018-08-31 19:41:11 +01:00
2018-09-02 00:29:13 +01:00
- Show the network address of provided IP address and netmask:
2018-08-31 19:41:11 +01:00
2018-09-03 23:20:14 +01:00
`ipcalc -n {{1.2.3.4}}/{{24}}`
2018-08-31 19:41:11 +01:00
2018-09-02 00:29:13 +01:00
- Display geographic information about a given IP address:
2018-08-31 19:41:11 +01:00
2018-09-03 23:20:14 +01:00
`ipcalc -g {{1.2.3.4}}`