I have arch-linux-arm running on a raspberryPi.The network I am in uses static IPs.gateway IP is 192.168.178.5IP for my device is 192.168.178.201 To connect to the internet I use:ip addr add 192.168.178.201 dev eth0ip route add default via 192.168.178.5However the latter yieldsRTNETLINK answeres: Network is unreachableWhat am I missing?UPDATEmtak's answer fixed the initial problem,however I still cannot reach the gateway.Attempting to ping result in destination host unreachable
Trying to connect to gateway in static ip network
networking;arch linux;ip;routing;raspberry pi
You need to add a subnet mask when you add the IP address. Now the system will think the IP is a /32, which does not include the ip 192.168.178.5, therefore it's unreachable.To add the new IP address with a subnet mask:ip addr add 192.168.178.201/24 dev eth0