dhcp relay gateway

Use dhcp relay gateway to specify the DHCP relay agent address to be inserted in DHCP requests.

Use undo dhcp relay gateway to restore the default.

Syntax

dhcp relay gateway ip-address

undo dhcp relay gateway

Default

The primary IP address of the interface is inserted in DHCP requests as the DHCP relay agent address.

Views

Interface view

Predefined user roles

network-admin

mdc-admin

Parameters

ip-address: Specifies the DHCP relay agent address. It must be an IP address of the interface.

Usage guidelines

The DHCP relay agent uses the specified IP address instead of the primary IP address of the relay interface as the DHCP relay agent address.

If you execute this command multiple times, the most recent configuration takes effect.

Examples

# Specify 10.1.1.1 as the DHCP relay agent address to be inserted in DHCP requests on VLAN-interface 2.

<Sysname> system-view
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2] dhcp relay gateway 10.1.1.1

Related commands

gateway-list