Configuring a BOOTP/DHCP relay gateway

The DHCP relay agent selects the lowest-numbered IP address on the interface to use for DHCP messages. The DHCP server then uses this IP address when it assigns client addresses. However, this IP address may not be the same subnet as the one on which the client needs the DHCP service.

This feature provides a way to configure a gateway address for the DHCP relay agent to use for DHCP requests, rather than the DHCP relay agent automatically assigning the lowest-numbered IP address.

You must be in VLAN context to use this command, for example:

HP Switch# config
HP Switch(config)# vlan 1
HP Switch(vlan-1)#

Syntax:

ip bootp-gateway ip-addr

Allows you to configure an IP address for the DHCP relay agent to use for DHCP requests. The IP address must have been configured on the interface.

Default: Lowest-numbered IP address

If the IP address has not already been configured on the interface (VLAN), you will see the message shown in Example of trying to configure an IP address that is not on this interface (VLAN).

Example of trying to configure an IP address that is not on this interface (VLAN)

HP Switch# config
HP Switch(config)# vlan 1
HP Switch(vlan-1)# ip bootp-gateway 10.10.10.1
The IP address 10.10.10.1 is not configured on this VLAN.

Viewing the BOOTP gateway

To display the configured BOOTP gateway for an interface (VLAN) or all interfaces, enter this command. You do not need to be in VLAN context mode.

Syntax:

show dhcp-relay bootp-gateway [vlan vid]

Displays the configured BOOTP gateway for a specified VLAN (interface.) If a specific VLAN ID is not entered, all VLANs and their configured BOOTP gateways display.

Example:

Assigning a gateway to an interface and then displaying the information shows an IP address being assigned to a gateway for VLAN 22, and then displayed using the show dhcp-relay bootp-gateway command.

Assigning a gateway to an interface and then displaying the information

HP Switch(vlan-22)ip bootp-gateway 12.16.18.33
HP Switch(vlan-22)# exit
HP Switch(config)# show dhcp-relay bootp-gateway vlan 22


 BOOTP Gateway Entries


 VLAN                 BOOTP Gateway
 -------------------- --------------- 
 VLAN 22              12.16.18.33

Operating notes

  • If the configured BOOTP gateway address becomes invalid, the DHCP relay agent returns to the default behavior (assigning the lowest-numbered IP address.)

  • If you try to configure an IP address that is not assigned to that interface, the configuration fails and the previously configured address (if there is one) or the default address is used.