arduino ethernet does not connect

I'm using an Arduino Ethernet and need to give basic open/close commands to relay control. I have used an alternate ip address as that of router 192.1.0.xx and also mentioned a random MAC address to the Arduino Ethernet since MAC address was not mentioned on the box that I got along with Arduino Ethernet. The code gets compiled and uploaded perfectly and I'm also able to ping the ip address of the board on the command line, but when I open my browser and try to run using HTML then it does nothing and opens 'cant open this page' .tried every possible solution of turning off my firewall my antivirus but nothing seems to work for me

SATYAM257:
and also mentioned a random MAC address to the Arduino Ethernet since MAC address was not mentioned on the box that I got along with Arduino Ethernet.

That’s correct, you can use any MAC address as long as it’s unique on the network.

SATYAM257:
The code gets compiled and uploaded perfectly and I’m also able to ping the ip address of the board on the command line, but when I open my browser and try to run using HTML then it does nothing and opens ‘cant open this page’ .tried every possible solution of turning off my firewall my antivirus but nothing seems to work for me

Post your code using code tags (</> button on the toolbar).

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

int led = 13;

// Enter a MAC address and IP address for your controller below.
// The IP address will be dependent on your local network:
byte mac = { 0x28, 0xF1, 0x0E, 0x3B, 0x7E, 0xF2 };
IPAddress ip(192, 168, 0, 48);
String readString;

// Initialize the Ethernet server library
// with the IP address and port you want to use
// (port 80 is default for HTTP):
EthernetServer server(80);

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

// start the Ethernet connection and the server:
Ethernet.begin(mac, ip);
server.begin();
Serial.print("server is at ");
Serial.println(Ethernet.localIP());

pinMode(led, OUTPUT); //initalize the led as an output
}

void loop() {
// listen for incoming clients
EthernetClient client = server.available();
if (client) {
Serial.println(“new client”);
// an http request ends with a blank line
boolean currentLineIsBlank = true;
while (client.connected()) {
if (client.available()) {
char c = client.read();
Serial.write(c);

//read char by char HTTP request
if (readString.length() < 100) {
//store characters to string
readString += c;
//Serial.print(c);
}

if (c == ‘\n’ && currentLineIsBlank) {
// send a standard http response header
client.println(“HTTP/1.1 200 OK”);
client.println(“Content-Type: text/html”);
client.println();
client.print("");
client.print("");
client.print("<a href="/?0"">Turn On LED");
client.print("<a href="/?1"">Turn Off LED
“);
client.print(”");
client.print("");
break;
}
}
}
// give the web browser time to receive the data
delay(1);
if (readString.indexOf("?0") >0){
digitalWrite(led, HIGH);
}
if (readString.indexOf("?1") >0){
digitalWrite(led, LOW);
}
}
}
</>

this is my code and instead of a relay I have substituted a led just to be sure whether its working or not

I have attached *.png files

ping - status I get after ping
ipconfig - ipconfigrations
tcpip - properties of lan network tcp/ip 6
unidentified network - lan network is unidentified
error - error shown after typing the ip address in explorer edge

I’m using windows 10 Microsoft edge/google crome / internet explorer

in serial monitor I get

server is at 192.168.0.48

all firewall and antivirus are off

I’m guessing there has to be some setting I need to do in order to lan to work with Arduino Ethernet module

any reply ??????????????

Fail on the code tags there buddy.

So actually you haven't managed to even get basic operation of the Ethernet working. Why are you worrying about some obscure and complex system of determining and sending out the MAC address?

actually I’m not into any course of this and tried solutions from various forums and amazon books and YouTube. its not a worry for me just a hobby. so any suggestions how I should proceed because my
issue is not with circuitry or basic coding understanding also for starters codes are available. its just the internet part that I’m stuck . any system would not be worth if I’m unable to connect it with internet. sir Just want to get clear understanding of this.
where should I look for solution.
i’m kind of new to it and its only after trying my level http://www.arduino.cc/best to get to solutions I got into your forum.

and I actually didn’t read how to post comments ,my fault. next time will click on top left hand side the smileys to post code.

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

int led = 13;

// Enter a MAC address and IP address for your controller below.
// The IP address will be dependent on your local network:
byte mac[] = { 0x28, 0xF1, 0x0E, 0x3B, 0x7E, 0xF2 };
IPAddress ip(192, 168, 0, 48);
String readString;

// Initialize the Ethernet server library
// with the IP address and port you want to use
// (port 80 is default for HTTP):
EthernetServer server(80);

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


  // start the Ethernet connection and the server:
  Ethernet.begin(mac, ip);
  server.begin();
  Serial.print("server is at ");
  Serial.println(Ethernet.localIP());

  pinMode(led, OUTPUT);              //initalize the led as an output
}


void loop() {
  // listen for incoming clients
  EthernetClient client = server.available();
  if (client) {
    Serial.println("new client");
    // an http request ends with a blank line
    boolean currentLineIsBlank = true;
    while (client.connected()) {
      if (client.available()) {
        char c = client.read();
        Serial.write(c);

        //read char by char HTTP request
        if (readString.length() < 100) {
          //store characters to string
          readString += c;
          //Serial.print(c);
         }           

        if (c == '\n' && currentLineIsBlank) {
          // send a standard http response header
          client.println("HTTP/1.1 200 OK");
          client.println("Content-Type: text/html");
          client.println();
          client.print("<html>");
          client.print("<body>");
          client.print("<a href=\"/?0\"\">Turn On LED</a>");
          client.print("<a href=\"/?1\"\">Turn Off LED</a>
");
          client.print("</body>");
          client.print("</html>");
          break;
        }
      }
    }
    // give the web browser time to receive the data
    delay(1);
    if (readString.indexOf("?0") >0){
               digitalWrite(led, HIGH);
    }
    if (readString.indexOf("?1") >0){
               digitalWrite(led, LOW);
    }
  }
}

hopefully this is the right way

My apologies. I mixed this thread up with another one I had responded to around the same time that was about getting the MAC address from the Ethernet controller and then sending it as an email. You're proceeding correctly.

sir I was able to connect but its taking too long to respond . the command is not switching off the led . it just keeps me waiting but does not respond.
I have attached the screen shot… does it usually take very long to respond … or can I modify code or setting to accept commands faster…
does it have anything to do with my ISP.I have used port 80 as default since its my home network.