# Difficulties with static ip

**URL:** <https://discourse.nodered.org/t/difficulties-with-static-ip/44284>\
**Category:** General\
**Created:** [16 April 2021 12:57 UTC](https://discourse.nodered.org/t/difficulties-with-static-ip/44284 "2021-04-16T12:57:37Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![JereLehtonen](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@JereLehtonen](https://discourse.nodered.org/u/JereLehtonen)\
**Post date:** [16 April 2021 12:57 UTC](https://discourse.nodered.org/t/difficulties-with-static-ip/44284/1 "2021-04-16T12:57:38Z")

</div>

Hello all!

I'm currently trying to connect two local raspberry pis via Ethernet. My goal is to send my master raspberry pi node-red dashboard to slave raspberry pi. At first, I have succeeded with the task by connecting the raspberry's and set my slave raspberry chromium IP address (169.254.180.35). But the problem is that the ip address later on changes when rebooting, so i need to change the configurations again at the slave raspberry. I would like that the ip address stays the same. This isn't really my area of expertise, so I'm asking help 😄

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [16 April 2021 13:16 UTC](https://discourse.nodered.org/t/difficulties-with-static-ip/44284/2 "2021-04-16T13:16:21Z")

</div>

Welcome to the forum @JereLehtonen

This isn't a node-red issue at all, but if you look at [this blog](http://blog.clanlaw.org.uk/pi-headless-server.html) at the section " Optional - Set a fixed IP address" it shows you the options for setting a fixed IP. I know the blog is about setting up a headless server, but that doesn't matter, the section on setting the IP is ok for headless or GUI installations.

---

<div class="post-metadata">

**Author:** ![JereLehtonen](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@JereLehtonen](https://discourse.nodered.org/u/JereLehtonen)\
**Post date:** [19 April 2021 05:23 UTC](https://discourse.nodered.org/t/difficulties-with-static-ip/44284/3 "2021-04-19T05:23:32Z")

</div>

Hello Colin!  
And thank you for the fast reply!  
I tried the suggested method. Although the node-red pointed ip address to 127.0.0.1. I would like it to be 169.254.180.35:1880, so my additional raspberry can display the dashboard. Did i adjust the configurations wrongly?

```auto
interface eth0
static ip_address=169.254.180.35/24
static routers=169.254.180.1
static domain_name_servers=169.254.180.1 8.8.8.8

```

Thank you for helping with this "issue" 🙂

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [19 April 2021 08:46 UTC](https://discourse.nodered.org/t/difficulties-with-static-ip/44284/4 "2021-04-19T08:46:10Z")

</div>

Is that address within the DHCP range of the router? If so then it may also give that address to another device. You must choose an address outside the range configured in the router. If you think you have done that did you reboot after changing dhcpcd.conf?

If it still doesn't work what does  
`ip addr`  
show in a terminal. Also from the the other raspberry what does  
`ping theipaddress`  
show (with the appropriate address obviously)

---

<div class="post-metadata">

**Author:** ![Simon01011](https://avatars.discourse-cdn.com/v4/letter/s/e68b1a/32.png) [@Simon01011](https://discourse.nodered.org/u/Simon01011)\
**Post date:** [19 April 2021 08:58 UTC](https://discourse.nodered.org/t/difficulties-with-static-ip/44284/5 "2021-04-19T08:58:29Z")

</div>

I think you should use a different address range. The one you are using is for [APIPA](https://www.geeksforgeeks.org/what-is-apipa-automatic-private-ip-addressing/). You could use addresses like 192.168.10.XXX/24. Make sure both machines are on the same subnet!

---

<div class="post-metadata">

**Author:** ![JereLehtonen](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@JereLehtonen](https://discourse.nodered.org/u/JereLehtonen)\
**Post date:** [20 April 2021 05:36 UTC](https://discourse.nodered.org/t/difficulties-with-static-ip/44284/6 "2021-04-20T05:36:43Z")

</div>

Hello Colin,

Yes, I did the reboot, and i was able to change the ip address of the node-red. I tried to change the ip address to 169.254.180.35, but then node-red changed the ip address to 127.0.0.1 and couldn't connect to the slave raspberry. Then tried with the 192.168.10.XXX address and still didn't get the dashboard to the slave raspberry, which have display connected..

Should i create two separate programs to the slave and master raspberry's and communicate with mqtt for example?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [20 April 2021 08:03 UTC](https://discourse.nodered.org/t/difficulties-with-static-ip/44284/7 "2021-04-20T08:03:33Z")

</div>

> [@JereLehtonen](#):
>
> node-red changed the ip address to 127.0.0.1

127.0.0.1 is the ip address of localhost, which is how you address node-red when running the browser on the same machine as node-red.

You didn't answer any of these questions. There is no point me trying to help if you don't answer the questions.

> [@Colin](#):
>
> Is that address within the DHCP range of the router?
> 
> what does  
> `ip addr`  
> show in a terminal. Also from the the other raspberry what does  
> `ping theipaddress`  
> show (with the appropriate address obviously)

Also you have not addressed @Simon01011's point. Did you read the link he posted?

---

<div class="post-metadata">

**Author:** ![JereLehtonen](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@JereLehtonen](https://discourse.nodered.org/u/JereLehtonen)\
**Post date:** [20 April 2021 09:13 UTC](https://discourse.nodered.org/t/difficulties-with-static-ip/44284/8 "2021-04-20T09:13:08Z")

</div>

My apologies,

Yes i read the post which @Simon01011 posted, thank you for that. That is the reason why i changed target ip address to 192.168.10.XXX. Im sorry for not responding directly to your questions.

ip addr  
1: lo: \<LOOPBACK, UP, LOWER\_UP\> mtu 65536 qdisc noqueue state UNKNOW group default qlen 1000  
link/loopback 00:00:00:00:00 brd 00:00:00:00:00  
inet 127.0.0.1/8 scope host low  
valid\_lft forever preferred\_lft forever  
inet6 ::1/128 scope host  
valid\_lft forever preferref\_lft foverer  
eth0: \<BROADCAST, MULTICAST, UP, LOWER\_UP\> mtu 1500 qdisc pfifo\_fast state UP group default qlen 1000  
link/ether b8:27:eb:2e:e6:43 brd ff:ff:ff:ff:ff  
inet 169.254.180.35/16 brd 169.254.255.255 scope global noprefixroute eth0  
valid\_lft forever preferred\_lft forever  
inet6 fe80::71f2:1410:37ee:bd01/64 scope link  
valid\_lft forever preferred\_lft forever

/etc/dhcpcd.conf IP configuration is been commented out. Two raspberrys are connected via ethernet cable.

ping theipaddress gives Temporary failure in name resolution.

I will soon uncomment the dhcpcd.conf ip configurations and send you the data that ip addr gives.

Thank you for your patience 🙂

---

<div class="post-metadata">

**Author:** ![Simon01011](https://avatars.discourse-cdn.com/v4/letter/s/e68b1a/32.png) [@Simon01011](https://discourse.nodered.org/u/Simon01011)\
**Post date:** [20 April 2021 09:36 UTC](https://discourse.nodered.org/t/difficulties-with-static-ip/44284/9 "2021-04-20T09:36:50Z")

</div>

> [@JereLehtonen](#):
>
> eth0: \<BROADCAST, MULTICAST, UP, LOWER\_UP\> mtu 1500 qdisc pfifo\_fast state UP group default qlen 1000  
> link/ether b8:27:eb:2e:e6:43 brd ff:ff:ff:ff:ff  
> inet 169.254.180.35/16 brd 169.254.255.255 scope global noprefixroute eth0

This is still the wrong address I think...

These are two raspberries, right? Do you know raspi-config?

> **[Raspberry Pi Documentation - Configuration](https://www.raspberrypi.com/documentation/computers/configuration.html)**
>
> The official documentation for Raspberry Pi computers and microcontrollers

Use this tool to set your IP addresses like 192.168.10.10 for the first pi and 192.168.10.11 for the second one. Try if they can communicate with each other

---

<div class="post-metadata">

**Author:** ![JereLehtonen](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@JereLehtonen](https://discourse.nodered.org/u/JereLehtonen)\
**Post date:** [20 April 2021 10:45 UTC](https://discourse.nodered.org/t/difficulties-with-static-ip/44284/10 "2021-04-20T10:45:54Z")

</div>

Yea, I need to change the ip address back to 192.168.10.10. and change my slave raspberry to 192.168.10.11 to see how it works. Yea i know raspi-config, havent use it to be honest not so much. I will keep you updated (if interested) to see if this helps my project 😃

---

<div class="post-metadata">

**Author:** ![gerry](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gerry/32/21604_2.png) [@gerry](https://discourse.nodered.org/u/gerry)\
**Post date:** [20 April 2021 13:58 UTC](https://discourse.nodered.org/t/difficulties-with-static-ip/44284/11 "2021-04-20T13:58:25Z")

</div>

I see an obvious problem that may be overlooked. You realize you cannot connect two pi's directly together via an ethernet cable unless it is a crossover cable? If you don't have a hub or switch to connect to you must use a crossover cable.

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [20 April 2021 14:19 UTC](https://discourse.nodered.org/t/difficulties-with-static-ip/44284/12 "2021-04-20T14:19:08Z")

</div>

> [@gerry](#):
>
> You realize you cannot connect two pi's directly together via an ethernet cable unless it is a crossover cable?

Pi use auto sensing ethernet ports so no need for crossover cables

---

<div class="post-metadata">

**Author:** ![gerry](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gerry/32/21604_2.png) [@gerry](https://discourse.nodered.org/u/gerry)\
**Post date:** [20 April 2021 14:31 UTC](https://discourse.nodered.org/t/difficulties-with-static-ip/44284/13 "2021-04-20T14:31:13Z")

</div>

Good to know

---

<div class="post-metadata">

**Author:** ![Bigbloke](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bigbloke/32/40969_2.png) [@Bigbloke](https://discourse.nodered.org/u/Bigbloke)\
**Post date:** [23 April 2021 23:31 UTC](https://discourse.nodered.org/t/difficulties-with-static-ip/44284/14 "2021-04-23T23:31:58Z")

</div>

Hello,

If you merely need to view the dashboard on a remote Pi, you don’t need to “join them together.

If your master Pi is 192.168.x.y, then the dashboard is viewable on the second Pi by addressing 192.168.x.y:1880/ui.

I think this is the linkage that you are looking for.

Rick

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [24 April 2021 08:00 UTC](https://discourse.nodered.org/t/difficulties-with-static-ip/44284/15 "2021-04-24T08:00:05Z")

</div>

I believe that there is no router in the setup, just the two Pis.

---

<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:** [23 June 2021 08:00 UTC](https://discourse.nodered.org/t/difficulties-with-static-ip/44284/16 "2021-06-23T08:00:52Z")

</div>

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