< Home

dhcp server option121

Function

The dhcp server option121 command configures a classless static route allocated by a DHCP server to a client.

The undo dhcp server option121 command deletes a classless static route allocated by a DHCP server to a client.

By default, the classless static route allocated to a client is not configured.

Format

dhcp server option121 ip-address { ip-address mask-length gateway-address } &<1-8>

undo dhcp server option121 [ ip-address ip-address mask-length gateway-address ]

Parameters

Parameter

Description

Value

ip-address

Specifies the destination IP address.

The value is in dotted decimal notation.

mask-length

Specifies the mask length.

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

gateway-address

Specifies the gateway address of a route.

The value is in dotted decimal notation.

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The dhcp server option121 ip-address command applies to only the DHCP server. The dhcp server option121 ip-address command configures Option 121 that defines a classless static route allocated to a client from an interface address pool.

mask-length and gateway-address specify a classless static route. The dhcp server option121 ip-address command configures a maximum of eight classless static routes.

Prerequisites

  1. The DHCP function has been enabled using the dhcp enable command in the system view.
  2. IP addresses in the interface address pool have been configured using the ip address command.

  3. The DHCP server function has been enabled on the interface using the dhcp select interface command.

  4. The undo dhcp server option121 command will delete all classless static routes. To delete one classless static route, run the undo dhcp server option121 ip-address ip-address mask-length gateway-address command.

Example

# Configure a classless static route allocated by a DHCP server to a client in the interface address pool on VLANIF100.
<HUAWEI> system-view
[HUAWEI] dhcp enable
[HUAWEI] interface vlanif 100
[HUAWEI-Vlanif100] ip address 10.1.1.2 24
[HUAWEI-Vlanif100] dhcp select interface
[HUAWEI-Vlanif100] dhcp server option121 ip-address 10.10.10.10 24 192.168.11.11
# Configure a classless static route allocated by a DHCP server to a client in the interface address pool on GE0/0/1.
<HUAWEI> system-view
[HUAWEI] dhcp enable
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] undo portswitch
[HUAWEI-GigabitEthernet0/0/1] ip address 10.1.1.2 24
[HUAWEI-GigabitEthernet0/0/1] dhcp select interface
[HUAWEI-GigabitEthernet0/0/1] dhcp server option121 ip-address 10.10.10.10 24 192.168.11.11
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >