< Home

dhcp client default-route preference

Function

The dhcp client default-route preference command configures the default route preference that a DHCP server delivers to a DHCP client.

The undo dhcp client default-route preference command restores the default value of the default route preference that a DHCP server delivers to a DHCP client.

By default, the default route preference that a DHCP server delivers to a DHCP client is 60.

Format

dhcp client default-route preference preference-value

undo dhcp client default-route preference

Parameters

Parameter

Description

Value

preference-value

Specifies the default route preference.

The value is an integer that ranges from 1 to 255. A smaller value indicates a higher preference.

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

A DHCP client can obtain the default route through the DHCP server to dynamically update the routing table. The next-hop address of the default route is the DHCP client's gateway address carried in Option3.

The default route that a DHCP server delivers is the user network router (UNR) route with the default preference 60. You can run the dhcp client default-route preference command to change the default route preference.

Example

# In the view of VLANIF100, set the default route preference that a DHCP server delivers to a DHCP client to 30.

<HUAWEI> system-view
[HUAWEI] interface vlanif 100
[HUAWEI-Vlanif100] dhcp client default-route preference 30

# In the view of GE0/0/1, set the default route preference that a DHCP server delivers to a DHCP client to 30.

<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] undo portswitch
[HUAWEI-GigabitEthernet0/0/1] dhcp client default-route preference 30
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >