Raspberry Pi: static IP address

Environment
  • Raspberry Pi 3 model B

To set Raspberry Pi static IP address, e.g 192.168.0.100:

  • Modify /etc/network/interfaces
...
#iface eth0 inet dhcp
iface eth0 inet static
address 192.168.0.100
network 192.168.0.0
netmask 255.255.255.0
broadcast 192.168.0.255
gateway 192.168.0.1 
...
  • Add to /etc/dhcpcd.conf
...
interface eth0
static ip_address=192.168.0.100/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1

 

Leave a Reply

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