Static IP-address via LAN
I need to setup RatOS in an existing network which operates with static IP-addresses via LAN. How can I change the network configuration in RatOS?
4 Replies
Have the DNS provider give it a static IP address
Edit: yes, I meant DHCP, that's what I get for being tired from work
äh i think you mean dhcp?... but this doesn't exist /work at the moment .... i need to define an specific ip address, gateway dns etc. manually in the client network settings .... how could i do that in RatOS?
What do you mean it doesn't exist? Usually it is in the router you connect your pi to
If you set it in the pi itself, you will cause issues if you ever move it. Let DHCP do it's job
this is a buisness network and the dhcp server is operating with MAC address whitelisting and at the moment its easier for us to reuse existing ip-addresses from older devices that no longer exists in the network anymore...
i know this is a little bit dirty, and we will fix this in the future, but for now it's the quick and dirty workaround...
So I was hoping that if i edit the dhcpcd.conf file and fill in the ip address and mark the eth0 device as static, ratOS will use this address, but it doesn't...
Okay I find it out myself after a bunch of try and error...For everyone here is the way that worked:
1. connect to the RatOS wifi hotspot with a laptop or anything else and open a SSH session to the device. The default IP is the 192.168.50.1 as described in the RatOS doku
2. open the interfaces file in /etc/network/
with a texteditor like :
sudo nano /etc/network/interfaces
paste the followng text and replace the numbers with you correct addresses that you want to defined manually:
auto eth0
iface eth0 inet static
address xxx.xxx.xxx.xxx
netmask 255.255.255.0
gateway xxx.xxx.xxx.xxx
after a reboot if you relogin via ssh and type ifconfig you can see the addresses ar now static set