ip relay source-ip-address

Function

The ip relay source-ip-address command configures a source IP address of DHCP Request messages on a DHCP relay-enabled interface.

The undo ip relay source-ip-address command deletes the source IP address of DHCP Request messages configured on a DHCP relay-enabled interface.

By default, no source IP address of DHCP Request messages is configured on a DHCP relay-enabled interface.

Format

ip relay source-ip-address ip-address [ vpn-instance vpn-instance-name ]

undo ip relay source-ip-address

Parameters

Parameter Description Value
ip-address

Specifies a source IP address.

In the interface view, if ip-address is set to 0.0.0.0, the interface uses its own IP address as the source IP address of the DHCP request packet.

The value is in dotted decimal notation.

vpn-instance vpn-instance-name

Specifies the name of a VPN instance.

The value is a string of 1 to 31 case-sensitive characters, spaces not supported. In addition, the VPN instance name must not be _public_. When double quotation marks are used around the string, spaces are allowed in the string.

Views

100ge sub-interface view, 100GE interface view, 10GE sub-interface view, 10GE interface view, 200GE sub-interface view, 25GE sub-interface view, 25GE interface view, 400GE sub-interface view, 400GE interface view, 40GE sub-interface view, 40GE interface view, 50GE sub-interface view, 50GE interface view, Eth-Trunk sub-interface view, Eth-Trunk interface view, FlexE sub-interface view, FlexE interface view, GE optical interface view, GE sub-interface view, GE interface view, GE electrical interface view, Global VE sub-interface view, PW-VE sub-interface view, VBDIF interface view, VE sub-interface view, VLANIF interface view, Sub-interface view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
dhcp write

Usage Guidelines

Usage Scenario

When a DHCP client and DHCP server reside in different VPNs, the DHCP client cannot obtain an IP address from the DHCP server. To configure an IP address on a DHCP relay agent to implement the plug-and-play function, run the ip relay source-ip-address command.

Prerequisites

DHCP relay has been enabled using the dhcp select relay command.

Precautions

If this command has been run in both the system view and interface view, the command executed in the interface view has a higher priority.

Example

# Configure a source IP address of DHCP Request messages on a DHCP relay agent.
<HUAWEI> system-view
[~HUAWEI] interface GigabitEthernet 0/1/23
[~HUAWEI-GigabitEthernet0/1/23] dhcp select relay
[*HUAWEI-GigabitEthernet0/1/23] ip relay source-ip-address 10.100.1.1
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >