Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Assigning a non-local Ip address

Status
Not open for further replies.

EOJ

Member
So I'm playing around with this arduino project:

**broken link removed**

Basically I can take temperature and humidity readings and calculate the dew point and have them displayed on the internet using an Ethernet shield.

The problem is when I figured out how to assign the sensor/ethernet shield an IP address, it turns out its a local ip address which prevents me from accessing the readings from a device outside my LAN.

My question is how can I assign the ethernet/sensor a global ip address that would allow me to view the readings from anywhere?

The ethernet/sensor is operating though my wireless router at home. If you can, please include relevant websites PDFs, articles, that my be of help.

Thanks again.
 
In keeping it simple there are two types of IP (Internet Protocol) addresses. There are Fixed and Dynamic. Your ISP (Internet Service Provider) assigns your IP address and unless you are paying a premium for a fixed web address you have a dynamic IP address which periodically changes. For example do a Google of "get my ip address" will bring up your current IP address later it may be different and by tomorrow different again. A dynamic IP address changes. Your ISP can assign you a "fixed" IP, usually at an expensive cost. A fixed IP address does not change. That is where you need to start. You create a web page and the arduino sends data to the Ether Shield and the shield is assigned a static IP address.

You can try getting a fixed IP from a third party. A Google of "third party static ip" will get you going. This method is popular for people using WordPress and similar software.

Something else to read up on is port forwarding.

Ron
 
Last edited:
Yes...port forwarding...that's why I ask for the model number of the router...

That might work and be a quick. easy and low cost solution. Should work. Cool thinking on that one.

Ron
 
There are four types of IP addresses. Fixed vs. dynamic. Local (non-routable or private) vs. public, routable addresses. Two times two is four.
 
If your local IP device is serving web pages on port 80 then you need to port forward a port on your routers external IP to port 80 on your local IP.

I.e. if your local device is 192.168.1.123 and your external is 80.123.123.123 then you tell your router (for example) to forward port 1234 on the external IP to port 80 on the 192.168.1.123 device.

Then from a browser anywhere in the world you could type **broken link removed** and it would route the traffic correctly. I run a number of web and email servers through various ports for various devices.
 
If your local IP device is serving web pages on port 80 then you need to port forward a port on your routers external IP to port 80 on your local IP.

I.e. if your local device is 192.168.1.123 and your external is 80.123.123.123 then you tell your router (for example) to forward port 1234 on the external IP to port 80 on the 192.168.1.123 device.

Then from a browser anywhere in the world you could type **broken link removed** and it would route the traffic correctly. I run a number of web and email servers through various ports for various devices.

Thanks for sharing. Something I just never got into.

Ron
 
I probably haven't explained it brilliantly but 90%+ of the information needed to let internal network devices free on the big World Wide Web is in my post :)
 
Although not you initial question: see Amazon Web Services https://aws.amazon.com/documentation/ for a whole new ball of wax to play with.

For your other question, you will need a DYNDNS (Dynamic DNS) https://dyn.com/dns/?rdr=dyndnsorg running somewhere (a good place is your router), So, whenever your IP address changes, your assigned easy to remember name will point to your home instead of someone elses's. This is just one provider.

But, the basic idea is to forward a port with your router to the private IP address and port (can be different).

HTTP is port 80 and well-known ports have a "service" associated to it. You may not want http: to point to your datalogger, so you could use mydynamicaddressname:99 where the public port 99 is forwarded to the private IP 192.168.1.100:80

FWIW: There's lots of issues trying to email from devices on your network.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top