Here are the terminal commands to manually assign a static IP address to your network interface in Arch Linux:
Identify Your Network Interface: Use the
ip linkcommand to list all network interfaces and identify the one you’re using (e.g.,wlan0for Wi-Fi oreth0for Ethernet).ip linkBring the Network Interface Down: Replace
INTERFACEwith your network interface name (e.g.,wlan0).sudo ip link set INTERFACE downAssign a Static IP Address: Replace
INTERFACEwith your network interface name,192.168.1.10with the IP address you want to assign, and192.168.1.1with your router’s IP address.sudo ip addr add 192.168.1.10/24 dev INTERFACESet the Default Gateway: Replace
192.168.1.1with your router’s IP address.sudo ip route add default via 192.168.1.1Bring the Network Interface Up:
sudo ip link set INTERFACE upConfigure DNS (optional but recommended): Edit the
/etc/resolv.conffile to set your DNS server. You can use your router’s IP or a public DNS server like Google’s (8.8.8.8).sudo nano /etc/resolv.confAdd the following line:
nameserver 192.168.1.1Or for Google DNS:
nameserver 8.8.8.8
By following these steps, you should be able to manually assign a static IP address to your network interface in Arch Linux, allowing you to connect to your OpenWrt router for further configuration.