How are subnets assigned on an AR

2

When many hosts are distributed on an internal network, the internal host IDs can be divided into multiple subnet IDs to facilitate management. A network can be divided into multiple subnets to conserve IP address space and support flexible IP addressing.
Subnetting is implemented within the internal network. The internal network has only one network ID for the external network. When packets are transmitted from the external network to the internal network, the router on the internal network selects a route for the packets based on the subnet ID and finds the destination host.
Take subnet division of an IP address in Class B as an example. The subnet mask consists of a string of continuous 1s and 0s. The digit 1 corresponds to the network ID and subnet ID fields, while the digit 0 corresponds to the host ID field.
The first 5 bits of the host ID is used as the subnet ID. The subnet ID ranges from 00000 to 11111, allowing a maximum of 32 (25) subnets. Each subnet ID has a subnet mask. For example, the subnet mask of the subnet ID 11111 is 255.255.248.0. After performing an AND operation on the IP address and the subnet mask, you can obtain the network address.
Subnetting reduces the available IP addresses. For example, a Class B IP address contains 65534 (216 - 2) host IDs. After 5 bits in the host ID are used as the subnet ID, there can be a maximum of 32 subnets, each having an 11-bit host ID. Each subnet has a maximum of 2046 host IDs (211 - 2, excluding the host IDs with all 1s and all 0s). Therefore, the IP address has a maximum of 65472 (32 x 2046) host IDs, 62 less than the maximum number of host IDs before subnetting.

Other related questions:
Subnet-based VLAN assignment on S series switch
Example of configuring IP subnet-based VLAN assignment for S series switches (except S1700 switches): 1. Configuration roadmap 1) Create VLANs, and add an interface to the VLANs so that the interface allows packets of IP subnet-based VLANs to pass through. 2) Enable IP subnet-based VLAN assignment on the interface, and associate IP subnets with the VLANs, so that the switch can determine the VLANs to which received packets belong according to the source IP addresses or specified subnets in the packets. 2. Configuration procedure 1) Create VLANs. [HUAWEI] vlan batch 100 200 //Create VLAN100 and VLAN 200. 2) Configure an interface. [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] port link-type hybrid //Set the interface type to hybrid. [HUAWEI-GigabitEthernet0/0/1] port hybrid untagged vlan 100 200 //Add the interface to VLAN 100 and VLAN 200 in untagged mode. [HUAWEI-GigabitEthernet0/0/1] ip-subnet-vlan enable //Enable IP subnet-based VLAN assignment on the interface. [HUAWEI-GigabitEthernet0/0/1] quit 3) Associate IP subnets with VLANs. [HUAWEI] vlan 100 [HUAWEI-vlan100] ip-subnet-vlan 1 ip 192.168.1.2 24 priority 2 //Associate IP subnet 192.168.1.2/24 with VLAN 100 and set the 802.1p priority of VLAN 100 to 2. [HUAWEI-vlan100] quit [HUAWEI] vlan 200 [HUAWEI-vlan200] ip-subnet-vlan 1 ip 192.168.2.2 24 priority 3 [HUAWEI-vlan200] quit

Method used to configure the DHCP Option field on the AR
Option fields in a DHCP message carry control information and parameters that are not defined in protocols. There are known options and customized options. For details about known options, see RFC 2132. Customized options are defined by vendors. For example, to set Option 64 to the hexadecimal string 0x11 and configure known Option 121 to assign classless static route to clients (destination IP address 10.10.10.10/24 and gateway address 10.11.11.11), perform the following configurations: - Interface address pool [Huawei] interface gigabitethernet1/0/1 [Huawei-GigabitEthernet1/0/1] dhcp server option 64 hex 11 [Huawei-GigabitEthernet1/0/1] dhcp server option121 ip-address 10.10.10.10 24 10.11.11.11 - Global address pool [Huawei] ip pool global1 [Huawei-ip-pool-global1] option 64 hex 11 [Huawei-ip-pool-global1] option121 ip-address 10.10.10.10 24 10.11.11.11 - DHCP option template (applicable to only the scenario where user-defined network parameters are allocated to static clients) [Huawei] dhcp option template template1 [Huawei-dhcp-option-template-template1] option 64 hex 11 [Huawei-dhcp-option-template-template1] option121 ip-address 10.10.10.10 24 10.11.11.11

Subnetting on an S series switches
A network can be divided into multiple subnets to conserve IP address space and support flexible IP addressing. When many hosts exist on an internal network, the internal host IDs can be divided into multiple subnets to facilitate management. Then the entire network contains multiple small networks. Subnetting is implemented within an internal network. The internal network has only one network ID for the external network. When packets are transmitted from the external network to the internal network, the routing device on the internal network selects a route for the packets based on the subnet ID and find the destination host. Take subnet division of an IP address in Class B as an example. The subnet mask consists of a string of continuous 1s and 0s. 1s correspond to the network ID field and the subnet ID field while 0s correspond to the host ID field. The first 5 bits of the host ID is used as the subnet ID. The subnet ID ranges from 00000 to 11111, allowing for a maximum of 32 (2 to the power of 5) subnets. Each subnet ID has a subnet mask. For example, the subnet mask of the subnet ID 11111 is 255.255.248.0. After performing an AND operation on the IP address and the subnet mask, you can obtain the network address. Subnetting reduces the available IP addresses. For example, normally an IP address of Class B can contain 65534 (216 �?2) host IDs. After 5 bits in the host ID are used as the subnet ID, there can be a maximum of 32 subnets, each with an 11-bit host ID. That is, each subnet has a maximum of 2046 host IDs (211 �?2, excluding the host IDs with all 1s and all 0s). Therefore, the IP address has a maximum of 65472 (32 x 2046) host IDs, 62 less than the maximum number of host IDs before subnetting.

How to assign fixed IP addresses to terminals through the interface address pool on the AR
Reserve fixed IP addresses that will be assigned to terminals and manually assign them to terminals.

If you have more questions, you can seek help from following ways:
To iKnow To Live Chat
Scroll to top