Thursday, February 17, 2011

Linux上好用的IP計算工具-sipcalc

sipcalc這個工具真是計算IP位置的好工具!尤其是在Linux console mode就可以使用囉!
當然啦!在OpenSUSE 11.3上只要透過zypper就可以安裝成功了。

Steps:
1. linux-8zbb:~ # zypper in sipcalc
Retrieving repository 'OpenSUSE 11.3 update' metadata [done]
Building repository 'OpenSUSE 11.3 update' cache [done]
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following NEW package is going to be installed:
sipcalc

1 new package to install.
Overall download size: 29.0 KiB. After the operation, additional 58.0 KiB will be used.
Continue? [y/n/?] (y): y
Retrieving package sipcalc-1.1.5-0.pm.2.1.x86_64 (1/1), 29.0 KiB (58.0 KiB unpacked)
Retrieving: sipcalc-1.1.5-0.pm.2.1.x86_64.rpm [done (15.7 KiB/s)]
Installing: sipcalc-1.1.5-0.pm.2.1 [done]
Additional rpm output:
warning: /var/cache/zypp/packages/Packman_opensuse_11.3/x86_64/sipcalc-1.1.5-0.pm.2.1.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 9a795806: NOKEY

2. linux-8zbb:~ # sipcalc 10.10.10.1/23 <- 指定某個IP subnet
-[ipv4 : 10.10.10.1/23] - 0

[CIDR]
Host address - 10.10.10.1
Host address (decimal) - 168430081
Host address (hex) - A0A0A01
Network address - 10.10.10.0
Network mask - 255.255.254.0
Network mask (bits) - 23
Network mask (hex) - FFFFFE00
Broadcast address - 10.10.11.255
Cisco wildcard - 0.0.1.255
Addresses in network - 512
Network range - 10.10.10.0 - 10.10.11.255
Usable range - 10.10.10.1 - 10.10.11.254

linux-8zbb:~ # sipcalc eth0 <- 針對目前的interface
-[int-ipv4 : eth0] - 0

[CIDR]
Host address - 10.10.10.253
Host address (decimal) - 168430333
Host address (hex) - A0A0AFD
Network address - 10.10.10.0
Network mask - 255.255.255.0
Network mask (bits) - 24
Network mask (hex) - FFFFFF00
Broadcast address - 10.10.10.255
Cisco wildcard - 0.0.0.255
Addresses in network - 256
Network range - 10.10.10.0 - 10.10.10.255
Usable range - 10.10.10.1 - 10.10.10.254

沒錯它就是這麼簡單好用,更多的功能請自行研究吧。

No comments: