No internet connection
  1. Home
  2. General

Setting static IP address

By @Lb12021-04-21 13:13:24.287Z

Hello, we have an environment where all of the IP addresses on our networks have to be static. I'm readying two Tiny Pilots to send to a remote location, and they need to have the IPs set for the network where they will live (no DNS). Everything is set up, except for setting the IPs for the destination network, and disabling writing to the MicroSD cards. The problem is that after I set the IP, I won't be able to test it again on the network here, and I won't have access to it in the remote location. I'm not that familiar with Linux, so is there someone who can help me set the IP addresses, and any other network information (default gateways, subnet masks, etc.) that has to be correct on the first try, when they boot it up there? Also, once I set the static IP here, can I still SSH in using the host name, and a wireless router with a different IP network than the static IP for the Tiny Pilot, to disable writing to the MicroSD card?
Thanks for your help.

  • 3 replies
  1. Michael Lynch @michael2021-04-21 21:43:48.032Z

    Interesting scenario!

    To set up a static IP, you can open /etc/dhcpcd.conf and add lines to specify the network configuration.

    In this example, the static IP I'm requesting is 10.0.0.222 and the router is at 10.0.01.

    interface eth0
    static ip_address=10.0.0.222
    static routers=10.0.0.1
    static domain_name_servers=10.0.0.1
    

    If you look in the examples of that file, you can see another option for a hybrid configuration where it tries DHCP first and falls back to a static IP if DHCP is unavailable. That might be useful for your scenario.

    Also, once I set the static IP here, can I still SSH in using the host name, and a wireless router with a different IP network than the static IP for the Tiny Pilot, to disable writing to the MicroSD card?

    No, if you're on a different network, you won't be able to access the device by hostname unless you configure the TinyPilot to join your VPN.

    Does the remote location have Internet access? If it does, I'd recommend setting up Tailscale on the TinyPilot and on your client machine. That way, you'll still be able to access the TinyPilot securely even when it's on a different network. If you want more control over the infrastructure, you could also use WireGuard, as Tailscale is just a friendly abstraction over WireGuard.

    You can also disable microSD writes before you ship. If you configure a static IP and then disable microSD writes, everything should still work when they boot it up at the remote location.

    I'd also recommend trying this process on a test network where you can still access the TinyPilot before you ship it off. You can set up a separate router that has the same IP subnet as the remote network you're shipping to, and that will provide an opportunity to verify that this will work how you expect.

    1. L@Lb12021-06-22 12:25:20.398Z

      Update: I set up two Tiny Pilots as described above (wireless router set to target IP address), and tested both with a Win10 desktop computer, and a Dell PowerEdge R420. I used a powered VGA-HDMI adapter on the server, and a straight HDMI cable on the Win10 box. Both worked, and I could control everything. I shipped one of the units to the remote location, and I have not been able to get video from that server. It is also a Dell PowerEdge R420. I have tried both the front and rear VGA ports, but the USB power cable has only been tried on one USB port on the back of the server. I will try another port when someone is back on site, to make the change.

      Right now, I can SSH into the Tiny Pilot, but I can't log into the web interface. It looks like it's letting me log in, but it says disconnected at the bottom of the display, and I can't reboot it with the GUI interface. I rebooted it through the SSH interface, but it still shows Disconnected. Do you have any ideas, other that powering it off?

      1. Michael Lynch @michael2021-06-23 20:19:59.111Z

        Sorry about that! I think you're hitting this bug:

        That's fixed in the latest version. Can you try updating via System > Update?