auto eth0:1 iface eth0:1 inet static address 192.168.0.30 netmask 255.255.255.0 broadcast 192.168.0.255 network 192.168.0.0 gateway 192.168.0.1With this I get a static IP address of 192.168.0.30 that I know I can always use to find my RPi but I also get the benefit of DHCP on (such as DNS config).
Monday, April 29, 2013
added static IP to Raspberry Pi to make it easy to find
I don't want to change the eth0 interface in the RPi to stop using DHCP because I like getting system config from DHCP. I don't want to set up DHCP reservations for my RPi because that's an extra step that doesn't provide any real advantage. To make my RPi easy to find, I've added this section to the end of the /etc/network/interfaces file.