IP address planning in enterprises (1)

Source: Internet
Author: User

However, since these enterprises do not have experience in network management and planning, many new network administrators do not pay enough attention to IP address planning and management, as a result, it will cause a lot of inconvenience when you need to expand the network or add services in the future, and over time, there will be no structured compilation to gradually increase the difficulty of daily maintenance management. Therefore, this article will introduce the allocation and management of IP addresses. Let's take a look at several basic rules for address allocation.

Rule 1: systematic addressing

Systemization is structured and organized. The network address is organized according to the enterprise's specific needs and organizational structure. Generally, the planning process is based on the overall situation and overall focus, and then divided from big to small. In fact, this is the same as the actual physical address allocation principle. It must first be divided into provinces, cities, counties, districts, roads, streets, and finally doorboards. In terms of the network, the systematic compilation of adjacent hosts or office communities with the same service nature is also consecutive on the IP address, in this way, effective route aggregation can be easily performed on the border routing devices of each block, so that the entire network structure is clear, the routing information is clear, and the route table in the router can also be reduced. The addresses in each region are relatively independent from those in other regions, which facilitates independent and flexible management.

Note: Multiple Route entries are summarized into one containing the total route entries. This is a route summary or route induction. When a router checks and computes a route, resources are consumed. The more route entries there are, the longer the route table is, the more time it takes. Therefore, the route table length is reduced through route aggregation, it is helpful to improve the efficiency of the router. The efficiency of effective route summary and summarization is closely related to the distribution of IP address CIDR blocks in the network structure. The more continuous and organized the IP address deployment, the easier and more effective the route summary. Therefore, we should pay attention to systematic addressing when deploying the network. In a subnet environment, routing induction is the most effective when the network address is a continuous block in the form of 2 exponent.

Rule 2: Sustainable scalability

In fact, in the initial planning stage, we should consider network expansion in the future. We should have a long-term vision and leave a lot of room for the blocks that are likely to increase in size in the future. IP addresses are first divided by class. All standard CIDR blocks A, B, and C can only be used in strict accordance with the rules. However, it has now reached the stage of no class. because the size of the subnet and the actual number of hosts can be freely planned, the allocation of Address resources is more reasonable, which virtually increases the scalability of the network. Although the IP address planning with margin not properly considered can also meet the needs for a long period of time at the beginning of the network, when a local area shows high growth or the overall network scale is increasing, at this time, unreasonable planning is likely to have to re-deploy a local IP address or even an overall IP address, which is not a simple task in a medium or large network.

Here, we will briefly describe the concepts of IP addresses, masks, subnets, and so on, so as to understand the significance of classless address division.

IPv4-Internet Protocol Version 4 (Internet Protocol Version 4) is the current IP Protocol. The address is usually represented by four decimal numbers separated by dots. Each number corresponds to eight binary BITs, which are called a single-bit group (octets ). For example, if the IP address of a host is 128.10.2.1 in binary format, the IP address is 0000000.00001010.00000010.00000001.

There are five types of network addresses:

1. Class A address: the first octet in the four octets represents the network number, and the remaining three represent the host bit. The range is 0 xxxxxxx, that is, 0 to 127.

2. Class B address: the first two OCTs represent the network number, and the remaining two represent the host bit. The range is 10 xxxxxx, that is, 128 to 191.

3. Class C address: the first three OCTs represent the network number, and the remaining one represents the host space. The range is 110 xxxxx, that is, 192 to 223.

4. Class D address: multicast address, ranging from 224 to 239.

5. Class E address: Reserved address. used in the experiment. The range is 240 to 255.

Some special IP addresses:

1. IP address 127.0.0.1: local loopback test address

2. broadcast address: Broadcast bandwidth limit 255

3. IP address 0.0.0.0: represents any network

4. The network number is 0, indicating the network or the CIDR block.

5. All Network numbers are 1: All Networks

6. The host space is 0: represents any host address of a network segment.

7. Host bit: 1 indicates all hosts in the network segment.

Private IP address: to save IP address space and increase security, some IP address segments are reserved as private IP addresses and will not appear on the Internet. A network with a private IP address is called an intranet or a private network. To communicate with an external network, you must use a Network Address Translation (NAT ).

Private address ranges:

1. In Class A addresses: 10.0.0.0 to 10.20.255.255.255

2. Class B address: 172.16.0.0 to 172.31.255.255

3. Class C address: 192.168.0.0 to 192.168.255.255

Classless IP Address: first, You Need To Know Subnet Masks (Subnet mask). It is used to identify which part of the IP address is the network address and which part is the host address. It consists of 1 and 0 and is 32 characters long, the value 1 indicates the network number. Not all networks require subnets. Therefore, we introduce the default subnet mask (default subnet mask ). the default subnet mask of Class a ip addresses is 255.0.0.0 (because 255 is equivalent to 8-bit 1 in binary format, it is also abbreviated as "/8", indicating that the network number occupies 8 digits ); class B is 255.0.0 (/16); Class C is 255.255.255.0 (/24 ).

