ip dhcp relay source-interface

Use this command to specify the source interface to be used in the Relay Agent packets sent to the DHCP server or other relay agent.

Syntax

ip dhcp relay source-interface interface
no ip dhcp relay source-interface [interface]

Parameters

interface Specifies the interface to be used as the source address in Relay Agent packets sent to the DHCP server. The interface can be a VLAN or loopback interface.

Defaults

If a source interface is not specified with this command, the default is the primary IP address of the VLAN interface that the DHCP client is connected to.

Mode

Configuration command, Global configuration.

Configuration command, Interface configuration.

Usage

This command allows you to specify the source IP address to be used in the Relay Agent packets sent to the DHCP server or other relay agent. This feature should be used in conjunction with the ip dhcp relay information option server-override or ip dhcp relay information option vpn commands, which cause the server identifier override (11) sub-option to be added to the Relay Agent DHCP packets sent to the DHCP server.

Note

Note

The source interface specified with this command must belong to the same VRF specified with the command described below.

Example

The following example:

  • Enables IP forwarding for the UPD protocol on VRF Alpha-Group
  • Enables DHCP/BOOTP relay on VLAN 10 of VRF Alpha-Group and sets the new destination address to 134.141.95.105 on VRF Internet-Access
  • Configures the inclusion of DHCP relay agent information options virtual subnet selection (151), link selection (5), and server identifier override (11) sub-options into the relay agent DHCP packet sent to the server or other relay agent with the ip dhcp relay information option vpn command.
  • Configures the source interface (VLAN 20) to be used in the server identifier override sub-option.
    System(su)->router Alpha-Group
    System(su-*ha-Group)->configure
    System(su-*ha-Group-config)->ip forward-protocol udp
    System(su-*ha-Group-config)->interface vlan.0.10
    System(su-*ha-Group-config-intf-vlan.0.10)->ip helper-address 134.141.95.105 vrf Internet-Access
    System(su-*ha-Group-config-intf-vlan.0.10)->ip dhcp relay information option vpn
    System(su-*ha-Group-config-intf-vlan.0.10)->ip dhcp relay source-interface vlan.0.20
    System(su-*ha-Group-config-intf-vlan.0.10)->exit