Getting Started, basic download and run

Windows 10, IDE Arduino 1.8.8, Arduino DUE, board power is via the USB cable.
The two boxes have the text: Arduino DUE and Arduino Ethernet Shield 2, all in caps but I use leading caps here. IOW, I am rather certain these are genuine Arduino components.

Added note: From another thread I did the download for the DUE and tried again. Same results.

Start with the sketch Web Server from David A Mellis and Tom Igoe,, The text of the code was copied from here
https://www.arduino.cc/en/Tutorial/WebServer

It compiles and the IDE appears to go through the motions of uploading the software. But I cannot connect with Chrome. I do see the IP address in the code: 192.168.1.177. There is an Arduino Ethernet board connected and its lights are on. The lights for the Ethernet cable: Left on green, right flashes amber. The other end is in a D-Link router/switch and hard connected to my desktop, not wireless. After the upload I tried the connect, then pressed Reset and tried again. No Joy.

There is a USB cable connected to both ports. Select Tools -> Get Board Info and a dialog with information about the DUE is displayed.

I have no assurance or confidence that the program is actually running. So add an LED blink as described below.

From this site: https://www.arduino.cc/en/tutorial/blink
I added this to setup()

  pinMode( LED_BUILTIN, OUTPUT );

Move to loop and add this at the top.

void loop() {
  bool light_on = false;
  if( light_on == true )
  {
    digitalWrite( LED_BUILTIN, LOW );
    light_on = false;
  }
  else
  {
    digitalWrite( LED_BUILTIN, HIGH );
    light_on = true;
  };

It compiles and uploads but I am not able to detect any activity that can be attributed to the web server app and to the light blink code.
Where on the board is the LED_BUILTIN?
Is there a specific LED that already exists on the board that can be used for this test?

&&&&&&&&&&&
A new Arduino DUE and Ethernet shield were unboxed and connected. At the end of the upload operation the following text is displayed.

CPU reset.
readWord(addr=0)=0x20088000
readWord(addr=0xe000ed00)=0x412fc230
readWord(addr=0x400e0740)=0
readWord(addr=0x400e0940)=0x285e0a60
writeWord(addr=0x400e1a00,value=0xa500000d)

A new Chrome tab was opened and 192.168.1.177 entered, Site cannot be reached. Reset the board, wait 30 seconds, open a new tab, same results.

What should I do differently?

Thank you for your time

i suggest you change what you have for the blink part in loop() to this

void loop() {
  static bool light_on = false;
  static uin32_t moment=millis();
  If (millis()-moment>500) {
    if( light_on == true )   digitalWrite( LED_BUILTIN, LOW );
    else  digitalWrite( LED_BUILTIN, HIGH );
    moment=millis();
    light_on=!light_on;
  }

this will at least provide you with some time between state switches (of the builtin led pin) so you can actually see it blink

Deva_Rishi,
Wonderful. You showed me a few things I did not know. I made a few minor changes to this:

void loop() {
  static bool    light_on    = false;
  static uint32_t  current_time = 0;
  static uint32_t  light_time     = 0;

  current_time = millis();
  if( current_time - light_time  > 1000 )
  {
    light_time = current_time;
    if( light_on == true )
    {
      digitalWrite( LED_BUILTIN, LOW );
      light_on = false;
    }
    else
    {
      digitalWrite( LED_BUILTIN, HIGH );
      light_on = true;
    }; 
  };

Function millis() only need be called once.

Where is LED_BUILTIN?

I now see that when the Ethernet shield is installed there are two LEDs that are activated. On the shield it the LED right next to the Ethernet connector on the Ethernet shield. On the CPU board it is the LED marked L between the two USB connectors except being a bit further back on the board.

The app still does not respond to Chrome trying to connect, but I do have confidence that the app is loaded and running. Now to work that problem.

Ethernet cable is not connected

Arduino DUE, Arduino Ethernet Shield 2, IDE 1.8.8, windows 10
Application: Web Server from David A Mellis and Tom Igoe,, The text of the code was copied from here

I modified this app by putting code at the top of the loop to blink the LED_BUILTIN. It does blink and the rate can be easily changed. A solid indicator that the app is properly downloaded.

After a reset the serial port displays: Ethernet cable is not connected.

Setup:

My desktop is hard cabled to a D-Link switch which then connects to my cable modem.
I started with the computer on port 1 and the Arduino on port 4.
When the Ethernet cable is connected to the Arduino, check the lights at the Ethernet connection.
Looking at the connector from the perspective of the cable, the LED on the left is lit green solid.
The status light on the D-Link switch for that port is on.
The Arduino LED on the right side of the cable blinks amber irregularly.
That is a good indication that the Ethernet cable is indeed connected.

Disconnect the Ethernet cable and both go out.
Get another Ethernet cable, same results.

Double and triple check the switch and cable.

Move the desktop computer connection to port 4, I still have access to the internet. Port 4 works, so does port 1.
Swap the cable from the Arduino to go between the D-Link and the cable modem, still have internet access. The cable is good.

Use the cable that came from the modem to the Arduino, making three cables that have been tried and two ports on the D-Link switch.
Same results.

Replace the Arduino DUE and Ethernet shield with another sitting on my desk just for this reason.
Same Results.

What might I try now?

Where is LED_BUILTIN?

don't know, it mus be defined somewhere or the compiler would have complained about it, on the DUE it is on pin 13, maybe you can also define something as pin 13 yourself and use that.

Function millis() only need be called once.

yes but now you've declared an extra 4 byte variable, it all depends what is your most precious resource (atm none i suppose) The other changes you made can be down to style, but

    }; 
  };

these semicolons really shouldn't be there(they don't actually do anything), in fact a closing brace is preferred on a line by itself except within the declaration of a class, then it can be followed by a semicolon.
Do you program in Java ?

