I'm able to connect to the local server when static IP is not set, however, as soon as I set a static IP on eth0 then I'm no longer able to reach the server by name. When I was configuring my static IP in /etc/network/interfaces
I was able to reach the server without issues but now when I follow the guides to set static IP in /etc/dhcpcd.conf
it no longer connect to server. I tried brand new Raspbian image so the /etc/network/interfaces
file is untouched and this is what I added at the end of /etc/dhcpcd.conf
file:
interface eth0
static ip_address=192.168.16.1/24
static routers=192.168.16.254
static domain_name_servers=192.168.10.100
How do I connect to the server even if I have static IP?
eth0
may also differ. – Milliways Oct 17 '17 at 23:06DHCP
was invented for precisely this reason, to simplify an administrator's life. – Milliways Oct 24 '17 at 00:55domain_name_servers
is on a different network from your Pi. Are you sure 192.168.10.100 shouldn't be 192.168. 16 .100? – Bob Brown Jan 06 '20 at 12:48