Help setting up static IP

Hey all,
I am a new user and very new to networking. I could use some help setting up the static IP for my device properly to communicate with a modem-router combo. There are several devices that will be connected to this router that communicates with a wireless modem that I have the LAN set with a range of allowable static IP’s (for instance, 4 address from 192.168.1.2-192.168.1.4, where 192.168.1.1 is saved for the modem I believe). I tried to set the static IP by enabling it in the network settings, but I wasn’t sure what to set for the DNS server. Any help is appreciated.
I did find this page on the RS website:
https://manual.raspberryshake.org/staticip.html
but it doesn’t give much explanation on how to properly set up, granted many use cases will vary drastically.
Thanks in advance!

1 Like

If you don’t have your own, or some other DNS that you want to use, you can use a couple of publicly available ones:

Cloudflare: 1.1.1.1 or 1.0.0.1
Google: 8.8.8.8 or 8.8.4.4

Both of those are reliable.

2 Likes

Hello jpschmidt8,

Yes, some modems will use 192.168.1.1, others will use 192.168.1.254 (or .255), but that should be easy to check, as it has to be written on the manual on your modem/router. It is, usually, the address that you would type in the browser bar to access the modem/router admin/settings page.

As Philip has indicated, any of those DNS servers is more than good, and we have found that they are very reliable in terms of stable connection. If a server is not found, however, the new improvements in our Shake OS will add one of these automatically, so that you can proceed in configurating what you need without too many problems.

jpschmidt8:

Before you act, read Shutdown, remove UPS, reboot - Server Connection: Not Connected

Then you can tell me how to fix it when your unit breaks when you give it a static IP address via the web server option.

I hadn’t seen that staticip.html page, it may be very useful to me.

I’ve been dealing with a lot of other non-seismic stuff. I might be able to get back to it this week.

2 Likes

Hey Stormchaser,

So I have tried to intialize the static IP from the URL page on the RS3D. I tried setting the IP to some IP (example 192.168.1.2) and because I have this instance connected to a wireless cell modem/router combo, I input the LAN IP of the modem as the DNS. When the system reboots, the RS3D gets a 169.128… IP which indicates that the device was unable to resolve the static IP. I checked in the /etc/dhcpcd.conf file and found that those lines had been inserted at the top, but the URL page doesn’t show that the RS3D is in static IP mode. What I have found is that I have to set my modem as a server to serve a range of IP’s that if I set the range to a single IP (i.e. 192.168.1.3 to 192.168.1.3), then the RS3D then takes the only available dynamically assigned IP. This doesn’t work well for my use case because I need the IP to be static to allow access to the device through the proper ports. I have a case I will be installing shortly where I will have two rasberry shakes operating at the same router and the chance that having a shake be randomly assigned is not going to work well with streaming data to EW. I was speaking to a networker and he indicated that if the static IP were to be set, usually there would be a need to indicate the subnet mask, as well as the default gateway which the URL for setting a ethernet static IP does not mention.

I am not a networker so I really don’t fully understand a lot of this, but please let me know if you need more information to understand my use case.

Thanks for the help thus far!

1 Like

hi jp,

i would like to suggest a different method for this use case:

instead of assigning the static IP on the shake itself (and when that goes wrong, not easy to figure out why), try assigning the static IP on the router using the function of assigning a specific IP by MAC Address of the device; most routers have this option available.

if so, this is easily done with the following steps:

  1. configure the router to nothing in relation to assigning IP addresses (for shakes)
  2. configure the shake to get a dynamic assigned IP by the router
  3. reboot the shake - it should boot up with the dynamic IP assigned by the router
  4. on the router admin interface, go to the page of connected devices and configure the shake (identified by its MAC address) to be assigned a static IP, to be used every time it connects to the router
  5. reboot the shake - it should now be assigned the the static IP you defined on the router

in this manner, you can have any number of shakes connected to the same router, where the IP management is on the router itself, where it should be. in this configuration the shake remains a DHCP client and merely does what it is told to do by the router.

hope this helps,
richard

2 Likes

I have been biting my tongue and keeping out of this discussion (so far).
But I agree with Richard on this. Not because it is the “right” answer, but because it is the answer which works with Raspbian.

The Raspbian (Raspberry-PI OS) dev. team have their own ideas about how things should work. They replaced the network network initialization code from Debian with their own, concentrated in dhcpd as far as I can tell. Even when you configure a “static” IP following their procedure, it actually doesn’t configure the interface until it has contacted a DHCP server and registered the address that it wants to use.

This isn’t how static IPs are supposed to work. Real static IPs have no dependencies on DHCP. I tried to raise this issue, but they insist that is how networks work, they all have a DHCP server … all I can say is that they have led very sheltered lives.

2 Likes

Sounds good. Sounds easy. How the heck do we do that?

IIRC, the RS web config page to set a static IP address doesn’t include an option to change back to DHCP. From my support issue (getting lively again) and from staticip.html, is it just a matter of removing the lines that the later says to add?

If you look at the configuration of the DHCP server in your router (or wherever…), you should find a table of allocated IPs. Usually somewhere around there is a means of adding a new entry. You add a new entry, using the MAC address of your device, the IP you want it to have and an expiration of “Never” (or whatever term they choose to use).

Your device will do a normal DHCP request on startup, but always get the same IP allocared, with no renewal time associated.

Exactly how you do it varies with every implementation, but poke around in the DHCP server config and it should be fairly obvious when you find it.

1 Like

Hey Ivor,
This does appear to work well as a work-around for us for now going forward. Thank you for the help.

2 Likes

hi,

changing back to DHCP (dynamically allocated IP address), all you have to do is un-check the “Enable Static IP” option; at next boot it will revert to DHCP.

cheers,
richard

image

1 Like

I disagree, at least with my RSnB. I originally got in trouble by checking that box and entering an IP address. Upon reboot, the main system started routing through a virtual machine. Meanwhile, the config page still had the Enable Static IP box unchecked.

I think I have things back under control, see my post for details (comment out the lines added to /etc/dhcpcd.conf).

2 Likes

This is a good point as well. I noticed the /etc/dhcpcd.conf has prepended lines of

interface eth0
static ip_address=some user-defined ip
static routers=some user-defined ip
static domain_name_servers=some user-defined ip

I just comment each of these lines out in “VI” then save that file and reboot.

2 Likes

Yes, I made a backup copy of /etc/dhcpcd.conf first (I don’t trust my vi skills, even for something trivial).

I think the config page “Enable Static IP” is Just Plain Broken and should be either fixed or removed.

2 Likes