Unable to print DHCP address

Hello to all, I am trying to print the IP address of my enc28j60 ethernet module connected to Arduino UNO. Pin connections are ok and I tested the data transfer ok by assigning a Static IP first to my ethernet module.

The sketch is attached here. I tried debugging on serial port, and it says “Failed to configure Ethernet using DHCP” as is written under Ethernet.begin(mac) function. I also tried after installing a DHCP server on my PC by following the link Running the Server | DHCP Server for Windows. There is only one network card on my PC and I chosen it while installing DHCP server.

regards,
Abhishek Singh
Scientist, DAE
Kolkata, India

sketch_mar04a.ino (1.21 KB)

which library you use? Ethernet library is for Wiznet chips. For ENC28j60 use UIPEthernet library