< Home

network (IP address pool view)

Function

The network command sets a network segment address for a global address pool.

The undo network command restores the default network segment address.

By default, no network segment address is specified.

Format

network ip-address [ mask { mask | mask-length } ]

undo network

Parameters

Parameter

Description

Value

ip-address

Specifies a network segment address.

The value is in dotted decimal notation.

mask

Specifies the mask of the network segment address. If this parameter is not specified, the natural mask is used.

-

mask

Specifies the mask of the network segment address.

The value is in dotted decimal notation.

mask-length

Specifies the network mask length of the DHCP server.

The value is an integer that ranges from 0 to 32.

Views

IP address pool view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

This command applies to DHCP servers. Before a DHCP server assigns IP addresses to clients from a global address pool, run the network command to set a network segment address for the global address pool so that the DHCP server can select and assign IP addresses on this network segment to clients. When a DHCP server assigns an IP address to the client from the interface address pool, the network segment of the interface IP address is that of the interface address pool.

Precautions

  • Each IP address pool can be configured with only one network segment. If the system needs multiple address segments, multiple IP address pools are required.
  • The size of an address pool can be controlled by setting the mask length. The mask length is in reverse proportion to the address pool size.
  • When configuring an address pool, ensure that IP addresses on the network address segment must be class A, B, or C IP addresses, and the mask cannot be set to 0, 1, 31, or 32.
  • If you need to assign IP addresses with a 16-bit mask in the network segment 10.1.1.0 to clients, the number of IP addresses in an IP address pool is 64K after the network 10.1.1.0 mask 16 command is executed in the view of the IP address pool. If the number of IP addresses in the IP address pool is less than 64K, the network 10.1.1.0 mask 16 command cannot be executed in the view of the IP address pool. In this case, perform the following operations:

    Run the following commands in the IP address pool view:

    [HUAWEI-ip-pool-test] ip pool test  
    [HUAWEI-ip-pool-test] section 0 10.1.1.2 10.1.1.254  // The section command specifies the range of IP addresses to be allocated.
    [HUAWEI-ip-pool-test] network 10.1.1.1 mask 16  // The network command specifies the mask of IP addresses to be allocated using the mask parameter.

    Enable the DHCP server function on a specific interface.

    [HUAWEI-Vlanif10] ip address 10.1.1.1 16
    [HUAWEI-Vlanif10] dhcp select global
  • The size of the IP address pool cannot be larger than 16K.

Example

# Set the network segment address of the IP address pool global1 to 192.168.1.0 and mask length to 24.

<HUAWEI> system-view
[HUAWEI] ip pool global1
[HUAWEI-ip-pool-global1] network 192.168.1.0 mask 24
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >