first stop raspberry from getting ip from dhcp server
by uninstalling anoying package dhcpcd5

apt-get purge dhcpcd5 (removes all dhcp client config)

then do as root:

nano /etc/network/interfaces

look like this

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.2.18
netmask 255.255.255.0
gateway 192.168.2.1

now the dns server
 

/etc/resolvconf.conf

nameserver 192.168.2.1
nameserver 8.8.8.8
service networking restart
ping google.com (should work)


Leave a comment

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close