How you set it can vary depending on what you’re running. Linux is all about choice, and choice means multiple ways to do a thing. Places to look:
raspi-config
- catchall CLI tool on Raspbian, not sure if it covers both of the following, but it’s a good option to start with- /etc/network/interfaces - the Debian way to do things
- Network Manager - usually used for desktops, but can be used by servers; if the first two don’t work, try this
But you could also have installed something different. If you post your OS and version and what you’re running on it, I can give better advice.
That said, normal networking rules apply:
- don’t set a static lease in your DHCP range, or you could get conflicts, which can look like it’s not working
- consider using DHCP and setting the static lease through your router; use the MAC address and you’ll never need to mess with network settings on the Pi
- if you set on the pi, make sure everything is correct (netmask, gateway, interface)
femtech@midwest.social 1 day ago
If you can I would set static IPs from the router though. That’s what I do as another device can still take the IP and cause issues.
sugar_in_your_tea@sh.itjust.works 1 day ago
At least set it outside your DHCP range.
I have my DHCP set to use from
.100
and up, and my static addressee are in the.1-99
range.I still set it through my router so I have a place to look up which one is which (they’re piling up), but they’re all in that range.
Appoxo@lemmy.dbzer0.com 1 day ago
Too bad when the DHCP server is down with the proxmox host ;)