Setting a static IP address on the Raspberry Pi running Jessie Lite

networking

Jeff Geerling has discovered in his work on the Raspberry Pi Dramble cluster that Raspbian Jessie does networking a bit differently. Whereas before (with Wheezy) it was just a case of adding some lines to /etc/network/interfaces, now you need to add some lines to /etc/dhcpcd.conf to make dhcpcd5 set the static IP address. He’s blogged about it here but just for posterity (in case his blog disappears, as others have), here are the essentials for setting a static IP for your wired connection:

So, in /etc/network/interfaces, you add:

auto lo
iface lo inet loopback
iface eth0 inet static
  address 10.0.1.60/24
  netmask 255.255.255.0
  gateway 10.0.1.1
  dns-nameservers 8.8.8.8 8.8.4.4

And then to /etc/dhcpcd.conf you add:

interface eth0
static ip_address=10.0.1.60/24
static routers=10.0.1.1
static domain_name_servers=8.8.8.8 8.8.4.4

This should give you a static IP of 10.0.1.60.

He has some other tips on his blog, so head over there if you want to read more.

4 comments for “Setting a static IP address on the Raspberry Pi running Jessie Lite

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.