Comware Based
1752777 Members
6047 Online
108789 Solutions
New Discussion юеВ

set hostname in DHCP requests

 
cgu
Frequent Advisor

set hostname in DHCP requests

In the context of a switch acting as a DHCP client requesting its (management) IP address, is it possible to have the hostname specified in the DHCP request (so that the DHCP can use that info to update the corresponding record)?

Switches used are 5130 series, firmware R3506P02.

Thanks!

3 REPLIES 3
Ivan_B
HPE Pro

Re: set hostname in DHCP requests

You can use custom DHCP identifier with following command:

dhcp client identifier
Use dhcp client identifier to configure a DHCP client ID for an interface.
Use
undo dhcp client identifier to restore the default.
Syntax
dhcp client identifier { ascii ascii-string | hex hex-string | mac interface-type interface-number }
undo dhcp client identifier
Default
An interface generates the DHCP client ID based on its MAC address. If the interface has no MAC
address, it uses the MAC address of the first Ethernet interface to generate its client ID.
Views
Interface view
Parameters
ascii ascii-string: Specifies a case-sensitive ASCII string of 1 to 63 characters as the client ID.
hex hex-string: Specifies a hexadecimal number of 4 to 64 characters as the client ID.
mac interface-type interface-number: Uses the MAC address of the specified interface as a DHCP client ID. The interface-type interface-number argument specifies an interface by its type and number.
Usage guidelines
A DHCP client ID is added to the DHCP option 61. A DHCP server can specify IP addresses for
clients based on the DHCP client ID. You can specify a DHCP client ID by performing one of the
following operations:
тАв Naming an ASCII string or hexadecimal number as the client ID.
тАв Using the MAC address of an interface to generate a client ID.
Whichever method you use, make sure the IDs for different DHCP clients are unique.
Examples
# Use a hexadecimal number of FFFFFFFF as the client ID for VLAN-interface 10.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] dhcp client identifier hex FFFFFFFF

More information can be found in the IP Services Configuration Guide and IP Services Command Reference Guide.

Hope this helps!

 

 

I am an HPE employee

Accept or Kudo

cgu
Frequent Advisor

Re: set hostname in DHCP requests

Thanks, however I would like to have the the hostname option (option 12), not client id. Is such a thing possible?

Ivan_B
HPE Pro

Re: set hostname in DHCP requests

No, I am afraid Option 12 is not implemented for DHCP Client in this device, at least this feature is not among documented ones.

I have seen this feature in ProVision-based switches (ProCurve series, now known as Aruba), there it can be enabled by "dhcp host-name-option" command, but I have seen no any single Comware-based device that can send Option 12 as a DHCP Client.

 

 

 

I am an HPE employee

Accept or Kudo