How do I figure out how to connect to my arduino using ethernet shield?

It prints the IP in the serial monitor, but it doesn't work, and adding the port doesn't make a difference.

The client example works, so it's not broken or anything.

I'm using Arduino 1.6.5 IDE on a Mega 2560. I'm trying to run the Examples/Ethernet/WebServer example.

  • 1
    Please state which Arduino you have. Also which version of the IDE. You need to run one of the "server" examples, please state which example you are trying.
    – Nick Gammon
    Aug 24, 2015 at 20:44
  • @NickGammon Like this?
    – Lara
    Aug 24, 2015 at 22:34
  • What IP address are you using? What are you typing into your web browser? What do you see in the Serial Monitor?
    – Nick Gammon
    Aug 24, 2015 at 23:37
  • @NickGammon That's in the original post: "It prints the IP in the serial monitor, but it doesn't work, and adding the port doesn't make a difference." Meaning I take the printed ip. using ip:port doesn't work either.
    – Lara
    Aug 25, 2015 at 1:26
  • It prints the IP in the serial monitor - I'm not asking you to describe what you see. Please copy and paste it. What IP addresses are you using on your local LAN? For example, do you see a message like "new client"?
    – Nick Gammon
    Aug 25, 2015 at 2:22

1 Answer 1


Your question is kind of trivial, but from what I understood you're typing the IP address (that the Arduino displays on the serial monitor) into your browser.

First, make sure you connect your Ethernet shield to your router using an ethernet cable. (Now it's connected locally...)

Second, even if you type in your Arduino's IP address into the browser, the browser will return nothing because the Arduino simply has nothing to display, and hasn't been programmed to accept requests.

To actually have the Arduino display something you can try the Webserver example sketch or you can follow this great Tutorial that I found very useful for beginners.

BTW ports are only used to expose your Arduino to the Internet, in other words if you don't portforward to your Arduino, your Arduino won't be able to get requests from outside your local network (Wi-Fi,Ethernet).

  • Like I stated in the question, I'm using the webserver example sketch. I also portforwarded my arduino.
    – Lara
    Aug 25, 2015 at 22:23
  • I think it would be more accurate to say that ports are used to identify the service running on the Arduino (for example to differentiate between HTTP and NTP). Port forwarding happens on the router and makes a service running on an internal host (at a private IP address such as or visible from the "outside world" (the WAN interface).
    – dlu
    Nov 24, 2015 at 4:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.