No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Configuration Guide - IP Service

S2720, S5700, and S6720 V200R013C00

This document describes the configurations of IP Service, including IP address, ARP, DHCP, DHCP policy VLAN, DNS, mDNS gateway, mDNS relay, UDP Helper, IP performance optimization, IPv6, DHCPv6, IPv6 DNS, IPv6 over IPv4 tunnel, and IPv4 over IPv6 tunnel.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Subnetting

Subnetting

A network can be divided into multiple subnets to conserve IP address space and support flexible IP addressing.

When many hosts are distributed on an internal network, the internal host IDs can be divided into multiple subnet IDs to facilitate management. Then the entire network contains multiple small networks.

Subnetting is implemented within the internal network. The internal network has only one network ID for the external network. When a packet is transmitted from the external network to the internal network, devices on the internal network select routes for the packet based on the subnet ID and finds the destination host.

Figure 1-4 shows subnetting of a Class B IP address. The subnet mask consists of a string of continuous 1s and 0s. 1s indicate the network ID and the subnet ID fields, and 0s indicate the host ID field.

Figure 1-4  Subnetting of IP addresses

The Class B IP address shown in Figure 1-4 is used as an example. Assume that the network address is 172.16.0.0 and the mask is 255.255.0.0. The two left-most bits of the host ID are used as the subnet ID. The subnet ID ranges from 00 to 11 (in binary format), allowing a maximum of 4 (22) subnets. Each subnet ID has a subnet mask and the subnet mask of the IP address changes with the subnet division. That is, the subnet mask of IP address is changed from 255.255.0.0 to 255.255.192.0. After performing an AND operation on the IP address and the subnet mask, you can obtain the network address. The network addresses of the four subnets are shown in Figure 1-5.

Figure 1-5  IP address subnets

Table 1-5 lists the network addresses (with the all-0 host ID), broadcast addresses (with the all-1 host ID), and host addresses of the preceding four subnets.

Table 1-5  Network address and host address ranges (in binary format)

Subnet

Network Address

Broadcast Address

Host Address Range

10101100 00010000 00000000 00000000

10101100 00010000 00000000 00000000

10101100 00010000 00111111 11111111

10101100 00010000 00000000 00000001

to

10101100 00010000 00111111 11111110

10101100 00010000 01000000 00000000

10101100 00010000 01000000 00000000

10101100 00010000 01111111 11111111

10101100 00010000 01000000 00000001

to

10101100 00010000 01111111 11111110

10101100 00010000 10000000 00000000

10101100 00010000 10000000 00000000

10101100 00010000 10111111 11111111

10101100 00010000 10000000 00000001

to

10101100 00010000 10111111 11111110

10101100 00010000 11000000 00000000

10101100 00010000 11000000 00000000

10101100 00010000 11111111 11111111

10101100 00010000 11000000 00000001

to

10101100 00010000 11111111 11111110

The above section describes how to subnet a network in the binary mode. Typically, the subnetting result is presented in decimal format. Converting a result in binary format to one in decimal format is complex. The following describes how to subnet a network more easily.

The preceding Class B IP address with the network address being 172.16.0.0 and the mask being 255.255.0.0 is used as an example. After subnetting, the mask is 255.255.192.0. The length of the subnet mask equals 18 (16 + 2). The method is as follows:

  • The number of digits of the subnet ID is m and the number of subnets is 2m. In this example, m equals 2, so the number of subnets is 4.
  • The number of digits of the host ID is n, and the number of valid host addresses in each subnet equals 2n - 2 (excluding the host IDs with all 1s and all 0s). In this example, n equals 14, so the number of valid host addresses in each subnet is 16382.
  • The span between two neighboring subnet network IDs is called block size, which equals deducting a component neither 0 nor 255 in a subnet mask from 256. The first subnet network ID starts from 0 (located in the component neither 0 nor 255 in a subnet mask), and the IDs of the following subnets increase one by one by the block size. In this example, block size = 256 - 192 = 64. The four subnets are 172.16.0.0/18, 172.16.64.0/18, 172.16.128.0/18, and 172.16.192.0/18, respectively.

Table 1-6 lists the subnetting result in decimal format.

Table 1-6  Network address and host address ranges (in decimal format)

Subnet

Network Address

Broadcast Address

Host Address Range

172.16.0.0/18

172.16.0.0

172.16.63.255

172.16.0.1 to 172.16.63.254

172.16.64.0/18

172.16.64.0

172.16.127.255

172.16.64.1 to 172.16.127.254

172.16.128.0/18

172.16.128.0

172.16.191.255

172.16.128.1 to 172.16.191.254

172.16.192.0/18

172.16.192.0

172.16.255.255

172.16.192.1 to 172.16.255.254

Subnetting reduces the available IP addresses. For example, a Class B IP address contains 65534 (216 - 2) host addresses. After 2 bits in the host ID are used as the subnet ID, there are a maximum of 65528 (4 × (214 - 2)) host addresses in the four subnets, 6 less than the maximum number of host addresses before subnetting.

To implement efficient network planning, subnetting and IP addressing should abide by the following rules.

Hierarchy

To divide a network into multiple layers, you need to consider geographic and service factors. Use a top-down subnetting mode to facilitate network management and simplify routing tables. In most cases:

  • A network consisting of a backbone network and a MAN is divided into hierarchical subnets.
  • An administrative network is divided into subnets based on administrative levels.

Consecutiveness

Consecutive addresses facilitate route summarization on a hierarchical network, which greatly reduces the number of routing entries and improves route search efficiency.

  • Allocate consecutive IP addresses to each area.
  • Allocate consecutive IP addresses to devices that have the same services and functions.

Scalability

When allocating addresses, reserve certain addresses on each layer to ensure consecutive address allocation in future network expansion.

A backbone network must have enough consecutive addresses for independent autonomous systems (ASs) and further network expansion.

Efficiency

When planning subnets, fully utilize address resources to ensure that the subnets are sufficient for hosts.

  • Allocate IP addresses by using variable length subnet mask (VLSM) to fully use address resources.
  • Consider the routing mechanisms in IP address planning to improve address utilization efficiency in the allocated address spaces.
Translation
Download
Updated: 2019-04-20

Document ID: EDOC1100065678

Views: 36456

Downloads: 264

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next