DHCP - Using the MAC as the client ID on a Cisco device

By default, a Cisco DHCP client will use a proprietary format for the client ID it sends to the DHCP server. However, this can be modified so that the MAC address of the interface in question is sent as the client ID.

This can be done using the following command on the interface being configured as the DHCP client:

R1(config-if)#ip dhcp client client-id gigabitethernet

Now having said that, when the MAC address is used as the client ID, the Cisco IOS DHCP server will often display this with a preceding "01". For example, the following are two separate Syslog messages that refer to the Client ID:

*Nov 24 14:31:44.793: DHCPD: assigned IP address 192.168.1.13 to client 0152.5400.0b34.75. *Nov 24 14:31:46.792: DHCPD: Sending notification of DISCOVER: *Nov 24 14:36:06.640: DHCPD: No option 125 *Nov 24 14:36:08.640: DHCPD: DHCPRELEASE message received from client 0152.5400.0b34.75 (192.168.1.13).

Notice that the MAC address of the interface in question is 5254.000b.3475 however in the above messages, it is indicated as 0152.5400.0b34.75 with a "01" prepended. The “01” that is prepended on the client ID is actually a hardware identifier. It denotes that the following information is an Ethernet MAC address. The Cisco debug chooses to display the hardware identifier as part of the client ID. This can be understood as an attempt to ensure the uniqueness of the client identifier in the event that there are technologies being used other than Ethernet (such as FrameRelay, FiberChannel, or ATM to name a few).

If you look at a packet capture of a DHCP request, you can see that identifier like so (yellow highlight):

dhcp-client-id-wireshark-packet-capture.png

https://forum.networklessons.com/t/dhcp-static-binding-on-cisco-ios/1032/23?u=lagapidis

https://networklessons.com/cisco/ccie-enterprise-infrastructure/cisco-ios-dhcp-client-identifier

https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ipaddr/command/ipaddr-cr-book/ipaddr-i1.html#wp1820979811