Cisco – DHCP Relay by MAC Address of CPE

ciscodhcprouter

We are testing a new Provisioning Server in DOCSIS/CMTS environment and we need to setup a lab with 5 models of CPE.
I'm wondering if we can configure on Cisco Routers the dhcp relay (ip helper) accord with the MAC address of CPE.
The goal of this would be to redirect by default all dhcp discover to the actual Provisioning Server and the 5 CPE of lab would be redirect to the new Provisioning Server.
A guess how to reach that ?

Info :
The router is a CMTS Cisco UBR7225 with NPE-G2 card.
The type of DHCP server is irrelevant, you can consider as ISC DHCPd service running on both.

Best Answer

I don't think it's possible to do what you want to do. If it would be possible, it would be something like this:

ip dhcp pool MAC1
  relay source 10.10.0.0/24
  relay destination 192.0.2.NEW
  client-identifier 0122.2222.2222.01
...
ip dhcp pool REST
  relay source 10.10.0.0/24
  relay destination 192.0.2.OLD

But it was not accepted in my lab box:

lab(dhcp-config)#client-identifier 0122.2222.2222.01
% This command may not be used with network, origin, vrf or relay pools.

You can however configure two helper-addresses and filter the requests at the DHCP server, so that 'old' excludes replying to those 5 MAC addresses and 'new' only replies to them.

But maybe you simply need more isolated lab environment, at least separate logical interface.

You could also create interim DHCP server, which forwards requests further based on the MAC addresses, it wouldn't be very hard exercise, probably 2-3h including research for me. But would you want your production to rely on this new script, I certainly would not want it to.