DHCPAddressPrinter doesn't work on Arduino Ethernet

Hello guys, first post on the forum

I recently got an Arduino Ethernet Rev. 3 with PoE. Just to clarify, this is the arduino board with Ethernet capability built in, not the ethernet shield on an arduino board. A couple of tutorials suggest that the first script I should run is DhcpAddressPrinter, found in the examples folder of File..., as this would allow me to find my ip number.

I am using the 1.0.5 arduino environment, an ethernet cord that I have checked to be functioning, and the usb2serial board to connect via micro USB. Every time I run DhcpAddressPrinter, I get the message "Failed to configure Ethernet using DHCP". I have used both the MAC address on the sticker of my board, and a couple of random MAC addresses.

Do you have any idea why this may be the case? And a related note; my tutorial said that older boards didnt have a MAC sticker, and so you could make up any number. Now that they do have stickers with a specific number, is this the only number that should work?


Do you modify the sketch example? So you must post it here to inspect, or nothing know what is wrong.

Or if the code is EXACLY like this if (Ethernet.begin(mac) == 0) in the section:

  // start the Ethernet connection:
  if (Ethernet.begin(mac) == 0) {
    Serial.println("Failed to configure Ethernet using DHCP");
    // no point in carrying on, so do nothing forevermore:

There are two possible causes:
SD card reader disrupts communication. Adding lines to setup() solves the problem:

#define SDCARDPin 4
digitalWrite(SDCARDPin, HIGH);

Your local network has no DHCP server, or something like that, what causes the DHCP server unavailable for Arduino Ethernet Shield (mean wrong wired ethernet cable, ethernet cable from Ethernet Shield is not attached to proper port in the switch, Ethernet Shield is connected to the computer instead of the switch...).

I, like many others, have the same problem and unable to get it resolved. I will first state that I am a network newbie. Should the sketch work without connecting the ethernet shield to a computer or modem, or can I evaluate its performance via the serial port? I have tried many sketch examples and never get a working connection (or maybe I don't know what to look for.) Thanks for some guidance.

The DhcpAddressPrinter sketch will "work" if what you mean by work is it will return a fail after a couple minutes. If you want it to work correctly, it must be attached to a device with a DHCP server running.