Hello, I am using RockPiS and currently need to set static IP for port eth0. I tried to do according to the guide online. But I cannot find the configuration file /etc/network/interfaces , Is there any specific way to set IP on RockPi or I need to create the file to get it work?
I am using Debian Buster system and with DHCP the RockPi works well without any issue.
On Armbian, Network manager is the primary tool, but you can actually also set it up via /etc/network/interface or simply use armbian-config utility â network.
Thank you for the reply! I did a check and found the network service is missing and there is only Network Manager service. I will try to install and check again.
Hi thanks a lot for your help. As we have Network Manager I tried also on this way:
nmcli con mod connection_name ifname eth0 type ethernet ip4 10.x.x.x/24 gw4 x.x.x.x
nmcli con mod connection_name ipv4.address 10.x.x.x
nmcli con mod connection_name ipv4.method manual
nmcli con mod connection_name connection.autoconnect yes
nmcli con up connection_name
This really works. I put something easier to understand.
ip a
sudo nmcli connection show
sudo nmcli con add con-name âwiredLabâ ifname eth0 type ethernet
sudo nmcli connection modify âwiredLabâ ipv4.address 192.168.0.104/24 ipv4.gateway 192.168.0.1 ipv4.method manual
sudo nmcli connection up âwiredLabâ
sudo nmcli connection show
ip a
ping www.baidu.com
sudo nmcli con add con-name âwiredHomeâ ifname eth0 type ethernet
sudo nmcli connection modify âwiredHomeâ ipv4.method auto
sudo nmcli connection up âwiredHomeâ
sudo nmcli connection show
ip a
ping www.baidu.com #configure automatically on when the OS restartă
sudo nmcli connection modify âwiredLabâ connection.autoconnect yes
sudo nmcli connection modify âwiredHomeâ connection.autoconnect no