Problems setting the Arduino Ethernet Shield

I've recently bought an Arduino Ethernet Shield but I am having some troubles trying to set it.... I show you a report of what i've done:
Important Notes:

  • The Ethernet Shield I got does not have a label indicating the MAC.
  • To solve the problem of MAC, I have assigned different random addresses (people say this usually works Setting an Arduino Ethernet MAC address manually | Freetronics. U1mZ-PmSzZg)
    Followed steps:
  • Find available IP on my network through CMD. For example the IP 192,168,150,217 is available.
  • I set a new random MAC, but I make sure that the MAC is correct according to the following website: MAC Address Validator
  • I loaded the example simple code: WebClient
  • What the Serial com port shows is:

Failed to configure Ethernet using DHCP
connection failed

  • When I try to make a ping, nothing happens.
  • The TX and RX led's show activity while they're trying to connect, but later they don't show any activity.

What do you recommend?



are you on a 10/100/1000 network? sometime a 10/100 switch in between helps, the other thing is we need to see your code so we can tell if it is setup correctly.

Hello Jasit,
Thanks for your prompt response…
This is the code:

  Web client
  This sketch connects to a website (
 using an Arduino Wiznet Ethernet shield. 
 * Ethernet shield attached to pins 10, 11, 12, 13
  created 18 Dec 2009
 by David A. Mellis
 modified 9 Apr 2012
 by Tom Igoe, based on work by Adrian McEwen

#include <SPI.h>
#include <Ethernet.h>

// Enter a MAC address for your controller below.
// Newer Ethernet shields have a MAC address printed on a sticker on the shield
byte mac[] = { 0xDE, 0x1D, 0x3C, 0x4D, 0x5B, 0xED };
// if you don't want to use DNS (and reduce your sketch size)
// use the numeric IP instead of the name for the server:
//IPAddress server(74,125,232,128);  // numeric IP for Google (no DNS)
char server[] = "";    // name address for Google (using DNS)

// Set the static IP address to use if the DHCP fails to assign
IPAddress ip(192,168,150,217);

// Initialize the Ethernet client library
// with the IP address and port of the server 
// that you want to connect to (port 80 is default for HTTP):
EthernetClient client;

void setup() {
 // Open serial communications and wait for port to open:
   while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only

  // 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:
    // try to congifure using IP address instead of DHCP:
    Ethernet.begin(mac, ip);
  // give the Ethernet shield a second to initialize:

  // if you get a connection, report back via serial:
  if (client.connect(server, 80)) {
    // Make a HTTP request:
    client.println("GET /search?q=arduino HTTP/1.1");
    client.println("Connection: close");
  else {
    // kf you didn't get a connection to the server:
    Serial.println("connection failed");

void loop()
  // if there are incoming bytes available 
  // from the server, read them and print them:
  if (client.available()) {
    char c =;

  // if the server's disconnected, stop the client:
  if (!client.connected()) {

    // do nothing forevermore:

I am not sure if I am on a 10/100/1000 network, but what I can say is: I’ve tested the same code in two networks, on home and in my office…