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 8.8.8.8
    • address 192.168.1.81
    • netmask 255.255.255.0
    • broadcast 192.168.1.255
    • gateway 192.168.1.254
  4. Add the DNS server configs as below:
    • sudo nano /etc/dhcpcd.conf
    • Add the following : static domain_name_servers=172.26.1.50 8.8.8.8
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s