gateway (IP address pool view)

Function

The gateway command configures a gateway address and subnet mask for an address pool.

The undo gateway command deletes the configuration.

By default, no gateway address or subnet mask is configured for an address pool.

Format

gateway ip-address { mask-length | mask }

undo gateway

Parameters

Parameter Description Value
ip-address

Specifies a gateway address.

The value is in dotted decimal notation.

mask-length

Specifies the mask length of the gateway address.

The value is an integer ranging from 0 to 32.

mask

Specifies the subnet mask of the gateway.

The value is in dotted decimal notation.

Views

IP address pool view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
dhcp write

Usage Guidelines

Usage Scenario

To allow IP address assignment from an address pool, run the gateway command to configure a gateway address and a subnet mask for the address pool. If a DHCP client requests an IP address from the DHCP server, the DHCP server notifies the client of the gateway address and subnet mask using Option 3 and Option 1.

Precautions

A gateway address can be included only in an address segment on the local address pool.

Example

# Set a gateway address to 10.10.110.1 and a subnet mask to 255.255.0.0 for an address pool named huawei.
<HUAWEI> system-view
[~HUAWEI] ip pool huawei server
[*HUAWEI-ip-pool-huawei] gateway 10.10.110.1 255.255.0.0
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >