Computing network address

Source: Internet
Author: User

How to calculate the network address
In our daily life, we can see from the literal that the street address is North Street, but we cannot see the network address from the IP address. We need to calculate the network address, the subnet mask we mentioned above must be used.

The calculation process is like this: Convert the IP address and subnet mask into binary values, and then perform the calculation. The result is the network address. As shown in the following operation, alignment up and down is performed. The values of 1 and 1 are equal to 1, and the remaining values are 0.
1... 0... 1... 0
1... 0... 0... 0... 0
And operations ________________
1... 0... 0... 0... 0
For example, if the calculated IP address is 202.99.160.50 and the subnet mask is 255.255.255.0, follow these steps:
1) convert the IP address and subnet mask to binary
202.99.160.50 is converted to binary 11001010? 01100011? 10100000? 00110010
255.255.255.0 is converted to binary 11111111? 11111111? 11111111? 00000000
2) perform and calculate the two
11001010? 01100011? 10100000? 00110010
11111111? 11111111? 11111111? 00000000
And Calculation ________________________________________
11001010? 01100011? 10100000? 00000000
3) convert the calculation result to decimal, which is the network address.
11001010? 01100011? 10100000? 00000000 is converted to decimal format 202.99.160.0.
Now we can answer the communication and communication problems in the above three cases.
1. The calculation result below shows that the network addresses of the two computers are 192.168.0.0 and the IP addresses are different.
192.168.0.1 112.1600.10101000.20.0000.00000001
201710000255.0 11111111.11111111.111111.00000000
And Calculation ______________________________________________________________
192.168.0.0 112.1600.10101000.00000000.00000000
192.168.0.200 11000000.10101000.00000000.11001000
201710000255.0 11111111.11111111.111111.00000000
And Calculation ______________________________________________________________
192.168.0.0 112.1600.10101000.00000000.00000000

2. The calculation result below shows that the network address of machine 1 is 192.168.0.0, and the network address of Machine 2 is 192.168.1.0 but not the same network.
192.168.1.200 11000000.10101000.00000001.11001000
201710000255.0 11111111.11111111.111111.00000000
And Calculation ______________________________________________________________
192.168.1.0 112.1600.10101000.00000001.00000000

3. The calculation result below shows that the network address of machine 1 is 192.168.0.0, and the network address of Machine 2 is 192.168.0.192 and is not in the same network.
192.168.0.1 112.1600.10101000.20.0000.00000001
255.255.255.192 11111111.11111111.111111.111_00
And Calculation ______________________________________________________________
192.168.0.0 112.1600.10101000.00000000.00000000

192.168.0.200 11000000.10101000.00000000.11001000



Author: 61.138.234 .*Reply to this speech

--------------------------------------------------------------------------------

2. How to calculate the network address
255.255.255.192 11111111.11111111.111111.111_00
And Calculation ______________________________________________________________
192.168.0.182 11000000.10101000.00000000.11000000

I believe that this should understand why the network address is calculated and how it is calculated, but there may be many questions, such as why the IP address is written, what is the subnet mask, and so on. Don't worry, the following is a brief introduction.
Iii. Computing-IP addresses and subnet masks Used for computing
After knowing the IP address and subnet mask, you can calculate:
● Network address
● Broadcast address
● Address range
● This website has several hosts
[Example 1] in the following example, the IP address 192.168.100.5 subnet mask is 255.255.255.0. Calculate the network address, broadcast address, address range, and number of hosts.
1. Step-by-Step Calculation
1) convert the IP address and subnet mask to binary. The subnet mask is the network address and the host address. Network Address before dotted line, host address after dotted line
192.168.100.5 112.1600.10101000.01100100.00000101
201710000255.0 11111111.11111111.111111.00000000

2) perform and calculate the IP address and subnet mask. The result is the network address.
192.168.100.5 112.1600.10101000.01100100.00000101
201710000255.0 11111111.11111111.111111.00000000
And Calculation ______________________________________________________________
Result: 192.168.100.0 112.1600.10101000.01100100.00000000.

3) change the network address part of the above network address to full 1, and the result is the broadcast address.
Network Address: 192.168.100.0 112.1600.10101000.01100100.00000000
___________________________________________________________________________
Change host address to full 1
Broadcast address: 192.168.100.255 111000000.10101000.01100100.11111111
4) The address range is all hosts included in this section.
The network address + 1 is the first host address, and the broadcast address-1 is the last host address.
The address range is: network address + 1 to broadcast address-1
In 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.100.2... 192.168.100.20... 192.168.100.111... 192.168.100.254

5) number of hosts
Number of hosts = 2 binary number of hosts-2
2 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 = 254
2. overall computing
The above example is used together to calculate the process as follows:
192.168.100.5 112.1600.10101000.01100100.00000101
201710000255.0 11111111.11111111.111111.00000000

2) perform and calculate the IP address and subnet mask. The result is the network address.
192.168.100.5 112.1600.10101000.01100100.00000101
201710000255.0 11111111.11111111.111111.00000000
And Calculation ______________________________________________________________
The result is the network address 192.168.100.0 112.1600.10101000.01100100.00000000.

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.