IP Address Allocation in Network Planning

Source: Internet
Author: User

In network planning, the design of the IP address scheme is crucial. A good IP address scheme can not only reduce network load, but also lay a good foundation for future network expansion. This article discusses the IP address scheme design in network planning and provides an example of the IP address scheme design.

I. IP address and subnet mask

The IP address is used to identify a unique machine on the network. According to RFC791, the IP address consists of 32-bit binary numbers (four bytes), which are 12-bit decimal numbers (xxx. xxx. xxx. xxx) each 3-digit represents 8-bit binary (one byte ). Because one byte can represent a maximum of 255, each byte in the IP address can contain 0 ~ Value Between 255. However, 0 and 255 have special meanings. 255 represents the broadcast address. 0 in the IP address is used to specify the network address number (if 0 is at the end of the address) or the node address (if 0 is at the address ). For example, 192? 168? 32? 0 indicates the network 192.168.32.0, and 0.0.0.62 indicates the computer with the Node Address 62 on the network.

IP addresses are divided into three categories, Class A, Class B, and class C, depending on the number of network address bytes in the IP address. Class A is used for ultra-large networks (Millions of nodes), Class B is used for medium-scale networks (Thousands of nodes), and class C is used for small networks (up to 254 nodes ). Class A addresses use the first byte to represent the network address, and the last three words represent the node address. Class B addresses use the first two bytes to represent the network address, and the last two bytes to represent the node address. Class C addresses use the first three bytes to represent the network address, and the fourth byte to represent the node address. See table 1.

The network device determines the network type based on the first byte of the IP address. The first binary bit of the first byte in A network is 0, and the first two binary digits of the first byte in B network are 10; the first three binary digits of the first byte in the C-class network are 110, as shown in table 2. Change to decimal visible Class A network address from 1 ~ 127, Class B network addresses from 128 ~ 191, Class C network address from 192 ~ 223. 224 ~ The number of 239 instances is sometimes referred to as Class D, and more than 239 of network numbers are retained.

The subnet mask is used to locate the network and Node Address in the IP address. The subnet mask is 32 characters long. 1 indicates the network part, and 0 indicates the node address part. The subnet mask of Class A, Class B, and class C networks is shown in Table 3. For example, if A node IP address is 192.168.202.195 and the subnet mask is 255.255.0, the network address is 192.168.202 and the node address is 195.

Sometimes to Facilitate network management, you need to divide the network into several network segments. To solve this problem, we must break the traditional 8-bit boundary and use the "preemptive" digits in the node address space as the network address. Specifically, the following two steps are required to create a subnet mask:
1. determine the number of IP network segments
2. Determine the subnet mask.

First, determine the number of IP network segments. For example, if you have five CIDR blocks on your network but only allow users on the three CIDR blocks to access the Internet, you must configure IP addresses for the three CIDR blocks. After determining the number of IP network segments, determine the number of CIDR blocks to be intercepted from the node address space to create a subnetwork number for each CIDR block. The method is to calculate the combined values of these digits. For example, two digits can be used in four combinations (00, 01, 10, and 11 ), there are eight combinations (000, 001, 010, 011, 100, 101, 110, and 111 ). Note that all 0 and 1 combinations must be removed from these groups. Because the IP protocol specifies that the combination of all 0 and 1 represents the network address and broadcast address, if we need to divide the class C Network (192.168.123.0) into four network segments, the first three digits of the node address must be intercepted as the network address. The corresponding subnet mask is 255.255.255.255.244 (11111111.11111111.
11111111.11100000), use the subnet mask on the address 192.168.123.0 to obtain the value in Table 4.

It can be seen that the above sub-network scheme is used, and each sub-network has 30 node addresses. By intercepting several network addresses from the node address space, you can divide the network into several network segments to Facilitate network management. Ii. design an IP address solution instance

In the process of network planning, it is indispensable to draw an accurate network diagram. Accurate network documentation is indispensable for upgrading and analyzing problems in the future. A good network diagram should contain information about various network devices connected to different network segments, such as the locations and IP addresses of routers, bridges, and gateways, and mark each network segment with the corresponding network address. If the network is small and has only one network segment, you can draw other key network devices (such as servers), including network addresses. This is a simple network diagram. Five network segments are interconnected by servers (the server provides the routing function), and one is used to connect the backbone network to other network segments. Before designing an IP address solution, consider the following:
? Whether to connect the network to the Internet
? Whether to divide the network into several network segments for convenient Network Management
? Static IP Address allocation or dynamic IP Address Allocation

If you do not plan to connect to the Internet, you can use the non-Internet connection network address defined in RFC1918, which is called "dedicated Internet Address Allocation ". RFC1918 specifies the Guiding Principles for IP Address allocation that do not want to connect to the Internet. In the IP Address Allocation Scheme controlled by the Internet address Authority (IANA), three types of network numbers are set aside for private networks not connected to the Internet, which are used for A, B, and C IP networks respectively, the details are as follows:
10.0.0.0 ~ 10.20.255.255
172.16.0.0 ~ 172.131.255.255
192.168.0.0 ~ 192.168.255.255

IANA makes sure that these network numbers are not allocated to any network connected to the Internet, so anyone can choose these network addresses as their own network addresses. Table 5 shows the Network Address Allocation Scheme with reserved IP addresses.

If you plan to connect the network to the Internet, you need to apply for a network address from the ISP. Here, we assume we get a class C network address 192.168.168.0. As shown in the network diagram, the entire network is divided into five network segments, each of which uses an IP address. Therefore, a subnet mask with at least five subnets must be used. Here, the subnet mask we use is 255.255.255.255.244. The network IP address allocation scheme is shown in table 6.

It is not hard to see that, after dividing the network into five CIDR blocks using the subnet mask, each CIDR block has 30 available IP addresses. If the number of nodes in a CIDR Block exceeds 30, you can use the dynamic IP Address Allocation Protocol (DHCIP.

Article entry: dnbm responsibility Editor: dnbm

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.