Ethernet shield pings, but no internet

Howdy,
I have been attempting to get the arduino to call a web service, but have not been able to get it to get to the internet. I have it plugged into my router with DHCP and the arduino receives an IP, and prints out the subnet, gateway, dhcp server ip and dns server. I can also ping the arduino from other computers on my network.

However when it tries to connect to google - no love. It feels like I am missing some small thing, but just can’t figure it out. Any ideas?

Here is the sketch

#include <Ethernet.h>
#include "Dhcp.h"

#include <string.h>

byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xCC };
byte server[] = { 64, 233, 187, 99 }; // Google
boolean ipAcquired = false;

Client client(server, 80);

void setup()
{
  Serial.begin(9600);
  
  Serial.println("getting ip...");
  int result = Dhcp.beginWithDHCP(mac);
  
  if(result == 1)
  {
    ipAcquired = true;
    
    byte buffer[6];
    Serial.println("ip acquired...");
    
    Dhcp.getMacAddress(buffer);
    Serial.print("mac address: ");
    printArray(&Serial, ":", buffer, 6, 16);
    
    Dhcp.getLocalIp(buffer);
    Serial.print("ip address: ");
    printArray(&Serial, ".", buffer, 4, 10);
    
    Dhcp.getSubnetMask(buffer);
    Serial.print("subnet mask: ");
    printArray(&Serial, ".", buffer, 4, 10);
    
    Dhcp.getGatewayIp(buffer);
    Serial.print("gateway ip: ");
    printArray(&Serial, ".", buffer, 4, 10);
    
    Dhcp.getDhcpServerIp(buffer);
    Serial.print("dhcp server ip: ");
    printArray(&Serial, ".", buffer, 4, 10);
    
    Dhcp.getDnsServerIp(buffer);
    Serial.print("dns server ip: ");
    printArray(&Serial, ".", buffer, 4, 10);
    
    delay(3000);
    
    Serial.println("connecting...");
    
    if (client.connect()) {
      Serial.println("connected");
      client.println("GET /search?q=arduino HTTP/1.0");
      client.println();
    } else {
      Serial.println("connection failed");
    }
  }
  else
    Serial.println("unable to acquire ip address...");
}

void printArray(Print *output, char* delimeter, byte* data, int len, int base)
{
  char buf[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
  
  for(int i = 0; i < len; i++)
  {
    if(i != 0)
      output->print(delimeter);
      
    output->print(itoa(data[i], buf, base));
  }
  
  output->println();
}

void loop()
{
  if(ipAcquired)
  {
    if (client.available()) {
      char c = client.read();
      Serial.print(c);
    }

    if (!client.connected()) {
      Serial.println();
      Serial.println("disconnecting.");
      client.stop();
      spinForever();
    }
  }
  else
    spinForever();
}

void spinForever()
{
  for(;;)
      ;
}

Google has made some changes inside its network that broke the example code.

You need to switch to a different server. You can try switching to another IPA in the 66.102.7.103 area (part of the range that "host www.google.com" now returns), but I haven't tested that: I skipped the example and went straight to my production setup when I discovered the problem.

Ran

Brilliant! It's working, and the IP you suggested also works. Thanks for the help.