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.
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. |
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
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