sudo nano /etc/network/interfaces.
"iface eth0 inet dhcp" with
iface eth0 inet static
The IP address can be of your choice. use CTRL+X to save and close the file. When asked for confirmation, enter 'Y' and hit ENTER. DO NOT FORGET TO REBOOT THE SYSTEM FOR CHANGES TO TAKE PLACE. After rebooting use the command "ifconfig" to check the IP address of RPI.
DHCP is Dynamic Host Configuration Protocol, where the IP address will get assigned dynamically. We are forcibly removing it and inducing an IP address of our choice.