0

I am trying to configure DHCP Server on a Cisco 2960-x Switch to achieve port-based address allocation. I would like the ip address assigned to any device connected to that port to be the same every time.

I have used the following guide to achieve this: http://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst2960/software/release/12-2_55_se/configuration/guide/scg_2960/swdhcp82.html#wp1320905

The commands used are explained in detail here: http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ipaddr/command/ipaddr-cr-book.pdf

I have also tried various iterations of the following command to find something that works: address ip-address client-id string [ascii]

What I am not sure about is the string after Client ID. Does it have to match your interface name? If not how does the DHCP server know which interface to relate the assigned IP address.

Here's my running-config:

version 15.0

no service pad

service timestamps debug datetime msec

service timestamps log datetime msec

no service password-encryption

!

hostname otg

! boot-start-marker

boot-end-marker

! enable secret 5 $1$43Kk$SyzqQc5biarBjD2TD9Hw0/

enable password otgswitch

!

no aaa new-model

clock timezone UTC -5 0

clock summer-time UTC recurring

switch 1 provision ws-c2960x-24ts-l

no ip dhcp use vrf connected

ip dhcp use subscriber-id client-id

ip dhcp subscriber-id interface-name

!

ip dhcp pool mypool

network 192.168.200.0 255.255.255.0

reserved-only

address 192.168.200.20 client-id "GigabitEthernet1/0/2" ascii

address 192.168.200.25 client-id "GigaEth1/0/1" ascii

address 192.168.200.30 client-id "GE1/0/4" ascii

address 192.168.200.35 client-id 188b.4528.d482

address 192.168.200.45 client-id "188b.4528.d482" ascii

!

I then enables DHCP debug messages and here is what I receive:

Jan 4 02:55:49.112: DHCPD: Reload workspace interface Vlan1 tableid 0.

Jan 4 02:55:49.112: DHCPD: tableid for 192.168.200.245 on Vlan1 is 0

Jan 4 02:55:49.112: DHCPD: client's VPN is .

Jan 4 02:55:49.112: DHCPD: using subscriber-id as client-id

Jan 4 02:55:49.112: DHCPD: using received relay info.

Jan 4 02:55:49.112: DHCPD: DHCPDISCOVER received from client 0047.6931.2f30.2f on interface Vlan1.

Jan 4 02:55:49.112: DHCPD: using received relay info.

Please advise on what I might be doing wrong. Would appreciate your help.

  • 1
    I'm voting to close this question as off-topic because it is not a programming question – nos Jan 04 '16 at 19:07
  • @AllayDesay That does not mean those question should be here. Please read http://stackoverflow.com/help/on-topic . Try asking at http://networkengineering.stackexchange.com or somewhere else. – nos Jan 04 '16 at 20:11

1 Answers1

0

I was facing problem due to loss of information in the dhcp binding table. In short the subscriber id automatically generated would not match my reservations. Here are some examples:

port#  interface  received SID(hex)      expected SID(hex) 
2      Gi1/0/2    0047-6931-2f30-2f      0047-6931-2f30-2f32 
13     Gi1/0/13   0047-6931-2f30-2f31    0047-6931-2f30-2f31-33 
24     Gi1/0/24   0047-6931-2f30-2f32    0047-6931-2f30-2f32-34 

I was hitting IOS bug present in some 15.0 releases. I updated my ios to 15.2 and problem solved!