The Ip2long IP address is converted to an integer type.Long2ip integer data is converted to IP. The subnet mask is converted to a mask length mode:$slash _notation = strlen (Preg_replace ("/0/", "", Decbin (Ip2long ($subnet _mask)));$bits =strpos (Decbin (Ip2long ($mask)), "0"); The
address, and the broadcast address-1 is the last host address.The address range is: network address + 1 to broadcast address-1In this example, the Network range is 192 · 168 · 100 · 1 to 192 · 168 · 100 · 254.That is to say, the following addresses are all in one CIDR block.192 · 168 · 100 · 1, 192 · 168 · 2... 192 · 168 · 100 · 20... 192 · 168 · 100 · 111... 192 · 168 · 100 · 2545) number of hostsNumber of hosts = 2 binary number of hosts-22 is beca
is usually a broadcast address and a network address in the IP address. These two addresses are generally unavailable. You can refer to the details www.2cto.com 5. IP address range algorithm: 1) company IP address information query: (for example, 113.73.0.0 or 113.73.0.0/17) Yangge recommends a better method: http://soc.taobao.com:9999/soc/extend/?extend_feature
· 168 · 100 · 254.That is to say, the following addresses are all in one CIDR block.192 · 168 · 100 · 1, 192 · 168 · 2... 192 · 168 · 100 · 20... 192 · 168 · 100 · 111... 192 · 168 · 100 · 2545) number of hostsNumber of hosts = 2 binary number of hosts-22 is because the host does not include the network address and broadcast address. In this example, the number of binary hosts is 8 bits.Number of hosts = 28-2 = 2542) overall computingThe above exampl
This article describes in detail how to configure network IP addresses. What operations do we need? I believe that reading this article will help you.
A few days ago, the netizen harcsbg encountered a strange subnet mask problem during network IP address configuration. harcsbg asked for help in the ccid it community.
Dear experts, I have encountered a strange pro
IP Address Subnet mask calculation, return IP segment start and end range, length, mask and other information.
/**
* Mask Calculator
* @author Weaksun
* @param string $ip IP
* @param
IP address segment: 210.143.144.1 ~ 210.143.159.254,
210.143. (1001) 0000.00000000 indicates the network address and identifies a network,
210.143. (1001) 1111.11111111 is the broadcast address, which can broadcast messages to all addresses in the network.
This CIDR block is equivalent to 210.143.144.0/20, that is, 210.143. (1001) 0000.00000000, and 20 indicates the sub
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.