Completely understand IP addresses-calculate related addresses

Source: Internet
Author: User


Completely understand the IP address -- after computing the relevant IP address, you can calculate the IP address and subnet mask: 1. network address 2. broadcast address 3. Address range 4. Several hosts on this website. Example 1: in the following example, the IP address is 192 · 168 · 100 · 5. The subnet mask is 255 · 255 · 255 · 0. Calculate the network address, broadcast address, address range, and number of hosts. (1) perform step-by-step calculation. 1) convert the IP address and subnet mask to binary. The subnet mask is a network address consecutively. The host address is followed by the subnet mask. The network address is displayed before the dotted line, and the host address is displayed after the dotted line. 2) Calculate the IP address and subnet mask. The result is the network address. 3) change the network address part of the network address above, the host address is changed to full 1, and the result is the broadcast address. 4) The address range is the network address of all hosts included in this segment + 1 is the first host address, and the broadcast address-1 is the last host address, it can be seen that the address range is: network address + 1 to broadcast address-1 The Network range of this example is: 192 · 168 · 100 · 1 to 192 · 168 · 100 · 254 that is to say, the following addresses are all in a network segment. 192 · 168 · 100 · 1, 192 · 168 · 2... 192 · 168 · 100 · 20... 192 · 168 · 100 · 111... 192 · 168 · 100 · 2545) number of hosts = 2 binary number of host digits-2 minus 2 because the host does not include the network address and broadcast address. In this example, the number of binary hosts is 8 bits. The number of hosts = 28-2 = 254 (2) overall calculation. Let's combine the above examples to calculate the process as follows: Example 2: the IP address is 128 · 36 · 199 · 3. The subnet mask is 255 · 255 · 240 · 0. Calculate the network address, broadcast address, address range, and number of hosts. 1) convert the IP address and subnet mask to binary. The subnet mask is a network address consecutively. The host address is followed by the network address in front of the dotted line and the host address in front of the dotted line. 2) the IP address and subnet mask are operated and calculated. The result is the network address. 3) the network address in the calculation result is changed to 1, and the result is the broadcast address. 4) The address range is the network address of all hosts included in this segment + 1 is the first host address, and the broadcast address-1 is the last host address, it can be seen that the address range is: network address + 1 to broadcast address-1 The Network range of this example is: 128 · 36 · 192 · 1 to 128 · 36 · 207 · 254 5) number of hosts = 2 binary digits number of hosts-2 number of hosts = 212-2 = 4094 minus 2 because the host does not include the network address and broadcast address. From the above two examples, we can see that no matter whether the subnet mask is standard or special, you only need to convert the address into binary when calculating the network address, broadcast address, and address count, then, the subnet mask is used to determine the network address before consecutive 1, and then the host address for calculation.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.