How to configure Raspberry Pi Ethernet with Static IP Address
In case if you plan to set your Raspberry Pi with a static IP address, then follow the steps listed below:
Kindly make sure that you are logged into Raspberry Pi on command line (console or SSH) before proceeding.
Configuring a Static IP Address on Ethernet Port:
The file along with path where network information is stored on a Pi running Debian (Raspbian) is:
Edit this file using the following command:
sudo nano /etc/network/interfaces
The file will probably have the following default command for Ethernet to run on DHCP:
iface eth0 inet dhcp
Where eth0 is the Ethernet Interface that we plan to configure.
We will modify this line to the following:
iface eth0 inet static
We modified the dhcp to static in the line and then we add the network information.
Here address 192.168.10.72 is the static IP address we plan to assign to Raspberry Pi. For the Netmask, network, broadcast and gateway values please refer to the configuration of your own network.
Exit out (CTRL-X) and save (Y) the file.
Reboot your Raspberry Pi
Once the machine is rebooted, it will have the static IP address as listed above.