# DNS address assignment on the internal network

**URL:** <https://discourse.nodered.org/t/dns-address-assignment-on-the-internal-network/28511>\
**Category:** General\
**Created:** [18 June 2020 03:09 UTC](https://discourse.nodered.org/t/dns-address-assignment-on-the-internal-network/28511 "2020-06-18T03:09:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joaovitor](https://avatars.discourse-cdn.com/v4/letter/j/3ab097/32.png) [@Joaovitor](https://discourse.nodered.org/u/Joaovitor)\
**Post date:** [18 June 2020 03:09 UTC](https://discourse.nodered.org/t/dns-address-assignment-on-the-internal-network/28511/1 "2020-06-18T03:09:39Z")

</div>

Well, I am running node-RED on my local machine.

I can access node-RED easily from other devices, but I have a problem: it is common for the router to assign my machine (pc with win 10) from time to time dynamic ip addresses.

When this happens, I have to check the new ip to access node-RED again, a repetitive task that I believe is unnecessary.

I was wondering: wouldn't there be a way to mask the dynamic ip with a local DNS address? I believe that even if the numerical address changes, I can access the application by the DNS address.

Would it be like, or would it be my illusion?

Thanks for the help.

---

<div class="post-metadata">

**Author:** ![SteveMann](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stevemann/32/3810_2.png) [@SteveMann](https://discourse.nodered.org/u/SteveMann)\
**Post date:** [18 June 2020 03:36 UTC](https://discourse.nodered.org/t/dns-address-assignment-on-the-internal-network/28511/2 "2020-06-18T03:36:50Z")

</div>

DNS is Domain Name Server (or Service- I've seen both). There is no DNS address.

Just put your Pi name and address in the Hosts file on the PC. If your router is changing the IP address of the Pi- I assume you're using a Pi- then make the DHCP assignment static on the router. The method differs for different routers. In mine it's called a "fixed DHCP lease".

In Windows 10, the hosts file is located in `C:\Windows\System32\drivers\etc`

To edit the Windows hosts file, open a Command Prompt as administrator. Right-click on the Window icon and select **Command Prompt (Administrator)**  
Navigate to **C:\Windows\System32\drivers\etc**. Then use notepad to edit the file: `notepad hosts`

In my hosts file, for example, I have an Intel Nuc named "Nuc", and the hosts file line is: `192.168.1.64	nuc`. Now, from that PC, I can `ssh nuc` or enter `nuc:8123` in the browser address field to open Home Assistant, 'nuc:1880' to open Node-Red.

You should put the same data into the hosts files of all PCs on your local net.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [18 June 2020 06:04 UTC](https://discourse.nodered.org/t/dns-address-assignment-on-the-internal-network/28511/3 "2020-06-18T06:04:59Z")

</div>

He's not running a Pi.

Either, most routers allow you to configure them to give a fixed ip address to certain devices (by detecting their Mac address), or you can just fix your machines IP address to be a static address, or you could install Apples bonjour print services on all windows machines and then you machine will be addressable as its hostname.local. eg mypc.local

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [17 August 2020 06:05 UTC](https://discourse.nodered.org/t/dns-address-assignment-on-the-internal-network/28511/4 "2020-08-17T06:05:10Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
