How to allocate IP addresses and subnet masks to 1000 computers

Source: Internet
Author: User

1000 computers can allocate IP addresses and subnet masks in a Class B network, which can have 65 534 hosts. When the number of enterprise users is, you must use a Class B IP address segment. Obviously, in many cases, many IP address segments are useless (for example, there are only about 300 nodes in the Network), which is wasted, this is a pity. Reserved as the address segment used by the internal network: Class A address: 10.0.0.0-10.20.255.254 can accommodate 16 777 214 Class B address: 172.16.0.0-172.31.255.254 can accommodate 65 534 hosts Class C address: 192.168.0.0-192.168.255.254 can accommodate 254 www.2cto.com (1), network ID, host ID calculation method: [instance 1] The default subnet mask of class C address is 192.9.200.13: 255.255.255.0 1. Convert the IP address 192.9.200.13 to binary 11000000 00001001 11001000 00001101 2. Convert the subnet mask 255.255.255.0 to binary 11111111 11111111 11111111 00000000 3. Convert the two binary logic "and" to 11000000. 00001 001 11001000 00000000 is converted to 192.9.200.0 in decimal format. This is the "Network Address". The three address segments 192.9.200 are network IDs. 4. After the subnet mask is reversed in binary format, perform the "and" operation with the IP address. The obtained result is the master host ID. 00000000 00000000 00000000 11111111 11000000 (subnet mask value) Counter 00001001 11001000 00001101 00000000 after "and" operation, 00000000 00000000 00001101 is converted to decimal format 0.0.0.13, this is the host ID of the IP address. When www.2cto.com communicates between two computers using TCP/IP, TCP/IP performs the "and" Operation on the subnet mask of the Local Machine and the IP address of the host on the receiver, obtain the network ID of the target host. By comparing with the network ID of the local machine, you can know whether the receiver host is in the local network. If the network ID is the same, it indicates that the receiver is in the local network, then, TCP/IP can send data packets directly to the target host through relevant protocols. If the network ID is different and the target host is on a remote network, the data packet is sent to the vro on the network, and the router sends the data packet to other networks until the destination is reached. Determining whether different hosts are in the same network is the network ID corresponding to the Host IP address. The network ID length determines the IP address type. As long as the network ID length is the same, it belongs to the same type of network. In this way, only one network can exist in one network segment, because their network subnet mask is the same. The network ID includes the network ID and subnet ID. Note: The "and" operation is an arithmetic logic operation method. The binary "and" operation rule is that when one of the two corresponding bitwise codes involved in the operation is 0, the operation result is 0, the result is 1 only when the numbers corresponding to the two bitwise are 1. (2) 1000 computers clearly belong to B-type networks. To determine how IP addresses are allocated, first determine the first two IP segments of B-type IP addresses. The tentative B-type IP address is 172.18.x.x. The key is to establish the third segment, as long as the network ID is the same. 2 m-2 ≥ 1000 m = 10 it can be determined that the number of host addresses (the number of 0) is 10, the subnet mask consists of 32 bits, the number of 1 is 22 bits, the binary representation of the subnet mask is: 11111111 11111111 11111100 00000000, And the decimal value is: 255.255.252.0. Match 1 in the subnet mask with the $ of the IP address, and 0 with the & of the IP address. 201710000252.0 11111111.11111111.111100.00000000 172.18.x.x 10101100.00010010. $ &&. & www.2cto.com network ID section 10101100.00010010. ###### 00.00000000 the IP address is 172.18.x.x, and the number of binary data is 10101100.00010010. $ &&. &, $ can be set to 0 or 1, not necessarily all 0 or all 1. For the convenience of calculation, fill in 0 for all $, & enter it as you like, because this address belongs to Class B and is mainly set to the third segment. 10101100.00010010.000000 &&. &, a total of 1000 computers, the fourth segment of the IP address can accommodate 254 hosts (1-254), 1000/254 = 3.93, using the first method, the integer is 4, so that the third segment of the IP address must be divided into four different numbers. Only 1 or 0 can be entered, that is, four numbers in 000000, it can only be 1 or 0. As for how to fill it out, it is based on your own preferences. I did this, 00000000, 00000001, 00000010, 00000011. Convert it to binary, Which is 0, 1, 2, and 3, so that the third segment can be determined. Divide the IP address into four network segments: 172.18.0.y, 172.18.1.y, 172.18.2.y, and 172.18.3.y, y can be randomly selected between the range (1-254), as long as the host IP address does not conflict. Author: jiangxuezhi2009

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.