Setting Static IP in Raspberry PI

Setting static IP for Raspberry PI devices:

  1. Open the interfaces file
    • sudo nano /etc/network/interfaces
  2. You will find something written as
    • iface eth0 inet manual
    • change it to – iface eth0 inet static
  3.  Add the following after iface eth0 inet static as per the values:
    • dns-nameservers
    • address
    • netmask
    • broadcast
    • gateway
  4. Add the DNS server configs as below:
    • sudo nano /etc/dhcpcd.conf
    • Add the following : static domain_name_servers=