Cisco – How to configure CISCO switch 2960 for port-based address allocation on a single port only

cisco

CISCO 2960 allows you to configure so-called Port-Based address allocation. It makes the switch to associate IP address it is giving out via DHCP with port-identifier, which is random, switch created identifier. In practice it means that any machine connected to such configured port will always get the same IP address, regardless of what that machine's MAC address is.
I want to have that feature configured on –some ports– only. But no matter what commands I try it seems that this can only be done for all ports, all for none. Even though CISCO manual seems to indicate there's both global and per-port command to enable that.
Here are relevant commands from CISCO manual:

  • configure terminal

  • ip dhcp use subscriber-id client-id
    (this configures the DHCP server to globally use the subscriber ID as the client ID on all incoming DHCP
    messages)

  • interface FastEthernet0/1

  • ip dhcp server use subscriber-id
    client-id

    (Optional: Configures the DHCP server to use the subscriber ID as the client ID on all incoming DHCP messages on the interface)

but it appears if I configure only per-interface than there's no effect at all, if I configure globally and per interface – CISCo behaves as if all ports were configured to use that feature.
Any ideas?

Best Answer

I've made some tests. I think that as interface is intended the interface of the DHCP server that give the DHCP offer. In my setup I use vlans for different DHCP pools. So, in my case, I have to configure:

interface vlan n

ip dhcp server use subscriber-id client-id

It works but in my configuration I had to create dedicated vlans only for DHCP port based!

Related Topic