Set Static IP for Raspberry Pi

sudo nano /etc/network/interfaces

Simply change the line that reads:

iface eth0 inet dhcp

to

iface eth0 inet static
Then directly below this line enter like the following
address 192.168.1.81
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.254
dns-nameservers 8.8.8.8 8.8.4.4
Then
sudo ./etc/init.d/networking restart
 or
sudo reboot

Log back in and run

ifconfig
Advertisements