option121

Function

The option121 command specifies a classless static route that a DHCP server delivers to a DHCP client.

The undo option121 command deletes a classless static route that a DHCP server delivers to a DHCP client.

By default, no classless static route is specified.

Format

option121 ip-address { ip-address1 mask-length1 gateway-address1 } [ ip-address2 mask-length2 gateway-address2 [ ip-address3 mask-length3 gateway-address3 [ ip-address4 mask-length4 gateway-address4 [ ip-address5 mask-length5 gateway-address5 [ ip-address6 mask-length6 gateway-address6 [ ip-address7 mask-length7 gateway-address7 [ ip-address8 mask-length8 gateway-address8 ] ] ] ] ] ] ]

undo option121 [ ip-address ip-address1 mask-length1 gateway-address1 ]

Parameters

Parameter Description Value
ip-address1

Specifies a gateway address.

The value is in dotted decimal notation.

mask-length1

Specifies a mask length.

The value is an integer ranging from 0 to 32.

gateway-address1

Specifies a gateway address.

The value is in dotted decimal notation.

ip-address2

Specifies a gateway address.

The value is in dotted decimal notation.

mask-length2

Specifies a mask length.

The value is an integer ranging from 0 to 32.

gateway-address2

Specifies a gateway address.

The value is in dotted decimal notation.

ip-address3

Specifies a gateway address.

The value is in dotted decimal notation.

mask-length3

Specifies a mask length.

The value is an integer ranging from 0 to 32.

gateway-address3

Specifies a gateway address.

The value is in dotted decimal notation.

ip-address4

Specifies a gateway address.

The value is in dotted decimal notation.

mask-length4

Specifies a mask length.

The value is an integer ranging from 0 to 32.

gateway-address4

Specifies a gateway address.

The value is in dotted decimal notation.

ip-address5

Specifies a gateway address.

The value is in dotted decimal notation.

mask-length5

Specifies a mask length.

The value is an integer ranging from 0 to 32.

gateway-address5

Specifies a gateway address.

The value is in dotted decimal notation.

ip-address6

Specifies a gateway address.

The value is in dotted decimal notation.

mask-length6

Specifies a mask length.

The value is an integer ranging from 0 to 32.

gateway-address6

Specifies a gateway address.

The value is in dotted decimal notation.

ip-address7

Specifies a gateway address.

The value is in dotted decimal notation.

mask-length7

Specifies a mask length.

The value is an integer ranging from 0 to 32.

gateway-address7

Specifies a gateway address.

The value is in dotted decimal notation.

ip-address8

Specifies a gateway address.

The value is in dotted decimal notation.

mask-length8

Specifies a mask length.

The value is an integer ranging from 0 to 32.

gateway-address8

Specifies a gateway address.

The value is in dotted decimal notation.

ip-address

Specifies a destination IP address.

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

If a DHCP client cannot directly access the network based on the gateway address (carried in the Option 3 field), run the option121 command to specify a classless static route which carries a specified destination address and next-hop address that a DHCP server delivers to the DHCP client to guide traffic forwarding.

A mask length and a gateway address can be specified for a classless static route. A maximum of eight classless static routes can be configured by running the option121 command repeatedly.

Prerequisites

A global address pool has been created using the ip pool (system view) command in the system view.

Precautions

The undo option121 command deletes all classless static routes.

To delete a specific classless static route, run the undo option121 ip-address gateway-address command.

You are advised to configure the well-known Option 121 using the option121 command. If both the option and option121 commands are run to define the Option 121, the option121 command takes effect.

Example

# Configure a classless static route entry with the destination IP address 10.10.10.10, the mask length of 24, and the gateway address of 10.10.10.1 in the view of the global address pool named global1.
<HUAWEI> system-view
[~HUAWEI] ip pool global1 server
[*HUAWEI-ip-pool-global1] option121 ip-address 10.10.10.10 24 10.10.10.1
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >