- Community Home
- >
- Networking
- >
- Switching and Routing
- >
- Comware Based
- >
- Re: set hostname in DHCP requests
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2020 02:06 AM
05-28-2020 02:06 AM
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2020 02:26 AM
05-28-2020 02:26 AM
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2020 05:44 AM
05-28-2020 05:44 AM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2020 07:00 AM
05-28-2020 07:00 AM
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.