don't know, it mus be defined somewhere or the compiler would have complained about it, on the DUE it is on pin 13, maybe you can also define something as pin 13 yourself and use that.

That answer was supplied in my reply noted as reply 2.

yes but now you've declared an extra 4 byte variable, it all depends what is your most precious resource (atm none i suppose) The other changes you made can be down to style, but

And how many bytes are consumed by having two additional calls to the function? And how much additional CPU time is consumed by that extra function call? Even in small projects, its is best to not use resources that are not needed.

Now to figure out why these Arduino shields cannot recognize that a cable is connected.

bkelly:
And how many bytes are consumed by having two additional calls to the function?

Not the same memory 1 is PROGMEM the other is RAM, but on that note, why did you changelight_on=!light_on;and would the most efficient code then not be

void loop() {
  static bool    light_on    = false;
  static uint32_t  current_time = 0;
  static uint32_t  light_time     = 0;

  current_time = millis();
  if( current_time - light_time  > 1000 )
  {
    light_on=!light_on;
    digitalWrite( LED_BUILTIN, light_on ); // of course this is not quite correct digitalWrite() takes 
                                        // an INT as argument, but LOW=0=false and HIGH=1=true
    light_time = current_time;    
  }

Deva_Rishi,
Your method is better, I changed mine. Thank you.

Back to the primary topic, Ethernet cable is not connected.
I have tried three sets of CPU and Ethernet shield, and three cables, each of which were plugged in elsewhere on the D-link switch, with no Joy. I deleted all the Arduino code and reloaded. Same symptoms.
Does anyone have a suggestion?

Maybe this will help. The goal is to read up to 12 analog sensors and make them available via an Ethernet connection to my desktop. Suggestions appreciated.

Edit: For each of the Ethernet shields I put the MAC address into the code and tried it. No change.

Did you un- comment 1 of these lines

// You can use Ethernet.init(pin) to configure the CS pin
  //Ethernet.init(10);  // Most Arduino shields
  //Ethernet.init(5);   // MKR ETH shield
  //Ethernet.init(0);   // Teensy 2.0
  //Ethernet.init(20);  // Teensy++ 2.0
  //Ethernet.init(15);  // ESP8266 with Adafruit Featherwing Ethernet
  //Ethernet.init(33);  // ESP32 with Adafruit Featherwing Ethernet

and what is visible in the Serial monitor ?

Yes, I un-commented each of them one at a time, compile, and loaded to the board.

The serial monitor window will not allow me to copy the text. But it did provide information.
With none of those options enabled it displays a message about Ethernet cable not connected.
With this one enabled: Ethernet.init(10); the message is the same, cable not connected
With all the remainder is states that the shield was not found.

The serial monitor window will not allow me to copy the text

Select the required text with the mouse as usual then use Ctrl and C on the keyboard to copy the selected text to the clipboard. Paste it where required as usual

bkelly:
Yes, I un-commented each of them one at a time, compile, and loaded to the board.

The serial monitor window will not allow me to copy the text. But it did provide information.
With none of those options enabled it displays a message about Ethernet cable not connected.
With this one enabled: Ethernet.init(10); the message is the same, cable not connected
With all the remainder is states that the shield was not found.

That tells me that 10 is the default and that for some reason you can't reach the Default Router. Since you specify an IP address of 192.168.1.177 it's going to assume that your Router and the Domain Name Server are both at 192.168.1.1. Are they?

Try changing "Ethernet.begin(mac, ip);" to "Ethernet.begin(mac);" and let the local DHCP server provide your Arduino with an IP address. If the displayed server address is not 192.168.x.x then that would also explain why the router can't be reached at 192.168.1.1.

John's onto something, yes it should be pin 10 ! , and depending on your router the IP address maybe 192.168.1.1 or 192.168.0.1 or 10.0.0.1 here's how to find it you can also specify that address as an IP with only the last digit changed (to 177 as in the example)

UKHeiliBob
Yes, I know show to use ctl-C. Tried it multiple times, did not work. Tried it again today, and it worked. Oh well.

Johnwasser and Deva_Rishi

Ok, so now I see that the code line Ethernet.init( pin_number ); where pin_number is the chip select pin.

My router was at 192.168.0.1. So I set the board to 192.168.0.177 and it began chatting.
Hooray!.

Side question. I have been using a USB hub from Staples, in part because it has a power connection and does not need to draw power from the desktop USB port. However, every time the cpu board is unplugged and reconnected the IDE cannot find the Arduino and the port number must be changed. The connection is broken at the Arduino, the cable into the hub does not move. It ranges from 1 through 9. Do I need a better USB hub to not have to make this change every time. If so, what do you have that is working. Should this be a new thread?

But again, NOW this is working. Thank you for your time and patience.

The IDE sometimes loses connection to COM-ports, it happens to me while i plug straight into my laptop. Usually it is related to another program using that port to communicate with an external device. In my case, well what shall i say it usually is the Serial-monitor (the other program) and the same Arduino or another one using the Serial port. Make sure the Serial monitor is closed before you press upload. Using the hub may cause extra issues, i generally do not have to do much more than unplug Arduino-USB and re-plug for the old port to show up again. Depending on my physical USB-port the Arduino's always get the same port-nr assigned (different ones for different Arduino's though) Do you really need the hub ? Your USB port should provide 500mA that is quite a lot, If you want to use more power then plug a power-supply into the socket, or power via the 5v pin.