I'm new to networking and need help with network settings. I'm looking for a tool for calculating available host address ranges with CIDR using Linux command prompt. How do I use subnet calculator under Linux or UNIX? The above will provide network start & stop range, wildcard, mask and other information. You can calculate 192.168.1.0/24 subnet as follows Instead of taking address information from the shell command line arg sipcalc can obtain relevant information by looking at a specified interface on the system. In this example, get information for eth0 interface: Whatmask is a small C program that will help you with network settings. Download and compile it as follows: OR
Linux comes with various IP subnet calculator that will help you with network settings. Once such program is Sipcalc which is an ip subnet calculator. You can install it as follows under Debian or Ubuntu Linux:$ sudo apt-get update
$ sudo apt-get install sipcalc
Sample outputs:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
sipcalc
0 upgraded, 1 newly installed, 0 to remove and 51 not upgraded.
Need to get 30.6kB of archives.
After this operation, 123kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu/ lucid/universe sipcalc 1.1.4-2 [30.6kB]
Fetched 30.6kB in 2s (15.1kB/s)
Selecting previously deselected package sipcalc.
(Reading database ... 203411 files and directories currently installed.)
Unpacking sipcalc (from .../sipcalc_1.1.4-2_i386.deb) ...
Processing triggers for man-db ...
Processing triggers for doc-base ...
Processing 1 added doc-base file(s)...
Registering documents with scrollkeeper...
Setting up sipcalc (1.1.4-2) ...
How Do I Calculate Subnets?
$ sipcalc 192.168.1.0/24
Sample outputs:
-[ipv4 : 192.168.1.0/24] - 0
[CIDR]
Host address - 192.168.1.0
Host address (decimal) - 3232235776
Host address (hex) - C0A80100
Network address - 192.168.1.0
Network mask - 255.255.255.0
Network mask (bits) - 24
Network mask (hex) - FFFFFF00
Broadcast address - 192.168.1.255
Cisco wildcard - 0.0.0.255
Addresses in network - 256
Network range - 192.168.1.0 - 192.168.1.255
Usable range - 192.168.1.1 - 192.168.1.254
$ sipcalc 192.168.1.5/24Interface Specific Calculation
$ sipcalc eth0
Sample outputs:
-[int-ipv4 : eth0] - 0
[CIDR]
Host address - 192.168.3.254
Host address (decimal) - 3232236542
Host address (hex) - C0A803FE
Network address - 192.168.3.0
Network mask - 255.255.255.0
Network mask (bits) - 24
Network mask (hex) - FFFFFF00
Broadcast address - 192.168.3.255
Cisco wildcard - 0.0.0.255
Addresses in network - 256
Network range - 192.168.3.0 - 192.168.3.255
Usable range - 192.168.3.1 - 192.168.3.254
whatmask Program
$ cd /tmp
$ wget http://downloads.laffeycomputer.com/current_builds/whatmask/whatmask-1.2.tar.gz
$ tar -zxvf whatmask-1.2.tar.gz
$ cd whatmask-1.2/
$ ./configure
$ make
$ sudo make install
You can use it as follows to find out usable ip address with /29:$ whatmask /29
Sample outputs:
---------------------------------------------
TCP/IP SUBNET MASK EQUIVALENTS
---------------------------------------------
CIDR = .....................: /29
Netmask = ..................: 255.255.255.248
Netmask (hex) = ............: 0xfffffff8
Wildcard Bits = ............: 0.0.0.7
Usable IP Addresses = ......: 6
$ whatmask 202.54.1.2/27
Sample outputs:
------------------------------------------------
TCP/IP NETWORK INFORMATION
------------------------------------------------
IP Entered = ..................: 202.54.1.2
CIDR = ........................: /27
Netmask = .....................: 255.255.255.224
Netmask (hex) = ...............: 0xffffffe0
Wildcard Bits = ...............: 0.0.0.31
------------------------------------------------
Network Address = .............: 202.54.1.0
Broadcast Address = ...........: 202.54.1.31
Usable IP Addresses = .........: 30
First Usable IP Address = .....: 202.54.1.1
Last Usable IP Address = ......: 202.54.1.30
Download software featured in this faq:
本日志由 flyinweb 于 2011-01-26 08:46:24 发表,目前已经被浏览 1610 次,评论 0 次;
引用通告:http://www.517sou.net/Article/569/Trackback.ashx
而且直接配置文件是效率最高的,通过其它驱动效率都相对较低,BDB
这个测试不太准确,看官方的测试结果:http://bind-dlz.sourceforg
为什么使用BDB时QPS这么低? 我在bind版本基本相似的环境中测试的
It is quite useful and interesting too.
VIRT 的上限是64G,也就是36位, cat /proc/cpuinfo的结果是:addre
昨天要准备用线程重写webbench,试验了下Fedora Linux 2.6.35.14
不明白您的具体的意思是什么?
已经发送到你QQ邮箱