DHCP Static Binding on Cisco IOS

Thanks Laz. Its working now.

Hello, everyone!

When would we want to create a static binding for our hosts? Wouldn’t just assigning the IPs manually help in such an “unusual” scenario? :smiley:

And please, when configuring static mappings, should I enable a debug command or do show interface x?

Because, if I do show interface x here


The MAC address is 5254.000b.3475

However, in the debug



The MAC address is actually 0152.5400.0b34.75. Laz, you’ve mentioned that DHCP adds an extra 01 to the MAC address? Any idea why does it work like this? :smiley: So I suppose that the best would just be to copy whatever identifier is being used off the debug output.

That’s all, thank you all!

David

Hello David!

A static DHCP binding is useful in environments where you want a specific IP address to always be assigned to a specific host, based on its MAC address. This is often used for servers, printers, IP cameras, network equipment, or any device that needs a consistent IP address. This approach is scalable, delivers centralized control, and easier management, however, it depends upon DHCP which may become a single point of failure.

Another way to do this is to use a manual IP assignment. This is more labor intensive, less scalable, and more difficult to manage, but doesn’t critically depend upon DHCP. So the approach you choose should be appropriate to the needs of your particular network and requirements.

First of all, the above requires that you have configured the client to use the MAC address as the client identifier by issuing the ip address dhcp client-id <interface> command. Once that’s done, the MAC address will be used as the client identifier. Now, doing a bit more research, I have found that 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. For some reason, 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):

Knowing this, you can identify the exact MAC address by simply removing that 01 prefix from the rest of the client ID.

I hope this has been helpful!

Laz