2

I'm not a network admin, but I have an old Cisco Catalyst 3560 for my network. I've successfully set up a DHCP Pool:

ip dhcp pool 192.168.0.0
 network 192.168.0.0 255.255.255.0
 default-router 192.168.0.254
 dns-server 203.0.178.191 203.215.29.191

And my computers can happily connect and get an IP address. However my step is that I'd like to assign some static IP addresses within that same subnet. Here's what I started with:

ip dhcp pool Static
 host 192.168.0.11 255.255.255.0
 hardware-address xxxx.xxxx.xxxx
 default-router 192.168.0.254
 dns-server 203.0.178.191 203.215.29.191

However, when I try an ipconfig /renew on the PC with MAC address xxxx.xxxx.xxxx, I get the following:

An error occurred while renewing interface Ethernet : unable to contact your DHCP server. Request has timed out.

I feel like I'm probably missing something simple. It definitely seems to be recognising the MAC address since the behaviour is different with the Static pool configured, can anyone help me work out why DHCP is timing out? Any help would be much appreciated!

Edit:

Full config (slightly truncated for readability/security):

Current configuration : 3839 bytes
!
version 12.2
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Switch
!
boot-start-marker
boot-end-marker
!
enable secret 5 xxxx
!
!
!
no aaa new-model
clock timezone UTC 10
clock summer-time UTC recurring last Sun Oct 2:00 last Sun Mar 3:00
system mtu routing 1500
ip name-server 203.0.178.191
ip name-server 203.215.29.191
!
ip dhcp pool 192.168.0.0
   network 192.168.0.0 255.255.255.0
   default-router 192.168.0.254
   dns-server 203.0.178.191 203.215.29.191
!
ip dhcp pool Static1
   host 192.168.0.1 255.255.255.0
   hardware-address aaaa.bbbb.cccc
   default-router 192.168.0.254
   dns-server 203.0.178.191 203.215.29.191
!
ip dhcp pool Static2
   host 192.168.0.11 255.255.255.0
   hardware-address dddd.eeee.ffff
   default-router 192.168.0.254
   dns-server 203.0.178.191 203.215.29.191
!
!
!
!
crypto pki trustpoint TP-self-signed-<snip>
!
!
crypto pki certificate chain TP-self-signed-<snip>
  quit
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
vlan internal allocation policy ascending
!
!
!
interface GigabitEthernet0/1
!
<snip>
!
interface GigabitEthernet0/28
!
interface Vlan1
 ip address 192.168.0.253 255.255.255.0
!
ip default-gateway 192.168.0.254
ip classless
ip http server
ip http secure-server
!
!
vstack
!
line con 0
line vty 0 4
 password xxxx
 login
line vty 5 15
 password xxxx
 login
!
end
5

It looks like your configuration for the DHCP reservation is incorrect. It seems you only have the hardware address (used for BOOTP) missing the network type, but not the client identifier (used for DHCP). You probably want to prepend 01 (ethernet) to the client identifier MAC address. Something like:

ip dhcp pool Static
 host 192.168.0.11 255.255.255.0
 client-identifier 01xx.xxxx.xxxx.xx
 default-router 192.168.0.254
 dns-server 203.0.178.191 203.215.29.191

This is explained in Cisco IOS IP Configuration Guide, Release 12.2 :

Specifies the unique identifier for DHCP clients. This command is used for DHCP requests.

  • DHCP clients require client identifiers. The unique identification of the client is specified in dotted hexadecimal notation, for example, 01b7.0813.8811.66, where 01 represents the Ethernet media type.
  • See "Troubleshooting Tips" below for information on how to determine the client identifier of the DHCP client.
  • Outstanding, that's done the trick. I'd read some posts on the Cisco forum where the official responses were using hardware-address rather than client-identifier. It's good to the what's correct, and the difference between the two. – Vocoder Apr 6 at 1:18
3

... complementary to the other answer which is completely correct.

How do you know whether to use the hardware address or the client identifier?

It's up the client which it uses, and it might not always be possible to determine it from documentation. It's tremendously useful for debugging DHCP to be able to see what's the Cisco DHCP server is actually receiving.

On Cisco command prompt:

debug ip dhcp server packet detail
term mon

You'll then see debugging which includes:

DHCPD: DHCPDISCOVER received from client 0158.0a20.87d2.28 on interface Vlan1.
DHCPD: Sending DHCPOFFER to client 0158.0a20.87d2.28 (192.168.0.128).

You'll see that this client identified itself with the identifier (begins 01). This particular example is a Cisco VOIP phone getting assigned a static address:

ip dhcp pool phone2
 host 192.168.0.128 255.255.255.0
 client-identifier 0158.0a20.87d2.28

You can also use a packet sniffer such as wireshare/tshark/tcpdump to see the DISCOVER message, if you have a convenient host on the LAN.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.