The classless IP subnet does not use the default subnet mask, but allows you to freely divide the network and host spaces, completely breaking the fixed category division such as A, B, and C. For example, in the address 192.168.10.32/28, the mask is 255.255.255.255.240, And the last group is 11110000, that is, only the last four digits are used as the master location, and the first 28 digits are used as the network, because 192. x. x. x is a class C address. The default 24-bit mask. In other words, 4 bits are used as the network bits. In this way, the subnet mask can be used to obtain "2 x to the power-2 (x represents the many-occupied mask bits, here is 4)" = 14 subnets, here, the two CIDR blocks are all 0 and all 1. Each subnet contains "2 to the power of y-2 (y represents the host bit, and 4 here)" = 14 hosts, here, the two addresses are the addresses with all the host locations 0 and 1. In this way, a class C subnet is divided into 14 available small subnets (in some cases, the initial full 0 Segment is also available, after using the IP SUBNET-ZERO command in a Cisco router, you can use all 0 CIDR blocks to obtain 15 available subnets ). You can see that when the number of hosts in each subnet is small, you can use this method to save IP resources and obtain more subnets. In actual use

Classless IP Address: first, You Need To Know Subnet Masks (Subnet mask). It is used to identify which part of the IP address is the network address and which part is the host address. It consists of 1 and 0 and is 32 characters long, the value 1 indicates the network number. Not all networks require subnets. Therefore, we introduce the default subnet mask (default subnet mask ).

The default subnet mask of Class a ip addresses is 255.0.0.0 (because 255 is equivalent to 8-bit 1 in binary format, it is also abbreviated as "/8", indicating that the network number occupies 8 digits ); class B is 255.0.0 (/16); Class C is 255.255.255.0 (/24 ).

The classless IP subnet does not use the default subnet mask, but allows you to freely divide the network and host spaces, completely breaking the fixed category division such as A, B, and C. For example, in the address 192.168.10.32/28, the mask is 255.255.255.255.240, And the last group is 11110000, that is, only the last four digits are used as the master location, and the first 28 digits are used as the network, because 192. x. x. x is a class C address. The default 24-bit mask. In other words, 4 bits are used as the network bits.

In this way, the subnet mask can be used to obtain "2 x to the power-2 (x represents the many-occupied mask bits, here is 4)" = 14 subnets, here, the two CIDR blocks are all 0 and all 1. Each subnet contains "2 to the power of y-2 (y represents the host bit, and 4 here)" = 14 hosts, here, the two addresses are the addresses with all the host locations 0 and 1.

In this way, a class C subnet is divided into 14 available small subnets (in some cases, the initial full 0 Segment is also available, after using the IP SUBNET-ZERO command in a Cisco router, you can use all 0 CIDR blocks to obtain 15 available subnets ).

You can see that when the number of hosts in each subnet is small, you can use this method to save IP resources and obtain more subnets. In actual use, for example, if you assign an IP address to the devices at both ends of a point-to-point connection, if you assign an IP address strictly according to the classification of subnets, then you can only assign a class C subnet to it. A Class C network contains 254 (that is, the 8th power of 2-2) Available addresses, and you only use 2, 252 available addresses are wasted.

In this case, if the/30 mask is used, a subnet only contains 2 (that is, 2 to the power of 2-2) Valid addresses, so that other subnet addresses can be used.

Supernetting is a concept similar to subnet (or a relative concept). IP addresses are divided into independent network addresses and host addresses based on the subnet mask. However, unlike a subnet that divides a large network into several small networks, it combines some small networks into a large network-a supernetwork. It can be said that supernetwork is a concept of Address Aggregation, which is closely related to route aggregation. Here is a brief description of Route summary and supernetwork computing methods. For example, the route table of a vro has the following entries:

Destination IP Address Mask next hop (or gateway)

192.168.0.0 255.255.255.0 10.1.1.2

192.168.1.0 255.255.255.0 10.1.1.2

192.168.2.0 255.255.255.0 10.1.1.4

The first two next hop addresses are the same. As you can imagine, the two subnets are mounted under a vro. The two routes can be summarized as: Destination IP address 192.168.0.0, mask 255.255.254.0, the next hop is a route like 10.1.1.2. Why can't I write 192.168.0.0 255.0.0 10.1.1.2? Because such a summary is not accurate, it contains some subnets (192.168.2.0 ~ 192.168.255.0), the most obvious is that the subnet 192.168.2.0 in the routing table is under 10.1.1.4, so the routing will fail. How is the mask calculated in the route summary?

We all know that IPv4 addresses are composed of four 8-bit binary numbers, one is the network bit, and the other is the host bit. The subnet mask network bit is the binary number of all 1, and the host bit is the binary number of all 0. When each information packet passes through a vro, it checks its destination IP address, performs "and" operation with the subnet mask of the route entry in the routing table, and compares it with the destination IP address in the route entry, if they are the same, they will be forwarded according to this routing rule. If they are different, they will be checked and compared to the next one.

We can see that the summary routing operation is to extract the network bits with the same destination IP addresses from Multiple Route entries into one. For example, in the preceding route table, the destination IP address is 192.168.0.0, And the destination IP address is 192.168.1.0. We have extracted only the first two segments of 192.168, and the third segment of the network bit still has the same part.

In 192.168.0.0, the third part is written as 00000000 binary (8 bits 0), and in 182.161.0, the third part is written as 00000001 binary (7 bits 1 bits), so their first seven digits are the same, the corresponding subnet mask should be 11111110 (7-bit, 1-bit, 0) and the synthetic decimal value is 254.

Therefore, this summary route should be written as follows: the destination IP address is 192.168.0.0, The subnet mask is 255.254.0, And the next hop is 10.1.1.2. In this way, this summary route contains only two subnets: 192.168.0.0 and 192.168.1.0. It is a precise summary route. At this time, the information packet sent to the 192.168.2.0 CIDR block is written as a binary value of 00000010 (the first six digits are 0) and is not included in this precise summary route.


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.