If your a Linux Power User, like me, you use SSH quite frequently. Don’t you hate it when you know the IP of the device you want to access, but all of a sudden the IP changes? That’s because your using DHCP, which is what your router generally defaults to. Look inside to find out more…….
Having a static IP is also necessary for server applications. If I, for example, were to host an Apache2 website on my Ubuntu Server, it would be impossible for me to do the correct port forwarding without a static IP address.
How to do it
Giving your Raspberry Pi a static IP is easy, and can be done without much hassle at all.
sudo nano /etc/network/interfaces
Clear all of the contents of the file, and copy the contents below – while filling in all of the necessary details.
iface eth0 inet static
address (IP you wish to set)
gateway (IP of Router)
nameserver (IP of Router)
If you have a Cisco router, like me, your default IP address is 192.168.1.1 . This is also the case with several other manufactures. A simple Google search will result you with the correct IP. You could also use Fing, a network scanner for iOS, that’s become incredibly handy for me.