Static IP in ChirpStack OS - How to?

Hello,

For a test setup I would like to configure a static IP address (I am using the full Chirpstack OS in Rpi4). I found a few threads on this forum but unfortunately I have not been able to set a workable static IP.

In the folder /etc/network I modified the interfaces file with a static IP (see below).

iface eth0 inet static
  address 192.168.1.103
  netmask 255.255.255.0
  network 192.168.7.0
  gateway 192.168.7.1

Also changing the network and gateway to the same subnet does (after a reboot) not result in the static IP address as configured.

Any ideas or suggestions?

Thanks

So if it does not work thru the /etc/network/interfaces file I could imagine adding it to a list of commands executed at startup (as workaround)

Command to add: ifconfig eth0 192.168.1.103

Where can I configure / add this in the Chirpstack OS?

Hi,

don’t forget to flush your RPI4 dynamic IP assigned by your GW(ROUTER), between the reipl for your RPI4

Thanks. However I am using the full Chirpstack OS and the assignment of IP addresses is handled differently afaik.

Such a trivial topic taking so much time :sob: and becomes frustrating :nerd_face:

Please look into connmanctl, that might help you :slight_smile:

https://www.mankier.com/1/connmanctl#Example

Thanks Orne. Will have a look at it

My 2 cents of experience below

Set static IP settings in Chirpstack full OS

  • sudo su
  • cd /var/lib/connman
  • cd ethernet_dca632817e1c_cable (in my case)
  • cat settings (displays the current settings)

Change IP address to static (example)

  • connmanctl config <service> --ipv4 manual <ip address> <netmask> <gateway>
  • connmanctl config ethernet_dca632817e1c_cable --ipv4 manual 192.168.178.37 255.255.255.0 192.168.178.1
  • Changes immediately / if connected thru SSH the link will be broken directly and you have to ssh to new IP@
  • Do not change the settingsfile manually (changes effected the OS directly)

Good connman overview: https://variwiki.com/index.php?title=Static_IP_Address#Configuring_Static_IP
(also describes when you would like to use the /etc/network/interfaces instead of connman)

3 Likes

Would you like to create a PR to add this do the documentation (e.g. a new page under the “use” section)? https://github.com/brocaar/chirpstack-docs

Sure …good idea. Are you asking me todo this? :slight_smile:

Yes, if you would like to, that would be appreciated :slight_smile:

WIll pick it up during xmas holiday period

3 Likes